/* Pai film surfaces. Existing geometry, states, media and control contracts stay
   in paiban-app.css / paiban-create.css. This layer owns presentation only. */
body.workbench-open {
    --director-bg: #F1EFEB;
    --director-panel: #FFFEFB;
    --director-raised: #F1EFF3;
    --director-line: transparent;
    --director-line-strong: transparent;
    --director-copy: #1E192D;
    --director-muted: #716B7B;
    font-family: var(--pai-ui);
    color-scheme: light;
}
body.workbench-open .app-main { background: var(--director-bg); }
#view-workbench {
    color: #1E192D;
    font-family: var(--pai-ui);
    --shot-dark: #FFFEFB;
    --shot-panel: #FFFEFB;
    --shot-panel-raised: #F1EFF3;
    --shot-line: transparent;
    --shot-copy: #1E192D;
    --shot-muted: #716B7B;
}
#view-workbench :is(.shot-card, .frame-shot-card, .story-ritual-surface) {
    --shot-dark: #FFFEFB;
    --shot-panel: #FFFEFB;
    --shot-panel-raised: #F1EFF3;
    --shot-line: transparent;
    --shot-copy: #1E192D;
    --shot-muted: #716B7B;
    --story-shot-copy: #1E192D;
    --story-shot-muted: #716B7B;
    --story-shot-panel: #FFFEFB;
    --story-shot-line: transparent;
}
#view-workbench .world-surface {
    --world-panel: #FFFEFB;
    --world-panel-raised: #F1EFF3;
    --world-line: transparent;
    --world-copy: #1E192D;
    --world-muted: #716B7B;
    --world-card-preview-surface: #F1EFEB;
}
/* The creation dialog keeps the existing form, options and keyboard handling. */
#create-dialog {
    --pb-bg: #FFFEFB;
    --pb-field: #F1EFEB;
    --pb-text: #1E192D;
    --pb-muted: #716B7B;
    --pb-line: transparent;
    --pb-accent: #1E192D;
    --pb-tint: #F1EFF3;
    --pb-button: #1E192D;
    --pb-on: #FFFEFB;
    --pb-error: #A83D51;
    color-scheme: light;
    font-family: var(--pai-ui);
    border: 1px solid transparent;
    border-radius: 26px;
    box-shadow: 0 24px 70px #1E192D14;
}
#create-dialog::backdrop { background: #1E192D47; backdrop-filter: none; }
#create-dialog .pc-head h2 { font-family: PaiNunito, PaiTitles, PaiWorkspace, "PingFang SC", sans-serif; font-weight: 600; letter-spacing: -.025em; }
#create-dialog .pc-head h2 span { color: #1E192D; }
#create-dialog .pc-title { border-bottom-color: transparent; }
#create-dialog .pc-style { border-color: transparent; border-radius: 15px; }
#create-dialog .pc-style-value, #create-dialog .pc-link { color: #716B7B; }
#create-dialog .pc-modes button[aria-pressed=true] { color: #1E192D; }
#create-dialog .pc-preset[aria-pressed=true] { background: #EDE6EC; color: #713F60; border-color: transparent; }
#create-dialog .pc-ratios { border-color: transparent; border-radius: 12px; }
#create-dialog .pc-ratios [aria-pressed=true] { background: #FFFEFB; color: #1E192D; box-shadow: 0 1px 4px #1E192D08; }
#create-dialog .pc-primary { border-radius: 12px; }
#create-dialog .pc-primary:hover:not(:disabled) { background: #362F45; }
#create-dialog .pb-text-working { --pb-sheen-base: #716B7B; --pb-sheen-light: #AD8B9D; }
/* Shared film dialogs, including editors created by the existing renderer. */
:is(#production-format-dialog, #work-source-dialog, #delete-work-item-dialog,
    #setting-editor-dialog, #setting-extraction-dialog, #production-style-dialog,
    #setting-reference-picker-dialog, #setting-generation-dialog, #shot-reference-dialog,
    #story-generation-dialog, #storyboard-preview-dialog, #model-audition-dialog,
    #frames-next-actions),
body.workbench-open :is(.shot-insert-dialog, .rough-cut-inspector-dialog, .shot-video-adjustment-dialog) {
    color: #1E192D;
    color-scheme: light;
    font-family: var(--pai-ui);
    background: #FFFEFB;
    border-color: transparent;
    border-radius: 26px;
    box-shadow: 0 24px 70px #1E192D14;
    --shot-copy: #1E192D;
    --shot-muted: #716B7B;
    --shot-panel: #FFFEFB;
    --shot-panel-raised: #F1EFF3;
    --shot-line: transparent;
    --world-copy: #1E192D;
    --world-muted: #716B7B;
    --world-panel: #FFFEFB;
    --world-panel-raised: #F1EFF3;
    --world-line: transparent;
}
body.workbench-open dialog::backdrop { background: #1E192D47; backdrop-filter: none; }
/* Keep the heading on one axis when shorter chapters do not need a scrollbar. */
body.workbench-open .app-main { scrollbar-gutter: stable; }

/* Navigation and reading surfaces. */
#view-workbench :is(.workbench-topbar, .workbench-steps) { background: var(--director-bg); border-color: transparent; box-shadow: none; }
#view-workbench :is(.workbench-back, .workbench-format, .workbench-step) { color: #716B7B; }
#view-workbench .workbench-title, #view-workbench .workbench-identity h1 { color: #1E192D; font-family: PaiNunito, PaiTitles, PaiWorkspace, "PingFang SC", sans-serif; }
/* A document heading and light chapter navigation share one quiet surface. */
#view-workbench .workbench-topbar {
    min-height: 80px;
    padding-top: 12px;
    padding-bottom: 12px;
    grid-template-columns: 88px minmax(0, 1fr) 88px;
    gap: 16px;
    backdrop-filter: none;
}
#view-workbench .workbench-back {
    width: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    color: #1E192D;
    border-radius: 12px;
}
#view-workbench .workbench-back span { display: none; }
#view-workbench .workbench-back svg { width: 20px; height: 20px; }
#view-workbench .workbench-identity {
    position: static;
    width: auto;
    min-width: 0;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 4px;
    text-align: center;
    transform: none;
}
#view-workbench .workbench-identity h1 {
    width: 100%;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    text-align: center;
    order: 0;
}
#view-workbench .workbench-format {
    display: block;
    min-width: 0;
    max-width: 100%;
    min-height: 18px;
    padding: 0;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    order: 0;
}
#view-workbench .workbench-save-status {
    position: static;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    justify-self: end;
    margin: 0;
    padding: 0 4px;
    gap: 6px;
    font-size: 11px;
    line-height: 1.4;
}
#view-workbench #workbench-save-copy { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view-workbench .workbench-steps {
    width: min(560px, 100%);
    min-height: 44px;
    margin: 0 auto 16px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
    background: var(--director-bg);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}
#view-workbench .workbench-steps > i { display: none; }
#view-workbench .workbench-step {
    position: relative;
    min-width: 0;
    min-height: 44px;
    padding: 4px 2px 8px;
    gap: 0;
    color: #716B7B;
    background: transparent;
    border-radius: 8px;
    transform: none;
    box-shadow: none;
    transition: color .16s ease, background .16s ease;
}
#view-workbench .workbench-step:hover { color: #1E192D; background: #EAE7ED; transform: none; }
#view-workbench .workbench-step:focus-visible { outline: 2px solid #8E8796; outline-offset: -2px; }
#view-workbench .workbench-step > span { display: none; }
#view-workbench .workbench-step strong { font-size: 15px; font-weight: 500; letter-spacing: 0; }
#view-workbench .workbench-step em { display: none; }
#view-workbench .workbench-step.is-active { color: #1E192D; background: transparent; box-shadow: none; }
#view-workbench .workbench-step.is-active strong { font-weight: 700; }
#view-workbench .workbench-step::after {
    content: "";
    position: absolute;
    left: calc(50% - 10px);
    bottom: 3px;
    width: 20px;
    height: 3px;
    border-radius: 3px;
    background: #1E192D;
    opacity: 0;
    transform: scaleX(.6);
    transition: opacity .16s ease, transform .16s ease;
    pointer-events: none;
}
#view-workbench .workbench-step.is-active::after { opacity: 1; transform: scaleX(1); }
@media (max-width: 760px) {
    #view-workbench .workbench-topbar {
        height: calc(64px + env(safe-area-inset-top));
        min-height: calc(64px + env(safe-area-inset-top));
        max-height: calc(64px + env(safe-area-inset-top));
        padding: env(safe-area-inset-top) 14px 0;
        grid-template-columns: 72px minmax(0, 1fr) 72px;
        gap: 8px;
        flex: 0 0 calc(64px + env(safe-area-inset-top));
    }
    #view-workbench .workbench-identity h1 { font-size: 16px; }
    #view-workbench .workbench-format { font-size: 11px; }
    #view-workbench .workbench-save-status { font-size: 11px; }
    #view-workbench .workbench-steps {
        top: calc(64px + env(safe-area-inset-top));
        width: 100%;
        height: auto;
        min-height: 44px;
        max-height: none;
        margin: 0 0 4px;
        padding: 0;
        gap: 4px;
        border-radius: 0;
        flex: 0 0 auto;
    }
    #view-workbench .workbench-step {
        height: 44px;
        min-height: 44px;
        max-height: none;
        padding: 4px 2px 8px;
        flex-direction: row;
        gap: 0;
        border-radius: 8px;
    }
    #view-workbench .workbench-step strong { font-size: 15px; line-height: 1.4; }
    body.rough-cut-mobile-workspace #view-workbench .workbench-steps { position: relative; top: auto; }
}
@media (prefers-reduced-motion: reduce) {
    #view-workbench .workbench-step, #view-workbench .workbench-step::after { transition: none; }
}
#view-workbench :is(.eyebrow, .workbench-format) { color: #716B7B; }
#view-workbench :is(.story-ritual-surface, .world-surface, .frame-shot-card, .workbench-card,
    .story-editor, .story-breakdown-panel, .production-style-card, .frame-status-overview,
    .setting-card, .workbench-empty, .workbench-card-list, .shot-draft-summary,
    .frames-waiting-card, .rough-cut-waiting-card, .delivery-waiting-card) {
    color: #1E192D;
    background: #FFFEFB;
    border-color: transparent;
    box-shadow: none;
}
#view-workbench :is(.story-ritual-surface, .world-surface) { border-radius: 24px; }
#view-workbench .story-ritual-surface::before { background: none; opacity: 0; }
#view-workbench :is(.workbench-stage-heading h2, .world-heading h2) { color: #1E192D; font-family: PaiNunito, PaiTitles, PaiWorkspace, "PingFang SC", sans-serif; }
#view-workbench .story-ritual-surface .workbench-stage-heading h2 { color: #1E192D; font-family: PaiNunito, PaiTitles, PaiWorkspace, "PingFang SC", sans-serif; }
#view-workbench :is(.workbench-stage-heading p, .story-draft-subline p, .story-draft-summary,
    .story-draft-save-note, .story-editor small, .story-editor > label, .settings-stage-intro,
    .setting-card-description, .settings-summary, .frame-shot-copy p, .shot-reference-strip-copy p,
    .frame-shot-inline-hint, .frames-complete-copy, .workbench-empty p, .rough-cut-helper,
    .final-copy, .rough-cut-panel-heading p, .workbench-loading) { color: #716B7B; }
#view-workbench .story-ritual-surface .workbench-stage-heading .eyebrow { color: #716B7B; font-family: var(--pai-ui); font-weight: 500; }
#view-workbench .story-ritual-surface .workbench-stage-heading > p:last-child,
#view-workbench .story-ritual-surface .workbench-stage-heading > div > p:last-child { color: #716B7B; }
#view-workbench :is(.story-editor-footer, .story-editor small, .workbench-card-head,
    .world-toolbar, .setting-card-footer, .shot-image-generation, .shot-video-generation) { border-color: transparent; }
#view-workbench :is(.story-editor textarea, .workbench-input, .workbench-textarea,
    .frame-shot-inline-field .workbench-input, .frame-shot-inline-field .workbench-textarea,
    .shot-video-prompt-input-shell,
    .shot-image-generation-field select, .shot-video-spec-field select, .shot-video-spec-value,
    .shot-duration-input, .shot-card-title-input, .shot-card-prompt-field textarea) {
    color: #1E192D;
    caret-color: #1E192D;
    background: #F5F3F0;
    border-color: transparent;
    box-shadow: none;
}
#view-workbench .story-editor textarea { background: transparent; }
/* Story opening: one soft input card, with the label kept for screen readers. */
#view-workbench #workbench-story-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
#view-workbench #story-pane-story .story-editor:not(:has(.tutorial-course-field)) {
    min-height: 0;
    padding: 0;
    gap: 16px;
    background: transparent;
    box-shadow: none;
}
#view-workbench .story-input-shell { position: relative; min-width: 0; }
#view-workbench #workbench-story:not(.tutorial-course-field) {
    display: block;
    height: 264px;
    min-height: 180px;
    padding: 20px;
    border: 0;
    border-radius: 20px;
    color: #1E192D;
    background: #F5F3F0;
    font: 400 16px/1.85 var(--pai-ui);
    letter-spacing: 0;
    resize: vertical;
}
#view-workbench #workbench-story:not(.tutorial-course-field):focus {
    border: 0;
    background: #F1EFEB;
    box-shadow: none;
}
#view-workbench .story-input-hint {
    position: absolute;
    inset: 0;
    padding: 20px;
    overflow: hidden;
    pointer-events: none;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    font: 400 16px/1.85 var(--pai-ui);
    letter-spacing: 0;
    color: #716B7B;
    --pb-sheen-base: #716B7B;
    --pb-sheen-light: #D9CDD5;
}
#view-workbench .story-input-hint[hidden] { display: none; }
#view-workbench #workbench-story-hint::after { content: none; }
#view-workbench .is-showing-story-hint #workbench-story::placeholder { color: transparent; }
@media (max-width: 700px) {
    #view-workbench #workbench-story:not(.tutorial-course-field) {
        height: 232px;
        padding: 16px;
        border-radius: 18px;
    }
    #view-workbench .story-input-hint { padding: 16px; }
}
/* The editable text and reference mirror are a pair. Keep all authored geometry
   and the existing composition/scroll handlers; only change their paint. */
#view-workbench .shot-video-prompt-field { color: #1E192D; background: #F5F3F0; border-color: transparent; box-shadow: none; }
#view-workbench .shot-video-prompt-field textarea,
#view-workbench .shot-video-prompt-inline-highlight { color: #1E192D; background: transparent; border-color: transparent; caret-color: #1E192D; }
#view-workbench .shot-video-prompt-field textarea { -webkit-text-fill-color: #1E192D; }
#view-workbench .shot-video-prompt-input-shell.has-inline-bindings textarea { color: transparent; -webkit-text-fill-color: transparent; background: transparent; caret-color: #1E192D; }
#view-workbench .shot-video-prompt-input-shell.has-inline-bindings textarea::selection { color: transparent; -webkit-text-fill-color: transparent; background: #AD8B9D40; }
#view-workbench .shot-video-prompt-input-shell.is-composing textarea { color: #1E192D; -webkit-text-fill-color: #1E192D; background: transparent; }
#view-workbench .shot-video-prompt-field textarea:disabled { caret-color: #716B7B; }
#view-workbench .shot-video-prompt-field textarea:focus { border-color: transparent; outline-color: #AD8B9D; }
#view-workbench .shot-video-prompt-field :is(small, .shot-video-binding-feedback-label, .shot-video-prompt-label-row small) { color: #716B7B; }
#view-workbench .shot-video-mention-menu { color: #1E192D; background: #FFFEFB; border-color: transparent; box-shadow: 0 12px 30px #1E192D14; backdrop-filter: none; }
#view-workbench .shot-video-mention-option { color: #67507B; background: #EEE8F1; border-color: transparent; box-shadow: none; }
#view-workbench .shot-video-mention-option.is-location { color: #39775F; background: #EAF2EC; }
#view-workbench .shot-video-mention-option.is-prop { color: #885522; background: #F4ECE0; }
#view-workbench .shot-video-mention-option:is(:hover, .is-active) { border-color: transparent; }
#view-workbench .shot-video-mention-dot { background: currentColor; box-shadow: none; }
@media (forced-colors: active) {
    #view-workbench .shot-video-prompt-input-shell.has-inline-bindings textarea { color: CanvasText; -webkit-text-fill-color: CanvasText; background: Canvas; }
}
#view-workbench :is(input, textarea)::placeholder { color: #8E8796; opacity: 1; }
#view-workbench :is(.workbench-input, .workbench-textarea):focus { border-color: transparent; outline-color: #AD8B9D; box-shadow: none; }
/* Controls retain their current sizes, order, availability and event handlers. */
#view-workbench :is(.primary-button, .shot-image-generate-button, .shot-video-generate-button,
    .rough-cut-export-button, .rough-monitor-play),
:is(#setting-editor-dialog, #setting-extraction-dialog, #setting-generation-dialog,
    #production-style-dialog, #shot-reference-dialog, #storyboard-preview-dialog,
    #model-audition-dialog, #production-format-dialog) .primary-button {
    background: #1E192D;
    border-color: transparent;
    color: #FFFEFB;
    border-radius: 12px;
    box-shadow: none;
}
#view-workbench .primary-button :is(span, strong, small) { color: inherit; }
#view-workbench :is(.primary-button, .shot-image-generate-button, .shot-video-generate-button):hover:not(:disabled) { background: #362F45; }
#view-workbench :is(.secondary-button, .icon-button, .story-source-edit, .text-button,
    .shot-video-enhance-button, .frame-shot-edit-button, .frame-shot-delete-button,
    .frame-card-add-button, .world-agent-action, .world-reorganize-action, .shot-card-delete-button) {
    color: #716B7B;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}
#view-workbench :is(.text-button, .icon-button, .story-source-edit, .frame-shot-edit-button):hover { color: #1E192D; background: #F1EFF3; }
#view-workbench :is(.secondary-button, .world-agent-action):hover { color: #1E192D; background: #F1EFF3; }
#view-workbench .frame-shot-delete-button:hover { color: #A83D51; background: #F8ECED; }
#view-workbench :is(button, a, input, textarea, select):focus-visible,
#create-dialog :is(button, input, textarea, select):focus-visible { outline: 2px solid #AD8B9D; outline-offset: 3px; }
/* World and shot tools use quiet paper layers. Status colours remain semantic. */
#view-workbench :is(.setting-filter, .story-pane-button) { color: #716B7B; background: transparent; border-color: transparent; box-shadow: none; }
#view-workbench :is(.setting-filter.is-active, .story-pane-button.is-active) { color: #1E192D; background: #F1EFF3; border-color: transparent; }
#view-workbench .setting-filter.is-active::after { content: none; }
#view-workbench :is(.setting-extraction-tool, .story-breakdown-panel, .shot-reference-strip,
    .frame-shot-inline-editor, .frame-shot-inline-field, .shot-video-continuity,
    .shot-video-options, .shot-image-generation, .shot-video-generation) { background: #F5F3F0; border-color: transparent; box-shadow: none; }
#view-workbench :is(.setting-extraction-tool-icon, .story-breakdown-icon, .setting-empty-icon,
    .world-empty-symbols, .story-expansion-path) { color: #716B7B; }
#view-workbench .story-expansion-path i { background: #AD8B9D; box-shadow: none; }
#view-workbench .story-expansion-path b { background: #E5E2DD; }
#view-workbench :is(.setting-card h3, .setting-extraction-tool-title,
    .setting-extraction-tool-copy strong, .frame-shot-copy strong, .frame-shot-copy h3,
    .shot-reference-strip-copy strong, .workbench-card-number, .workbench-empty h3,
    .story-breakdown-copy strong, .frame-shot-inline-field > span,
    .shot-image-generation-field > span, .shot-video-spec-field > span,
    .shot-video-prompt-label-row, .shot-video-quote, .shot-image-quote,
    .shot-video-continuity-label, .shot-duration-unit, .shot-card-title-editor small) { color: #1E192D; }
#view-workbench :is(.shot-video-reference-mode-options, .setting-generation-tabs) { background: #F1EFEB; border-color: transparent; box-shadow: none; }
#view-workbench .shot-video-reference-option { color: #716B7B; background: transparent; border-color: transparent; box-shadow: none; }
#view-workbench .shot-video-reference-option :is(strong, small) { color: inherit; }
#view-workbench .shot-video-reference-option.is-selected { color: #1E192D; background: #FFFEFB; border-color: transparent; box-shadow: 0 1px 5px #1E192D08; }
#view-workbench .shot-video-reference-option.is-selected :is(strong, small) { color: inherit; }
#view-workbench :is(.shot-reference-chip, .shot-video-binding-chip, .shot-video-prompt-inline-binding) { color: #67507B; background: #EEE8F1; border-color: transparent; box-shadow: none; }
#view-workbench :is(.shot-reference-chip.is-location, .shot-video-binding-chip.is-location, .shot-video-prompt-inline-binding.is-location) { color: #874F6E; background: #F2E7EE; border-color: transparent; }
#view-workbench :is(.shot-reference-chip.is-prop, .shot-video-binding-chip.is-prop, .shot-video-prompt-inline-binding.is-prop) { color: #885522; background: #F4ECE0; border-color: transparent; }
#view-workbench .shot-reference-strip.is-ready { background: #EFF4EF; border-color: transparent; box-shadow: none; }
#view-workbench .shot-reference-strip.is-ready strong { color: #39775F; }
#view-workbench :is(.shot-reference-strip.is-blocked, .shot-reference-strip.is-outdated) { background: #F8EFED; border-color: transparent; box-shadow: none; }
#view-workbench :is(.shot-reference-strip.is-blocked, .shot-reference-strip.is-outdated) strong { color: #885522; }
#view-workbench .setting-status { color: #885522; background: #F4ECE0; border-color: transparent; }
#view-workbench .setting-status.is-ready { color: #39775F; background: #EFF4EF; border-color: transparent; }
#view-workbench .frame-status-cell { background: #F1EFEB; border-color: transparent; color: #716B7B; box-shadow: none; }
#view-workbench .frame-status-cell.is-complete { color: #39775F; background: #EAF2EC; border-color: transparent; }
#view-workbench .frame-status-cell.is-pending { color: #885522; background: #F4ECE0; border-color: transparent; }
#view-workbench .frame-status-cell.is-current { color: #FFFEFB; background: #1E192D; border-color: transparent; box-shadow: none; }
#view-workbench .workbench-save-status.is-saved { color: #39775F; }
#view-workbench .workbench-save-status.is-saving { color: #716B7B; }
#view-workbench .workbench-save-status.is-pending { color: #885522; }
#view-workbench .workbench-save-status.is-error { color: #A83D51; }
#view-workbench .workbench-save-status .save-status-dot { box-shadow: none; }
#view-workbench .workbench-save-status.is-saved .save-status-dot { background: #39775F; }
#view-workbench .workbench-save-status.is-saving .save-status-dot { background: #AD8B9D; }
#view-workbench .workbench-save-status.is-pending .save-status-dot { background: #885522; }
#view-workbench .workbench-save-status.is-error .save-status-dot { background: #A83D51; }
#view-workbench .frame-shot-card.is-targeted, #view-workbench .frame-shot-card.is-current { border-color: transparent; box-shadow: none; }
#view-workbench .frame-status-grid { background: #F5F3F0; border-color: transparent; }
#view-workbench .frame-status-total { color: #39775F; background: #EAF2EC; border-color: transparent; }
#view-workbench :is(.frame-status-heading-copy > span, .frame-shot-eyebrow) { color: #716B7B; }
#view-workbench .shot-reference-manage-chip { color: #655F70; background: #FFFEFB; border-color: transparent; box-shadow: none; }
#view-workbench .shot-reference-manage-chip:hover { color: #1E192D; background: #F1EFF3; }
#view-workbench .shot-video-enhance-spark { color: inherit; text-shadow: none; }
#view-workbench .frame-shot-copy::before { color: #716B7B; }
#view-workbench .shot-image-candidate.is-selected .shot-image-candidate-result { color: #39775F; background: #EAF2EC; }
#view-workbench :is(.shot-image-comparison-heading h4, .shot-image-candidate-heading strong,
    .shot-video-take-heading strong, .shot-version-history-heading strong) { color: #1E192D; }
#view-workbench :is(.shot-image-comparison-heading p, .shot-image-candidate-status,
    .shot-video-take-heading span, .shot-video-take-spec, .shot-version-history-heading span,
    .shot-version-history-meta, .shot-version-history-label) { color: #716B7B; }
#view-workbench :is(.shot-image-candidate, .shot-version-history-group,
    .shot-version-history-candidate, .shot-video-take, .shot-keyframes-route) { color: #1E192D; background: #F5F3F0; border-color: transparent; box-shadow: none; }
#view-workbench :is(.shot-image-candidate.is-selected, .shot-version-history-candidate.is-selected) { border-color: transparent; box-shadow: none; }
#view-workbench :is(.shot-image-choice-button, .shot-video-select-button, .shot-keyframe-generate-button) { color: #FFFEFB; background: #1E192D; border-color: transparent; box-shadow: none; }
#view-workbench .shot-version-history-toggle { color: #716B7B; background: #F5F3F0; border-color: transparent; box-shadow: none; }
#view-workbench .shot-version-history-toggle:hover { color: #1E192D; background: #F1EFF3; }
#view-workbench .shot-version-history-icon { color: #716B7B; background: #F1EFF3; border-color: transparent; }
#view-workbench .shot-video-take-spec span { color: #655F70; background: #FFFEFB; border-color: transparent; }
#view-workbench .shot-video-take.is-selected .shot-video-take-heading > .shot-video-take-status { color: #39775F; background: #EAF2EC; border-color: transparent; }
#view-workbench :is(.shot-video-adjust-button, .shot-video-take-actions .secondary-button,
    .frame-carousel-mobile-navigation button, .frame-card-mobile-navigation button) { color: #716B7B; background: #F5F3F0; border-color: transparent; box-shadow: none; }
#view-workbench .shot-video-reference-option { color: #655F70; }
/* The old mobile select labels use an important declaration; match only paint. */
@media (max-width: 760px) {
    #view-workbench :is(.shot-video-spec-field, .shot-image-generation-field) > span,
    #setting-generation-dialog :is(.setting-generation-model-field > span, .setting-generation-count legend) { color: #716B7B !important; }
}
/* Quick cut: the monitor stays dark; the surrounding controls become paper. */
#view-workbench :is(.rough-cut-shell, .rough-cut-workspace, .rough-cut-panel,
    .rough-cut-program-panel, .rough-cut-inspector, .rough-timeline-panel,
    .rough-cut-footer, .rough-cut-clip-card, .rough-cut-settings,
    .rough-cut-agent-panel, .rough-cut-export-panel, .rough-cut-state,
    .final-export-card, .delivery-stage, .delivery-shell) { color: #1E192D; background: #FFFEFB; border-color: transparent; box-shadow: none; }
#view-workbench :is(.rough-cut-preview, .final-video-shell, .delivery-video-shell) { background: #1E192D; }
#view-workbench :is(.rough-cut-panel-heading h3, .rough-cut-program-panel h3,
    .rough-cut-inspector h3, .rough-cut-inspector label, .rough-cut-footer strong,
    .rough-cut-clip-card strong, .rough-timeline-track-label, .rough-cut-timeline-title,
    .final-heading h2, .delivery-heading h2, .delivery-agent strong) { color: #1E192D; }
#view-workbench :is(.rough-cut-program-panel .rough-cut-panel-heading p,
    .rough-cut-preview-eyebrow, .rough-cut-inspector small, .rough-cut-footer p,
    .rough-monitor-time, .rough-cut-export-status, .delivery-agent p,
    .delivery-wait-note, .rough-cut-empty p, .final-state p) { color: #716B7B; }
#view-workbench :is(.rough-cut-inspector input:not([type=range]):not([type=color]),
    .rough-cut-inspector select, .rough-cut-inspector textarea,
    .rough-subtitle-input, .rough-cut-track-input) { color: #1E192D; background: #F5F3F0; border-color: transparent; box-shadow: none; }
#view-workbench :is(.rough-monitor-controls, .rough-timeline-toolbar,
    .rough-timeline-ruler, .rough-timeline-track, .rough-timeline-label,
    .rough-cut-inspector-tabs, .rough-cut-mobile-tabs) { background: #F5F3F0; color: #716B7B; border-color: transparent; box-shadow: none; }
#view-workbench :is(.rough-timeline-clip, .rough-cut-clip-card.is-selected) { background: #EDE6EC; border-color: transparent; color: #1E192D; box-shadow: none; }
#view-workbench :is(.rough-timeline-clip.is-selected, .rough-cut-inspector-tabs .is-active) { background: #E3D7E1; border-color: transparent; color: #1E192D; }
#view-workbench :is(.rough-monitor-controls button:not(.rough-monitor-play), .rough-timeline-toolbar button) { color: #716B7B; background: transparent; border-color: transparent; box-shadow: none; }
#view-workbench .rough-monitor-play { color: #FFFEFB; background: #1E192D; }
#view-workbench .rough-timeline-playhead { background: transparent; }
#view-workbench .rough-monitor-clip { color: #716B7B; }
#view-workbench :is(.rough-timeline-labels, .rough-timeline-row, .rough-timeline-video-track,
    .rough-timeline-subtitle-track, .rough-timeline-source-audio, .rough-timeline-audio-track,
    .rough-timeline-zoom) { color: #716B7B; background: #F5F3F0; border-color: transparent; box-shadow: none; }
#view-workbench .rough-timeline-canvas { background: #F5F3F0; }
#view-workbench :is(.rough-timeline-tick, .rough-timeline-clip-body, .rough-timeline-clip-body strong,
    .rough-timeline-clip-body small, .rough-timeline-zoom > span, .rough-timeline-subtitle-empty,
    .rough-timeline-audio-track.is-empty) { color: #655F70; border-color: transparent; }
#view-workbench .rough-timeline-clip-number { color: #655F70; background: #FFFEFB; }
#view-workbench .rough-timeline-clip.is-selected .rough-timeline-clip-body strong { color: #1E192D; }
#view-workbench .rough-timeline-source-block { color: #39775F; background: #DAE7DE; }
#view-workbench .rough-timeline-source-block.is-muted { color: #716B7B; background: #EDEAE7; }
#view-workbench .rough-timeline-trim { background: #713F60; }
#view-workbench .rough-timeline-audio-block { background: #67507B; border-color: transparent; box-shadow: none; }
#view-workbench .rough-timeline-subtitle-block { background: #713F60; border-color: transparent; box-shadow: none; }
#view-workbench .rough-timeline-tools .rough-timeline-play-toggle { background: #1E192D; border-color: transparent; color: transparent; }
#view-workbench .rough-timeline-tools .rough-timeline-settings-trigger { color: #716B7B; }
#view-workbench .rough-timeline-settings-trigger::before { color: #716B7B; border-color: transparent; }
#view-workbench :is(.rough-timeline-tools .secondary-button:hover:not(:disabled), .rough-timeline-tools .rough-timeline-undo:not(:disabled)) { color: #1E192D; background: #F1EFF3; border-color: transparent; }
#view-workbench .rough-timeline-zoom input { accent-color: #AD8B9D; }
#view-workbench .rough-inspector-identity,
body.workbench-open .rough-cut-inspector-dialog .rough-inspector-identity { background: #F5F3F0; border-color: transparent; }
/* Related film dialogs use the same readable labels and quiet options. */
:is(#setting-editor-dialog, #setting-extraction-dialog, #setting-generation-dialog,
    #production-style-dialog, #shot-reference-dialog, #setting-reference-picker-dialog,
    #storyboard-preview-dialog, #model-audition-dialog, #production-format-dialog,
    #work-source-dialog, #story-generation-dialog, #frames-next-actions)
    :is(h2, h3, h4, strong, label, legend) { color: #1E192D; font-family: var(--pai-ui); }
:is(#setting-editor-dialog, #setting-extraction-dialog, #setting-generation-dialog,
    #production-style-dialog, #shot-reference-dialog, #setting-reference-picker-dialog,
    #storyboard-preview-dialog, #model-audition-dialog, #production-format-dialog,
    #work-source-dialog, #story-generation-dialog, #frames-next-actions)
    :is(p, small, .eyebrow, .text-button, .icon-button) { color: #716B7B; }
:is(#setting-editor-dialog, #setting-extraction-dialog, #setting-generation-dialog,
    #production-style-dialog, #shot-reference-dialog, #setting-reference-picker-dialog,
    #production-format-dialog, #work-source-dialog)
    :is(input:not([type=radio]):not([type=checkbox]):not([type=range]):not([type=color]):not([type=file]), textarea, select) { color: #1E192D; background: #F5F3F0; border-color: transparent; box-shadow: none; }
:is(#setting-generation-dialog, #setting-extraction-dialog, #setting-reference-picker-dialog, #shot-reference-dialog)
    :is(.setting-generation-reference, .setting-generation-generate-dock,
        .setting-generation-edit-dock, .setting-generation-header, .setting-generation-footer,
        .setting-generation-history-card, .setting-extraction-item, .setting-generation-tabs,
        .setting-generation-count-options, .setting-reference-asset-card) { background: #F5F3F0; color: #1E192D; border-color: transparent; box-shadow: none; }
#setting-generation-dialog :is(.setting-generation-tab, .setting-generation-count-options span) { color: #716B7B; background: transparent; border-color: transparent; box-shadow: none; }
#setting-generation-dialog :is(.setting-generation-tab.is-active, .setting-generation-count-options input:checked + span) { color: #1E192D; background: #FFFEFB; border-color: transparent; box-shadow: none; }
#setting-generation-dialog .setting-generation-create-button { background: #1E192D; border-color: transparent; color: #FFFEFB; box-shadow: none; }
#setting-generation-dialog .setting-generation-create-button :is(strong, span, small) { color: inherit; }
#setting-generation-dialog .setting-generation-model-field > span { color: #716B7B; }
#frames-next-actions .frames-complete-card { background: #FFFEFB; color: #1E192D; border-color: transparent; box-shadow: none; }
#frames-next-actions .primary-button { color: #FFFEFB; background: #1E192D; border-color: transparent; box-shadow: none; }
#view-workbench :is(.frames-empty-state, .rough-cut-empty-state, .delivery-empty-state,
    .delivery-processing, .delivery-agent, .delivery-ready-heading, .final-export-panel,
    .rough-cut-editing-surface, .rough-cut-editor-panel, .rough-inspector-card,
    .shot-image-comparison-panel, .shot-video-panel, .shot-video-specs,
    .shot-keyframe-card, .shot-version-history) { color: #1E192D; background: #FFFEFB; border-color: transparent; box-shadow: none; }
#view-workbench :is(.frames-empty-state h3, .rough-cut-empty-copy h3, .delivery-empty-state h3,
    .delivery-ready-heading h2, .final-export-panel h3, .rough-inspector-card h3) { color: #1E192D; font-family: PaiNunito, PaiTitles, PaiWorkspace, "PingFang SC", sans-serif; }
#view-workbench :is(.frames-empty-state p, .rough-cut-empty-copy p, .delivery-empty-state p,
    .delivery-ready-heading p, .final-export-panel p, .rough-inspector-card p,
    .shot-image-generation-copy p, .shot-video-generation-copy p, .shot-keyframe-copy p) { color: #716B7B; }
#view-workbench :is(.frames-empty-storyboard span, .rough-cut-empty-timeline span,
    .delivery-empty-sheet, .delivery-empty-sheet.is-center, .delivery-empty-mark) { color: #716B7B; background: #F1EFF3; border-color: transparent; box-shadow: none; }
#view-workbench .frames-empty-storyboard .is-focus { color: #713F60; background: #EDE6EC; border-color: transparent; }
#view-workbench .delivery-empty-visual::before { background: none; }
#view-workbench .delivery-empty-sheet::after { border-color: transparent; }
#view-workbench .delivery-progress li { color: #716B7B; }
#view-workbench .delivery-progress li > span { color: #716B7B; background: #F1EFF3; border-color: transparent; }
#view-workbench .delivery-progress li.is-active { color: #1E192D; }
#view-workbench .delivery-progress li.is-active > span { color: #FFFEFB; background: #1E192D; border-color: transparent; }
#view-workbench .delivery-progress li.is-complete { color: #39775F; }
#view-workbench .delivery-progress li.is-complete > span { color: #39775F; background: #EAF2EC; border-color: transparent; }
#view-workbench .setting-card-watermark { color: #1E192D; opacity: .07; font-family: PaiNunito, sans-serif; letter-spacing: -.045em; }
#view-workbench .pb-text-working { --pb-sheen-base: #716B7B; --pb-sheen-light: #AD8B9D; }
#view-workbench .world-grid { --world-card-preview-surface: #F1EFEB; }
#view-workbench #production-style-tags, #view-workbench #production-style-tags span { color: #655F70; }
#view-workbench .world-agent-action > span { color: #716B7B; }
#view-workbench .setting-card--character .setting-card-heading h3 > span:first-child { color: #67507B; }
#view-workbench .setting-card--location .setting-card-heading h3 > span:first-child { color: #39775F; }
#view-workbench .setting-card--prop .setting-card-heading h3 > span:first-child { color: #885522; }
#view-workbench :is(.world-footer, .production-style-summary) { border-color: transparent; }
/* Drawer and studio interiors have their own old surfaces. */
:is(#setting-generation-dialog, #setting-extraction-dialog, #setting-reference-picker-dialog, #shot-reference-dialog)
    :is(.setting-generation-shell, .setting-generation-heading, .setting-generation-body,
        .setting-reference-picker-shell, .setting-reference-picker-heading,
        .shot-reference-shell, .shot-reference-dialog .management-heading, .shot-reference-footer) {
    color: #1E192D; background: #FFFEFB; border-color: transparent; box-shadow: none;
    scrollbar-color: #B5AFBB #FFFEFB;
}
#setting-generation-dialog :is(.setting-generation-prompt-field, .setting-generation-voice,
    .setting-generation-voice-sample, .setting-generation-current, .setting-generation-current-preview.is-empty,
    .setting-generation-reference-empty, .setting-generation-history-state,
    .setting-generation-history-card, .setting-studio-nav) { color: #716B7B; background: #F5F3F0; border-color: transparent; box-shadow: none; }
#setting-generation-dialog :is(.setting-generation-prompt-field > span, .setting-generation-current-name,
    .setting-generation-history-state strong, .setting-generation-current-title strong) { color: #1E192D; }
#setting-generation-dialog :is(.setting-generation-tab-icon, .setting-generation-current-copy p,
    .setting-generation-current-copy span, .setting-generation-history-state > span,
    .setting-generation-heading .eyebrow, .setting-generation-voice-description-field > span em,
    .setting-generation-tab small) { color: #716B7B; }
#setting-generation-dialog :is(.setting-generation-current-copy, .setting-generation-tab-icon) { background: transparent; border-color: transparent; box-shadow: none; }
#setting-generation-dialog .setting-generation-current-remove { color: #1E192D; background: #FFFEFB; border-color: transparent; box-shadow: none; }
#setting-generation-dialog :is(.setting-generation-current-actions button, .setting-generation-footer .secondary-button,
    .setting-studio-nav button) { color: #716B7B; background: #FFFEFB; border-color: transparent; box-shadow: none; }
#setting-generation-dialog .setting-studio-nav button.is-active { color: #1E192D; }
#setting-generation-dialog .setting-studio-nav button.is-active::after { background: #1E192D; }
#setting-generation-dialog .setting-generation-voice-sample .setting-generation-reference-actions .secondary-button,
#setting-editor-dialog .setting-audio-actions .secondary-button {
    color: #1E192D;
    background: #F1EFF3;
    border-color: transparent;
    border-radius: 12px;
    box-shadow: none;
    min-height: 40px;
    font-size: 12px;
    font-weight: 600;
}
#setting-generation-dialog .setting-generation-voice-sample .setting-generation-reference-actions .secondary-button:hover:not(:disabled),
#setting-editor-dialog .setting-audio-actions .secondary-button:hover:not(:disabled) {
    color: #1E192D;
    background: #EDE6EC;
    transform: none;
}
#setting-generation-dialog .setting-generation-voice-sample .setting-generation-reference-actions .secondary-button:disabled,
#setting-editor-dialog .setting-audio-actions .secondary-button:disabled { color: #716B7B; }
#setting-generation-dialog .setting-generation-voice-sample-empty > span {
    color: #1E192D;
    background: #F1EFF3;
    border-color: transparent;
}
#setting-generation-dialog .setting-generation-voice-sample :is(p, small) { color: #716B7B; }
#setting-generation-dialog :is(textarea:focus, select:focus) { color: #1E192D; background: #F5F3F0; border-color: transparent; box-shadow: none; outline-color: #AD8B9D; }
#setting-generation-dialog select { color-scheme: light; }
#setting-generation-dialog select option { color: #1E192D; background: #FFFEFB; }
#setting-reference-picker-dialog .setting-reference-picker-state {
    color: #716B7B;
    background: #F5F3F0;
    border-color: transparent;
    box-shadow: none;
}
#setting-reference-picker-dialog .setting-reference-picker-state strong { color: #1E192D; }
#setting-reference-picker-dialog .setting-reference-picker-state.is-error { color: #A83D51; }
#setting-reference-picker-dialog :is(.setting-reference-empty-visual, .setting-reference-asset-fallback) {
    color: #716B7B;
    background: #F1EFF3;
    border-color: transparent;
}
#setting-reference-picker-dialog .setting-reference-picker-footer {
    color: #1E192D;
    background: #FFFEFB;
    border-color: transparent;
    box-shadow: none;
}
#setting-reference-picker-dialog :is(.primary-button, .secondary-button) {
    color: #1E192D;
    background: #F1EFF3;
    border-color: transparent;
    border-radius: 12px;
    box-shadow: none;
}
#setting-reference-picker-dialog :is(#empty-upload-setting-reference, #upload-new-setting-reference) {
    color: #FFFEFB;
    background: #1E192D;
}
#setting-reference-picker-dialog :is(.primary-button, .secondary-button):hover:not(:disabled) {
    color: #1E192D;
    background: #EDE6EC;
    transform: none;
}
#setting-reference-picker-dialog :is(#empty-upload-setting-reference, #upload-new-setting-reference):hover:not(:disabled) {
    color: #FFFEFB;
    background: #362F45;
}
#setting-reference-picker-dialog .setting-reference-asset-preview { color: #716B7B; background: #F5F3F0; }
#setting-reference-picker-dialog .setting-reference-asset-action { color: #1E192D; background: #F1EFF3; }
#setting-reference-picker-dialog .setting-reference-asset-card.is-current .setting-reference-asset-action {
    color: #39775F;
    background: #EAF2EC;
}
#setting-reference-picker-dialog .setting-reference-asset-card.is-selecting .setting-reference-asset-action {
    color: #713F60;
    background: #EDE6EC;
}
#setting-reference-picker-dialog .setting-reference-asset-card.is-selecting .setting-reference-asset-action::before {
    border-color: #AD8B9D40;
    border-top-color: #713F60;
}
:is(#setting-editor-dialog, #setting-generation-dialog, #setting-reference-picker-dialog)
    :is(button, input, textarea, select):focus-visible {
    outline: 2px solid #AD8B9D;
    outline-offset: 3px;
}
#setting-editor-dialog :is(.setting-kind-card, .setting-create-emblem) { color: #716B7B; background: #F5F3F0; border-color: transparent; box-shadow: none; }
#setting-editor-dialog .setting-kind-card.is-active { color: #1E192D; background: #EDE6EC; border-color: transparent; box-shadow: none; }
#setting-editor-dialog :is(.setting-kind-card strong, .setting-create-emblem span) { color: inherit; }
#setting-editor-dialog :is(input, textarea, select):focus { color: #1E192D; background: #F5F3F0; border-color: transparent; box-shadow: none; }
#setting-editor-dialog input:-webkit-autofill { -webkit-text-fill-color: #1E192D; caret-color: #1E192D; -webkit-box-shadow: 0 0 0 1000px #F5F3F0 inset; }
#shot-reference-dialog :is(.shot-reference-option, .shot-reference-thumb, .shot-reference-video,
    .shot-continuity-option, .shot-no-reference-option, .shot-no-reference-reason-field,
    .shot-reference-empty) { color: #716B7B; background: #F5F3F0; border-color: transparent; box-shadow: none; }
#shot-reference-dialog .shot-reference-option:has(input:checked) { background: #EDE6EC; border-color: transparent; box-shadow: none; }
#shot-reference-dialog .shot-reference-option:hover { background: #F1EFF3; border-color: transparent; box-shadow: none; }
#shot-reference-dialog .shot-reference-option-copy strong { color: #1E192D; }
#shot-reference-dialog .shot-reference-option-copy span { color: #716B7B; }
#shot-reference-dialog :is(.shot-reference-edit, .secondary-button, .text-button, .icon-button) { color: #716B7B; background: transparent; border-color: transparent; box-shadow: none; }
#shot-reference-dialog input { color-scheme: light; accent-color: #713F60; }
#setting-extraction-dialog :is(.setting-extraction-item-meta, .setting-extraction-item .field > span,
    .agent-generation-status, .agent-generation-status strong) { color: #716B7B; }
#view-workbench .story-ritual-surface .shot-card { color: #1E192D; background: #FFFEFB; border-color: transparent; box-shadow: none; }
#view-workbench .story-ritual-surface .shot-card .workbench-card-number > span:first-child { color: #716B7B; background: #F1EFF3; border-color: transparent; box-shadow: none; }
#view-workbench :is(.story-ritual-surface .shot-insert-button,
    .story-ritual-surface .shot-card-delete-button, .frame-shot-edit-button, .frame-shot-delete-button) {
    position: relative;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #716B7B;
    background: transparent;
    border-color: transparent;
    border-radius: 12px;
    box-shadow: none;
    transform: none;
}
#view-workbench :is(.story-ritual-surface .shot-insert-button,
    .story-ritual-surface .shot-card-delete-button, .frame-shot-edit-button, .frame-shot-delete-button)::before {
    content: "";
    position: absolute;
    inset: 4px;
    background: #F1EFF3;
    border-radius: 10px;
    pointer-events: none;
    transition: background-color .16s ease;
}
#view-workbench .story-ritual-surface .shot-insert-plus {
    position: relative;
    width: 20px;
    height: 20px;
    color: #E84FB7;
    background: transparent;
    border-color: transparent;
    border-radius: 0;
}
#view-workbench :is(.story-ritual-surface .shot-insert-plus,
    .story-ritual-surface .shot-card-delete-button, .frame-shot-edit-button, .frame-shot-delete-button) svg {
    position: relative;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}
#view-workbench :is(.story-ritual-surface .shot-insert-button,
    .story-ritual-surface .shot-card-delete-button, .frame-shot-edit-button, .frame-shot-delete-button):hover:not(:disabled) {
    color: #1E192D;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    transform: none;
}
#view-workbench :is(.story-ritual-surface .shot-insert-button,
    .frame-shot-edit-button):hover:not(:disabled)::before { background: #EDE6EC; }
#view-workbench :is(.story-ritual-surface .shot-card-delete-button,
    .frame-shot-delete-button):hover:not(:disabled) { color: #A83D51; }
#view-workbench :is(.story-ritual-surface .shot-card-delete-button,
    .frame-shot-delete-button):hover:not(:disabled)::before { background: #F9EDF0; }
#view-workbench :is(.story-ritual-surface .shot-insert-button,
    .story-ritual-surface .shot-card-delete-button, .frame-shot-edit-button, .frame-shot-delete-button):disabled {
    background: transparent;
    box-shadow: none;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    #view-workbench :is(.story-ritual-surface .shot-insert-button,
        .story-ritual-surface .shot-card-delete-button, .frame-shot-edit-button, .frame-shot-delete-button)::before { transition: none; }
}
#view-workbench .story-ritual-surface .story-draft-summary { color: #716B7B !important; background: #F5F3F0; border-color: transparent; font-family: var(--pai-ui) !important; }
/* One quiet metadata row, then a full-width title and description. */
#view-workbench .story-ritual-surface.is-draft .shot-card {
    padding: 8px 0 12px;
    background: transparent;
    border: 0;
}
#view-workbench .story-ritual-surface.is-draft .shot-card .workbench-card-head {
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
}
#view-workbench .story-ritual-surface.is-draft .shot-card .workbench-card-number {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
}
#view-workbench .story-ritual-surface.is-draft .shot-card .workbench-card-number > span:first-child { display: none; }
#view-workbench .story-ritual-surface.is-draft .shot-card-title-editor {
    display: grid;
    grid-template-rows: 44px 44px;
    gap: 4px;
    width: 100%;
    min-width: 0;
}
#view-workbench .story-ritual-surface.is-draft .shot-card-title-editor > small {
    display: flex;
    align-items: center;
    height: 44px;
    margin: 0;
    padding: 0 128px 0 0;
    color: #716B7B;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
}
#view-workbench .story-ritual-surface.is-draft .shot-card-title-input,
#view-workbench .story-ritual-surface.is-draft .shot-card-title-input:focus {
    width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 0 12px;
    font-size: 18px !important;
    font-weight: 600;
    line-height: normal;
    background: #F5F3F0;
    border-radius: 12px;
}
#view-workbench .story-ritual-surface.is-draft .shot-card .workbench-card-actions {
    position: absolute;
    top: 0;
    right: -4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    height: 44px;
    margin: 0;
    gap: 4px;
}
#view-workbench .story-ritual-surface.is-draft .shot-card-duration-field {
    position: relative;
    display: block;
    width: 76px;
    min-width: 76px;
    max-width: 76px;
    height: 44px;
    margin: 0;
}
#view-workbench .story-ritual-surface.is-draft .shot-card-duration-field > span {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}
#view-workbench .story-ritual-surface.is-draft .shot-card-duration-field .shot-duration-wrap {
    height: 44px;
    min-height: 44px;
    border-radius: 12px;
}
#view-workbench .story-ritual-surface.is-draft .shot-card-duration-field .shot-duration-input {
    width: 100%;
    height: 42px;
    min-height: 0;
    padding: 0 28px 0 12px;
    font-size: 16px;
    line-height: normal;
    text-align: left;
}
#view-workbench .story-ritual-surface.is-draft .shot-card-duration-field .shot-duration-unit {
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #716B7B;
    font-size: 12px;
    line-height: 18px;
}
#view-workbench .story-ritual-surface.is-draft .shot-card .workbench-fields { margin: 12px 0 0; }
#view-workbench .story-ritual-surface.is-draft .shot-card-prompt-field { display: block; margin: 0; gap: 0; }
#view-workbench .story-ritual-surface.is-draft .shot-card-prompt-field > span {
    height: auto;
    margin: 0 0 8px;
    color: #716B7B;
    font-size: 12px;
    line-height: 18px;
}
#view-workbench .story-ritual-surface.is-draft .shot-card-prompt-field textarea {
    display: block;
    min-height: 144px;
    height: 144px;
    padding: 14px;
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
    border-radius: 14px;
}
#view-workbench .delivery-processing::before { background: none; }
#view-workbench .delivery-processing-screen { background: #F1EFF3; border-color: transparent; box-shadow: none; }
#view-workbench .delivery-processing-screen::after { content: ""; background: url('/static/brand/pai/v1/pai-wordmark-light.svg') center / 32% auto no-repeat; opacity: .22; }
#view-workbench .delivery-agent-mark { background: transparent; border-color: transparent; box-shadow: none; }
#view-workbench .delivery-agent-mark::after { background: #39775F; border-color: transparent; box-shadow: none; }
#view-workbench .delivery-trace-rail { stroke: #E5E2DD; }
#view-workbench .delivery-trace-glow { stroke: #AD8B9D; }
#view-workbench .delivery-trace-core { stroke: #AD8B9D; filter: none; }
#view-workbench .delivery-ready { color: #1E192D; background: #FFFEFB; border-color: transparent; box-shadow: none; }
#view-workbench :is(.delivery-ready h3, .delivery-master-bar strong) { color: #1E192D; }
#view-workbench :is(.delivery-master-bar, .delivery-export-options) { color: #716B7B; background: #F5F3F0; border-color: transparent; box-shadow: none; }
#view-workbench :is(.delivery-master-bar em, .delivery-ready > p, .delivery-export-options label) { color: #716B7B; }
#view-workbench .delivery-master-download { color: #716B7B; background: transparent; border-color: transparent; box-shadow: none; }
#view-workbench :is(.delivery-empty-kicker, .frames-empty-kicker, .rough-cut-empty-kicker) { color: #716B7B; }
#view-workbench .delivery-cinema { color: #1E192D; background: #FFFEFB; border-color: transparent; box-shadow: none; }
#view-workbench .delivery-cinema::after { background: none; }
#view-workbench :is(.delivery-cinema-head h3, .delivery-dock-copy > strong,
    .delivery-process-label strong, .delivery-complete-copy strong) { color: #1E192D; }
#view-workbench :is(.delivery-cinema-head p, .delivery-cinema-note, .delivery-cinema-download,
    .delivery-dock-copy > span, .delivery-process-label span, .delivery-process-meta,
    .delivery-process-value, .delivery-complete-copy span) { color: #716B7B; }
#view-workbench .delivery-original-retained { color: #39775F; background: #EAF2EC; }
#view-workbench :is(.delivery-finish-dock, .delivery-resolution-option) { color: #716B7B; background: #F5F3F0; border-color: transparent; box-shadow: none; backdrop-filter: none; }
#view-workbench .delivery-resolution-option[aria-pressed=true] { color: #1E192D; background: #EDE6EC; border-color: transparent; box-shadow: none; }
#view-workbench .delivery-resolution-option :is(small, em) { color: #716B7B; }
#view-workbench .delivery-enhance-start { color: #FFFEFB; background: #1E192D; box-shadow: none; }
#view-workbench .delivery-spark { color: #716B7B; background: none; -webkit-text-fill-color: currentColor; }
#view-workbench .delivery-process-track { background: #E5E2DD; box-shadow: none; }
#view-workbench .delivery-process-track i { background: #AD8B9D; box-shadow: none; }
#view-workbench :is(.delivery-complete-compare, .delivery-complete-download) { color: #716B7B; background: #F1EFF3; border-color: transparent; box-shadow: none; }
#view-workbench .delivery-enhancement-error { color: #A83D51; }
body.workbench-open :is(.agent-generation-state, .story-generation-agent) { color: #1E192D; }
body.workbench-open :is(.agent-generation-state h3, .agent-generation-status strong) { color: #1E192D; }
body.workbench-open :is(.agent-generation-state p, .agent-generation-state small,
    .agent-generation-kicker) { color: #716B7B; }
body.workbench-open :is(.agent-generation-status, .agent-generation-field) { background: #F1EFF3; border-color: transparent; box-shadow: none; }
body.workbench-open :is(.agent-generation-core, .story-agent-core) { background: #1E192D; border-color: transparent; box-shadow: none; }
body.workbench-open :is(.agent-generation-orbit, .story-agent-orbit) { border-color: transparent; border-top-color: transparent; box-shadow: none; }
body.workbench-open :is(.agent-generation-scan, .story-agent-scan) { background: linear-gradient(90deg, transparent, #AD8B9D, transparent); box-shadow: none; }
body.workbench-open .agent-generation-status > span { background: #AD8B9D; box-shadow: none; }
#view-workbench .frame-carousel-arrow { color: #716B7B; background: #FFFEFB; border-color: transparent; box-shadow: none; }
#view-workbench .frame-carousel-arrow:hover { color: #1E192D; background: #F1EFF3; border-color: transparent; box-shadow: none; }
#view-workbench .shot-video-route-recommended { color: #713F60; background: #EDE6EC; border-color: transparent; box-shadow: none; }
/* Flat colour surfaces replace the old nested outlines. Borders keep their
   existing thickness, so input mirrors and timeline coordinates do not move. */
#view-workbench :is(.icon-button, .frame-shot-edit-button, .frame-shot-delete-button,
    .shot-reference-manage-chip, .frame-carousel-arrow) { background: #F1EFF3; }
#view-workbench :is(.icon-button, .frame-shot-edit-button, .shot-reference-manage-chip):hover { background: #EDE6EC; }
#view-workbench .shot-setting-thumbnail { border-color: transparent; background: #F1EFF3; }
#view-workbench .shot-duration-wrap { border-color: transparent; background: #F5F3F0; }
#view-workbench .rough-timeline { border-color: transparent; background: #F5F3F0; }
#view-workbench .rough-timeline-browser-thumb { box-shadow: none; }
#view-workbench :is(.rough-monitor-clip, .rough-cut-preview) { border-color: transparent; }
#view-workbench :is(.shot-image-candidate.is-selected, .shot-video-history-card.is-selected) { background: #EDE6EC; }
#view-workbench .shot-video-binding-chip.is-ambiguous::after { content: none; }
#setting-generation-dialog .setting-generation-history-button { grid-template-columns: minmax(0,1fr) auto; }
/* Readable controls within the existing editing surfaces. The prompt mirror,
   monitor, timeline tracks and drag hit areas retain their original geometry. */
#view-workbench .shot-version-history-toggle.is-compact .shot-version-history-icon {
    color: inherit;
    background: currentColor;
}
#view-workbench .shot-keyframe-history-button { color: #716B7B; }
#view-workbench .shot-video-reference-option {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    place-items: center;
    min-height: 48px;
    text-align: center;
}
#view-workbench .shot-video-reference-option > span > strong { justify-content: center; }
#view-workbench .shot-video-reference-option > span > small { display: none; }
#view-workbench .rough-timeline-settings-trigger::before { background: currentColor; }
#view-workbench .rough-timeline-playhead::before,
#view-workbench .rough-timeline-playhead::after,
#view-workbench .rough-timeline-playhead-handle::before {
    background: #E84FB7;
    box-shadow: none;
}
#view-workbench .rough-timeline-canvas.is-scrubbing .rough-timeline-playhead::after { box-shadow: none; }
#view-workbench .rough-timeline-playhead-time { color: #FFFEFB; background: #713F60; }
#view-workbench .rough-timeline-playhead:focus-visible { outline-color: #AD8B9D; }
#view-workbench .rough-timeline-tools .secondary-button {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    height: 42px;
    padding: 0;
    flex: 0 0 42px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
    white-space: pre-line;
}
#view-workbench .rough-timeline-tools :is(.rough-timeline-play-toggle,
    .rough-timeline-settings-trigger, .rough-timeline-delete-trigger) {
    width: 42px;
    min-width: 42px;
    padding: 0;
}
#view-workbench .rough-timeline-tools .secondary-button:not(.rough-timeline-play-toggle) { background: #F1EFF3; }
#view-workbench .rough-timeline-tools .secondary-button:disabled { color: #716B7B; opacity: .45; }
#view-workbench .world-surface :is(.settings-state, .world-empty) {
    color: #716B7B;
    background: #F5F3F0;
    border-color: transparent;
    box-shadow: none;
}
#view-workbench .world-surface .settings-state strong { color: #1E192D; }
#view-workbench .workbench-stage .eyebrow.workbench-stage-kicker {
    color: #E84FB7;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}
#view-workbench .world-heading-subline .world-heading-actions #add-setting {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #1E192D;
    background: #F1EFF3;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}
#view-workbench .world-heading-subline .world-heading-actions #add-setting:hover:not(:disabled) {
    color: #1E192D;
    background: #EDE6EC;
    transform: none;
}
#view-workbench .world-heading-subline .world-heading-actions #add-setting svg {
    width: 18px;
    height: 18px;
    stroke: #E84FB7;
}
#view-workbench #extract-settings {
    min-height: 34px;
    padding: 0 12px;
    color: #1E192D;
    background: #F1EFF3;
    border-color: transparent;
    border-radius: 10px;
    box-shadow: none;
    font-size: 12px;
    font-weight: 600;
    filter: none;
}
#view-workbench #extract-settings strong { display: inline; font-weight: inherit; }
#view-workbench #extract-settings:hover:not(:disabled) {
    color: #1E192D;
    background: #EDE6EC;
    border-color: transparent;
    box-shadow: none;
    transform: none;
    filter: none;
}
#view-workbench #extract-settings:active:not(:disabled) { transform: none; box-shadow: none; }
#view-workbench #extract-settings:disabled {
    color: #716B7B;
    background: #F1EFF3;
    border-color: transparent;
    box-shadow: none;
    cursor: default;
    opacity: 1;
    filter: none;
}
#view-workbench #edit-production-style {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #716B7B;
    background: transparent;
    border-color: transparent;
    border-radius: 10px;
    box-shadow: none;
}
#view-workbench #edit-production-style svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
#view-workbench #edit-production-style:hover:not(:disabled) { color: #1E192D; background: #F1EFF3; }
#view-workbench .frame-stage-heading .frame-status-heading-copy { display: none; }
#view-workbench .frame-stage-heading .frame-status-heading {
    min-width: 0;
    gap: 0;
}
#view-workbench .frame-stage-heading .frame-status-total {
    min-height: 32px;
    padding: 0 10px;
    gap: 5px;
}
#view-workbench .frame-stage-heading .frame-status-total strong {
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
#view-workbench .frame-stage-heading .frame-status-total small {
    color: inherit;
    font-size: 10px;
}
@media (max-width:760px) {
    #view-workbench .workbench-stage .eyebrow.workbench-stage-kicker { font-size: 10px; }
    #view-workbench .shot-video-spec-value {
        padding: 5px 10px !important;
        white-space: normal;
        overflow-wrap: anywhere;
        text-wrap: balance;
        line-height: 1.3 !important;
    }
}
@media (max-width:700px) {
    #view-workbench .world-heading-subline {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    #view-workbench .world-heading .world-heading-subline .settings-stage-intro {
        width: 100%;
        font-size: 13px;
        line-height: 1.6;
    }
    #view-workbench .world-heading-subline .world-heading-actions {
        width: 100%;
        justify-content: space-between;
    }
    #view-workbench .world-surface :is(.settings-state, .world-empty) {
        min-height: 160px;
        padding: 24px 18px;
        border-radius: 18px;
    }
    #view-workbench .world-surface .settings-state strong { font-size: 16px; }
    #view-workbench .world-surface .settings-state p { margin: 8px 0 0; font-size: 12px; line-height: 1.6; }
    #view-workbench .shot-video-reference-option {
        grid-template-columns: minmax(0,1fr);
        padding: 10px 5px;
        min-height: 48px;
        text-align: center;
    }
    #view-workbench .shot-video-reference-option > span {
        display: grid;
        grid-template-rows: 18px;
        gap: 0;
        width: 100%;
    }
    #view-workbench .shot-video-reference-option > span > strong {
        display: block;
        margin: 0;
        font-size: 12px;
        line-height: 18px;
        text-align: center;
    }
    #view-workbench .rough-timeline-tools {
        display: flex;
        flex-wrap: nowrap;
        gap: 4px;
        overflow-x: auto;
        overflow-y: hidden;
    }
}

/* Layout wrappers stay clear so they do not square off the paper cards. */
#view-workbench :is(.rough-cut-workspace, .rough-cut-shell, .delivery-stage, .delivery-ready) { background: transparent; }
#view-workbench :is(.rough-cut-editing-surface, .delivery-cinema, .delivery-processing,
    .delivery-empty-state, .final-export-panel) { border-radius: 24px; }

/* Film waiting: one quiet paper surface and a small pink rhythm. These are
   decorative layers only; task state, copy, progress and media clocks stay in JS. */
@keyframes pai-film-wait-dot {
    0%, 65%, 100% { opacity: .42; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-2px); }
}
@keyframes pai-film-wait-breathe {
    0%, 100% { opacity: .5; }
    50% { opacity: 1; }
}
@keyframes pai-film-wait-spin { to { transform: rotate(360deg); } }

/* Short waits remain compact, including the preview's centred play control. */
:is(body.workbench-open, #create-dialog) .loading-spinner,
body.workbench-open .rough-monitor-rendering-spinner {
    border-color: #AD8B9D35;
    border-top-color: #E84FB7;
    border-right-color: #AD8B9D35;
    box-shadow: none;
    animation: pai-film-wait-spin 1.15s linear infinite;
}
:is(body.workbench-open, #create-dialog) button.is-busy::before {
    border-color: currentColor;
    border-top-color: transparent;
    box-shadow: none;
    animation: pai-film-wait-spin 1.15s linear infinite;
}
body.workbench-open .rough-timeline-play-toggle.is-loading::before {
    border-color: #FFFEFB50;
    border-top-color: #FFFEFB;
    animation: roughTimelineSpin 1.15s linear infinite;
}
body.workbench-open .shot-video-enhance-button.is-busy .shot-video-enhance-ring {
    border-color: #AD8B9D35;
    border-top-color: #E84FB7;
    animation: pai-film-wait-spin 1.15s linear infinite;
}
#view-workbench .shot-video-enhance-button.is-busy .shot-video-enhance-copy {
    display: inline-block;
    line-height: 1.4;
}
/* This control already has a leading spinner; a trailing dot made its text
   an extra grid row under the old busy-child rule and shifted the alignment. */
#view-workbench .shot-video-enhance-button.is-busy .shot-video-enhance-copy::after {
    display: none;
    content: none;
}
#setting-reference-picker-dialog .setting-reference-asset-card.is-selecting .setting-reference-asset-action::before {
    border-color: #AD8B9D35;
    border-top-color: #E84FB7;
    animation: pai-film-wait-spin 1.15s linear infinite;
}
body.workbench-open .upload-track { background: #F1EFF3; }
body.workbench-open .upload-track i { background: #AD8B9D; animation-duration: 2s; }
body.workbench-open .rough-monitor-play.is-loading::before {
    background: #E84FB7;
    box-shadow: none;
    animation: pai-film-wait-breathe 2s ease-in-out infinite;
}
body.workbench-open :is(.workbench-save-status.is-saving .save-status-dot,
    .rough-cut-status-dot.is-saving, .story-breakdown-panel.is-working .story-breakdown-icon,
    .agent-generation-status > span, .delivery-progress li.is-active > span) {
    box-shadow: none;
    animation: pai-film-wait-breathe 2s ease-in-out infinite;
}
body.workbench-open :is(.workbench-save-status.is-saving .save-status-dot,
    .rough-cut-status-dot.is-saving, .agent-generation-status > span) { background: #E84FB7; }
#view-workbench .workbench-save-status.is-saving .save-status-dot { background: #E84FB7; }
/* Static fallback for working copy; the final text-only sheen is feature gated. */
:is(body.workbench-open, #create-dialog) .pb-text-working {
    color: #716B7B;
    -webkit-text-fill-color: currentColor;
    background: none;
    text-shadow: none;
    animation: none;
}
:is(body.workbench-open, #create-dialog) .pb-text-working::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 7px;
    vertical-align: .1em;
    border-radius: 50%;
    background: #E84FB7;
    animation: pai-film-wait-breathe 2s ease-in-out infinite;
}

/* Story and world preparation use three softly staggered dots on a paper chip. */
body.workbench-open .story-inline-loading h2 { color: #1E192D; }
body.workbench-open .story-inline-loading p { color: #716B7B; }
body.workbench-open :is(.story-agent-visual, .agent-generation-visual) {
    width: 96px;
    height: 72px;
}
body.workbench-open :is(.story-agent-field, .agent-generation-field) {
    inset: 12px 4px;
    background: #F1EFF3;
    border: 0;
    border-radius: 18px;
    box-shadow: none;
    transform: none;
    animation: none;
}
body.workbench-open :is(.story-agent-orbit, .story-agent-scan,
    .agent-generation-orbit, .agent-generation-scan) { display: none; animation: none; }
body.workbench-open .agent-generation-state {
    background: #F5F3F0;
    border-color: transparent;
    box-shadow: none;
}
body.workbench-open .agent-generation-state::before,
body.workbench-open .agent-generation-state::after { display: none; animation: none; }
body.workbench-open :is(.story-agent-core, .agent-generation-core) {
    position: relative;
    width: 7px;
    height: 7px;
    border: 0;
    border-radius: 50%;
    background: #E84FB7;
    box-shadow: none;
    transform: none;
    animation: pai-film-wait-dot 1.8s .15s ease-in-out infinite;
}
body.workbench-open :is(.story-agent-core, .agent-generation-core)::before,
body.workbench-open :is(.story-agent-core, .agent-generation-core)::after {
    content: "";
    position: absolute;
    top: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #AD8B9D;
    transform: none;
    animation: pai-film-wait-breathe 1.8s ease-in-out infinite;
}
body.workbench-open :is(.story-agent-core, .agent-generation-core)::before { left: -16px; }
body.workbench-open :is(.story-agent-core, .agent-generation-core)::after { left: 16px; animation-delay: .3s; }

/* Media waiting reuses the accepted Agent image/board fixed-dot field.
   Source: paiban-agent-setting-images.css .pb-generation-light / pb-image-dots.
   The dots stay fixed; only their light mask travels quietly across the canvas. */
@keyframes pai-film-wait-field {
    from { mask-position: 0% 15%; -webkit-mask-position: 0% 15%; }
    to { mask-position: 100% 85%; -webkit-mask-position: 100% 85%; }
}
body.workbench-open :is(.ai-image-loader, .ai-video-loader,
    .shot-image-comparison-loading, .shot-video-loading) {
    color: #716B7B;
    background: #F1EFEB;
    border-color: transparent;
    box-shadow: none;
}
body.workbench-open :is(.ai-image-loader-grid, .ai-image-loader-beam,
    .ai-image-loader-node, .ai-video-loader-track, .ai-video-loader-playhead,
    .ai-video-loader-waveform) { display: none; animation: none; }
body.workbench-open :is(.ai-image-loader, .ai-video-loader)::before,
body.workbench-open :is(.ai-image-loader, .ai-video-loader)::after { display: none; }
body.workbench-open :is(.ai-image-loader-atmosphere, .ai-video-loader-atmosphere),
#view-workbench .world-grid .setting-card-preview.is-generating-preview::after,
#view-workbench .delivery-processing-screen::before,
#view-workbench .delivery-cinema.is-enhancing .delivery-enhance-scan::before {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle, #716B7B66 .8px, transparent 1px);
    background-size: 6px 6px;
    opacity: .85;
    filter: none;
    transform: none;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, #0002 55%, #0008 85%);
    mask-image: radial-gradient(ellipse at center, #000 10%, #0002 55%, #0008 85%);
    -webkit-mask-size: 230% 230%;
    mask-size: 230% 230%;
    animation: pai-film-wait-field 7s ease-in-out infinite alternate;
}
body.workbench-open :is(.ai-image-loader-hud, .ai-video-loader-hud) {
    right: auto;
    max-width: calc(100% - 26px);
    padding: 3px 7px;
    color: #1E192D;
    background: #FFFEFBE6;
    border-radius: 8px;
    font-family: var(--pai-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
}
body.workbench-open :is(.ai-image-loader-hud > i, .ai-video-loader-hud > i),
body.workbench-open .ai-image-loader-hud::after { display: none; animation: none; }
body.workbench-open .ai-generation-eta {
    max-width: calc(100% - 28px);
    padding: 3px 7px;
    color: #716B7B;
    background: #FFFEFBE6;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 0;
    text-shadow: none;
}
body.workbench-open .ai-generation-eta::before { background: #E84FB7; box-shadow: none; }
body.workbench-open :is(.shot-video-loading-copy, .shot-image-comparison-loading > span:last-child) {
    color: #1E192D;
    background: #FFFEFB;
    border-color: transparent;
    backdrop-filter: none;
}
/* Submission/recovery already has live copy outside the decorative loader. */
body.workbench-open :is(.shot-image-comparison-loading, .shot-video-loading)
    :is(.ai-generation-eta, .ai-image-loader-hud, .ai-video-loader-hud) { display: none; }
/* Small setting candidates have their own status directly below the preview. */
#setting-generation-dialog .setting-generation-candidate-preview
    :is(.ai-generation-eta, .ai-image-loader-hud) { display: none; }

/* Resolving/batch preparation and AI writing keep the original state text. */
#view-workbench :is(.frame-status-resolving-indicator i, .setting-card-generation-dots i) {
    background: #E84FB7;
    animation: pai-film-wait-dot 1.8s ease-in-out infinite;
}
#view-workbench :is(.frame-status-resolving-indicator i, .setting-card-generation-dots i):nth-child(2) { animation-delay: .15s; }
#view-workbench :is(.frame-status-resolving-indicator i, .setting-card-generation-dots i):nth-child(3) { animation-delay: .3s; }
#view-workbench .frame-status-cell.is-resolving { background: #F1EFF3; animation: pai-film-wait-breathe 2s ease-in-out infinite; }
#view-workbench .frame-status-overview.is-paused :is(.frame-status-cell.is-resolving, .frame-status-resolving-indicator i) { animation: none; }
#view-workbench .setting-card-generation-label { color: #716B7B; }
#view-workbench .shot-video-prompt-field:is(.is-enhancing, .is-ai-writing, .is-tutorial-writing) .shot-video-prompt-input-shell { box-shadow: none; }
#view-workbench .shot-video-prompt-field:is(.is-enhancing, .is-ai-writing, .is-tutorial-writing) .shot-video-prompt-input-shell::before,
#view-workbench .shot-video-prompt-field:is(.is-enhancing, .is-ai-writing, .is-tutorial-writing) .shot-video-prompt-input-shell::after { opacity: 0; animation: none; box-shadow: none; }
#view-workbench .shot-video-prompt-field :is(textarea.ai-shot-prompt-writing, textarea.tutorial-shot-rework-writing) { text-shadow: none; animation: none; }
#view-workbench .shot-video-prompt-field.is-enhancing .shot-video-enhance-button { box-shadow: none; }

/* Export and clarity enhancement share the same waiting dot field. */
#view-workbench .delivery-agent strong { font-size: 14px; }
#view-workbench .delivery-agent p { font-size: 12px; line-height: 1.65; }
#view-workbench .delivery-wait-note { font-size: 11px; line-height: 1.65; }
#view-workbench .delivery-processing-screen { background: #F1EFEB; animation: none; }
#view-workbench .delivery-processing-screen::before { content: ""; }
#view-workbench .delivery-processing-screen::after { display: none; content: none; }
#view-workbench .delivery-trace { display: none; }
#view-workbench :is(.delivery-trace-glow, .delivery-trace-core,
    .delivery-process-track i, .delivery-cinema.is-enhancing .delivery-enhance-scan) { animation: none; }
#view-workbench .delivery-enhance-scan { display: none; }
#view-workbench .delivery-cinema.is-enhancing .delivery-enhance-scan {
    display: block;
    inset: 0;
    height: auto;
    opacity: 1;
    background: #F1EFEB;
    transform: none;
    animation: none;
    will-change: auto;
}
#view-workbench .delivery-cinema.is-enhancing .delivery-enhance-scan::after {
    display: none;
    content: none;
}
#view-workbench .delivery-process-track i { transition: width .24s ease; }
#view-workbench .delivery-process-track i::after { background: #AD8B9D; border: 0; box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
    :is(body.workbench-open, #create-dialog) :is(.loading-spinner, .rough-monitor-rendering-spinner,
        .shot-video-enhance-ring, .story-agent-core, .agent-generation-core,
        .save-status-dot, .rough-cut-status-dot, .story-breakdown-icon,
        .frame-status-cell.is-resolving, .frame-status-resolving-indicator i,
        .setting-card-generation-dots i, .agent-generation-status > span,
        .ai-image-loader-node, .ai-video-loader-track i, .delivery-progress li.is-active > span),
    :is(body.workbench-open, #create-dialog) button.is-busy::before,
    :is(body.workbench-open, #create-dialog) .pb-text-working::after,
    #setting-reference-picker-dialog .setting-reference-asset-card.is-selecting .setting-reference-asset-action::before,
    body.workbench-open :is(.story-agent-core, .agent-generation-core)::before,
    body.workbench-open :is(.story-agent-core, .agent-generation-core)::after,
    body.workbench-open .rough-monitor-play.is-loading::before,
    body.workbench-open .rough-timeline-play-toggle.is-loading::before { animation: none !important; opacity: 1; }
    body.workbench-open .upload-track i { animation: none; left: 0; }
    #view-workbench .delivery-process-track i { transition: none; }
    body.workbench-open :is(.ai-image-loader-atmosphere, .ai-video-loader-atmosphere),
    #view-workbench .world-grid .setting-card-preview.is-generating-preview::after,
    #view-workbench .delivery-processing-screen::before,
    #view-workbench .delivery-cinema.is-enhancing .delivery-enhance-scan::before {
        animation: none;
        -webkit-mask-position: center;
        mask-position: center;
        opacity: .35;
    }
}

/* Reuse pb-working-sheen and the existing creation hint's narrow bright band.
   Only the Pai palette changes; task copy and the text geometry stay intact. */
body.workbench-open, #create-dialog {
    --pai-wait-text-base: #716B7B;
    --pai-wait-text-light: #D9CDD5;
}
body.workbench-open :is(.story-inline-loading > h2, .agent-generation-state > h3,
    .ai-image-loader-hud > span, .ai-video-loader-hud > span:not(.ai-video-loader-waveform),
    .shot-image-comparison-loading > span:last-child, .shot-video-loading-copy,
    .delivery-processing .delivery-progress > li.is-active > strong,
    .delivery-cinema.is-enhancing .delivery-process-label > strong) {
    --pai-wait-text-base: #1E192D;
}
body.workbench-open .rough-monitor-rendering-copy {
    --pai-wait-text-base: #B9AFBC;
    --pai-wait-text-light: #FFFEFB;
}
body.workbench-open .delivery-cinema.is-enhancing .delivery-process-label > strong::before {
    background: #E84FB7;
    box-shadow: none;
}
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
    :is(body.workbench-open, #create-dialog) :is(.pb-text-working,
        .story-inline-loading > h2, .agent-generation-state > h3,
        .agent-generation-status > strong, .setting-card-generation-label,
        .ai-image-loader-hud > span, .ai-video-loader-hud > span:not(.ai-video-loader-waveform),
        .shot-image-comparison-loading > span:last-child, .shot-video-loading-copy,
        .workbench-loading > span:last-child, .final-loading > span:last-child,
        .workbench-save-status.is-saving > span:last-child,
        .rough-cut-status-dot.is-saving + .rough-cut-save-state, .rough-monitor-rendering-copy,
        .delivery-processing .delivery-agent > div > p,
        .delivery-processing .delivery-progress > li.is-active > strong,
        .delivery-cinema.is-enhancing .delivery-process-label > strong) {
        background-image: linear-gradient(105deg, var(--pai-wait-text-base) 44%,
            var(--pai-wait-text-light) 50%, var(--pai-wait-text-base) 56%);
        background-size: 200% 100%;
        background-repeat: repeat-x;
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
        text-shadow: none;
        animation: pb-working-sheen 2.8s linear infinite;
    }
    /* Keep the submission/recovery message's existing paper pill underneath. */
    body.workbench-open #view-workbench :is(.shot-image-comparison-loading > span:last-child,
        .shot-video-loading-copy) {
        background-image: linear-gradient(105deg, var(--pai-wait-text-base) 44%,
            var(--pai-wait-text-light) 50%, var(--pai-wait-text-base) 56%),
            linear-gradient(#FFFEFB, #FFFEFB);
        background-size: 200% 100%, 100% 100%;
        background-clip: text, padding-box;
        -webkit-background-clip: text, padding-box;
    }
}
@media (prefers-reduced-motion: reduce) {
    :is(body.workbench-open, #create-dialog) :is(.pb-text-working,
        .story-inline-loading > h2, .agent-generation-state > h3,
        .agent-generation-status > strong, .setting-card-generation-label,
        .ai-image-loader-hud > span, .ai-video-loader-hud > span:not(.ai-video-loader-waveform),
        .shot-image-comparison-loading > span:last-child, .shot-video-loading-copy,
        .workbench-loading > span:last-child, .final-loading > span:last-child,
        .workbench-save-status.is-saving > span:last-child,
        .rough-cut-status-dot.is-saving + .rough-cut-save-state, .rough-monitor-rendering-copy,
        .delivery-processing .delivery-agent > div > p,
        .delivery-processing .delivery-progress > li.is-active > strong,
        .delivery-cinema.is-enhancing .delivery-process-label > strong) {
        animation: none;
        background-image: none;
        background-clip: border-box;
        -webkit-background-clip: border-box;
        color: var(--pai-wait-text-base);
        -webkit-text-fill-color: currentColor;
    }
}
