/* Video Cut paint only. PixelSoundTheme owns native activation.
   Keep historical grid/fields, hover transforms and fonts.
   Shared portals require their frozen instance origin; never infer it in CSS. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active],
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] > body {
  background: var(--ps-bg) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #section-project-detail {
  background: var(--ps-bg);
  border-color: var(--ps-line);
  color: var(--ps-text);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #section-project-detail :is(.projects-panel, [data-ps-video-cut="workspace"]) {
  background: var(--ps-bg-soft);
  border-color: var(--ps-line);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #section-project-detail :is(.projects-panel-header, [data-ps-video-cut-ui="header"]) {
  background: var(--ps-shell-header-bg);
  border-color: var(--ps-line);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #section-project-detail .admin-subcard {
  background: var(--ps-surface-solid);
  border-color: var(--ps-line);
  box-shadow: 0 8px 24px #0003, var(--ps-shell-reflection);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #section-project-detail .admin-subcard:hover {
  box-shadow: 0 16px 40px #0005, var(--ps-shell-reflection);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #projectStatsZone > div {
  background: var(--ps-bg-soft) !important;
  border-color: var(--ps-line) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #section-project-detail :is(h2, h3, .admin-subcard-title, .projects-panel-title, .admin-tab-panel-title) {
  color: var(--ps-ink);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #section-project-detail :is(.projects-panel-icon, .admin-tab-panel-icon, .admin-subcard-icon) {
  background: var(--ps-bg-soft);
  color: var(--ps-gold);
  font-family: var(--ps-font-ui);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #section-project-detail :is(.muted, .fs-empty) {
  color: var(--ps-muted);
}

/* Existing ID + !important rules in index.html remain intact in Original. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) [data-ps-video-cut="workspace"] [data-ps-video-cut-ui="rows"] #ttkvcRowsWrap {
  background: var(--ps-bg-soft) !important;
  border-color: var(--ps-line) !important;
  box-shadow: 0 8px 24px #0003 !important;
  color: var(--ps-text);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) [data-ps-video-cut="workspace"] #ttkvcRowsWrap [data-ps-video-cut-ui="grid-header"] {
  background: var(--ps-surface-solid) !important;
  border-color: var(--ps-line) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) [data-ps-video-cut="workspace"] #ttkvcRowsWrap [data-ps-video-cut-ui="grid-header"] > div {
  color: var(--ps-ink);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) [data-ps-video-cut="workspace"] #ttkvcRowsWrap :is([data-ps-video-cut-ui="row"], [data-ps-video-cut-ui="total"]) {
  background: var(--ps-bg-soft) !important;
  border-color: var(--ps-line) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) [data-ps-video-cut="workspace"] #ttkvcRowsWrap :is([data-ps-video-cut-ui="row"], [data-ps-video-cut-ui="total"]) > div,
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) [data-ps-video-cut="workspace"] #ttkvcRowsWrap [data-role-display="removed_time"],
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) [data-ps-video-cut="workspace"] #ttkvcTotalTrimmed {
  color: var(--ps-text) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) [data-ps-video-cut="workspace"] [data-ps-video-cut-ui="rows"] :is(#ttkvcDefaultMargin, #ttkvcRowsWrap input, #ttkvcRowsWrap select) {
  background: var(--ps-surface-soft) !important;
  color: var(--ps-text) !important;
  border-color: var(--ps-line-strong) !important;
  accent-color: var(--ps-gold);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) [data-ps-video-cut="workspace"] [data-ps-video-cut-ui="rows"] label {
  color: var(--ps-text);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) [data-ps-video-cut="workspace"] [data-ps-video-cut-ui="rows"] :is(#ttkvcDefaultMargin, #ttkvcRowsWrap input, #ttkvcRowsWrap select):focus {
  background: var(--ps-bg-soft) !important;
  border-color: var(--ps-focus) !important;
  box-shadow: 0 0 0 3px #8df7ee26;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) [data-ps-video-cut="workspace"] [data-ps-video-cut-ui="rows"] #ttkvcRowsWrap input::placeholder {
  color: var(--ps-muted) !important;
}

/* The existing meter is 8px high in both themes; only its paint differs here. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) [data-ps-video-cut="workspace"] [data-ps-video-cut-ui="processing"] .projects-quota-track {
  background: var(--ps-surface-soft);
  --ps-video-cut-meter-track: var(--ps-surface-soft);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) [data-ps-video-cut="workspace"] #ttkvcWorkProgressBar {
  background: var(--ps-button-bg);
  --ps-video-cut-meter-fill: var(--ps-button-bg);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #section-project-detail :is([data-ps-video-cut-ui="processing"], #projectUploadZone, .admin-form-actions) button {
  background: var(--ps-bg-soft);
  color: var(--ps-text);
  border-color: var(--ps-line-strong);
  box-shadow: var(--ps-shell-reflection);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #section-project-detail :is([data-ps-video-cut-ui="processing"], #projectUploadZone, .admin-form-actions) button:hover:not(:disabled) {
  background: var(--ps-surface-soft);
  border-color: var(--ps-gold);
  box-shadow: 0 8px 22px #0003, 0 0 0 3px #c9a97722;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #section-project-detail :is([data-ps-video-cut-ui="processing"], #projectUploadZone) .btn-primary {
  background: var(--ps-button-bg);
  color: var(--ps-button-text);
  border-color: var(--ps-button-border);
  box-shadow: var(--ps-button-shadow);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #section-project-detail :is([data-ps-video-cut-ui="processing"], #projectUploadZone) .btn-primary:hover:not(:disabled) {
  background: var(--ps-button-hover);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #section-project-detail button:disabled {
  box-shadow: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #section-project-detail :is(button, a):focus-visible {
  outline: 2px solid var(--ps-focus);
  outline-offset: 3px;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) [data-ps-video-cut="workspace"] [data-ps-video-cut-ui="processing"] a {
  color: var(--ps-gold-light);
}

/* Existing status configuration keeps its semantic colors. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #projectStatusPill {
  --ps-project-status-shadow: 0 8px 18px #0002;
  --ps-project-status-dot-shadow: 0 0 0 3px #0002;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #projectStatusMenu[data-ps-video-cut-portal="project-status"] {
  --ps-project-menu-bg: var(--ps-surface-solid);
  --ps-project-menu-border: var(--ps-line-strong);
  --ps-project-menu-shadow: var(--ps-shell-reflection), 0 18px 50px #0005;
  --ps-project-menu-option-bg: transparent;
  --ps-project-menu-option-text: var(--ps-text);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #projectStatusMenu[data-ps-video-cut-portal="project-status"] button:is(:hover, [data-ps-current="true"]) {
  --ps-project-menu-option-bg: var(--ps-bg-soft);
  --ps-project-menu-option-text: var(--ps-gold-light);
}

/* Unified Import: explicit surface/tone markers, no style-content selectors.
   Transfer fills keep their existing semantic variables, widths and animation. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#mediaImportModal, #nextcloudBatchInteractionLock)[data-ps-video-cut-portal],
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #externalImportProjectPanel {
  --ps-wf-import-active: var(--ps-gold);
  --ps-wf-import-success: #a7e3bd;
  --ps-wf-import-error: #ffb4b4;
  --ps-wf-import-warning: #f5cd91;
  color: var(--ps-text);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#mediaImportModal, #nextcloudBatchInteractionLock)[data-ps-video-cut-portal],
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #quotaUploadModal[data-ps-video-cut-portal="quota"] {
  background: #0009 !important;
  color: var(--ps-text) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#mediaImportModal, #nextcloudBatchInteractionLock)[data-ps-video-cut-portal] :is([role="dialog"], [data-nextcloud-lock-message]),
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #quotaUploadModal[data-ps-video-cut-portal="quota"] [data-ps-quota-ui="card"] {
  background: var(--ps-surface-solid) !important;
  color: var(--ps-text) !important;
  border-color: var(--ps-line) !important;
  box-shadow: 0 28px 80px #0007 !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #mediaImportModal[data-ps-video-cut-portal="media-import"] [data-ps-import-surface]:not([role="dialog"], [data-import-field="progress"]),
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #mediaImportModal[data-ps-video-cut-portal="media-import"] :is([data-import-transfer-id], [data-nextcloud-selection-index]),
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #externalImportProjectPanel :is([data-ps-import-surface]:not([data-import-field="progress"]), [data-import-transfer-id]),
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #quotaUploadModal[data-ps-video-cut-portal="quota"] :is([data-ps-quota-ui="actions"], [data-ps-quota-ui="notice"]) {
  background: var(--ps-bg-soft) !important;
  border-color: var(--ps-line) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #mediaImportModal[data-ps-video-cut-portal="media-import"] [data-ps-import-selected="true"] {
  background: var(--ps-surface-solid) !important;
  border-color: var(--ps-gold) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#mediaImportModal, #nextcloudBatchInteractionLock)[data-ps-video-cut-portal] :is([data-ps-import-tone="text"], [data-import-field="filename"]),
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #externalImportProjectPanel :is([data-ps-import-tone="text"], [data-import-field="filename"]) {
  color: var(--ps-text) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #mediaImportModal[data-ps-video-cut-portal="media-import"] :is(.muted, [data-ps-import-tone="muted"]),
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #externalImportProjectPanel :is([data-ps-import-tone="muted"], [data-import-counts]),
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #quotaUploadModal[data-ps-video-cut-portal="quota"] .muted {
  color: var(--ps-muted) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #mediaImportModal[data-ps-video-cut-portal="media-import"] :is(#mediaImportModalTitle, [data-ps-import-tone="title"]),
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #quotaUploadModal[data-ps-video-cut-portal="quota"] #quotaUploadTitle {
  color: var(--ps-ink) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #mediaImportModal[data-ps-video-cut-portal="media-import"] [data-ps-import-tone="error"],
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #externalImportProjectPanel [data-ps-import-tone="error"] {
  color: #ffb4b4 !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #mediaImportModal[data-ps-video-cut-portal="media-import"] [data-ps-import-tone="warning"],
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"])[data-ps-video-cut-active] #externalImportProjectPanel [data-ps-import-tone="warning"] {
  color: #f5cd91 !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #mediaImportModal[data-ps-video-cut-portal="media-import"] [data-ps-import-tone="success"] {
  color: #a7e3bd !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #quotaUploadModal[data-ps-video-cut-portal="quota"] [data-ps-quota-ui] {
  border-color: var(--ps-line) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #quotaUploadModal[data-ps-video-cut-portal="quota"] [data-ps-quota-ui="error"] {
  background: #451f24 !important;
  color: #ffb4b4 !important;
  border-color: #ad666666 !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #quotaUploadModal[data-ps-video-cut-portal="quota"] [data-ps-quota-ui="success"] {
  background: #123b2d !important;
  color: #a7e3bd !important;
  border-color: #4c8b6466 !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#mediaImportModal, #quotaUploadModal)[data-ps-video-cut-portal] :is(button, input, select, textarea) {
  background: var(--ps-surface-soft) !important;
  color: var(--ps-text) !important;
  border-color: var(--ps-line-strong) !important;
  accent-color: var(--ps-gold);
  box-shadow: var(--ps-shell-reflection);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#mediaImportModal, #quotaUploadModal)[data-ps-video-cut-portal] button:hover:not(:disabled) {
  background: var(--ps-surface-solid) !important;
  border-color: var(--ps-gold) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#mediaImportModal, #quotaUploadModal)[data-ps-video-cut-portal] .btn-primary {
  background: var(--ps-button-bg) !important;
  color: var(--ps-button-text) !important;
  border-color: var(--ps-button-border) !important;
  box-shadow: var(--ps-button-shadow);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#mediaImportModal, #quotaUploadModal)[data-ps-video-cut-portal] .btn-primary:hover:not(:disabled) {
  background: var(--ps-button-hover) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#mediaImportModal, #quotaUploadModal, #projectStatusMenu)[data-ps-video-cut-portal] :is(button, input, select, textarea):focus-visible {
  outline: 2px solid var(--ps-focus) !important;
  outline-offset: 3px;
}
