/* Editor chrome only: media and client preview button artwork retain their colors. */
:root { color-scheme: light; }
.brand-name { font-size:15px; letter-spacing:1.5px; white-space:nowrap; }
@media(max-width:520px) { .brand-name { font-size:10px; letter-spacing:.5px; } }
.header-actions #themeToggle { width:34px; min-width:30px; padding:4px; font-size:19px; line-height:1; flex-shrink:0; }
:root[data-theme="dark"] {
  color-scheme:dark;
  --bg:#101922; --panel:#1b2b39; --line:#354e61;
  --ink:#e4edf4; --muted:#a0b3c3; --accent:#287497;
  --pale:#213f52; --green:#82cbbb; --blue:#8bbddd;
  --input:#10222e; --hover:#263f51; --focus:#6dd4ff;
  --soft:#172632;
  scrollbar-color:#486477 #14222e;
}
:root[data-theme="dark"] ::selection { background:#287497; color:#fff; }
:root[data-theme="dark"] :is(input,select,textarea) { background:var(--input); border-color:#476477; color:var(--ink); }
:root[data-theme="dark"] :is(input,textarea)::placeholder { color:#91a8b9; opacity:1; }
:root[data-theme="dark"] :is(input,select,textarea):focus { outline-color:var(--focus); border-color:var(--focus); box-shadow:0 0 0 3px #6dd4ff16; }
:root[data-theme="dark"] button:focus-visible { outline-color:var(--focus); }
:root[data-theme="dark"] button:not(.overlay):not(:disabled):hover { background-color:var(--hover); }
:root[data-theme="dark"] button.primary { background:var(--accent); border-color:#3683a5; color:#fff; box-shadow:0 3px 10px #0002; }
:root[data-theme="dark"] button.primary:not(:disabled):hover { background:#3285aa; }
:root[data-theme="dark"] :is(.app-header,.sidebar,.inspector,.main-toolbar,.timeline,.route-card,.asset-card,dialog) { background:var(--panel); border-color:var(--line); }
:root[data-theme="dark"] .app-header { box-shadow:0 1px 10px #0002; }
:root[data-theme="dark"] .brand { color:var(--ink); }
:root[data-theme="dark"] .brand-mark { background:linear-gradient(145deg,#3389ad,#205774); box-shadow:0 5px 12px #0003; }
:root[data-theme="dark"] :is(.brand small,.chapter-card small,.chapter-card span,.stage-heading small,.asset-heading small,.manager-heading small) { color:#9cbcd0; }
:root[data-theme="dark"] :is(.version,.library-button,.entry-mark,#typeBadge,.project-status,.side-heading b) { background:var(--pale); color:#9ed8f3; border-color:var(--line); }
:root[data-theme="dark"] :is(.project-title,.main-footer,.inspector-footer,.graph-tools,.dialog-head,.path-chip) { background:var(--soft); border-color:var(--line); }
:root[data-theme="dark"] #saveState { color:#a3cbbb; }
:root[data-theme="dark"] .unsaved { color:#f3c27f!important; }
:root[data-theme="dark"] :is(.project-title .live-dot,.live-dot) { background:#78c8ac; }
:root[data-theme="dark"] .chapter-card { background:linear-gradient(125deg,#213c50,#1b2e3f); border-color:#3a566c; }
:root[data-theme="dark"] .chapter-card:after { color:#67b9e218; }
:root[data-theme="dark"] :is(.chapter-card strong,.stage-heading h1,.timeline-head strong,.field-section h3,.inspector-heading,.graph-node strong,.asset-heading h1,.asset-info strong,.manager-heading h2,.project-tile h3,.new-project-banner h3,.export-intro h3,.export-options strong,.guide-step h3,.dialog-head h2,.empty-library h2,.empty-library h3,.inspector-empty h3) { color:var(--ink); }
:root[data-theme="dark"] :is(.side-heading,.sidebar-path,.node-item,.node-text small,.transport,.main-footer,.tabs button,.toolbar-actions,.field>span,.check-field,.hint,.node-id,.inspector-empty,.graph-node small,.asset-heading p,.asset-toolbar span,.asset-info small,.empty-library,.manager-heading p,.project-tile p,.project-tile small,.new-project-banner p,.export-intro p,.export-options span,.guide-step p,.path-chip,.dialog-head button) { color:var(--muted); }
:root[data-theme="dark"] :is(.chapter-card #switchProjectBtn,.sidebar-tools button,.toolbar-actions #checkBtn,.graph-tools button,.timeline-head button,.asset-actions button:first-child) { background:var(--input); border-color:var(--line); color:#bcd8e8; }
:root[data-theme="dark"] .node-item.active { background:var(--pale); color:#b6e6fc; }
:root[data-theme="dark"] .node-item:hover { background:var(--hover); }
:root[data-theme="dark"] .node-icon { background:#1b3938; border-color:#3c6661; color:#93d3c6; }
:root[data-theme="dark"] .node-icon.choiceNodes { background:#3b3329; border-color:#716048; color:#e5c392; }
:root[data-theme="dark"] .node-icon.jumpNodes { background:#233c52; border-color:#426482; color:#a4cdea; }
:root[data-theme="dark"] .tabs button.active { color:#89d7f7; border-color:#62bedf; }
:root[data-theme="dark"] .mode-switch { background:#10222e; }
:root[data-theme="dark"] .mode-switch button { color:var(--muted); }
:root[data-theme="dark"] .mode-switch button.active { background:#28536b; color:#e4f5ff; box-shadow:0 2px 5px #0002; }
:root[data-theme="dark"] .stage-area { background-color:#111e29; background-image:radial-gradient(#2d4355 .7px,transparent .7px); border-color:var(--line); }
:root[data-theme="dark"] .stage { background:#0b131b; box-shadow:0 10px 26px #0004; }
:root[data-theme="dark"] #stageEmpty { background:linear-gradient(125deg,#152635,#203749); color:#b7cbd9; }
:root[data-theme="dark"] #stageEmpty span { color:#9ed8f3; border-color:#48687f; }
:root[data-theme="dark"] .transport .play-button { background:var(--pale); border-color:#3d6075; color:#b6e6fc; }
:root[data-theme="dark"] .track-bed { border-left-color:var(--line); background:repeating-linear-gradient(90deg,transparent,transparent calc(10% - 1px),#304655 calc(10% - 1px),#304655 10%); }
:root[data-theme="dark"] .track-bar { background:#24465c; color:#c2e1f3; border-color:#46708b; }
:root[data-theme="dark"] .track-bar.active { background:#306b8a; color:#fff; border-color:#70c6eb; }
:root[data-theme="dark"] .route-card { color:#c2d4e2; }
:root[data-theme="dark"] .route-card:hover { border-color:#5d9bb8; }
:root[data-theme="dark"] :is(.field-section,.manager-actions,.guide-step) { border-color:var(--line); }
:root[data-theme="dark"] .feature-section { background:linear-gradient(135deg,#213b50,#1c3343); border-color:#38596f; }
:root[data-theme="dark"] :is(.inspector-empty>span,.project-number,.project-arrow) { color:#81a5bc; }
:root[data-theme="dark"] .connection button:last-child { color:#e8aa9b; }
:root[data-theme="dark"] #graphViewport { background-color:#111d27; background-image:radial-gradient(#354d5f .8px,transparent .8px); }
:root[data-theme="dark"] .graph-node { background:#1b2b39; border-color:#456376; box-shadow:0 4px 12px #0003; }
:root[data-theme="dark"] .graph-node.choiceNodes { background:#302e28; border-color:#716048; }
:root[data-theme="dark"] .graph-node.active { border-color:#70c6eb; box-shadow:0 0 0 4px #6dd4ff18; }
:root[data-theme="dark"] .graph-node .port { background:#14232f; border-color:#87bad5; }
:root[data-theme="dark"] .edge { stroke:#6c91aa; }
:root[data-theme="dark"] .edge.selected { stroke:#7edbff; }
:root[data-theme="dark"] #graphHint { background:#28536b; }
:root[data-theme="dark"] .asset-cover { background:linear-gradient(145deg,#213b50,#152735); }
:root[data-theme="dark"] .asset-cover .media-glyph { color:#9dbed3; border-color:#4f7087; }
:root[data-theme="dark"] .asset-type { background:#10222ee8; color:#c0d9e9; }
:root[data-theme="dark"] .asset-card:hover { box-shadow:0 8px 20px #0003; }
:root[data-theme="dark"] :is(.empty-library>span,.workspace-symbol,.new-project-banner>span,.export-intro>span,.import-illustration) { background:var(--pale); color:#95cae5; border-color:#456c86; }
:root[data-theme="dark"] .drag-over { background:#1a374b; outline-color:#70c6eb; }
:root[data-theme="dark"] .project-tile { background:var(--soft); border-color:var(--line); }
:root[data-theme="dark"] .project-tile.current { background:linear-gradient(130deg,#24465c,#1b2e3d); border-color:#5c93b0; }
:root[data-theme="dark"] .project-tile:hover { border-color:#70c6eb; box-shadow:0 6px 18px #0002; }
:root[data-theme="dark"] .project-tile em { color:#e8aa9b; }
:root[data-theme="dark"] .export-options label { background:var(--input); border-color:var(--line); }
:root[data-theme="dark"] :is(.export-options input,progress) { accent-color:#57b9df; }
:root[data-theme="dark"] .export-success { background:#193c35; border-color:#426c5f; color:#a1d8c3; }
:root[data-theme="dark"] :is(.export-success a,.success-text) { color:#9cdec2; }
:root[data-theme="dark"] .guide-step>b { color:#8abbd5; }
:root[data-theme="dark"] dialog { box-shadow:0 30px 110px #0008; }
:root[data-theme="dark"] dialog::backdrop { background:#060e18a8; }
:root[data-theme="dark"] .warning { background:#3a3022; border-color:#736040; color:#ebc993; }
:root[data-theme="dark"] .issue { border-left-color:#e3bd7d; }
:root[data-theme="dark"] .issue.error { border-left-color:#f09187; }
:root[data-theme="dark"] .issue.success { border-left-color:#86cdb0; }
:root[data-theme="dark"] #toast { background:#28536b; color:#eff8ff; box-shadow:0 5px 30px #0005; }
:root[data-theme="dark"] .overlay.editing { outline-color:#93d9f6; }
:root[data-theme="dark"] .overlay.selected { outline-color:#6dd4ff; }
:root[data-theme="dark"] .overlay .overlay-label { background:#17394fed; }
:root[data-theme="dark"] .resize-handle { background:#6dd4ff; }
@media(max-width:520px) { .header-actions { gap:4px; } .app-header { gap:6px; } .brand>div { display:none; } }
