/* V4 synchronizes the IDE workbench with the site theme, including fallback editors.
   Monaco is synchronized by its JS theme observer. iframe preview remains project-defined. */
html:not([data-theme="dark"]) .ide38-page{--ide-bg:#ffffff;--ide-panel:#f4f7fc;--ide-panel2:#eaf1fa;--ide-border:#d4dfed;--ide-text:#19314f;--ide-muted:#506786;--ide-highlight:#dceaff;--ide-accent:#2563eb}
html:not([data-theme="dark"]) .ide38-shell{background:#fff;border-color:#d4dfed}
html:not([data-theme="dark"]) .ide38-activity{background:#e9eff8}
html:not([data-theme="dark"]) .ide38-activity button{color:#344f74}
html:not([data-theme="dark"]) .ide38-sidebar{background:#f4f7fc}
html:not([data-theme="dark"]) .ide38-sidehead,html:not([data-theme="dark"]) .ide38-file,html:not([data-theme="dark"]) .ide38-extension label,html:not([data-theme="dark"]) .ide38-setting{color:#233b5b}
html:not([data-theme="dark"]) .ide38-file.active,html:not([data-theme="dark"]) .ide38-file:hover{background:#dceaff;color:#123969}
html:not([data-theme="dark"]) .ide38-setting select{color:#233b5b;background:#fff;border-color:#cbd7e7}
html:not([data-theme="dark"]) .ide38-tabs{background:#eaf1fa}
html:not([data-theme="dark"]) .ide38-tab{color:#385777}
html:not([data-theme="dark"]) .ide38-tab.active{background:#fff;color:#153e7c}
html:not([data-theme="dark"]) .ide38-shell .ide38-editor-box,html:not([data-theme="dark"]) .ide38-shell .ide38-fallback{background:#fff!important}
html:not([data-theme="dark"]) body .portal-main .ide38-page .ide38-fallback-textarea{background:#fff!important;color:#1a2942!important}
html:not([data-theme="dark"]) body .portal-main .ide38-page .ide38-fallback-numbers{background:#f3f6fb!important;color:#687e9d!important}
html:not([data-theme="dark"]) .ide38-shell .ide38-terminal-panel{background:#f5f8fd!important;color:#183657!important;border-color:#d3ddea}
html:not([data-theme="dark"]) .ide38-shell .ide38-terminal-bar{background:#eaf1fa;color:#38506d;border-color:#d4dfeb}
html:not([data-theme="dark"]) .ide38-shell .ide38-term-tab,html:not([data-theme="dark"]) .ide38-shell .ide38-terminal-bar #run-status,html:not([data-theme="dark"]) .ide38-shell .ide38-terminal-bar button{color:#2d4f79}
html:not([data-theme="dark"]) .ide38-shell .ide38-terminal-body,html:not([data-theme="dark"]) .ide38-shell .ide38-terminal-log{background:transparent!important;color:#17375c!important}
html:not([data-theme="dark"]) body .portal-main .ide38-page .ide38-terminal-input input{color:#17375c!important;border-color:#9bb2cc!important}
html:not([data-theme="dark"]) .ide38-prompt-mark{color:#126f5a}
/* Web Studio: editable source light in light theme, true dark in dark theme. */
html:not([data-theme="dark"]) .web39{--editor-bg:#fff;--editor-panel:#f1f5fb;--editor-text:#19314d;--editor-muted:#536b8a;--editor-border:#d5e0ed;--editor-blue:#2164cb}
html:not([data-theme="dark"]) .web39-workbench{background:#fff;border-color:#d5e0ed}
html:not([data-theme="dark"]) .web39-filetabs,html:not([data-theme="dark"]) .web39-preview-pane{background:#f1f5fb}
html:not([data-theme="dark"]) .web39-filetabs button{color:#3c5879}
html:not([data-theme="dark"]) .web39-filetabs button.active{background:#fff;color:#163c6b;border-top-color:#246fe1}
html:not([data-theme="dark"]) body .portal-main .web39 .web39-code-fallback{background:#fff!important;color:#1b2941!important}
html:not([data-theme="dark"]) .web39-code-status{background:#e0ebfb;color:#254c7d}
html:not([data-theme="dark"]) .web39-previewbar,html:not([data-theme="dark"]) .web39-consolebar{color:#1d3c62}
html:not([data-theme="dark"]) .web39-preview-devices button{color:#365270;border-color:#bed0e5}
html:not([data-theme="dark"]) .web39-preview-devices button.active{color:#fff;background:#236de5}
html:not([data-theme="dark"]) .web39-frame-wrapper{background:#e2eaf4}
html:not([data-theme="dark"]) .web39-console-log{color:#253e5d}
html:not([data-theme="dark"]) .web39-log-info{color:#2258a4}
html:not([data-theme="dark"]) .web39-log-error{color:#b42336}
html:not([data-theme="dark"]) .web39-log-warn{color:#956016}
