/* Pai film state palette: scoped presentation corrections. */

/* World state refinements. Append after pai-film-workbench.css.
   Actual World markup only: no state visibility, task, media or pricing changes.
   Empty previews use paper; actual images and the asset viewer stay intact. */

/* Entering World: the three small cards had independent dark gradients. */
body.workbench-open #view-workbench .world-surface .world-empty {
    color: #716B7B;
    background: #F5F3F0;
    border-color: transparent;
    box-shadow: none;
}
body.workbench-open #view-workbench .world-empty .world-empty-card {
    color: #716B7B;
    background: #FFFEFB;
    border-color: transparent;
    border-radius: 16px;
    box-shadow: 0 3px 12px #1E192D08;
}
body.workbench-open #view-workbench .world-empty .world-empty-card.is-character { color: #67507B; }
body.workbench-open #view-workbench .world-empty .world-empty-card.is-location { color: #39775F; }
body.workbench-open #view-workbench .world-empty .world-empty-card.is-prop { color: #885522; }
body.workbench-open #view-workbench .world-empty h3 { color: #1E192D; }
body.workbench-open #view-workbench .world-empty p { color: #716B7B; }
body.workbench-open #view-workbench .world-empty #empty-create-world {
    color: #FFFEFB;
    background: #1E192D;
    border-color: transparent;
    border-radius: 12px;
    box-shadow: none;
}
body.workbench-open #view-workbench .world-empty #empty-create-world > span { color: #E84FB7; }
body.workbench-open #view-workbench .world-empty #empty-create-world:hover:not(:disabled) {
    color: #FFFEFB;
    background: #362F45;
    border-color: transparent;
    box-shadow: none;
    transform: none;
}
body.workbench-open #view-workbench .world-empty #empty-create-world:disabled { opacity: .45; }
body.workbench-open #view-workbench .world-empty #empty-add-setting,
body.workbench-open #view-workbench .world-toolbar .world-reorganize-action {
    color: #716B7B;
    background: transparent;
    border-color: transparent;
    border-radius: 12px;
    box-shadow: none;
}
body.workbench-open #view-workbench .world-empty #empty-add-setting:hover:not(:disabled),
body.workbench-open #view-workbench .world-toolbar .world-reorganize-action:hover:not(:disabled) {
    color: #1E192D;
    background: #F1EFF3;
    transform: none;
}
body.workbench-open #view-workbench .world-toolbar .settings-summary .is-generating { color: #713F60; }
body.workbench-open #view-workbench .world-toolbar .settings-summary .is-pending { color: #885522; }
body.workbench-open #view-workbench .world-toolbar .settings-summary .is-complete { color: #39775F; }
body.workbench-open #view-workbench .world-surface .settings-state.is-error {
    color: #A83D51;
    background: #FAEEF1;
}

/* World cards retain their real image and live generation-dot layers. */
body.workbench-open #view-workbench .world-grid .setting-card {
    color: #1E192D;
    background: #FFFEFB;
    border-color: transparent;
    box-shadow: none;
}
body.workbench-open #view-workbench .world-grid .setting-card-preview.is-placeholder {
    color: #716B7B;
    background: #F1EFEB;
    border-color: transparent;
}
body.workbench-open #view-workbench .world-grid .setting-card-heading h3,
body.workbench-open #view-workbench .world-grid .setting-card-heading h3 > strong { color: #1E192D; }
body.workbench-open #view-workbench .world-grid :is(.setting-card-description, .setting-card-meta, .setting-card-meta span) { color: #716B7B; }
body.workbench-open #view-workbench .world-grid .setting-status {
    color: #885522;
    background: #F5EEDF;
    border-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
}
body.workbench-open #view-workbench .world-grid .setting-status.is-ready { color: #39775F; background: #EAF2EC; }
body.workbench-open #view-workbench .world-grid .setting-status.is-generating { color: #713F60; background: #EDE6EC; }
body.workbench-open #view-workbench .world-grid .setting-status.is-incomplete { color: #885522; background: #F5EEDF; }
body.workbench-open #view-workbench .world-grid .setting-delete-button:hover:not(:disabled) { color: #A83D51; background: #FAEEF1; }

/* IDs are deliberate: the older body.workbench-open detail/studio rules carry
   many class selectors, and an unscoped class repaint does not win the cascade. */
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog,
    #setting-generation-dialog, #setting-reference-picker-dialog) {
    color: #1E192D;
    color-scheme: light;
    font-family: var(--pai-ui);
    background: #FFFEFB;
    border-color: transparent;
}
body.workbench-open #setting-editor-dialog > form,
body.workbench-open #setting-extraction-dialog :is(.setting-extraction-shell, .management-heading, .setting-extraction-body, .management-footer),
body.workbench-open #setting-generation-dialog :is(.setting-generation-shell, .setting-generation-heading, .setting-generation-body, .setting-generation-footer),
body.workbench-open #setting-reference-picker-dialog :is(.setting-reference-picker-shell, .setting-reference-picker-heading, .setting-reference-picker-body, .setting-reference-picker-footer) {
    color: #1E192D;
    background: #FFFEFB;
    border-color: transparent;
    box-shadow: none;
    scrollbar-color: #B5AFBB #FFFEFB;
}
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog,
    #setting-generation-dialog, #setting-reference-picker-dialog)
    :is(.dialog-heading h2, .management-heading h2, .setting-generation-results-heading h3,
        .setting-generation-history-heading h3, .setting-extraction-style h3) { color: #1E192D; }
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog,
    #setting-generation-dialog, #setting-reference-picker-dialog)
    :is(.dialog-copy, .management-heading p, .management-footer p, .field > span,
        .field small, .setting-generation-results-heading p, .setting-generation-history-heading > span) { color: #716B7B; }
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog,
    #setting-generation-dialog, #setting-reference-picker-dialog) .form-error { color: #A83D51; }

/* Arranging the World: keep the accepted three-dot animation and live copy. */
body.workbench-open #setting-extraction-dialog .setting-agent-state {
    color: #716B7B;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}
body.workbench-open #setting-extraction-dialog .setting-extraction-agent {
    color: #1E192D;
    background: #F5F3F0;
    border-color: transparent;
    border-radius: 20px;
    box-shadow: none;
    --pai-wait-text-base: #716B7B;
    --pai-wait-text-light: #AD8B9D;
}
body.workbench-open #setting-extraction-dialog .setting-extraction-agent h3 { color: #1E192D; }
body.workbench-open #setting-extraction-dialog .setting-extraction-agent :is(p, small, .agent-generation-kicker, .agent-generation-status, .agent-generation-status strong) { color: #716B7B; }

/* Extracted items: selected, existing, voice completion, and editable fields. */
body.workbench-open #setting-extraction-dialog .setting-extraction-item {
    color: #1E192D;
    background: #F5F3F0;
    border-color: transparent;
    border-radius: 18px;
    box-shadow: none;
}
body.workbench-open #setting-extraction-dialog .setting-extraction-item.is-existing { background: #F1EFEB; }
body.workbench-open #setting-extraction-dialog .setting-extraction-item > input[type="checkbox"] { accent-color: #713F60; color-scheme: light; }
body.workbench-open #setting-extraction-dialog .setting-extraction-item-meta,
body.workbench-open #setting-extraction-dialog .setting-extraction-item .field > span { color: #716B7B; }
body.workbench-open #setting-extraction-dialog .setting-extraction-item--character .setting-extraction-item-meta strong { color: #67507B; }
body.workbench-open #setting-extraction-dialog .setting-extraction-item--location .setting-extraction-item-meta strong { color: #39775F; }
body.workbench-open #setting-extraction-dialog .setting-extraction-item--prop .setting-extraction-item-meta strong { color: #885522; }
body.workbench-open #setting-extraction-dialog .setting-extraction-style {
    color: #1E192D;
    background: #F5F3F0;
    border-color: transparent;
    border-radius: 18px;
    box-shadow: none;
}

/* Generation and details share the existing dialog and its state classes. */
body.workbench-open #setting-generation-dialog :is(.setting-generation-current,
    .setting-generation-prompt-field, .setting-generation-reference-section,
    .setting-generation-voice-sample, .setting-generation-generate-dock,
    .setting-generation-history-state, .setting-generation-state) {
    color: #1E192D;
    background: #F5F3F0;
    border-color: transparent;
    border-radius: 18px;
    box-shadow: none;
}
body.workbench-open #setting-generation-dialog .setting-generation-voice { color: #1E192D; background: transparent; border-color: transparent; box-shadow: none; }
body.workbench-open #setting-generation-dialog .setting-generation-current-copy { color: #1E192D; background: #FFFEFB; }
body.workbench-open #setting-generation-dialog :is(.setting-generation-prompt-field > span,
    .setting-generation-section-heading strong, .setting-generation-generate-intro strong,
    .setting-generation-history-state strong, .setting-generation-state strong) { color: #1E192D; }
body.workbench-open #setting-generation-dialog :is(.setting-generation-prompt-field small,
    .setting-generation-prompt-field > span em, .setting-generation-section-heading span,
    .setting-generation-section-heading em, .setting-generation-current-copy p,
    .setting-generation-current-title small, .setting-generation-generate-intro small,
    .setting-generation-voice-sample p, .setting-generation-voice-sample small,
    .setting-generation-history-state > span, .setting-generation-state > span:not(.ai-image-loader)) { color: #716B7B; }
body.workbench-open #setting-generation-dialog :is(.setting-generation-model-field > span, .setting-generation-count legend) { color: #716B7B !important; }
body.workbench-open #setting-generation-dialog .setting-generation-current-preview.is-empty,
body.workbench-open #setting-generation-dialog .setting-generation-reference-empty {
    color: #716B7B;
    background: #F1EFEB;
    border-color: transparent;
    box-shadow: none;
}
body.workbench-open #setting-generation-dialog .setting-generation-current-preview.is-empty > span,
body.workbench-open #setting-generation-dialog .setting-generation-reference-empty p { color: #716B7B; }
body.workbench-open #setting-generation-dialog .setting-generation-current-preview.is-empty::before {
    content: "Pai";
    color: #1E192D;
    opacity: .07;
    font-family: var(--pai-ui);
    letter-spacing: -.045em;
}
body.workbench-open #setting-generation-dialog .setting-generation-current-preview.is-empty .setting-generation-current-actions { border-top-color: transparent; }
body.workbench-open #setting-generation-dialog .setting-status {
    color: #885522;
    background: #F5EEDF;
    border-color: transparent;
    box-shadow: none;
}
body.workbench-open #setting-generation-dialog .setting-status.is-ready { color: #39775F; background: #EAF2EC; }
body.workbench-open #setting-generation-dialog .setting-status.is-generating { color: #713F60; background: #EDE6EC; }
body.workbench-open #setting-generation-dialog :is(.setting-generation-mode-summary, .setting-generation-progress) { color: #713F60; background: #EDE6EC; border-color: transparent; }
body.workbench-open #setting-generation-dialog .setting-generation-generate-star { color: #E84FB7; }

/* The former dark segmented controls, including their hover and active icon. */
body.workbench-open #setting-generation-dialog .setting-generation-tabs { color: #716B7B; background: #F1EFF3; border-color: transparent; box-shadow: none; }
body.workbench-open #setting-generation-dialog .setting-generation-tab { color: #716B7B; background: transparent; border-color: transparent; box-shadow: none; }
body.workbench-open #setting-generation-dialog .setting-generation-tab:hover { color: #1E192D; background: #EDE6EC; border-color: transparent; box-shadow: none; }
body.workbench-open #setting-generation-dialog .setting-generation-tab.is-active { color: #1E192D; background: #FFFEFB; border-color: transparent; box-shadow: none; }
body.workbench-open #setting-generation-dialog .setting-generation-tab .setting-generation-tab-icon { color: inherit; background: transparent; border-color: transparent; box-shadow: none; }
body.workbench-open #setting-generation-dialog .setting-generation-tab small { color: #716B7B; }
body.workbench-open #setting-generation-dialog .setting-studio-nav { color: #716B7B; background: transparent; border-color: transparent; }
body.workbench-open #setting-generation-dialog .setting-studio-nav button { color: #716B7B; background: transparent; }
body.workbench-open #setting-generation-dialog .setting-studio-nav button.is-active { color: #1E192D; }
body.workbench-open #setting-generation-dialog .setting-studio-nav button.is-active::after { background: #1E192D; }
body.workbench-open #setting-generation-dialog .setting-generation-count-options span { color: #716B7B; background: #FFFEFB; border-color: transparent; box-shadow: none; }
body.workbench-open #setting-generation-dialog .setting-generation-count-options input:checked + span { color: #1E192D; background: #EDE6EC; border-color: transparent; box-shadow: none; }

/* Candidate images, history, reference selection: only controls and copy change. */
body.workbench-open #setting-generation-dialog :is(.setting-generation-candidate, .setting-generation-history-button),
body.workbench-open #setting-reference-picker-dialog .setting-reference-asset-card {
    color: #1E192D;
    background: #FFFEFB;
    border-color: transparent;
    border-radius: 18px;
    box-shadow: none;
}
body.workbench-open #setting-generation-dialog .setting-generation-candidate.is-selected,
body.workbench-open #setting-reference-picker-dialog .setting-reference-asset-card.is-current { background: #EAF2EC; border-color: transparent; box-shadow: none; }
body.workbench-open #setting-reference-picker-dialog .setting-reference-asset-card.is-selecting { background: #EDE6EC; border-color: transparent; box-shadow: none; }
body.workbench-open #setting-generation-dialog .setting-generation-candidate-preview:not(:has(> img)) { color: #716B7B; background: #F1EFEB; }
body.workbench-open #setting-generation-dialog .setting-generation-candidate-preview.is-failed { color: #A83D51; background: #FAEEF1; }
body.workbench-open #setting-generation-dialog :is(.setting-generation-candidate-copy strong, .setting-generation-history-main strong),
body.workbench-open #setting-reference-picker-dialog .setting-reference-asset-copy strong { color: #1E192D; }
body.workbench-open #setting-generation-dialog :is(.setting-generation-candidate-copy span, .setting-generation-history-main small,
    .setting-generation-history-badges em, .setting-generation-history-arrow),
body.workbench-open #setting-reference-picker-dialog .setting-reference-asset-copy :is(span, small) { color: #716B7B; }
body.workbench-open #setting-generation-dialog .setting-generation-history-badges em.is-current { color: #39775F; }
body.workbench-open #setting-generation-dialog .setting-generation-candidate-selected,
body.workbench-open #setting-reference-picker-dialog .setting-reference-asset-card.is-current .setting-reference-asset-action { color: #39775F; background: #EAF2EC; border-color: transparent; box-shadow: none; }
body.workbench-open #setting-generation-dialog .setting-generation-candidate-readonly { color: #716B7B; background: #F1EFF3; border-color: transparent; }
body.workbench-open #setting-generation-dialog .setting-generation-history-button:hover:not(:disabled),
body.workbench-open #setting-reference-picker-dialog .setting-reference-asset-card:hover:not(:disabled) { color: #1E192D; background: #F1EFF3; border-color: transparent; box-shadow: none; transform: none; }
body.workbench-open #setting-generation-dialog .setting-generation-history-actions { border-color: transparent; }
body.workbench-open #setting-reference-picker-dialog .setting-reference-picker-state { color: #716B7B; background: #F5F3F0; border-color: transparent; border-radius: 18px; box-shadow: none; }
body.workbench-open #setting-reference-picker-dialog .setting-reference-picker-state strong { color: #1E192D; }
body.workbench-open #setting-reference-picker-dialog .setting-reference-picker-state.is-error { color: #A83D51; background: #FAEEF1; }
body.workbench-open #setting-reference-picker-dialog .setting-reference-asset-preview:not(:has(> img)),
body.workbench-open #setting-reference-picker-dialog :is(.setting-reference-asset-fallback, .setting-reference-empty-visual) { color: #716B7B; background: #F1EFEB; border-color: transparent; }
body.workbench-open #setting-reference-picker-dialog .setting-reference-asset-action { color: #1E192D; background: #F1EFF3; }
body.workbench-open #setting-reference-picker-dialog .setting-reference-asset-card.is-current:disabled { opacity: 1; }

/* Native fields: keep radio/checkbox mechanics and mobile control dimensions. */
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog, #setting-generation-dialog)
    :is(input[type="text"], textarea, select) {
    color: #1E192D;
    caret-color: #1E192D;
    background-color: #FFFEFB;
    border-color: transparent;
    border-radius: 12px;
    box-shadow: none;
    color-scheme: light;
}
body.workbench-open #setting-editor-dialog :is(input[type="text"], textarea, select) { background-color: #F5F3F0; }
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog, #setting-generation-dialog)
    :is(input[type="text"], textarea, select):focus {
    color: #1E192D;
    background-color: #FFFEFB;
    border-color: #AD8B9D;
    box-shadow: 0 0 0 2px #AD8B9D26;
}
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog, #setting-generation-dialog)
    :is(input, textarea)::placeholder { color: #938C9B; -webkit-text-fill-color: #938C9B; }
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog, #setting-generation-dialog)
    :is(input[type="text"], textarea, select):disabled { color: #716B7B; -webkit-text-fill-color: #716B7B; }
body.workbench-open #setting-generation-dialog select option,
body.workbench-open #setting-editor-dialog select option { color: #1E192D; background: #FFFEFB; }
body.workbench-open #setting-generation-dialog .setting-generation-model-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 8 5 5 5-5' fill='none' stroke='%23716B7B' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
}
body.workbench-open #setting-editor-dialog .setting-kind-card { color: #716B7B; background: #F5F3F0; border-color: transparent; box-shadow: none; }
body.workbench-open #setting-editor-dialog .setting-kind-card.is-active { color: #1E192D; background: #EDE6EC; border-color: transparent; box-shadow: none; }
body.workbench-open #setting-editor-dialog .setting-kind-card :is(span, strong) { color: inherit; }

/* Existing primary / secondary / light actions, with no white-on-paper hover. */
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog,
    #setting-generation-dialog, #setting-reference-picker-dialog) .primary-button {
    color: #FFFEFB;
    background: #1E192D;
    border-color: transparent;
    border-radius: 12px;
    box-shadow: none;
}
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog,
    #setting-generation-dialog, #setting-reference-picker-dialog) .primary-button:hover:not(:disabled) { color: #FFFEFB; background: #362F45; border-color: transparent; box-shadow: none; transform: none; }
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog,
    #setting-generation-dialog, #setting-reference-picker-dialog) .secondary-button { color: #1E192D; background: #F1EFF3; border-color: transparent; border-radius: 12px; box-shadow: none; }
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog,
    #setting-generation-dialog, #setting-reference-picker-dialog) .secondary-button:hover:not(:disabled) { color: #1E192D; background: #EDE6EC; border-color: transparent; box-shadow: none; transform: none; }
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog,
    #setting-generation-dialog, #setting-reference-picker-dialog) :is(.text-button, .icon-button) { color: #716B7B; background: transparent; border-color: transparent; border-radius: 12px; box-shadow: none; }
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog,
    #setting-generation-dialog, #setting-reference-picker-dialog) :is(.text-button, .icon-button):hover:not(:disabled) { color: #1E192D; background: #F1EFF3; box-shadow: none; transform: none; }
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog,
    #setting-generation-dialog, #setting-reference-picker-dialog) :is(.primary-button, .secondary-button, .text-button, .icon-button):disabled { opacity: .45; box-shadow: none; }
body.workbench-open #view-workbench .world-surface :is(button, .setting-card):focus-visible,
body.workbench-open :is(#setting-editor-dialog, #setting-extraction-dialog,
    #setting-generation-dialog, #setting-reference-picker-dialog) :is(button, input, textarea, select):focus-visible { outline: 2px solid #AD8B9D; outline-offset: 3px; }

/* Narrow-screen studio/picker scrollbars were explicitly painted dark. */
body.workbench-open #setting-generation-dialog .setting-generation-shell::-webkit-scrollbar-track,
body.workbench-open #setting-reference-picker-dialog .setting-reference-picker-shell::-webkit-scrollbar-track { background: #FFFEFB; }
body.workbench-open #setting-generation-dialog .setting-generation-shell::-webkit-scrollbar-thumb,
body.workbench-open #setting-reference-picker-dialog .setting-reference-picker-shell::-webkit-scrollbar-thumb { background: #B5AFBB; border-color: #FFFEFB; }


/* Pai shot-state refinements. Append after pai-film-workbench.css.
   Local candidate only: no DOM, event, native disabled, pricing or take changes.
   The mirrored shot prompt and all carousel/timeline coordinates are untouched. */

/* renderShotVideoPanel: readable setup guidance and recoverable error copy. */
#view-workbench .shot-video-panel .shot-video-notice {
    color: #716B7B;
    background: #F5F3F0;
    border-color: transparent;
    border-radius: 14px;
    box-shadow: none;
    font-family: var(--pai-ui);
    font-size: 13px;
    line-height: 1.65;
}
#view-workbench .shot-video-panel .shot-video-notice.is-guidance {
    color: #67507B;
    background: #F1EFF3;
    border-color: transparent;
}
#view-workbench .shot-video-panel .shot-video-notice > span {
    color: inherit;
}
#view-workbench .shot-video-panel .shot-video-notice .text-button {
    min-height: 44px;
    padding: 8px 12px;
    color: #1E192D;
    background: #FFFEFB;
    border-color: transparent;
    border-radius: 10px;
    box-shadow: none;
    font-size: 13px;
    line-height: 1.45;
}
#view-workbench .shot-video-panel .shot-video-notice .text-button:hover:not(:disabled):not(.tutorial-unavailable) {
    color: #1E192D;
    background: #EDE6EC;
    border-color: transparent;
}
#view-workbench .shot-video-panel .shot-video-notice .text-button:focus-visible {
    outline: 2px solid #AD8B9D;
    outline-offset: 3px;
}
#view-workbench .shot-video-panel .shot-video-notice.is-error {
    color: #A83D51;
    background: #F8EBEE;
    border-color: transparent;
}

/* renderShotVideoTake: the existing text remains the state authority.
   Neutral paint is the fallback; supported DOM states add quiet semantics. */
#view-workbench .shot-video-take .shot-video-take-heading > .shot-video-take-status {
    color: #655F70;
    background: #F1EFF3;
    border-color: transparent;
    box-shadow: none;
    font-family: var(--pai-ui);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
}
#view-workbench .shot-video-take:has(.ai-video-loader) .shot-video-take-heading > .shot-video-take-status {
    color: #67507B;
    background: #EEE8F1;
}
#view-workbench .shot-video-take:has(.shot-video-select-button) .shot-video-take-heading > .shot-video-take-status,
#view-workbench .shot-video-take.is-selected .shot-video-take-heading > .shot-video-take-status {
    color: #39775F;
    background: #EAF2EC;
}
#view-workbench .shot-video-take.is-stale .shot-video-take-heading > .shot-video-take-status {
    color: #885522;
    background: #F4ECE0;
}
#view-workbench .shot-video-take:has(.shot-video-failed-mark) .shot-video-take-heading > .shot-video-take-status {
    color: #A83D51;
    background: #F8EBEE;
}

/* Native checkbox still owns checking, keyboard access and disabled behavior.
   Keep the established 42x24 track, 18px thumb and 18px travel distance. */
#view-workbench .shot-video-panel .shot-video-continuity,
#view-workbench .shot-video-panel .shot-video-continuity.is-on,
#view-workbench .shot-video-panel .shot-video-continuity:focus-within {
    color: #1E192D;
    background: #F5F3F0;
    border-color: transparent;
    box-shadow: none;
    outline: none;
    border-radius: 14px;
}
#view-workbench .shot-video-panel .shot-video-continuity:hover:not(.is-disabled) {
    background: #F1EFF3;
    border-color: transparent;
    box-shadow: none;
}
#view-workbench .shot-video-continuity .shot-video-continuity-copy strong {
    color: #1E192D;
}
#view-workbench .shot-video-continuity .shot-video-continuity-copy small {
    color: #716B7B;
}
#view-workbench .shot-video-continuity .shot-video-continuity-switch {
    background: #D9D4DE;
    border-color: transparent;
    box-shadow: none;
}
#view-workbench .shot-video-continuity .shot-video-continuity-switch::after {
    background: #FFFEFB;
    box-shadow: 0 1px 3px #1E192D14;
    transform: translateX(0);
}
#view-workbench .shot-video-continuity > input:checked + .shot-video-continuity-switch {
    background: #713F60;
}
#view-workbench .shot-video-continuity > input:checked + .shot-video-continuity-switch::after {
    transform: translateX(18px);
}
#view-workbench .shot-video-continuity > input:disabled + .shot-video-continuity-switch {
    background: #DDD8DD;
}
#view-workbench .shot-video-continuity > input:disabled + .shot-video-continuity-switch::after {
    background: #FAF9F7;
    box-shadow: none;
}
#view-workbench .shot-video-continuity > input:focus-visible + .shot-video-continuity-switch {
    outline: 2px solid #AD8B9D;
    outline-offset: 3px;
}

/* renderShotKeyframesRoute: model/count are the original native selects.
   Explicit light option paint removes inherited dark native-menu surfaces. */
#view-workbench .shot-keyframes-route .shot-keyframes-shared select {
    color: #1E192D;
    background: #FFFEFB;
    border-color: transparent;
    border-radius: 10px;
    box-shadow: none;
    color-scheme: light;
    font-family: var(--pai-ui);
}
#view-workbench .shot-keyframes-route .shot-keyframes-shared select:hover:not(:disabled) {
    background: #F1EFF3;
    border-color: transparent;
}
#view-workbench .shot-keyframes-route .shot-keyframes-shared select:focus {
    color: #1E192D;
    background: #FFFEFB;
    border-color: transparent;
    box-shadow: none;
    outline: 2px solid #AD8B9D;
    outline-offset: 2px;
}
#view-workbench .shot-keyframes-route .shot-keyframes-shared select option {
    color: #1E192D;
    background: #FFFEFB;
    color-scheme: light;
}
#view-workbench .shot-keyframes-route .shot-keyframes-shared select option:checked {
    color: #713F60;
    background: #EDE6EC;
}
#view-workbench .shot-keyframes-route .shot-keyframes-shared select option:disabled {
    color: #8E8796;
}
#view-workbench .shot-keyframes-route .shot-keyframes-route-heading strong,
#view-workbench .shot-keyframes-route .shot-keyframe-card-head strong {
    color: #1E192D;
}
#view-workbench .shot-keyframes-route .shot-keyframes-route-heading small,
#view-workbench .shot-keyframes-route .shot-keyframe-automatic small {
    color: #716B7B;
}
#view-workbench .shot-keyframes-route .shot-keyframe-card > textarea,
#view-workbench .shot-keyframes-route .shot-keyframe-transition textarea {
    color: #1E192D;
    caret-color: #1E192D;
    background: #F5F3F0;
    border-color: transparent;
    box-shadow: none;
}
#view-workbench .shot-keyframes-route .shot-keyframe-card > textarea::placeholder {
    color: #716B7B;
    opacity: 1;
}
#view-workbench .shot-keyframes-route .shot-keyframe-automatic {
    color: #1E192D;
    background: #F5F3F0;
}
#view-workbench .shot-keyframes-route .shot-keyframe-automatic > span {
    color: #713F60;
    background: #EDE6EC;
}
#view-workbench .shot-keyframes-route .shot-keyframe-transition {
    color: #1E192D;
    background: #F5F3F0;
    border-color: transparent;
}
#view-workbench .shot-keyframes-route .shot-keyframe-transition strong {
    color: #1E192D;
}
#view-workbench .shot-keyframes-route .shot-keyframe-transition small,
#view-workbench .shot-keyframes-route .shot-keyframe-candidate small,
#view-workbench .shot-keyframes-route .shot-keyframe-candidate > span {
    color: #716B7B;
}
#view-workbench .shot-keyframes-route .shot-keyframe-candidate,
#view-workbench .shot-keyframes-route .shot-keyframe-history-item {
    color: #1E192D;
    background: #F5F3F0;
    border-color: transparent;
    box-shadow: none;
}
#view-workbench .shot-keyframes-route .shot-keyframe-candidate.is-selected {
    color: #713F60;
    background: #EDE6EC;
    border-color: transparent;
    box-shadow: inset 0 0 0 2px #AD8B9D;
}
#view-workbench .shot-keyframes-route .shot-keyframe-error {
    color: #A83D51;
}

@media (prefers-reduced-motion: reduce) {
    #view-workbench .shot-video-continuity .shot-video-continuity-switch,
    #view-workbench .shot-video-continuity .shot-video-continuity-switch::after {
        transition: none;
    }
}


/* Delivery chrome is paper; video and letterboxing retain their viewing surface. */
body.workbench-open #view-workbench :is(.delivery-workspace, .delivery-stage) {
    border: 0;
    outline: 0;
    box-shadow: none;
}
body.workbench-open #view-workbench :is(.delivery-cinema, .delivery-processing,
    .delivery-ready, .delivery-empty) {
    color: #1E192D;
    background: #FFFEFB;
    border: 0;
    box-shadow: none;
}
body.workbench-open #view-workbench .delivery-screening-room {
    background: #F5F3F0;
    border: 0;
    box-shadow: none;
}
body.workbench-open #view-workbench .delivery-cinema-stage {
    background: #F5F3F0;
}
body.workbench-open #view-workbench .delivery-cinema-stage::before { content: none; }
body.workbench-open #view-workbench .delivery-film-frame.final-video-preview {
    border: 0;
    box-shadow: none;
}
body.workbench-open #view-workbench .delivery-enhance-frame-tag {
    color: #1E192D;
    background: #FFFEFB;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}
body.workbench-open #view-workbench .delivery-enhance-frame-tag i {
    background: #E84FB7;
    box-shadow: none;
}
body.workbench-open #view-workbench :is(.delivery-master-bar, .delivery-finish-dock) {
    border: 0;
    box-shadow: none;
}
body.workbench-open #view-workbench .delivery-resolution-option:disabled,
body.workbench-open #view-workbench .delivery-resolution-option[aria-pressed="true"]:disabled {
    color: #716B7B;
    background: #F1EFF3;
    border: 0;
    box-shadow: none;
}
/* Native controls use the same light palette, including their system popup. */
body.workbench-open #view-workbench :is(select, option, input, textarea) {
    color-scheme: light;
}


/* Rough-cut control refinements. Append after pai-film-state-refinements.css.
   Flat button text remains available to accessibility through the existing
   aria-label/title. JS still owns playback, loading, seeking and timeline scale.
   Button dimensions, scrollbar travel, media clocks and all events stay intact. */

/* The generic secondary-button:hover rule previously exposed the flat text
   and turned the icon's ink button into a pale button after a click. */
body.workbench-open #view-workbench .rough-timeline-tools .rough-timeline-play-toggle {
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-size: 0;
    text-shadow: none;
    background: #1E192D;
    border-color: transparent;
    border-radius: 10px;
    box-shadow: none;
}
body.workbench-open #view-workbench .rough-timeline-tools .rough-timeline-play-toggle:is(:hover, :focus-visible, :active):not(:disabled) {
    color: transparent;
    -webkit-text-fill-color: transparent;
    background: #362F45;
    border-color: transparent;
    box-shadow: none;
    transform: none;
}
body.workbench-open #view-workbench .rough-timeline-tools .rough-timeline-play-toggle:focus-visible {
    outline: 2px solid #AD8B9D;
    outline-offset: 3px;
}
body.workbench-open #view-workbench .rough-timeline-tools .rough-timeline-play-toggle:disabled {
    color: transparent;
    -webkit-text-fill-color: transparent;
    background: #1E192D;
    border-color: transparent;
    box-shadow: none;
    opacity: .45;
}
body.workbench-open #view-workbench .rough-timeline-play-toggle:not(.is-playing):not(.is-loading)::before {
    border-top-color: transparent;
    border-bottom-color: transparent;
    border-left-color: #FFFEFB;
    background: transparent;
    box-shadow: none;
}
body.workbench-open #view-workbench .rough-timeline-play-toggle.is-playing::before {
    background: linear-gradient(90deg, #FFFEFB 0 3px, transparent 3px 5px, #FFFEFB 5px 8px);
    border-color: transparent;
    box-shadow: none;
}
body.workbench-open #view-workbench .rough-timeline-play-toggle.is-loading::before {
    background: transparent;
    border-color: #FFFEFB50;
    border-top-color: #FFFEFB;
    box-shadow: none;
}

/* The blue bar beneath the tracks is a custom horizontal scrollbar. Its
   width/transform, rail hit area and hover/drag growth remain owned by JS/base CSS. */
body.workbench-open #view-workbench .rough-timeline-browser-rail::before {
    background: #E5E2DD;
    box-shadow: none;
}
body.workbench-open #view-workbench .rough-timeline-browser-thumb {
    background: #AD8B9D;
    border-color: transparent;
    box-shadow: none;
}
body.workbench-open #view-workbench .rough-timeline-browser-rail:is(:hover, :focus-visible, .is-dragging) .rough-timeline-browser-thumb {
    background: #713F60;
    box-shadow: none;
}
body.workbench-open #view-workbench .rough-timeline-browser-rail:focus-visible {
    outline: 2px solid #AD8B9D;
    outline-offset: 2px;
}
body.workbench-open #view-workbench .rough-timeline-browser-rail:focus-visible::before {
    background: #E5E2DD;
}

/* Native timeline zoom and preview seek ranges keep their native values,
   bounds, step, width, hit area and input/change behavior. WebKit does not
   expose a progress pseudo-element, so its full track remains honest paper gray. */
body.workbench-open #view-workbench :is(.rough-timeline-zoom input[type="range"], input.rough-monitor-progress[type="range"]) {
    -webkit-appearance: none;
    appearance: none;
    accent-color: #713F60;
    color-scheme: light;
    color: #713F60;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}
body.workbench-open #view-workbench :is(.rough-timeline-zoom input[type="range"], input.rough-monitor-progress[type="range"])::-webkit-slider-runnable-track {
    height: 4px;
    background: #E5E2DD;
    border: 0;
    border-radius: 999px;
    box-shadow: none;
}
body.workbench-open #view-workbench :is(.rough-timeline-zoom input[type="range"], input.rough-monitor-progress[type="range"])::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -5px;
    background: #713F60;
    border: 2px solid #FFFEFB;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #AD8B9D;
}
body.workbench-open #view-workbench :is(.rough-timeline-zoom input[type="range"], input.rough-monitor-progress[type="range"])::-moz-range-track {
    height: 4px;
    background: #E5E2DD;
    border: 0;
    border-radius: 999px;
    box-shadow: none;
}
body.workbench-open #view-workbench :is(.rough-timeline-zoom input[type="range"], input.rough-monitor-progress[type="range"])::-moz-range-progress {
    height: 4px;
    background: #AD8B9D;
    border: 0;
    border-radius: 999px;
}
body.workbench-open #view-workbench :is(.rough-timeline-zoom input[type="range"], input.rough-monitor-progress[type="range"])::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: #713F60;
    border: 2px solid #FFFEFB;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #AD8B9D;
}
body.workbench-open #view-workbench :is(.rough-timeline-zoom input[type="range"], input.rough-monitor-progress[type="range"]):focus-visible {
    outline: 2px solid #AD8B9D;
    outline-offset: 3px;
    border-radius: 8px;
}
body.workbench-open #view-workbench :is(.rough-timeline-zoom input[type="range"], input.rough-monitor-progress[type="range"]):disabled { opacity: .45; }


/* Legacy image covers keep their media and mobile background-paint workaround. */
.app-page #view-productions .production-cover {
    border: 0;
    outline: 0;
    box-shadow: none;
    background-color: #F1EFEB;
}
.app-page #view-productions .production-cover:not(.has-image) {
    background-image: none;
}
.app-page #view-productions .production-card:is(.is-selected, [aria-selected="true"]) .production-cover {
    box-shadow: 0 0 0 2px rgba(113, 63, 96, .16);
}
.app-page #view-productions .production-cover:focus-visible {
    outline: 2px solid rgba(113, 63, 96, .45);
    outline-offset: 3px;
}

/* Preview preparation is a small status over the last frame. The old opaque
   backdrop (with no radius of its own) escaped rounded clipping on mobile. */
body.workbench-open .rough-monitor-rendering-status {
    border-radius: inherit;
    overflow: hidden;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body.workbench-open .rough-monitor-rendering-layout {
    display: flex;
    width: auto;
    align-items: center;
    gap: 9px;
    padding: 11px 15px;
    border-radius: 999px;
    color: #716B7B;
    background: #FFFEFB;
}
body.workbench-open .rough-monitor-rendering-copy {
    display: flex;
    width: auto;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    --pai-wait-text-base: #716B7B;
    --pai-wait-text-light: #AD8B9D;
}
body.workbench-open .rough-monitor-rendering-copy > span { width: auto; }
body.workbench-open .rough-monitor-rendering-spinner {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}
