/* Shared semantic palette for legacy editors. Dark surfaces retain their original rules.
   Media pixels, masks, subtitle colours and colour-picker swatches are never recoloured. */
html[data-theme="light"] {
  --studio-surface:linear-gradient(135deg,#f7fbfff5,#e7effcf5);
  --studio-raised:linear-gradient(120deg,#ffffffeb,#e9f2ffdf);
  --studio-inset:#e5edf8;
  --studio-field:#f8fbff;
  --studio-line:#bdcfe6;
  --studio-ink:#233f64;
  --studio-muted:#546d8b;
  --studio-active:#d7e7ff;
  --studio-accent:#2169d8;
  --studio-shadow:0 14px 44px #2449752e,inset 0 1px #fff;
  --studio-timeline-grid:#8faacb40;
}
html body #userCenterButton .home-workspace-label{
  padding:7px 10px!important;border:1px solid #95b7e54d;border-radius:9px;
  background:#edf4fcaa!important;color:#315d93!important;box-shadow:inset 0 1px #fff8!important;
  font-size:13px!important;font-weight:550!important;
}
html body #userCenterButton:hover .home-workspace-label{background:#e1edfb!important;border-color:#93b4de}
.cc-cloud-loading{position:absolute;inset:32px 0 0;z-index:4;border-radius:0 0 10px 10px;background:var(--theme-surface,#20252b);display:flex;align-items:center;justify-content:center;overflow:hidden;pointer-events:none}
.cc-cloud-loading img{width:100%;height:100%;object-fit:contain;opacity:.72}
.cc-cloud-loading span{position:absolute;bottom:12px;max-width:90%;padding:5px 10px;border-radius:6px;background:var(--theme-surface-raised,#303640);color:var(--theme-text,#e9ebee);font-size:12px}
.cc-cloud-loading[aria-busy=true]::after{content:"";position:absolute;left:0;bottom:0;height:2px;width:35%;background:#329aff;animation:cloud-import-flow 1.8s ease-in-out infinite}
@keyframes cloud-import-flow{from{transform:translateX(-100%);opacity:0}30%{opacity:1}to{transform:translateX(390%);opacity:0}}
@media(prefers-reduced-motion:reduce){.cc-cloud-loading[aria-busy=true]::after{animation:none;width:100%}}
html[data-theme=light] .cc-cloud-loading{background:var(--studio-inset)}
html[data-theme=light] .cc-cloud-loading span{background:#f7fbfff0;color:var(--studio-ink)}
html[data-theme=light] :is(.ciw.ciw,.cte.cte,#psInboxPopover,#psLibraryPanel,.cc-video-player){
  background:var(--studio-surface)!important;color:var(--studio-ink)!important;border-color:var(--studio-line)!important;box-shadow:var(--studio-shadow)!important;backdrop-filter:blur(22px)
}
html[data-theme=light] :is(.ciw,.cte,#psInboxPopover,#psLibraryPanel,.cc-video-player) :is(header,footer,.ciw-topbar,.ciw-tools,.ciw-viewbar,.ciw-footer,.ciw-property-tabs,.cte-toolbar,.cte-track-name){
  background:var(--studio-raised)!important;border-color:var(--studio-line)!important;color:var(--studio-ink)!important
}
html[data-theme=light] :is(.ciw,.cte,#psInboxPopover,#psLibraryPanel) :is(button,select,input:not([type=color]):not([type=range]),textarea:not(.ciw-inline-text)){
  color:var(--studio-ink)!important;background-color:var(--studio-field)!important;border-color:var(--studio-line)!important
}
html[data-theme=light] :is(.ciw,.cte,#psInboxPopover,#psLibraryPanel) button:not(:disabled):hover{background-color:var(--studio-active)!important;color:var(--studio-accent)!important}
html[data-theme=light] :is(.ciw,.cte,#psInboxPopover,#psLibraryPanel) :is(label,p,small,summary,output,.ciw-hint,.ciw-status,.ciw-layer-note,.ciw-legend,.ciw-scope-note,.ciw-view-label,.ciw-select-arrow,.ciw-select-option>span:last-child,.cte-status,.cte-zoom-label,.cte-empty-tracks,.cte-ruler span){color:var(--studio-muted)!important}
html[data-theme=light] :is(.ciw,.cte,#psInboxPopover,#psLibraryPanel) :is(h3,strong,.ciw-section h3){color:var(--studio-ink)!important}
html[data-theme=light] :is(.ciw-side,.ciw-properties,.ciw-layers,.ciw-property-frame,.cte-library,.cte-properties){background:#eaf2fc!important;border-color:var(--studio-line)!important}
html[data-theme=light] :is(.ciw-viewport,.cte-viewer){background:radial-gradient(ellipse at center,#f9fbff,#dce7f5)!important}
html[data-theme=light] :is(.ciw-select-menu,.ciw-sync-content,.ciw-number-popup,.ciw-plan-box[open],.cc-ratio-menu){
  background:#f4f8fff0!important;color:var(--studio-ink)!important;border-color:var(--studio-line)!important;box-shadow:0 8px 28px #234b7c2b!important;backdrop-filter:blur(20px)
}
html[data-theme=light] .ciw :is(.ciw-select-trigger,.ciw-prompt-slot,.ciw-result-thumb,.ciw-result-choice,.ciw-prompt-chip){background:var(--studio-field)!important;border-color:var(--studio-line)!important;color:var(--studio-ink)!important}
html[data-theme=light] .ciw :is(.ciw-ref.selected,.ciw-layer-row.selected,button.active,.ciw-select-option[aria-selected=true]){background:var(--studio-active)!important;color:var(--studio-accent)!important;border-color:#92b5e9!important}
html[data-theme=light] .ciw :is(.ciw-tools .ciw-divider){background:var(--studio-line)!important}
html[data-theme=light] .ciw :is(.ciw-layer-row img,.ciw-layer-row canvas){background:repeating-conic-gradient(#edf2f9 0% 25%,#d4dfed 0% 50%) 0/8px 8px;border-color:var(--studio-line)}
html[data-theme=light] .ciw input[type=range]::-webkit-slider-runnable-track{background:#b2c9e3!important}
html[data-theme=light] .ciw input[type=range]::-webkit-slider-thumb{background:#357ac8!important}
html[data-theme=light] :is(.ciw button.primary,.cte.cte .cte-primary){background:#246bd5!important;color:#fff!important;border-color:#246bd5!important}
html[data-theme=light] .cte.cte :is(.cte-timeline,.cte-sequence-bar){background:#e1eaf7!important}
html[data-theme=light] .cte.cte :is(.cte-track,.cte-library,.cte-properties,.cte-status,.cte-toolbar){border-color:var(--studio-line)!important}
html[data-theme=light] .cte.cte .cte-ruler{background:#e1eaf7}
html[data-theme=light] .cte.cte .cte-clip{background-color:#87c6e2!important;color:#143859!important;border-color:#4983b8!important}
html[data-theme=light] .cte.cte .cte-clip.audio{background-color:#a5d9cc!important}
html[data-theme=light] .cte.cte .cte-clip.subtitles{background-color:#cebbef!important}
html[data-theme=light] .cte.cte .cte-clip-title{background:#edf6ffdf!important;color:#193f63!important}
html[data-theme=light] .cte.cte .cte-clip.selected{outline:2px solid #2877dd;border-color:#2877dd!important}
html[data-theme=light] .cte.cte :is(.cte-playhead:before,.cte-playhead>i){background:#2369cf}
html[data-theme=light] .cc .cc-ratio-trigger{background:var(--studio-raised)!important;color:var(--studio-ink)!important;border-color:var(--studio-line)!important}
html[data-theme=light] .cc-ratio-menu button{color:var(--studio-ink)!important}
html[data-theme=light] .cc-ratio-menu button:is(:hover,:focus,[aria-selected=true]){background:var(--studio-active)!important}
html[data-theme=light] .cc-ratio-menu button[aria-selected=true]::after{color:var(--studio-accent)}
html[data-theme=light] .cc-ratio-divider{background:var(--studio-line)}
html[data-theme=light] .cc-model-group-title{color:var(--studio-muted)}
html[data-theme=light] .cc-model-badge-blue{color:#2062ac}html[data-theme=light] .cc-model-badge-green{color:#18754b}html[data-theme=light] .cc-model-badge-red{color:#a33d38}html[data-theme=light] .cc-model-badge-gold{color:#805c12}
html[data-theme=light] .cc-card-preview{background:linear-gradient(130deg,#e6effa,#d8e7f8)!important}
html[data-theme=light] .cc-node.type-video{background:var(--studio-inset)!important;color:var(--studio-ink)!important}
html[data-theme=light] .cc-node :is(header,footer,.cc-video-controls,.cc-media-controls){background:var(--studio-raised)!important;color:var(--studio-ink)!important}
html[data-theme=light] .cc-node :is(.cc-number,.cc-node-number,[data-node-number]){color:#315c8a!important;text-shadow:none!important}
html[data-theme=light] :is(#psInboxPopover,#psLibraryPanel) :is(nav,.ps-inbox-tabs,.ps-inbox-item,.ps-inbox-empty){background:transparent!important;color:var(--studio-muted)!important;border-color:var(--studio-line)!important}
html[data-theme=light] .ciw :is(.ciw-ref-filter,.ciw-plan-box,.ciw-result-gallery-list,.ciw-channel-card){background:var(--studio-raised)!important;color:var(--studio-ink)!important;border-color:var(--studio-line)!important}
html[data-theme=light] .ciw :is(.ciw-edge-panel,.ciw-context-menu){background:#f4f8fff2!important;color:var(--studio-ink)!important;border-color:var(--studio-line)!important;box-shadow:var(--studio-shadow)}
html[data-theme=light] .cte.cte :is(.cte-timeline-shell,.cte-track-headers,.cte-ruler-corner,.cte-ruler-viewport,.cte-material,.cte-folder-picker,.cte-sequence-picker){background:#e1eaf7!important;color:var(--studio-ink)!important;border-color:var(--studio-line)!important}
html[data-theme=light] .cte.cte .cte-material-thumb{background-color:#cee1f5;color:#376a95}
html[data-theme=light] :is(.ciw,.cte,#psInboxPopover,#psLibraryPanel) button:is(.primary,.cte-primary){background:#246bd5!important;color:#fff!important;border-color:#246bd5!important}
html[data-theme=light] .cc .type-video .cc-video-controls :is(button,.cc-video-duration){color:var(--studio-ink)!important;text-shadow:none!important}
html[data-theme=light] .cc .cc-media-surface{background-color:var(--studio-inset)!important}
html[data-theme=light] .cc .cc-node .cc-node-number{color:#315c8a!important;text-shadow:none!important}
html[data-theme=light] #psInboxPopover .ps-inbox-row{background:#edf4fc;border-color:var(--studio-line)}
html[data-theme=light] .cc .cc-node :is(.cc-category,.cc-type-icon){color:var(--studio-muted)!important}
html[data-theme=light] .cte.cte .cte-material-thumb{background:#cee1f5!important}
/* Explicit content and state colours: labels must not retain nested dark-theme colours. */
html[data-theme=light] .cc .cc-run-compact .cc-generate-main,
html[data-theme=light] .cc .cc-run-compact .cc-generate-main span{color:#244b78!important;text-shadow:none!important}
html[data-theme=light] .cc .cc-run-compact .cc-generate-main:disabled{opacity:1;color:#647b94!important;background:linear-gradient(120deg,#e3eaf4,#eef3f9)!important;border-color:#c5d2e3!important;cursor:not-allowed}
html[data-theme=light] .cc .cc-run-compact .cc-generate-main:disabled span{color:#647b94!important}
html[data-theme=light] .cc .cc-run-compact .cc-generate-main:not(:disabled):hover,
html[data-theme=light] .cc .cc-run-compact .cc-generate-main:not(:disabled):hover span{color:#164779!important}
html[data-theme=light] :is(.cc,.ciw) .cc-ref-editor{color:#233f64!important;caret-color:#2169d8;-webkit-text-fill-color:#233f64}
html[data-theme=light] :is(.cc,.ciw) .cc-ref-editor:empty:before{color:#607795!important;-webkit-text-fill-color:#607795}
html[data-theme=light] :is(.cc,.ciw) .cc-prompt-ref{color:#315a84!important;-webkit-text-fill-color:#315a84;background:#dceaff!important;border-color:#acc8e9!important}
html[data-theme=light] .cc button[data-cc="remove-edit-region"]{display:grid;place-items:center;width:26px;height:26px;min-width:26px;min-height:26px;padding:0;border:1px solid #b9cde6;border-radius:7px;background:#edf4fe!important;color:#315a84!important}
html[data-theme=light] .cc button[data-cc="remove-edit-region"]:hover{background:#d9e9ff!important;color:#1956a1!important}
html[data-theme=light] .cte.cte .cte-ruler>i.minor{background:#8aa2bf;height:5px}
html[data-theme=light] .cte.cte .cte-ruler>i.major{background:#456888;height:11px}
html[data-theme=light] .cte.cte .cte-ruler-head i,
html[data-theme=light] .cte.cte .cte-playhead:before,
html[data-theme=light] .cte.cte .cte-playhead>i{background:#1769d9!important}
html[data-theme=light] .cte.cte .cte-playhead:before{width:1.5px}
html[data-theme=light] .cte.cte .cte-range-region{background:#5c9aec12;box-shadow:inset 1px 0 #6099df66,inset -1px 0 #6099df66}
html[data-theme=light] :is(.cte.cte,#psInboxPopover) button[aria-pressed=true]{background:#c5ddff!important;color:#164f9d!important;border-color:#6c9fdf!important;box-shadow:inset 0 -2px #2676dc}
html[data-theme=light] :is(.cte.cte,#psInboxPopover) button[aria-pressed=true]:hover{background:#b4d3ff!important;color:#164f9d!important}
html[data-theme=light] .cte.cte :is(.cte-context,.cte-range-panel){background:#f2f7fff5!important;color:#233f64!important;border-color:#adc6e5!important;box-shadow:var(--studio-shadow)}
