/* Three-column creation workbenches, keeping the existing input and task handlers. */
body .studioToolPage:has(.remixWorkbench){max-width:none;border:0;padding:0;margin:0}
body .remixWorkbench,body .referenceGenerationWorkbench{display:grid;grid-template-columns:minmax(360px,calc((100% - 184px)*.41)) minmax(0,1fr) 160px;gap:12px;align-items:stretch;height:calc(100dvh - 48px);max-width:none;margin:0}
body .remixComposer,body .remixResults,body .remixRecent,body .referenceGenerationWorkbench>section,body .referenceGenerationWorkbench>.generationQueue{min-width:0;border:1px solid var(--line,#e5e7eb);border-radius:16px;background:var(--bg,#fcfcfd);padding:10px;box-sizing:border-box}
body .remixComposer{display:flex;flex-direction:column;overflow:hidden}
body .remixComposerHead{display:flex;justify-content:space-between;align-items:center;min-height:32px;margin-bottom:8px}
body .remixComposerHead h1{font-size:13px;font-weight:600;margin:0}
body .remixComposerHead button{border:0;background:none;min-height:28px;padding:4px 7px;font-size:12px}
body .remixForm{overflow-y:auto;min-height:0;flex:1;scrollbar-width:thin}
body .remixStep{margin:0 0 16px}
body .remixStep h2{font-size:12px;font-weight:600;line-height:20px;margin:0 0 6px}
body .remixStep>header{display:flex;align-items:center;gap:4px;margin-bottom:6px}
body .remixStep>header h2{flex:1;margin:0}
body .remixStep>header .chip{font-size:10px;min-height:24px;padding:3px 7px}
body .remixUploadTrigger{display:flex;width:100%;min-height:82px;flex-direction:column;justify-content:center;align-items:center;gap:6px;padding:14px;border:1px solid var(--line,#e5e7eb);border-radius:10px;background:transparent;color:var(--muted,#737373);font-size:12px;cursor:pointer}
body .remixUploadTrigger:hover{background:#f5f5f6;border-color:#c8cbd1}
body .remixUploadMark{font-size:24px;line-height:20px;font-weight:400}
body .remixSavedSource{font-size:11px;color:var(--muted,#737373);margin-top:7px}
body .remixSavedSource select{max-width:100%;margin:6px 0}
body .remixSavedSource .chip{font-size:11px;min-height:28px}
body .remixEmptySegments{display:grid;min-height:112px;place-content:center;text-align:center;padding:18px;border:1px solid var(--line,#e5e7eb);border-radius:10px;font-size:12px;line-height:1.6;color:var(--muted,#737373);margin:0}
body .remixEmptySegments[hidden]{display:none}
body .remixAudioFields{display:grid;grid-template-columns:1fr;gap:7px;border:1px solid var(--line,#e5e7eb);border-radius:10px;padding:10px}
body .remixAudioFields label{display:grid;grid-template-columns:60px minmax(0,1fr);align-items:center;font-size:11px;color:var(--muted,#737373)}
body .remixAudioFields select,body .remixOutputSettings select{min-width:0;width:100%;border:1px solid var(--line,#e5e7eb);border-radius:6px;background:transparent;color:var(--text,#181818);padding:5px;font-size:11px}
body .remixAudioFields>.chip{justify-self:end;min-height:25px;font-size:10px;padding:3px 7px}
body .remixSubmitArea{margin-top:auto;padding-top:10px;display:grid;gap:8px}
body .remixSubmitArea output{font-size:11px;line-height:1.5;color:var(--muted,#737373);overflow-wrap:anywhere}
body .remixSubmitArea output:empty{display:none}
body .remixOutputSettings{font-size:11px;color:var(--muted,#737373)}
body .remixOutputSettings>summary{cursor:pointer;padding:6px}
body .remixOutputSettings>label{display:grid;grid-template-columns:70px minmax(0,1fr);gap:6px;margin-top:6px;align-items:center}
body .remixSubmit{width:100%;min-height:40px;justify-content:center;border-radius:10px;font-size:12px;padding:8px}
body .remixSourceCard{display:grid;grid-template-columns:64px minmax(0,1fr);gap:6px;padding:8px 0;border-bottom:1px solid var(--line,#e5e7eb)}
body .remixSourceCard>video{width:64px;height:60px;object-fit:cover;grid-row:span 2;border-radius:6px;background:#eee;cursor:pointer}
body .remixSourceCard>div{min-width:0;font-size:11px;overflow:hidden}
body .remixSourceCard strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .remixSourceCard small{display:block;color:var(--muted,#737373);font-size:10px;margin-top:3px}
body .remixSourceCard>.chip{min-height:24px;font-size:10px;padding:3px 6px;justify-self:start}
body .remixClipRow{display:flex;align-items:center;flex-wrap:wrap;gap:5px;padding:8px;border:1px solid var(--line,#e5e7eb);border-radius:8px;margin-bottom:6px}
body .remixClipRow>strong{font-size:11px;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .remixClipRow label{font-size:10px;display:flex;gap:4px;align-items:center;color:var(--muted,#737373)}
body .remixClipRow input{font-size:11px;max-width:66px;padding:4px;border:1px solid var(--line,#e5e7eb);border-radius:5px;background:transparent;color:var(--text,#181818)}
body .remixClipRow .chip{font-size:10px;min-height:23px;padding:3px 6px}
body .remixResults{position:relative;display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin;padding:12px}
body .remixResults>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
body .remixResults h2,body .remixRecent h2{font-size:13px;line-height:20px;font-weight:600;margin:0}
body .remixResults>header p{font-size:12px;color:var(--muted,#737373);margin:0}
body .remixResultTools{display:flex;gap:6px;align-items:center}
body .remixResultTools .chip{min-height:32px;min-width:62px;font-size:11px;border-radius:10px;background:transparent}
body .remixResultsEmpty{display:grid;justify-items:center;align-content:center;flex:1;min-height:280px;gap:14px;color:var(--muted,#737373)}
body .remixResultsEmpty>span{font-size:36px;line-height:1}
body .remixResultsEmpty p{font-size:13px;margin:0}
body .remixResultsEmpty[hidden]{display:none}
body .remixPreviewVideo{display:block;width:100%;max-height:420px;margin:12px auto;background:#111;border-radius:8px}
body .remixPreviewVideo[hidden]{display:none}
body .remixPreviewTitle{font-size:11px;color:var(--muted,#737373);margin:10px 0 0}
body .remixPreviewTitle:has(+video[hidden]){display:none}
body .remixResultGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-top:14px}
body .remixResultGrid:empty{display:none}
body .remixResultCard{border:1px solid var(--line,#e5e7eb);border-radius:10px;overflow:hidden}
body .remixResultCard>video{width:100%;max-height:300px;display:block;background:#111}
body .remixResultCard>footer{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px;font-size:11px}
body .remixResultCard>footer label{display:flex;align-items:center;gap:5px;flex:1}
body .remixResultCard .chip{min-height:25px;padding:3px 6px;font-size:10px}
body .remixResults>small{font-size:12px;color:var(--muted,#737373);margin-top:auto;padding-top:12px}
body .remixRecent{overflow-y:auto;scrollbar-width:thin}
body .remixRecentCard{display:flex;flex-direction:column;align-items:start;gap:6px;width:100%;min-height:72px;padding:10px;margin-top:10px;border:1px solid var(--line,#e5e7eb);border-radius:10px;background:transparent;font-size:11px;line-height:1.5;text-align:left;overflow-wrap:anywhere;color:var(--text,#181818)}
body .remixRecentCard.selected{border-color:#c9cbd0;background:#f6f6f7}
body .remixRecentCard small{color:var(--muted,#737373);font-size:10px}
/* Existing image and video generation controls retain their IDs and listeners. */
body .generationPageTitle{display:none}
body .referenceGenerationWorkbench{align-items:stretch}
body .referenceGenerationWorkbench>.generationComposer{display:flex;flex-direction:column;overflow:hidden;grid-column:1;grid-row:1;padding:10px}
body .referenceGenerationWorkbench>.generationPreview{display:flex;flex-direction:column;overflow:auto;grid-column:2;grid-row:1;padding:12px}
body .referenceGenerationWorkbench>.generationQueue{grid-column:3;grid-row:1;overflow-y:auto;scrollbar-width:thin;padding:10px}
body .referenceGenerationWorkbench .panelHead{margin:0;min-height:60px;gap:8px;align-items:center}
body .referenceGenerationWorkbench .panelHead h2{font-size:13px;font-weight:600}
body .generationNew{margin-left:auto;border:0;background:transparent;font-size:12px;min-height:28px;padding:4px 8px}
body .generationInputSurface{display:flex;flex-direction:column;flex:1;min-height:160px;border:1px solid var(--line,#e5e7eb);border-radius:10px;padding:12px;overflow-y:auto;scrollbar-width:thin}
body .generationInputSurface .sectionLabel{font-size:11px;color:var(--muted,#737373);margin:0 0 10px}
body .generationInputSurface label[for=generationPrompt]{display:none}
body .generationInputSurface .referencePanel{margin:0 0 14px;padding:0;flex-shrink:0}
body .generationInputSurface .referencePanelHead{margin:8px 0 0}
body .generationInputSurface .referencePanelHead button{font-size:11px;min-height:28px;padding:5px 8px}
body .generationInputSurface .referencePreviewGrid{gap:8px;min-height:0}
body .generationInputSurface .referenceEmpty{height:76px;font-size:12px;border-color:#dedfe3;background:transparent;border-radius:9px}
body .generationInputSurface .promptMentionWrap{flex:1;display:flex;min-height:160px;flex-direction:column}
body .generationInputSurface .promptBox{flex:1;width:100%;min-height:160px;padding:0;border:0;background:transparent;border-radius:0;resize:none;box-shadow:none;font-size:13px;line-height:1.7}
body .generationInputSurface .promptBox:focus{outline:0;box-shadow:none}
body .generationInputSurface .promptActions{margin:8px 0 0;gap:5px;flex-shrink:0}
body .generationInputSurface .promptActions button{min-height:25px;min-width:25px;padding:4px;font-size:10px}
body .generationInputSurface .promptActions output{font-size:10px}
body .generationInputSurface>.studioShortcuts{margin:8px 0 0;gap:4px;flex-shrink:0;font-size:10px}
body .generationInputSurface>.studioShortcuts .chip{font-size:10px;padding:4px 6px;min-height:26px}
body .generationFooter{padding-top:8px;flex-shrink:0;position:relative}
body .generationFooterControls{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px;align-items:stretch}
body .generationFooterControls>.modelSelect{display:flex;flex-direction:column;align-items:start;gap:2px;margin:0;border:1px solid var(--line,#e5e7eb);border-radius:11px;padding:7px 10px;font-size:10px;min-width:0;color:var(--muted,#737373)}
body .generationFooterControls>.modelSelect select{width:100%;min-width:0;min-height:22px;border:0;padding:0;background:transparent;color:var(--text,#181818);font-size:11px;font-weight:600;box-shadow:none}
body .generationSettingsMenu{position:relative;min-width:0;border:1px solid var(--line,#e5e7eb);border-radius:11px}
body .generationSettingsMenu>summary{display:grid;align-content:center;gap:2px;cursor:pointer;padding:8px 10px;min-height:50px;font-size:10px;color:var(--muted,#737373);list-style:none}
body .generationSettingsMenu>summary small{color:var(--text,#181818);font-weight:600;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .generationSettingsMenu>.generationSettings{display:none}
body .generationSettingsMenu[open]>.generationSettings{display:grid;grid-template-columns:1fr 1fr;position:absolute;right:0;bottom:calc(100% + 8px);z-index:30;min-width:310px;width:100%;padding:16px;border:1px solid var(--line,#e5e7eb);border-radius:12px;background:#fff;box-shadow:0 12px 36px #00000015;gap:12px}
body .generationSettingsMenu .optionGrid label{font-size:11px}
body .generationFooter .generationSubmit{width:100%;min-height:40px;padding:8px 12px;font-size:12px;border-radius:10px;justify-content:center}
body .generationFooter [data-generation-cost]{font-size:10px;margin:0 0 4px;text-align:center;display:block}
body .generationCenterHead{border:0;padding:0;height:28px;min-height:28px!important;align-items:start!important}
body .generationCenterHead .meta{display:none}
body .referenceGenerationWorkbench .generationPreview .resultBox{flex:1;min-height:200px;aspect-ratio:auto;background:transparent;border:0;padding:12px;color:var(--muted,#737373);box-shadow:none;white-space:pre-wrap}
body .referenceGenerationWorkbench .studioEmpty{font-size:12px;gap:12px}
body .referenceGenerationWorkbench .studioEmpty .emptyMediaMark{border:0;background:transparent;color:#858585}
body .generationQueue>h2{font-size:12px;font-weight:600;margin:2px 0 12px}
body .generationQueue .generationRecent{margin:0;padding:0;border:0}
body .generationQueue .generationRecent>.panelHead{display:none}
body .generationQueue .generationRecent>p{font-size:11px;color:var(--muted,#737373);margin:0 0 14px}
body .generationQueue .generationRecent:has(~[data-video-jobs]){display:none}
body .generationQueue .generationRecent:has(~[data-image-jobs]){display:none}
body .generationQueue .videoJobs{margin:0;padding:0;border:0;background:transparent}
body .generationQueue .videoJobs>header{display:flex;flex-direction:column;gap:6px;margin:0 0 10px}
body .generationQueue .videoJobs>header h2{display:none}
body .generationQueue .videoJobs>header>div{display:flex;gap:3px;flex-wrap:wrap}
body .generationQueue .videoJobs>header .chip{font-size:10px;padding:3px 5px;min-height:24px}
body .generationQueue .videoJobRow{display:block;padding:9px;border:1px solid var(--line,#e5e7eb);border-radius:9px;background:transparent;margin:0 0 8px;overflow:hidden}
body .generationQueue .videoJobRow strong{display:block;font-size:11px;line-height:1.5}
body .generationQueue .videoJobRow span{font-size:10px;line-height:1.4;color:var(--muted,#737373)}
body .generationQueue .videoJobRow p{font-size:10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;line-height:1.5}
body .generationJobMenu{font-size:10px;margin-top:5px}
body .generationJobMenu>summary{cursor:pointer;color:var(--muted,#737373)}
body .generationJobMenu .videoJobActions{display:flex;flex-direction:column;align-items:stretch;gap:4px;margin-top:5px}
body .generationJobMenu .chip{font-size:10px;padding:4px;min-height:24px;width:100%;white-space:normal}
body .generationQueue .videoJobsEmpty{font-size:11px;color:var(--muted,#737373);padding:0;margin:10px 0}
body .generationQueue details.generationNamedDrafts,body .generationQueue details.generationMoreTools{border-top:1px solid var(--line,#e5e7eb);padding-top:10px;margin-top:14px;font-size:11px}
body .generationNamedDrafts>summary,body .generationMoreTools>summary{cursor:pointer}
body .generationNamedDrafts label{font-size:10px;display:block;margin-top:8px}
body .generationNamedDrafts input,body .generationNamedDrafts select{max-width:100%;width:100%;font-size:10px;padding:5px;border:1px solid var(--line,#e5e7eb);border-radius:5px;margin-top:4px;background:transparent;color:var(--text,#181818)}
body .generationNamedDrafts h3,body .generationNamedDrafts p,body .generationNamedDrafts small{font-size:10px;line-height:1.6}
body .generationNamedDrafts .chip,body .generationMoreTools .chip{font-size:10px;min-height:25px;padding:4px 5px;margin:4px 0;white-space:normal}
body .generationMoreTools .studioShortcuts{display:grid;margin:6px 0;gap:0}
body .generationSceneLibrary{font-size:12px;border-top:1px solid var(--line,#e5e7eb);padding-top:12px;margin-top:10px}
body .generationSceneLibrary>summary{cursor:pointer;color:var(--muted,#737373)}
body .generationSceneLibrary .videoJobs{margin-top:12px;padding:0;border:0}
@media(min-width:1700px){body .remixWorkbench,body .referenceGenerationWorkbench{grid-template-columns:minmax(420px,calc((100% - 184px)*.41)) minmax(0,1fr) 160px}}
@media(max-width:1100px) and (min-width:721px){body .remixWorkbench,body .referenceGenerationWorkbench{grid-template-columns:minmax(320px,43%) minmax(0,1fr)}body .remixRecent,body .referenceGenerationWorkbench>.generationQueue{display:none}}
@media(max-width:720px){
  body .remixWorkbench,body .referenceGenerationWorkbench{display:flex;flex-direction:column;gap:12px;height:auto;min-height:0}
  body .remixComposer,body .referenceGenerationWorkbench>.generationComposer{overflow:visible;min-height:600px;padding:10px}
  body .remixComposer,body .remixResults,body .remixRecent,body .referenceGenerationWorkbench>.generationPreview,body .referenceGenerationWorkbench>.generationQueue{width:100%;border-radius:12px}
  body .remixComposerHead{margin-bottom:10px}
  body .remixResults{min-height:300px}
  body .remixResultTools{gap:4px}
  body .remixResultTools .chip{min-width:0;padding:5px 7px;font-size:10px}
  body .remixResults>header{gap:8px}
  body .remixResults>header p{font-size:10px}
  body .remixRecent{display:flex;gap:8px;align-items:center;overflow-x:auto}
  body .remixRecent h2{flex-shrink:0}
  body .remixRecentCard{min-width:140px;width:140px;margin-top:0}
  body .referenceGenerationWorkbench>.generationPreview{min-height:320px}
  body .referenceGenerationWorkbench>.generationQueue{display:block;max-height:420px}
  body .generationInputSurface{min-height:360px;flex:none}
  body .generationFooter{margin-top:auto}
  body .generationSettingsMenu[open]>.generationSettings{min-width:min(310px,calc(100vw - 48px))}
  body .generationQueue .videoJobRow{max-width:100%}
}

body .generationCreationMark{width:44px;height:44px;flex:0 0 44px;background-color:#f1f2f4;border-radius:9px;mask-size:26px 26px;-webkit-mask-size:26px 26px;mask-position:center;-webkit-mask-position:center;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat}

body .generationInputSurface .promptActions [data-new-generation]{display:none}
