/* Reference studio layout. Scoped to the two episode workspaces. */
:root[data-theme='dark']:has(.app-shell--studio) {
 --color-bg: #080f15;
 --color-surface: #0d1821;
 --color-raised: #101a23;
 --color-field: #0a131a;
 --color-text: #dce7ee;
 --color-muted: #8295a3;
 --color-border: #213039;
 --color-grid: rgb(128 166 184 / 5%);
 --color-accent: #33d2c2;
 --color-accent-2: #33d2c2;
 --color-success: #38d2be;
 --color-glow: rgb(34 172 160 / 7%);
}
:root[data-theme] .app-shell.app-shell--studio { display: block; height: 100dvh; overflow: hidden; }
:root[data-theme] .app-shell.app-shell--studio > .app-topbar { display: flex; }
:root[data-theme] .app-shell.app-shell--studio > .main-area { display: block; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; overflow: hidden; }
:root[data-theme] .app-shell.app-shell--studio .page-content { display: block; width: 100%; height: 100%; margin: 0; max-width: none; padding: 100px 8.5vw 245px; overflow: auto; background-color: var(--color-bg); background-image: radial-gradient(ellipse at 50% 0%,var(--color-glow),transparent 40%),linear-gradient(var(--color-grid) 1px,transparent 1px),linear-gradient(90deg,var(--color-grid) 1px,transparent 1px); background-size: auto,40px 40px,40px 40px; }
:root[data-theme] .app-shell.app-shell--studio .studio-header { position: fixed; z-index: var(--z-header); inset: 0 0 auto; display: flex; align-items: center; gap: 15px; height: 68px; min-height: 68px; margin: 0; padding: 0 32px; border: 0; border-bottom: 1px solid var(--color-border); border-radius: 0; background: color-mix(in srgb,var(--color-surface) 80%,var(--color-bg)); box-shadow: none; }
:root[data-theme] .app-shell.app-shell--studio .studio-back { height: 32px; min-height: 32px; padding: 0 15px; border-radius: 20px; border: 1px solid var(--color-border); background: color-mix(in srgb,var(--color-muted) 8%,transparent); color: var(--color-text); font-size: 13px; letter-spacing: .04em; }
:root[data-theme] .app-shell.app-shell--studio .studio-header-divider { width: 1px; height: 25px; background: var(--color-border); }
:root[data-theme] .app-shell.app-shell--studio .studio-account { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0; border: 0; background: none; text-align: left; color: var(--color-text); }
:root[data-theme] .app-shell.app-shell--studio .studio-account .avatar { display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; font-size: 11px; background: var(--gradient-creative); color: var(--color-on-creative); }
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-title b { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 400; color: var(--color-text); }
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-title span { font-size: 11px; color: var(--color-muted); }
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs { display: flex; gap: 0; margin-left: auto; padding: 3px; border: 1px solid var(--color-border); border-radius: 17px; background: color-mix(in srgb,var(--color-muted) 8%,transparent); }
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs button { width: 72px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 13px; background: transparent; color: var(--color-muted); font-size: 13px; }
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs button.is-active { background: color-mix(in srgb,var(--color-accent-2) 16%,transparent); color: var(--color-accent-2); border-color: color-mix(in srgb,var(--color-accent-2) 30%,transparent); box-shadow: none; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-studio--stacked,.image-workspace--stacked) { display: block; position: static; width: 100%; height: auto; min-height: 0; max-width: none; margin: 0; padding: 0; overflow: visible; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-output-pane,.image-output-pane,.image-output) { display: block; position: static; width: 100%; height: auto; min-height: 0; max-height: none; margin: 0; padding: 0; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
:root[data-theme] .app-shell.app-shell--studio .video-feed-heading { display: flex; position: static; align-items: flex-start; justify-content: space-between; gap: 24px; min-height: 87px; padding: 0; margin: 0 0 55px; border: 0; background: none; }
:root[data-theme] .app-shell.app-shell--studio .video-feed-kicker { display: block; margin-bottom: 9px; color: var(--color-accent-2); font-size: 12px; font-weight: 400; letter-spacing: .19em; }
:root[data-theme] .app-shell.app-shell--studio .video-feed-heading h1 { margin: 0 0 8px; color: var(--color-text); font-size: 28px; line-height: 1.3; letter-spacing: -.04em; }
:root[data-theme] .app-shell.app-shell--studio .video-feed-heading p { margin: 0; color: var(--color-muted); font-size: 13px; }
:root[data-theme] .app-shell.app-shell--studio .video-feed-toolbar { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; padding: 0; }
:root[data-theme] .app-shell.app-shell--studio .video-feed-stats { color: var(--color-muted); font-size: 12px; white-space: nowrap; }
:root[data-theme] .app-shell.app-shell--studio .video-output-tabs { display: flex; align-items: center; gap: 28px; padding: 0; border: 0; border-radius: 0; background: none; }
:root[data-theme] .app-shell.app-shell--studio .video-output-tabs button { position: relative; height: 32px; padding: 0 0 9px; border: 0; border-radius: 0; background: none; color: var(--color-muted); font-size: 14px; }
:root[data-theme] .app-shell.app-shell--studio .video-output-tabs button.is-active { color: var(--color-text); }
:root[data-theme] .app-shell.app-shell--studio .video-output-tabs button.is-active::after { position: absolute; content: ''; inset: auto 0 0; height: 2px; border-radius: 2px; background: var(--color-accent-2); }
:root[data-theme] .app-shell.app-shell--studio .studio-feed-label { position: relative; display: block; height: 32px; padding-bottom: 9px; color: var(--color-text); font-size: 14px; font-weight: 600; }
:root[data-theme] .app-shell.app-shell--studio .studio-feed-label::after { position: absolute; content: ''; inset: auto 0 0; height: 2px; border-radius: 2px; background: var(--color-accent-2); }
:root[data-theme] .app-shell.app-shell--studio :is(.video-result-list,.image-results-grid) { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px; width: 100%; max-width: none; margin: 0; padding: 0; columns: auto; align-items: start; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-result-detail,.image-result-card) { position: relative; display: flex; flex-direction: column; width: 100%; height: auto; min-width: 0; max-width: none; min-height: 0; margin: 0; padding: 0; gap: 0; border: 1px solid color-mix(in srgb,var(--color-border) 75%,transparent); border-radius: 15px; background: color-mix(in srgb,var(--color-surface) 90%,var(--color-bg)); box-shadow: none; overflow: hidden; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-result-stage,.image-thumbnail,.image-thumbnail-stage) { position: relative; display: block; width: 100%; height: auto; min-height: 0; max-height: none; aspect-ratio: 16/9; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--color-media-bg); overflow: hidden; }
:root[data-theme] .app-shell.app-shell--studio .studio-video-thumbnail { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; }
:root[data-theme] .app-shell.app-shell--studio :is(.studio-video-thumbnail video,.image-thumbnail img) { display: block; width: 100%; height: 100%; min-height: 0; max-height: none; object-fit: cover; aspect-ratio: 16/9; }
:root[data-theme] .app-shell.app-shell--studio .studio-play-mark { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #ffffff44; border-radius: 50%; background: #08141acc; color: #fff; transform: translate(-50%,-50%); opacity: 0; transition: opacity 160ms; }
:root[data-theme] .app-shell.app-shell--studio .studio-video-thumbnail:is(:hover,:focus-visible) .studio-play-mark { opacity: 1; }
:root[data-theme] .app-shell.app-shell--studio .studio-card-meta { display: block; min-width: 0; padding: 6px 11px 5px; color: var(--color-muted); }
:root[data-theme] .app-shell.app-shell--studio .studio-card-meta p { margin: 0 0 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; line-height: 1.35; }
:root[data-theme] .app-shell.app-shell--studio .studio-card-meta time { display: block; font-size: 10px; line-height: 1.3; opacity: .72; }
:root[data-theme] .app-shell.app-shell--studio .studio-card-status { position: absolute; top: 9px; right: 9px; z-index: 2; padding: 3px 9px; border: 1px solid color-mix(in srgb,var(--color-accent-2) 40%,transparent); border-radius: 6px; background: color-mix(in srgb,var(--color-accent-2) 16%,#0a161baa); color: var(--color-accent-2); font-size: 10px; line-height: 1.3; pointer-events: none; }
:root[data-theme] .app-shell.app-shell--studio .studio-card-status.is-error { color: var(--color-danger); border-color: var(--color-danger); background: var(--color-danger-bg); }
:root[data-theme] .app-shell.app-shell--studio .task-log-button { top: 8px; right: auto; left: 8px; width: 26px; height: 26px; opacity: 0; transition: opacity 150ms; }
:root[data-theme] .app-shell.app-shell--studio :is(.media-result-card:hover,.media-result-card:focus-within) .task-log-button { opacity: 1; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-result-processing,.video-result-error) { min-height: 100%; max-height: 100%; padding: 32px 12px 12px; gap: 5px; overflow: auto; font-size: 10px; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-result-processing h3,.video-result-error h3,.image-result-processing h3) { font-size: 13px; }
:root[data-theme] .app-shell.app-shell--studio :is(.image-result-processing,.image-result-error) { padding: 32px 12px 12px; min-height: 205px; gap: 6px; border: 0; }
:root[data-theme] .app-shell.app-shell--studio .image-status-card .task-log-button { opacity: 1; }
:root[data-theme] .app-shell.app-shell--studio .video-output-content { padding: 0; overflow: visible; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-output-empty,.image-result-empty) { min-height: 280px; border: 1px dashed var(--color-border); background: transparent; }
/* Identical geometry for both floating composers. */
:root[data-theme] .app-shell.app-shell--studio :is(.video-create-pane,.image-workspace--stacked > .image-composer) { position: fixed; z-index: var(--z-composer); inset: auto auto 20px 50%; transform: translateX(-50%); width: min(1520px,75vw); height: auto; min-height: 0; max-height: none; margin: 0; padding: 22px; display: block; border: 1px solid color-mix(in srgb,var(--color-accent-2) 26%,var(--color-border)); border-radius: 20px; background: var(--color-surface); color: var(--color-text); box-shadow: 0 12px 36px #00000015; overflow: visible; }
:root[data-theme] .app-shell.app-shell--studio .video-create-scroll { height: auto; max-height: none; padding: 0; overflow: visible; }
:root[data-theme] .app-shell.app-shell--studio .video-composer { padding: 0; border: 0; background: none; display: block; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer { display: flex; flex-direction: column; gap: 7px; width: 100%; height: auto; padding: 0; border: 0; background: transparent; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-composer-body,.image-composer-body) { display: grid; grid-template-columns: 57px minmax(0,1fr); align-items: start; gap: 12px; height: auto; min-height: 0; margin: 0; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-reference-column,.image-reference-column) { width: 57px; padding: 5px 0 0; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-prompt-column,.image-prompt-column) { display: flex; flex-direction: column; width: 100%; min-width: 0; gap: 5px; }
:root[data-theme] .app-shell.app-shell--studio .composer-input-area { position: relative; height: 68px; min-width: 0; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-prompt-submit-row,.image-prompt-submit-row) { display: block; width: 100%; height: 68px; min-height: 68px; max-height: 68px; flex: none; }
:root[data-theme] .app-shell.app-shell--studio .mention-field { display: block; height: 100%; width: 100%; min-width: 0; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .mention-field .prompt-editor { display: block; height: 100%; min-height: 0; max-height: none; padding: 0; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-field); box-shadow: none; overflow: hidden; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .mention-field .prompt-editor:focus-within { border-color: color-mix(in srgb,var(--color-accent-2) 55%,var(--color-border)); box-shadow: 0 0 0 1px color-mix(in srgb,var(--color-accent-2) 12%,transparent); }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .prompt-editor > :is(.prompt-highlights,.prompt-textarea) { box-sizing: border-box; width: 100%; height: 100%; min-height: 0; max-height: none; margin: 0; padding: 10px 105px 10px 12px; font-family: var(--font-sans); font-size: 13px; line-height: 1.6; letter-spacing: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; border: 0; border-radius: 0; resize: none; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .prompt-editor > .prompt-highlights { color: var(--color-text); }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .prompt-editor > .prompt-textarea { background: transparent; color: transparent; -webkit-text-fill-color: transparent; caret-color: var(--color-accent-2); }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .prompt-editor > .prompt-textarea::placeholder { -webkit-text-fill-color: var(--color-muted); color: var(--color-muted); }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .prompt-reference { color: var(--color-accent-2); background: color-mix(in srgb,var(--color-accent-2) 12%,transparent); border-radius: 4px; padding: 0; }
:root[data-theme] .app-shell.app-shell--studio .composer-tools { position: absolute; z-index: 2; right: 10px; bottom: 10px; display: flex; gap: 5px; padding: 0; border: 0; }
:root[data-theme] .app-shell.app-shell--studio .composer-tools button { width: 23px; height: 23px; min-width: 23px; padding: 0; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--color-muted); }
:root[data-theme] .app-shell.app-shell--studio .composer-tools button.active { color: var(--color-accent-2); }
:root[data-theme] .app-shell.app-shell--studio .composer-footer { display: flex; justify-content: flex-end; align-items: center; gap: 35px; min-height: 15px; padding: 0; margin: 0; }
:root[data-theme] .app-shell.app-shell--studio .composer-footer .char-count { order: 2; font-size: 10px; color: var(--color-muted); }
:root[data-theme] .app-shell.app-shell--studio .composer-footer .write-prompt { order: 1; padding: 0; border: 0; background: none; color: #70a5f6; font-size: 11px; }
:root[data-theme] .app-shell.app-shell--studio .composer-bottom-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; width: 100%; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings { display: flex; flex: 1; width: auto; min-width: 0; gap: 9px; align-items: stretch; justify-content: flex-start; margin: 0; padding: 0; border: 0; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .setting-select { display: flex; flex: 0 1 75px; width: 75px; min-width: 0; height: 36px; min-height: 36px; margin: 0; padding: 3px 9px; gap: 0; border: 1px solid var(--color-border); border-radius: 10px; background: transparent; color: var(--color-text); box-shadow: none; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .model-setting { flex-basis: 150px; width: 150px; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .setting-select:has(#video-image-mode),
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .setting-select:has(#image-reference-mode) { flex-basis: 95px; width: 95px; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .setting-copy { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 0; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .setting-copy small { font-size: 9px; line-height: 12px; color: var(--color-muted); }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .settings-trigger { display: flex; justify-content: space-between; align-items: center; min-height: 15px; height: 15px; padding: 0; border: 0; background: none; font-size: 12px; line-height: 15px; color: var(--color-text); text-align: left; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .settings-trigger .icon { width: 10px; height: 10px; flex-shrink: 0; margin-left: 5px; color: var(--color-muted); }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .setting-chevron { display: none; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .video-duration-compact { display: flex; flex: 0 1 130px; width: 130px; min-width: 100px; height: 36px; min-height: 36px; margin: 0; padding: 3px 9px; gap: 10px; border: 1px solid var(--color-border); border-radius: 10px; background: transparent; }
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact > span { display: flex; flex-direction: column; flex-shrink: 0; }
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact small { font-size: 9px; line-height: 12px; }
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact output { font-size: 12px; line-height: 15px; white-space: nowrap; color: var(--color-text); }
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact input { flex: 1; width: 100%; min-width: 20px; height: 3px; margin: auto 0; padding: 0; accent-color: var(--color-accent-2); }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row { display: block; flex: 0 0 180px; width: 180px; margin: 0; padding: 0; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action { display: flex; align-items: center; gap: 5px; width: 100%; height: 36px; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generate-button { display: flex; flex: 1; align-items: center; justify-content: center; gap: 5px; width: 100%; min-width: 0; height: 36px; min-height: 36px; padding: 0 8px; border: 0; border-radius: 12px; background: var(--gradient-creative) !important; color: var(--color-on-creative) !important; font-size: 14px; line-height: 1; font-weight: 600; box-shadow: none !important; white-space: nowrap; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generate-button::before,
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generate-button::after { content: none; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generate-button:disabled { opacity: .5; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action.is-counting { border: 0; background: none; padding: 0; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action.is-counting .generate-button { height: 36px; min-height: 36px; opacity: 1; font-size: 12px; }
:root[data-theme] .app-shell.app-shell--studio .countdown-number { display: inline; width: auto; height: auto; margin: 0; padding: 0; font-size: 16px; background: none; }
:root[data-theme] .app-shell.app-shell--studio .countdown-copy { display: inline; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-cancel { flex: 0 0 44px; min-width: 44px; height: 36px; min-height: 36px; padding: 0; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-raised); color: var(--color-text); font-size: 11px; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-picker { width: 57px; min-width: 57px; height: 57px; margin: 0; padding: 0; border: 0; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-upload-button { position: relative; display: grid; place-items: center; width: 57px; height: 57px; min-height: 57px; padding: 0; border: 1px solid var(--color-border); border-radius: 13px; background: var(--color-raised); overflow: hidden; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-upload-button > .shared-reference-plus { position: absolute; top: 10px; left: 18px; z-index: 2; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-upload-button > b { position: absolute; z-index: 2; inset: auto 0 0; padding: 3px 0; border: 0; background: #0c1729a6; color: #e1ebf0; font-size: 8px; font-weight: 400; text-align: center; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-upload-button > small { position: absolute; z-index: 3; inset: 3px 3px auto auto; padding: 1px 3px; border-radius: 4px; background: #0c1729a6; color: #e1ebf0; font-size: 8px; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-mini-stack { position: absolute; inset: 0; width: 100%; height: 100%; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-mini { position: absolute; inset: auto; left: calc(10% + var(--stack-order) * 7%); top: calc(20% - var(--stack-order) * 5%); z-index: calc(1 + var(--stack-order)); width: 70%; height: 62%; border: 1.5px solid var(--color-surface); border-radius: 5px; transform: rotate(calc((var(--stack-order) - 1) * 7deg)); box-shadow: 0 2px 5px #0004; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-mini img,
:root[data-theme] .app-shell.app-shell--studio .shared-reference-mini video { width: 100%; height: 100%; object-fit: cover; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-mini-count { display: none; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-upload-button > b { z-index: 5; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-upload-button > small { z-index: 6; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-picker.has-references .shared-reference-upload-button { background: color-mix(in srgb,var(--color-accent-2) 10%,var(--color-raised)); }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-empty-stack { display: none; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-upload-button:has(.shared-reference-mini) > .shared-reference-plus { display: none; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-expand { position: absolute; z-index: 7; bottom: 0; left: 0; width: 57px; height: 15px; padding: 0; border: 0; background: none; color: transparent; }
:root[data-theme] .app-shell.app-shell--studio .composer-help { position: absolute; bottom: calc(100% + 8px); left: 0; width: 100%; }
:root[data-theme] .app-shell.app-shell--studio .composer-help p { display: none; }
:root[data-theme] .app-shell.app-shell--studio .composer-help .is-error { display: block; padding: 7px 12px; border: 1px solid var(--color-danger); border-radius: 8px; background: var(--color-surface); }
/* Expanded editing keeps all settings and action sizes unchanged. */
:root[data-theme] .settings-dropdown--studio { padding: 5px; border-radius: 12px; border-color: var(--color-border); background: var(--color-surface); box-shadow: 0 12px 32px #0005; }
:root[data-theme] .settings-dropdown--studio .settings-panel-header { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
:root[data-theme] .settings-dropdown--studio .settings-options { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; }
:root[data-theme] .settings-dropdown--studio .settings-choice { display: flex; flex-direction: row; justify-content: space-between; align-items: center; width: 100%; min-height: 30px; height: auto; margin: 0; padding: 7px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--color-muted); font-size: 12px; text-align: left; }
:root[data-theme] .settings-dropdown--studio .settings-choice.is-selected { background: color-mix(in srgb,var(--color-accent-2) 13%,transparent); color: var(--color-accent-2); }
:root[data-theme] .settings-dropdown--studio .settings-choice-check { color: var(--color-accent-2); }
:root[data-theme] .settings-dropdown--studio .settings-panel-note { margin: 8px 5px 3px; padding: 0; border: 0; font-size: 9px; }
:root[data-theme] .settings-dropdown--studio .settings-section { margin: 5px 0 0; padding: 5px 0 0; border-top: 1px solid var(--color-border); }
:root[data-theme] .settings-dropdown--studio .settings-section h3 { margin: 3px 9px; font-size: 10px; }
.studio-preview-actions { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.studio-preview-actions .task-log-button { position: static; }
.studio-menu-credits { color: var(--color-muted); padding: 0 12px; font-size: 12px; }
.studio-menu-theme { padding: 12px 0; }
@media (max-width: 1180px) {
 :root[data-theme] .app-shell.app-shell--studio .page-content { padding-right: 5vw; padding-left: 5vw; }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-create-pane,.image-workspace--stacked > .image-composer) { width: 90vw; }
 :root[data-theme] .app-shell.app-shell--studio .composer-bottom-row { gap: 14px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings { gap: 6px; }
}
@media (max-width: 760px) {
 :root[data-theme] .app-shell.app-shell--studio .studio-header { height: 60px; min-height: 60px; padding: 0 14px; gap: 10px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-back { font-size: 11px; padding: 0 10px; }
 :root[data-theme] .app-shell.app-shell--studio .episode-workspace-title b { max-width: 90px; font-size: 11px; }
 :root[data-theme] .app-shell.app-shell--studio .episode-workspace-title span { font-size: 9px; }
 :root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs button { width: 46px; font-size: 11px; }
 :root[data-theme] .app-shell.app-shell--studio .page-content { padding: 84px 16px 285px; }
 :root[data-theme] .app-shell.app-shell--studio .video-feed-heading { gap: 12px; margin-bottom: 30px; min-height: 90px; }
 :root[data-theme] .app-shell.app-shell--studio .video-feed-heading h1 { font-size: 23px; }
 :root[data-theme] .app-shell.app-shell--studio .video-feed-heading p { font-size: 10px; max-width: 200px; line-height: 1.5; }
 :root[data-theme] .app-shell.app-shell--studio .video-feed-kicker { font-size: 9px; letter-spacing: .1em; }
 :root[data-theme] .app-shell.app-shell--studio .video-feed-stats { font-size: 9px; }
 :root[data-theme] .app-shell.app-shell--studio .video-output-tabs { gap: 15px; }
 :root[data-theme] .app-shell.app-shell--studio .video-output-tabs button { font-size: 11px; }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-result-list,.image-results-grid) { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-card-meta { padding: 5px 7px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-card-meta p { font-size: 9px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-card-meta time { font-size: 8px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-card-status { top: 5px; right: 5px; font-size: 8px; padding: 2px 5px; }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-create-pane,.image-workspace--stacked > .image-composer) { bottom: 10px; width: calc(100vw - 20px); padding: 13px; border-radius: 16px; }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-composer-body,.image-composer-body) { grid-template-columns: 46px minmax(0,1fr); gap: 8px; }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-reference-column,.image-reference-column,.shared-reference-picker,.shared-reference-upload-button) { width: 46px; min-width: 46px; }
 :root[data-theme] .app-shell.app-shell--studio .shared-reference-upload-button { height: 50px; min-height: 50px; }
 :root[data-theme] .app-shell.app-shell--studio .shared-reference-upload-button > .shared-reference-plus { left: 13px; }
 :root[data-theme] .app-shell.app-shell--studio .shared-reference-expand { width: 46px; }
 :root[data-theme] .app-shell.app-shell--studio .composer-bottom-row { flex-wrap: wrap; gap: 10px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); flex: 1 0 100%; gap: 6px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings :is(.setting-select,.video-duration-compact) { width: auto; min-width: 0; }
 :root[data-theme] .app-shell.app-shell--studio .composer-submit-row { flex-basis: 100%; width: 100%; }
 :root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generate-button { font-size: 13px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .prompt-editor > :is(.prompt-highlights,.prompt-textarea) { font-size: 12px; padding: 8px 70px 8px 10px; }
 :root[data-theme] .app-shell.app-shell--studio .composer-tools { gap: 0; right: 6px; bottom: 8px; }
 :root[data-theme] .app-shell.app-shell--studio .composer-tools button { width: 20px; min-width: 20px; font-size: 17px; }
}
@media (hover: none) { :root[data-theme] .app-shell.app-shell--studio .task-log-button { opacity: 1; } }
/* Reset legacy grid and icon-button rules retained by earlier workbench versions. */
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings { display: flex !important; grid-template-columns: none; position: static; }
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs button { justify-content: center; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .setting-icon { display: none; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .setting-copy small { margin: 0; font-weight: 400; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .settings-trigger { font-weight: 400; gap: 0; }
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact { flex-direction: row; align-items: center; justify-content: flex-start; }
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact > span { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; width: auto; height: auto; }
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact output { font-weight: 400; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row { height: 36px; min-height: 36px; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action { min-height: 36px; max-height: 36px; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .prompt-editor > :is(.prompt-highlights,.prompt-textarea) { font-weight: 400; }
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(to right,var(--color-accent-2) 0 var(--range-progress),var(--color-border) var(--range-progress) 100%); }
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact input[type=range]::-webkit-slider-thumb { width: 11px; height: 11px; margin-top: -4px; border: 2px solid color-mix(in srgb,var(--color-accent-2) 40%,white); background: var(--color-accent-2); }
:root[data-theme] .app-shell.app-shell--studio .video-output-tabs button > span { display: inline; padding: 0; background: none; border: 0; font-size: inherit; font-weight: inherit; color: inherit; }
@media (max-width: 760px) {
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)); }
}
:root[data-theme] .settings-dropdown--studio .settings-choice-check { position: static; flex: 0 0 16px; width: 16px; height: 16px; margin-left: 8px; border: 0; background: none; font-size: 12px; }
:root[data-theme] .settings-dropdown--studio .settings-choice { font-weight: 400; }
:root[data-theme] .studio-mention-menu { z-index: var(--z-popover); background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
:root[data-theme] .studio-mention-menu .mention-option { background: transparent; color: var(--color-text); }
:root[data-theme] .studio-mention-menu .mention-option:is(:hover,.is-active) { background: var(--color-hover); }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings { height: 36px; min-height: 36px; flex: 1 1 0%; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-composer-body,.image-composer-body) { padding: 0; }
:root[data-theme] .app-shell.app-shell--studio .composer-footer { height: 15px; min-height: 15px; flex: 0 0 15px; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row { position: static; inset: auto; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action .countdown-number { display: inline; font-size: 16px; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action .countdown-copy { display: inline; font-size: 11px; }
@media (max-width: 760px) {
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings { height: auto; min-height: 0; flex-basis: 100%; }
}
:root[data-theme] .app-shell.app-shell--studio .composer-input-area { display: block; flex: none; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .mention-field { margin: 0; padding: 0; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .mention-field .prompt-editor { margin: 0; inset: auto; }
@media (max-width: 760px) {
 :root[data-theme] .app-shell.app-shell--studio .studio-header { flex-wrap: nowrap; }
 :root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs { width: auto; flex: 0 0 auto; }
 :root[data-theme] .app-shell.app-shell--studio .studio-header-divider { flex: 0 0 1px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-account { flex: 1; }
}
/* Preserve the reference proportions on wider desktop displays. */
@media (min-width: 1441px) {
 .app-shell--studio { --studio-unit: min(.06944445vw,1.42px); }
 :root[data-theme] .app-shell.app-shell--studio .page-content { padding-top: calc(100 * var(--studio-unit)); padding-bottom: calc(245 * var(--studio-unit)); background-size: auto,calc(40 * var(--studio-unit)) calc(40 * var(--studio-unit)),calc(40 * var(--studio-unit)) calc(40 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-header { height: calc(68 * var(--studio-unit)); min-height: calc(68 * var(--studio-unit)); padding: 0 calc(32 * var(--studio-unit)); gap: calc(15 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-back { height: calc(32 * var(--studio-unit)); padding: 0 calc(15 * var(--studio-unit)); font-size: calc(13 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-header-divider { height: calc(25 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-account { gap: calc(10 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-account .avatar { width: calc(29 * var(--studio-unit)); height: calc(29 * var(--studio-unit)); flex-basis: calc(29 * var(--studio-unit)); font-size: calc(11 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .episode-workspace-title b { font-size: calc(13 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .episode-workspace-title span { font-size: calc(11 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs { padding: calc(3 * var(--studio-unit)); border-radius: calc(17 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs button { width: calc(72 * var(--studio-unit)); height: calc(30 * var(--studio-unit)); border-radius: calc(13 * var(--studio-unit)); font-size: calc(13 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .video-feed-heading { min-height: calc(87 * var(--studio-unit)); margin-bottom: calc(55 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .video-feed-kicker { font-size: calc(12 * var(--studio-unit)); margin-bottom: calc(9 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .video-feed-heading h1 { font-size: calc(28 * var(--studio-unit)); margin-bottom: calc(8 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .video-feed-heading p { font-size: calc(13 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .video-feed-stats { font-size: calc(12 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .video-feed-toolbar { gap: calc(12 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .video-output-tabs { gap: calc(28 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .video-output-tabs button { height: calc(32 * var(--studio-unit)); padding-bottom: calc(9 * var(--studio-unit)); font-size: calc(14 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-result-list,.image-results-grid) { gap: calc(24 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-result-detail,.image-result-card) { border-radius: calc(15 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-card-meta { padding: calc(6 * var(--studio-unit)) calc(11 * var(--studio-unit)) calc(5 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-card-meta p { font-size: calc(12 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-card-meta time { font-size: calc(10 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-card-status { top: calc(9 * var(--studio-unit)); right: calc(9 * var(--studio-unit)); padding: calc(3 * var(--studio-unit)) calc(9 * var(--studio-unit)); font-size: calc(10 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-create-pane,.image-workspace--stacked > .image-composer) { bottom: calc(20 * var(--studio-unit)); padding: calc(22 * var(--studio-unit)); border-radius: calc(20 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-composer-body,.image-composer-body) { grid-template-columns: calc(57 * var(--studio-unit)) minmax(0,1fr); gap: calc(12 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-reference-column,.image-reference-column,.shared-reference-picker,.shared-reference-upload-button) { width: calc(57 * var(--studio-unit)); min-width: calc(57 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio :is(.shared-reference-picker,.shared-reference-upload-button) { height: calc(57 * var(--studio-unit)); min-height: calc(57 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .shared-reference-upload-button > b { font-size: calc(8 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .shared-reference-upload-button > small { font-size: calc(8 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .composer-input-area,
 :root[data-theme] .app-shell.app-shell--studio :is(.video-prompt-submit-row,.image-prompt-submit-row) { height: calc(68 * var(--studio-unit)); min-height: calc(68 * var(--studio-unit)); max-height: calc(68 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer { gap: calc(7 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-prompt-column,.image-prompt-column) { gap: calc(5 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .composer-footer { height: calc(15 * var(--studio-unit)); min-height: calc(15 * var(--studio-unit)); flex-basis: calc(15 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .composer-footer .char-count { font-size: calc(10 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .composer-footer .write-prompt { font-size: calc(11 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .prompt-editor > :is(.prompt-highlights,.prompt-textarea) { font-size: calc(13 * var(--studio-unit)); padding: calc(10 * var(--studio-unit)) calc(105 * var(--studio-unit)) calc(10 * var(--studio-unit)) calc(12 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .composer-tools { right: calc(10 * var(--studio-unit)); bottom: calc(10 * var(--studio-unit)); gap: calc(5 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .composer-tools button { width: calc(23 * var(--studio-unit)); height: calc(23 * var(--studio-unit)); font-size: calc(20 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings { height: calc(36 * var(--studio-unit)); min-height: calc(36 * var(--studio-unit)); gap: calc(9 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .setting-select { flex-basis: calc(75 * var(--studio-unit)); width: calc(75 * var(--studio-unit)); height: calc(36 * var(--studio-unit)); min-height: calc(36 * var(--studio-unit)); padding: calc(3 * var(--studio-unit)) calc(9 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .model-setting { flex-basis: calc(150 * var(--studio-unit)); width: calc(150 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .setting-select:has(#video-image-mode),
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .setting-select:has(#image-reference-mode) { flex-basis: calc(95 * var(--studio-unit)); width: calc(95 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .setting-copy small { font-size: calc(9 * var(--studio-unit)); line-height: calc(12 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .settings-trigger { height: calc(15 * var(--studio-unit)); min-height: calc(15 * var(--studio-unit)); font-size: calc(12 * var(--studio-unit)); line-height: calc(15 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .video-duration-compact { flex-basis: calc(130 * var(--studio-unit)); width: calc(130 * var(--studio-unit)); height: calc(36 * var(--studio-unit)); min-height: calc(36 * var(--studio-unit)); padding: calc(3 * var(--studio-unit)) calc(9 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .video-duration-compact small { font-size: calc(9 * var(--studio-unit)); line-height: calc(12 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .video-duration-compact output { font-size: calc(12 * var(--studio-unit)); line-height: calc(15 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .composer-submit-row { flex-basis: calc(180 * var(--studio-unit)); width: calc(180 * var(--studio-unit)); height: calc(36 * var(--studio-unit)); min-height: calc(36 * var(--studio-unit)); }
 :root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action,
 :root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generate-button,
 :root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action.is-counting .generate-button { height: calc(36 * var(--studio-unit)); min-height: calc(36 * var(--studio-unit)); max-height: none; font-size: calc(14 * var(--studio-unit)); }
}

/* Prompt-only enlargement uses the same live editor inside a centered native dialog. */
:root[data-theme] .prompt-expand-dialog { position: fixed; inset: 0; margin: auto; box-sizing: border-box; width: min(880px,calc(100vw - 40px)); height: min(480px,calc(100dvh - 80px)); max-height: calc(100dvh - 40px); padding: 20px; overflow: visible; border: 1px solid var(--color-border); border-radius: 22px; background: var(--color-surface); color: var(--color-text); box-shadow: 0 24px 90px #0005; font-family: var(--font-sans); }
.prompt-expand-dialog::backdrop { background: #080e1890; backdrop-filter: blur(5px); }
.prompt-expand-dialog > header { display: flex; align-items: center; justify-content: space-between; height: 32px; margin-bottom: 14px; }
.prompt-expand-dialog h2 { margin: 0; font-size: 16px; font-weight: 600; }
.prompt-expand-dialog > header button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-field); color: var(--color-muted); font-size: 22px; cursor: pointer; }
.prompt-expand-content { height: calc(100% - 46px); min-height: 0; }
.prompt-expand-dialog .mention-field { display: block; width: 100%; height: 100%; margin: 0; }
:root[data-theme] .prompt-expand-dialog .prompt-editor { position: relative; display: block; width: 100%; height: 100%; min-height: 0; max-height: none; padding: 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-field); }
:root[data-theme] .prompt-expand-dialog .prompt-editor:focus-within { border-color: var(--color-accent-2); box-shadow: 0 0 0 2px color-mix(in srgb,var(--color-accent-2) 12%,transparent); }
:root[data-theme] .prompt-expand-dialog .prompt-editor > :is(.prompt-highlights,.prompt-textarea) { box-sizing: border-box; display: block; width: 100%; height: 100%; min-height: 0; max-height: none; margin: 0; padding: 18px; border: 0; border-radius: 0; background: transparent; font-family: var(--font-sans); font-size: 15px; font-weight: 400; line-height: 1.8; letter-spacing: normal; white-space: pre-wrap; overflow-wrap: anywhere; resize: none; }
:root[data-theme] .prompt-expand-dialog .prompt-highlights { color: var(--color-text); }
:root[data-theme] .prompt-expand-dialog .prompt-editor > .prompt-textarea { color: transparent; -webkit-text-fill-color: transparent; caret-color: var(--color-accent-2); }
:root[data-theme] .prompt-expand-dialog .prompt-editor > .prompt-textarea::placeholder { color: var(--color-muted); -webkit-text-fill-color: var(--color-muted); }
:root[data-theme] .prompt-expand-dialog .prompt-reference { color: var(--color-accent-2); background: color-mix(in srgb,var(--color-accent-2) 12%,transparent); border-radius: 4px; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .prompt-editor > :is(.prompt-highlights,.prompt-textarea) { padding-right: 45px; }

/* Stable range geometry: one- and two-digit seconds occupy the same width. */
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact > span { flex: 0 0 39px; width: 39px; min-width: 39px; font-variant-numeric: tabular-nums; }
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact output { display: block; width: 100%; font-variant-numeric: tabular-nums; }
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact input[type=range] { display: block; flex: 1 1 0%; width: 0; min-width: 24px; height: 22px; min-height: 22px; max-height: 22px; padding: 0; margin: 0; border: 0; touch-action: none; transition: none; transform: none; }
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact input[type=range]::-webkit-slider-thumb { transition: none; }
/* Countdown text inherits the button's contrast and has no legacy dark label. */
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action.is-counting .generate-button { gap: 6px; font-family: var(--font-sans); user-select: none; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action.is-counting .generate-button > :is(.countdown-number,.countdown-copy) { display: inline-flex; align-items: center; justify-content: center; position: static; width: auto; height: auto; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent !important; color: inherit !important; -webkit-text-fill-color: currentColor; line-height: 1.2; letter-spacing: 0; text-decoration: none; box-shadow: none; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action.is-counting .generate-button > .countdown-number { min-width: 1ch; font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action.is-counting .generate-button > .countdown-copy { font-size: 12px; font-weight: 500; }
/* In-progress content fits inside a single stage without an inner scrollbar. */
:root[data-theme] .app-shell.app-shell--studio .video-result-stage:has(.video-result-processing) { min-height: 0; }
:root[data-theme] .app-shell.app-shell--studio .video-result-processing { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: none; height: 100%; min-height: 0; max-height: none; padding: 12px; overflow: hidden; color: var(--color-text); background: var(--color-raised); }
:root[data-theme] .app-shell.app-shell--studio .video-processing-heading { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 16px; }
:root[data-theme] .app-shell.app-shell--studio .video-processing-heading .video-spinner { flex: 0 0 14px; width: 14px; height: 14px; margin: 0; border-width: 1.5px; border-color: var(--color-border); border-top-color: var(--color-accent-2); }
:root[data-theme] .app-shell.app-shell--studio .video-processing-heading h3 { margin: 0; color: var(--color-text); font-size: 11px; font-weight: 500; line-height: 16px; }
:root[data-theme] .app-shell.app-shell--studio .video-result-processing .video-phase-timers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; gap: 5px; margin: 0; }
:root[data-theme] .app-shell.app-shell--studio .video-result-processing .video-phase-timers > span { gap: 4px; min-width: 0; padding: 6px 2px; border: 1px solid var(--color-border); border-radius: 7px; background: var(--color-surface); color: var(--color-muted); font-size: 9px; line-height: 12px; }
:root[data-theme] .app-shell.app-shell--studio .video-result-processing .video-phase-timers > .is-current { border-color: var(--color-accent-2); color: var(--color-text); }
:root[data-theme] .app-shell.app-shell--studio .video-result-processing .video-phase-timers b { font-size: 12px; font-weight: 550; color: var(--color-text); line-height: 14px; font-variant-numeric: tabular-nums; }
:root[data-theme] .app-shell.app-shell--studio .video-result-processing > .btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: 0 0 auto; height: 23px; min-height: 23px; margin: 0; padding: 3px 8px; font-size: 9px; line-height: 15px; border-radius: 7px; }
:root[data-theme] .app-shell.app-shell--studio .video-result-processing > .btn .icon { width: 11px; height: 11px; }
@media(min-width:1441px) { :root[data-theme] .app-shell.app-shell--studio .video-duration-compact > span { flex-basis: calc(39 * var(--studio-unit)); width: calc(39 * var(--studio-unit)); min-width: calc(39 * var(--studio-unit)); } }

/* A shared navigation remains visible above every authenticated workspace. */
:root[data-theme] .app-shell.app-shell--topnav { --workspace-header-height: 70px; display: flex; height: 100dvh; min-height: 0; flex-direction: column; padding-top: var(--workspace-header-height); overflow: hidden; }
:root[data-theme] .app-shell.app-shell--topnav > .app-topbar { position: fixed; z-index: 50; inset: 0 0 auto; display: flex; height: var(--workspace-header-height); min-height: var(--workspace-header-height); flex: none; }
:root[data-theme] .app-shell.app-shell--topnav > .main-area { display: flex; flex: 1; height: auto; min-height: 0; overflow: hidden; }
:root[data-theme] .app-shell.app-shell--topnav .company-password-page { min-height: 0; }
:root[data-theme] .app-shell.app-shell--studio .studio-header { top: var(--workspace-header-height); height: 52px; min-height: 52px; padding: 0 32px; gap: 15px; }
:root[data-theme] .app-shell.app-shell--studio .page-content { height: 100%; padding-top: 86px; }
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-back {
 position: absolute; left: 11.4vw; display: inline-flex; align-items: center; justify-content: center;
 min-width: 88px; min-height: 38px; padding: 0 15px; border: 1px solid var(--color-border);
 border-radius: 11px; background: var(--color-raised); color: var(--color-text);
 font-size: 13px; font-weight: 650; line-height: 1; white-space: nowrap;
}
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-back:hover {
 border-color: var(--color-accent-2); background: color-mix(in srgb,var(--color-accent-2) 9%,var(--color-raised));
}
@media(max-width:760px) {
 :root[data-theme] .app-shell.app-shell--topnav { --workspace-header-height: 96px; }
 :root[data-theme] .app-shell.app-shell--topnav > .app-topbar { display: grid; grid-template-rows: 48px 43px; align-content: start; padding-top: 5px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-header { height: 48px; min-height: 48px; padding: 0 14px; gap: 10px; }
 :root[data-theme] .app-shell.app-shell--studio .episode-workspace-back { left: 5vw; min-width: 75px; min-height: 33px; padding: 0 10px; font-size: 11px; }
 :root[data-theme] .app-shell.app-shell--studio .page-content { padding-top: 70px; }
}

/* Compact, matching video/image workspaces. Geometry stays independent of media ratio. */
.app-shell--studio {
 --studio-composer-width: min(1248px,62vw);
 --studio-composer-bottom: 20px;
 --studio-composer-clearance: 232px;
}
:root[data-theme] .app-shell.app-shell--studio .page-content {
 padding: 78px 7.7vw var(--studio-composer-clearance);
 scroll-padding-bottom: var(--studio-composer-clearance);
}
:root[data-theme] .app-shell.app-shell--studio .studio-header { justify-content: center; }
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs {
 position: relative; isolation: isolate; flex: 0 0 auto; width: 192px; height: 42px;
 padding: 3px; margin: 0; gap: 0; border-radius: var(--radius-pill);
}
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs::before {
 content: ''; position: absolute; z-index: -1; inset: 3px auto 3px 3px; width: calc((100% - 6px)/2);
 border: 1px solid color-mix(in srgb,var(--color-accent-2) 32%,transparent);
 border-radius: var(--radius-pill); background: color-mix(in srgb,var(--color-accent-2) 16%,transparent);
 transform: translateX(0);
}
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs[data-active-workbench=imagegen]::before { transform: translateX(100%); }
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs[data-switch-direction=forward]::before { animation: studio-tab-forward 280ms cubic-bezier(.22,.8,.25,1) both; }
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs[data-switch-direction=backward]::before { animation: studio-tab-backward 280ms cubic-bezier(.22,.8,.25,1) both; }
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs button {
 position: relative; width: 50%; height: 34px; flex: 1 1 0; min-width: 0; padding: 0;
 border: 0; border-radius: var(--radius-pill); background: transparent; font-size: 13px;
 transition: color var(--motion-fast);
}
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs button.is-active { border: 0; background: transparent; }
:root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs button:focus-visible { outline: 2px solid var(--color-accent-2); outline-offset: -2px; }
:root[data-theme] .app-shell.app-shell--studio .video-feed-heading { min-height: 50px; margin: 0 0 24px; gap: 0; justify-content: flex-end; }
:root[data-theme] .app-shell.app-shell--studio .video-feed-toolbar { gap: 6px; }
:root[data-theme] .app-shell.app-shell--studio .video-feed-stats { font-size: 11px; }
:root[data-theme] .app-shell.app-shell--studio .studio-feed-label { height: 28px; font-size: 12px; padding-bottom: 7px; }
:root[data-theme] .app-shell.app-shell--studio .video-output-tabs { height: 28px; flex: 0 0 auto; gap: 0; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-result-list,.image-results-grid) { grid-template-columns: repeat(5,minmax(0,1fr)); gap: clamp(16px,2vw,32px); }
:root[data-theme] .app-shell.app-shell--studio :is(.video-result-detail,.image-result-card) { border-radius: var(--radius-md); }
:root[data-theme] .app-shell.app-shell--studio .studio-card-meta { padding: 7px 10px; }
:root[data-theme] .app-shell.app-shell--studio .studio-card-meta p { font-size: 11px; }
:root[data-theme] .app-shell.app-shell--studio .studio-card-meta time { font-size: 9px; }
:root[data-theme] .app-shell.app-shell--studio .studio-card-status { top: 7px; right: 7px; padding: 3px 6px; font-size: 9px; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-create-pane,.image-workspace--stacked > .image-composer) {
 width: var(--studio-composer-width); bottom: var(--studio-composer-bottom); padding: 18px; border-radius: var(--radius-lg);
}
:root[data-theme] .app-shell.app-shell--studio .studio-composer { gap: 8px; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-composer-body,.image-composer-body) { grid-template-columns: 54px minmax(0,1fr); gap: 12px; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-reference-column,.image-reference-column,.shared-reference-picker,.shared-reference-upload-button) { width: 54px; min-width: 54px; }
:root[data-theme] .app-shell.app-shell--studio :is(.shared-reference-picker,.shared-reference-upload-button) { height: 58px; min-height: 58px; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-upload-button > :is(b,small) { font-size: 8px; }
:root[data-theme] .app-shell.app-shell--studio .shared-reference-expand { width: 54px; }
:root[data-theme] .app-shell.app-shell--studio .composer-input-area,
:root[data-theme] .app-shell.app-shell--studio :is(.video-prompt-submit-row,.image-prompt-submit-row) { height: 100px; min-height: 100px; max-height: 100px; }
:root[data-theme] .app-shell.app-shell--studio :is(.video-prompt-column,.image-prompt-column) { gap: 4px; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .prompt-editor > :is(.prompt-highlights,.prompt-textarea) { padding: 10px 42px 10px 12px; font-size: 13px; }
:root[data-theme] .app-shell.app-shell--studio .composer-tools { right: 8px; bottom: 8px; gap: 0; }
:root[data-theme] .app-shell.app-shell--studio .composer-tools button { width: 23px; height: 23px; min-width: 23px; font-size: 20px; }
:root[data-theme] .app-shell.app-shell--studio .composer-footer { height: 14px; min-height: 14px; flex-basis: 14px; }
:root[data-theme] .app-shell.app-shell--studio .composer-footer .char-count { font-size: 9px; }
:root[data-theme] .app-shell.app-shell--studio .composer-bottom-row { gap: 12px; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings {
 display: grid !important; grid-template-columns: 1.65fr .8fr .8fr .8fr 1.05fr 1.25fr;
 gap: 6px; height: 36px; min-height: 36px; align-items: stretch;
}
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings :is(.setting-select,.video-duration-compact,.model-setting) {
 width: 100%; min-width: 0; height: 36px; min-height: 36px; padding: 4px 7px; gap: 0;
}
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .setting-select:has(:is(#video-image-mode,#image-reference-mode)) { width: 100%; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .setting-copy small,
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact small { font-size: 8px; line-height: 11px; }
:root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings .settings-trigger,
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact output { height: 15px; min-height: 15px; font-size: 11px; line-height: 15px; }
:root[data-theme] .app-shell.app-shell--studio .video-duration-compact > span { flex-basis: 32px; width: 32px; min-width: 32px; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row { width: 140px; flex: 0 0 140px; height: 36px; min-height: 36px; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action,
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generate-button,
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action.is-counting .generate-button { height: 36px; min-height: 36px; max-height: 36px; font-size: 12px; }
:root[data-theme] .app-shell.app-shell--studio .composer-submit-row .generation-action.is-counting .generate-button > .countdown-copy { font-size: 10px; }
.app-shell--studio .video-advanced-inline { display:flex; align-items:center; gap:8px; width:100%; min-width:0; overflow-x:auto; padding:4px 2px 2px; border-top:1px solid var(--color-border); scrollbar-width:thin; }
.app-shell--studio .video-advanced-inline .video-option-check { display:inline-flex; align-items:center; gap:5px; flex:0 0 auto; min-height:28px; color:var(--color-muted); font-size:10px; white-space:nowrap; }
.app-shell--studio .video-advanced-inline .video-option-check input { margin:0; accent-color:var(--color-accent); }
.app-shell--studio .video-advanced-inline .video-option-field { display:inline-flex; align-items:center; gap:5px; flex:0 0 auto; min-height:26px; color:var(--color-muted); font-size:9px; white-space:nowrap; }
.app-shell--studio .video-advanced-inline .video-option-field select,.app-shell--studio .video-advanced-inline .video-option-field input { width:72px; height:24px; padding:2px 5px; border:1px solid var(--color-border); border-radius:6px; background:var(--color-raised); color:var(--color-text); font:inherit; }
.app-shell--studio .video-advanced-inline .video-option-field input[type=number] { width:46px; }
.app-shell--studio .video-advanced-inline .video-option-field small { margin-left:-4px; font-size:8px; }
.app-shell--studio .video-advanced-inline .video-draft-source select { width:150px; }
@keyframes studio-tab-forward { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes studio-tab-backward { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes studio-content-forward { from { opacity: .35; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
@keyframes studio-content-backward { from { opacity: .35; transform: translateX(-14px); } to { opacity: 1; transform: translateX(0); } }
.app-shell--studio[data-studio-transition=forward] :is(.video-output-pane,.image-output-pane) { animation: studio-content-forward 280ms ease-out both; }
.app-shell--studio[data-studio-transition=backward] :is(.video-output-pane,.image-output-pane) { animation: studio-content-backward 280ms ease-out both; }
@media(min-width:761px) and (max-width:1439px) {
 .app-shell--studio { --studio-composer-width: min(1000px,calc(100vw - 80px)); }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-result-list,.image-results-grid) { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
}
@media(min-width:761px) and (max-width:1100px) {
 :root[data-theme] .app-shell.app-shell--studio :is(.video-result-list,.image-results-grid) { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
 :root[data-theme] .app-shell.app-shell--studio .composer-bottom-row { flex-wrap: wrap; gap: 8px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings { flex-basis: 100%; }
 :root[data-theme] .app-shell.app-shell--studio .composer-submit-row { margin-left: auto; }
 .app-shell--studio { --studio-composer-clearance: 260px; }
}
@media(max-width:760px) {
 .app-shell--studio { --studio-composer-width: calc(100vw - 20px); --studio-composer-bottom: 10px; --studio-composer-clearance: 306px; }
 :root[data-theme] .app-shell.app-shell--studio .page-content { padding: 66px 16px var(--studio-composer-clearance); }
 :root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs { width: 174px; height: 38px; }
 :root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs button { height: 30px; font-size: 12px; }
 :root[data-theme] .app-shell.app-shell--studio .video-feed-heading { margin-bottom: 18px; }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-result-list,.image-results-grid) { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-create-pane,.image-workspace--stacked > .image-composer) { padding: 12px; border-radius: 16px; }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-composer-body,.image-composer-body) { grid-template-columns: 46px minmax(0,1fr); gap: 8px; }
 :root[data-theme] .app-shell.app-shell--studio :is(.video-reference-column,.image-reference-column,.shared-reference-picker,.shared-reference-upload-button,.shared-reference-expand) { width: 46px; min-width: 46px; }
 :root[data-theme] .app-shell.app-shell--studio :is(.shared-reference-picker,.shared-reference-upload-button) { height: 50px; min-height: 50px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-composer .studio-settings { grid-template-columns: repeat(3,minmax(0,1fr)); height: auto; min-height: 0; flex-basis: 100%; }
 :root[data-theme] .app-shell.app-shell--studio .composer-bottom-row { flex-wrap: wrap; gap: 8px; }
 :root[data-theme] .app-shell.app-shell--studio .composer-submit-row { flex-basis: 100%; width: 100%; }
 :root[data-theme] .app-shell.app-shell--studio .studio-card-meta { padding: 5px 7px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-card-meta p { font-size: 9px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-card-meta time { font-size: 8px; }
 :root[data-theme] .app-shell.app-shell--studio .studio-card-status { top: 5px; right: 5px; font-size: 8px; padding: 2px 5px; }
}
@media(prefers-reduced-motion:reduce) {
 :root[data-theme] .app-shell.app-shell--studio .episode-workspace-tabs[data-switch-direction]::before,
 .app-shell--studio[data-studio-transition] :is(.video-output-pane,.image-output-pane) { animation: none; }
}

/* Generated work controls share the studio palette and never cover preview clicks. */
.generated-result-actions{position:absolute;right:8px;bottom:8px;z-index:4;display:flex;align-items:center;gap:6px}
.generated-result-actions :is(button,select){height:28px;border:1px solid var(--color-border,#d4ded8);border-radius:8px;background:var(--color-surface,#fff);color:var(--color-text,#24392c);box-shadow:0 2px 8px #0002;font-family:inherit;font-size:11px;font-weight:500;line-height:1.2;cursor:pointer}
.generated-result-actions button{display:grid;place-items:center;width:28px;padding:5px}
.generated-result-actions button svg{width:15px;height:15px}
.generated-result-actions select{max-width:92px;padding:0 5px;font-size:11px}
.generated-result-actions button:hover{background:var(--color-surface-hover,#eef5ef)}
.generated-result-actions .generated-result-delete:hover{color:var(--color-danger,#c94c54)}
.generated-result-actions .is-saved{color:var(--color-accent-2,#48a875)}
.generated-result-actions :disabled{opacity:.5;cursor:wait}
.image-result-card>.generated-result-actions{top:8px;bottom:auto;right:8px}
.image-result-card:has(>.generated-result-actions)>.studio-card-status{display:none}
.generated-delete-dialog{width:min(440px,calc(100vw - 32px));padding:26px;border:1px solid var(--color-border,#d4ded8);border-radius:18px;color:var(--color-text,#24392c);background:var(--color-surface,#fff);box-shadow:0 24px 80px #0004}
.generated-delete-dialog::backdrop{background:#111b2166;backdrop-filter:blur(5px)}
.generated-delete-dialog h2{margin:0 0 14px;font-size:18px}
.generated-delete-dialog p{font-size:13px;line-height:1.8}
.generated-delete-dialog footer{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}
.generated-edit-dialog ul{max-height:35vh;overflow:auto;padding:0;list-style:none;margin:14px 0}
.generated-edit-dialog li{display:flex;flex-direction:column;gap:4px;padding:10px 0;border-bottom:1px solid var(--color-border,#d4ded8);font-size:13px;overflow-wrap:anywhere}
.generated-edit-dialog li span{font-size:12px;color:var(--color-text-muted,#64756c)}
.asset-card-preview>video,.shared-asset-choice-visual>video{width:100%;height:100%;object-fit:contain;background:var(--color-surface-alt,#edf2ef);border-radius:12px}
.asset-card-preview>video{height:150px;flex-shrink:0}
.asset-generated-player{display:block;width:100%;max-height:75vh;background:#111;object-fit:contain}
.asset-library-filters{flex-wrap:wrap}
.generated-asset-tag{position:absolute;left:8px;top:8px;z-index:2;max-width:96px;height:28px;padding:0 6px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface);color:var(--color-text);font-size:11px;cursor:pointer}

/* Shared feed geometry: six equal cards on desktop, with matching pending stages. */
:root[data-theme] .app-shell.app-shell--studio :is(.video-result-list,.image-results-grid) {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
:root[data-theme] .app-shell.app-shell--studio .video-studio--stacked .video-result-stage,
:root[data-theme] .app-shell.app-shell--studio .image-status-stage {
  position: relative; width: 100%; height: auto; min-height: 0;
  aspect-ratio: 16/9; overflow: hidden; background: var(--color-raised);
}
:root[data-theme] .app-shell.app-shell--studio .image-status-stage :is(.image-result-processing,.image-result-error) {
  position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; max-height: none;
  padding: 12px; gap: 5px; overflow: hidden; border-radius: 0;
}
:root[data-theme] .app-shell.app-shell--studio .image-status-stage .image-result-processing {
  justify-content: center; color: var(--color-text); background: var(--color-raised);
}
:root[data-theme] .app-shell.app-shell--studio .image-status-stage .image-result-processing h3 {
  margin: 0; font-size: 11px; line-height: 16px;
}
:root[data-theme] .app-shell.app-shell--studio .image-status-stage .video-spinner {
  flex: 0 0 14px; width: 14px; height: 14px; margin: 0; border-width: 1.5px;
}
:root[data-theme] .app-shell.app-shell--studio .image-status-stage .image-cancel-task {
  padding: 3px 8px; min-height: 23px; font-size: 9px; line-height: 15px; border-radius: 7px;
}
:root[data-theme] .app-shell.app-shell--studio :is(.video-result-processing,.image-result-processing) :is(.video-current-timer,.image-current-timer) {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 0; color: var(--color-muted); font-size: 10px; line-height: 17px;
}
:root[data-theme] .app-shell.app-shell--studio :is(.video-current-timer,.image-current-timer) b {
  color: var(--color-text); font-size: 13px; font-variant-numeric: tabular-nums;
}
:root[data-theme] .app-shell.app-shell--studio .video-result-processing { gap: 5px; }
:root[data-theme] .app-shell.app-shell--studio :is(.image-status-stage,.video-result-stage) :is(.image-result-error,.video-result-error) {
  position: absolute; inset: 0; min-height: 0; height: 100%; padding: 32px 10px 8px; gap: 7px; overflow: hidden;
}
:root[data-theme] .app-shell.app-shell--studio :is(.image-status-stage,.video-result-stage) :is(.image-result-error,.video-result-error) h3 {
  margin: 0 0 4px; font-size: 11px; line-height: 15px;
}
:root[data-theme] .app-shell.app-shell--studio :is(.image-status-stage,.video-result-stage) :is(.image-result-error,.video-result-error) p {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  margin: 0; overflow: hidden; font-size: 10px; line-height: 15px;
}
@media (max-width: 760px) {
  :root[data-theme] .app-shell.app-shell--studio :is(.video-result-list,.image-results-grid) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 760px) and (min-width: 601px) {
  :root[data-theme] .app-shell.app-shell--studio :is(.video-result-list,.image-results-grid) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  :root[data-theme] .app-shell.app-shell--studio :is(.video-result-list,.image-results-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Image cards use the same 16:9 stage and compact metadata footer as video cards. */
:root[data-theme] .app-shell.app-shell--studio .image-workspace--stacked .image-results-grid {
  width: 100%; max-width: none; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px;
}
:root[data-theme] .app-shell.app-shell--studio .image-workspace--stacked .image-result-card {
  height: auto; min-width: 0; display: block; margin: 0; overflow: hidden;
}
:root[data-theme] .app-shell.app-shell--studio .image-workspace--stacked :is(.image-thumbnail,.image-thumbnail-stage) {
  position: relative; width: 100%; height: auto; min-height: 0; aspect-ratio: 16/9; overflow: hidden;
}
:root[data-theme] .app-shell.app-shell--studio .image-workspace--stacked .image-thumbnail img {
  width: 100%; height: 100%; min-height: 0; max-height: none; object-fit: cover;
}
:root[data-theme] .app-shell.app-shell--studio .image-status-stage :is(.image-result-processing,.image-result-error) { padding: 8px; }
:root[data-theme] .app-shell.app-shell--studio .image-workspace--stacked .image-status-card :is(.image-result-processing,.image-result-error) { overflow: hidden; scrollbar-width: none; }
@media (max-width: 760px) {
  :root[data-theme] .app-shell.app-shell--studio .image-workspace--stacked .image-results-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
}
@media (max-width: 760px) and (min-width: 601px) {
  :root[data-theme] .app-shell.app-shell--studio .image-workspace--stacked .image-results-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  :root[data-theme] .app-shell.app-shell--studio .image-workspace--stacked .image-results-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
