/* Original BIZHUB canvas: restrained surfaces and contextual tools. */
.studio-ux-hide{display:none!important}
#videoPage.studio-unified .video-workspace{grid-template-columns:64px minmax(0,1fr) minmax(280px,340px)!important;grid-template-areas:'rail canvas agent' 'rail composer agent'!important}
#videoPage.studio-unified #videoEditor .ve-grid{grid-template-columns:64px minmax(0,1fr) minmax(280px,340px)!important;grid-template-areas:'rail preview agent' 'rail composer agent'!important}
.studio-agent-panel{grid-area:agent;min-width:0;background:#fff;border:1px solid #dce4eb;border-radius:18px;position:sticky;top:12px;max-height:calc(100dvh - 80px);overflow:auto;box-shadow:0 5px 18px #18334f05}
.studio-agent-panel .studio-drawer-heading{padding:18px 16px;position:sticky;top:0;background:#fff;z-index:1}
.studio-agent-panel .studio-drawer-heading h2{font-size:16px}
.studio-agent-panel .studio-drawer-body{padding:12px 16px 18px;overflow:visible}
.studio-agent-panel .video-conversation,.studio-agent-panel .ve-conversation{display:flex;flex-direction:column;max-height:50vh;overflow:auto;margin:0 0 16px}
.studio-agent-panel .video-chat-message,.studio-agent-panel .ve-message{max-width:100%;font-size:13px;overflow-wrap:anywhere}
.studio-agent-guide{padding:12px 16px;margin:0;background:#eff6ff;color:#315477;font-size:12px;line-height:1.6}
.studio-agent-panel [hidden]{display:none!important}
.studio-duration-label{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600;color:#344f69}
.studio-generation-settings{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:0 0 6px}
.studio-generation-settings .studio-credit-quote{margin:0;flex:1;text-align:right}
#studioQuoteNote{margin-bottom:12px!important}
.studio-credit-quote{display:block;font-size:14px;line-height:1.6;margin-top:12px;color:#163e6a}
.studio-caption-editor{border-top:1px solid #e5eaf0;margin-top:12px;padding-top:12px}
.studio-caption-editor label{display:block;font-size:12px;font-weight:600;color:#365574;margin-bottom:6px}
.studio-caption-editor textarea{width:100%;min-height:54px;font-size:14px;border:1px solid #d6e1eb;border-radius:8px;padding:9px}
.studio-caption-editor p{font-size:11px;color:#64788c;line-height:1.5;margin:6px 0 0}
.studio-caption-overlay{position:absolute;left:6%;right:6%;bottom:48px;text-align:center;white-space:pre-wrap;overflow-wrap:anywhere;font-size:clamp(14px,1.5vw,22px);line-height:1.5;color:white;text-shadow:0 1px 3px #000,1px 0 2px #000;background:#0007;padding:5px 10px;border-radius:5px;pointer-events:none;z-index:2}
#studioDownloadOptions label{display:block;font-size:13px;margin-bottom:18px}
#studioDownloadOptions select,#studioDownloadOptions textarea{display:block;width:100%;min-height:44px;margin-top:7px;padding:10px;border:1px solid #d6e1eb;border-radius:8px;font-size:16px}
#studioExportNote{font-size:13px;line-height:1.7;color:#526b84;margin:16px 0}
#studioDownloadOptions button,#studioDownloadOptions a{min-height:44px}
@media(max-width:1100px){
 #videoPage.studio-unified .video-workspace{grid-template-columns:60px minmax(0,1fr)!important;grid-template-areas:'rail canvas' 'rail agent' 'rail composer'!important}
 #videoPage.studio-unified #videoEditor .ve-grid{grid-template-columns:60px minmax(0,1fr)!important;grid-template-areas:'rail preview' 'rail agent' 'rail composer'!important}
 .studio-agent-panel{position:static;max-height:290px}
 .studio-agent-panel .video-conversation,.studio-agent-panel .ve-conversation{max-height:155px}
}
@media(max-width:760px){
 #videoPage.studio-unified .video-workspace{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:'rail' 'canvas' 'agent' 'composer'!important}
 #videoPage.studio-unified #videoEditor .ve-grid{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:'rail' 'preview' 'agent' 'composer'!important}
 .studio-duration-label{width:100%}
 .studio-duration-label select{flex:1}
 .studio-credit-quote{font-size:13px}
 .studio-caption-editor p{font-size:12px}
}
#videoPage.studio-unified{--studio-ink:#182c45;--studio-line:#dce4eb;padding-bottom:24px!important;max-width:1600px;margin:auto}
#videoPage.studio-unified .video-studio-header{padding:12px 0 16px;min-height:0;margin:0;gap:16px;align-items:center}
#videoPage.studio-unified .video-studio-title h1{font-size:25px;line-height:1.2;letter-spacing:-.6px;margin:4px 0;color:var(--studio-ink)}
#videoPage.studio-unified .video-studio-title>p{font-size:13px;margin:0;color:#66778a}
#videoPage.studio-unified .video-header-mark,#videoPage.studio-unified .video-studio-title>.video-eyebrow,#videoPage.studio-unified>.video-progress,#videoPage.studio-unified>.video-mobile-action{display:none!important}
#videoPage.studio-unified .ve-tabs{margin:0 0 0 auto;flex-shrink:0;background:#e8eef3;border:0;padding:4px;border-radius:12px}
#videoPage.studio-unified .ve-tabs button{min-height:44px;font-size:13px;padding:10px 16px}
#videoPage.studio-unified .ve-tabs button span{display:none}
#videoPage.studio-unified .video-workspace{display:grid;grid-template-columns:72px minmax(0,1fr);grid-template-areas:'rail canvas' 'rail composer';gap:12px;align-items:start}
#videoPage.studio-unified .studio-rail{grid-area:rail;display:flex;flex-direction:column;gap:10px;align-self:stretch;padding-top:10px}
.studio-rail-button{display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center;border:0;border-radius:12px;background:transparent;color:#576e87;min-height:64px;width:68px;font-size:11px;cursor:pointer}
.studio-rail-button:hover,.studio-rail-button:focus-visible{background:#e5eef9;color:#164e8c}
.studio-rail-icon{font-size:23px;line-height:1}
#videoPage.studio-unified #videoPreviewPanel{grid-area:canvas;background:#fff;border:1px solid var(--studio-line);padding:12px;border-radius:18px;box-shadow:none;position:static;margin:0;min-width:0}
#videoPage.studio-unified #videoForm{grid-area:composer;background:#fff;border:1px solid #cfdbe6;padding:16px 18px;border-radius:18px;box-shadow:0 5px 18px #18334f05;min-width:0}
#videoPage.studio-unified #videoForm>.video-step-heading,#videoPage.studio-unified #videoForm>.video-prompt-help,#videoPage.studio-unified #videoForm>.video-chat-attachments,#videoPage.studio-unified #videoForm>.video-workflow-note,#videoPage.studio-unified #videoForm>.video-format-heading,#videoPage.studio-unified .studio-command-proxy{display:none!important}
#videoPage.studio-unified #videoPreviewPanel>.video-preview-heading,#videoPage.studio-unified #videoPreviewPanel>.video-preview-stage,#videoPage.studio-unified #videoPreviewPanel>.video-clip-summary,#videoPage.studio-unified #videoPreviewPanel>.video-board-placeholder,#videoPage.studio-unified #videoPreviewPanel>.video-preview-note{display:none!important}
.studio-canvas{position:relative;display:grid;place-items:center;min-height:260px;height:clamp(280px,42vh,520px);overflow:hidden;border-radius:12px;background:#142033;color:white}
.studio-canvas-image{width:100%;height:100%;object-fit:contain;position:absolute;inset:0}
.studio-canvas-empty{text-align:center;padding:26px;max-width:450px;color:#b2c0d2}
.studio-canvas-empty h2{color:#f4f7fc;font-size:25px;letter-spacing:-.5px;margin:18px 0 12px}
.studio-canvas-empty p{font-size:14px;line-height:1.7;margin:0}
.studio-canvas-mark{display:grid;place-items:center;margin:auto;width:49px;height:49px;border:1px solid #53677c;border-radius:15px;font-size:26px;color:#f3b733;font-weight:800;transform:rotate(-5deg)}
.studio-canvas-context{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 3px 0;min-height:45px;color:#61768b;font-size:13px}
.studio-canvas-context>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.studio-canvas-context button{flex-shrink:0;min-height:44px;padding:7px 12px!important;font-size:12px}
.studio-filmstrip{display:flex;gap:8px;padding-top:10px;overflow-x:auto}
.studio-scene-tile{position:relative;flex:0 0 136px;max-width:33%;padding:0;overflow:hidden;border:2px solid transparent;background:#edf2f7;border-radius:9px;cursor:pointer;text-align:left;color:#344f69}
.studio-scene-tile[aria-pressed=true]{border-color:#2e79d3;box-shadow:0 0 0 2px #e8f1ff}
.studio-scene-tile img,.studio-scene-placeholder{width:100%;height:65px;object-fit:cover;display:grid;place-items:center;font-size:22px;background:#e1e9f2}
.studio-scene-tile small{display:block;padding:7px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:11px}
#videoPage.studio-unified #videoPrompt{min-height:64px!important;max-height:180px;resize:vertical;font-size:16px;line-height:1.55;border:0;background:transparent;box-shadow:none;padding:6px 0;margin:0}
#videoPage.studio-unified .video-prompt-heading{margin:0 0 6px;font-size:12px}
#videoPage.studio-unified .video-prompt-heading label{font-size:12px;color:#6c7e91;font-weight:600}
.studio-composer-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px;border-top:1px solid #edf1f5;padding-top:12px}
.studio-composer-tools button,.studio-composer-tools select,.studio-edit-tools button{min-height:44px!important;font-size:12px!important;padding:9px 12px!important;margin:0!important;white-space:nowrap;border-radius:10px!important}
.studio-composer-tools select{border:1px solid var(--studio-line);background:#f8fafc;color:#344f69;max-width:235px}
.studio-composer-tools #videoSend{margin-left:auto!important;width:auto!important;min-width:140px;box-shadow:none;background:#225da2;color:#fff}
.studio-count{margin-left:7px;padding:1px 5px;background:#e8eff5;border-radius:5px;font-size:10px;color:#57718e}
.studio-context-note,#videoPage.studio-unified #videoReadyReason{font-size:11px;line-height:1.55;margin:9px 0 0!important;color:#728397;background:none!important;padding:0!important;border:0!important}
#videoPage.studio-unified #videoReadyReason{color:#5d7188}
#videoPage.studio-unified #videoAgentStatus:empty,#videoPage.studio-unified #videoStoryboardStatus:empty,#videoPage.studio-unified #veStatus:empty{display:none}
.studio-agent-peek{display:block;width:100%;border:0;background:#f2f6fb;border-radius:9px;padding:9px 12px;margin:6px 0 10px;text-align:left;font-size:12px;color:#3e5c7d;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;cursor:pointer}
.studio-drawer{position:fixed;inset:0 0 0 auto;margin:0;width:min(540px,94vw);max-width:94vw;height:100dvh;max-height:100dvh;padding:0;border:0;border-left:1px solid #d4dfe8;border-radius:0;background:#fff;color:#243d57;box-shadow:-18px 0 70px #10233b22;overflow:hidden}
.studio-drawer[open]{display:flex;flex-direction:column}
.studio-drawer::backdrop{background:#14243a55;backdrop-filter:blur(2px)}
.studio-drawer-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 24px;border-bottom:1px solid #e4eaf0;flex-shrink:0}
.studio-drawer-heading h2{font-size:18px;margin:0;color:#203c59}
.studio-close{width:44px;height:44px;font-size:27px;border:0;border-radius:50%;background:#f0f4f8;color:#526b84;cursor:pointer}
.studio-drawer-body{padding:20px 24px 30px;overflow-y:auto;min-height:0;overscroll-behavior:contain}
.studio-drawer [hidden]{display:none!important}
.studio-drawer .creative-card,.studio-drawer .ve-card{padding:0;border:0;box-shadow:none;background:transparent}
.studio-drawer .video-inspiration{padding:0;margin:20px 0 0}
.studio-drawer .video-next-steps{position:static;margin:18px 0;padding:16px;border-radius:12px}
.studio-drawer .video-next-actions{grid-template-columns:1fr}
.studio-drawer #videoStoryboard article[data-studio-selected=false]{display:none}
.studio-drawer #videoStoryboard article{margin:0;border:0;padding:0;grid-template-columns:1fr}
.studio-drawer #videoStoryboard article>span{display:none}
.studio-drawer #videoStoryboard textarea{min-height:115px;font-size:16px}
.studio-drawer .video-scene-frame{max-height:280px;object-fit:contain;background:#142033}
.studio-scene-nav{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:16px;font-size:13px;color:#5f7690}
.studio-scene-nav button{min-width:44px;min-height:44px}
.studio-contact{border-top:1px solid #dce5ed;margin-top:18px;padding-top:16px}
.studio-contact summary{cursor:pointer;font-size:14px;min-height:44px}
#videoPage.studio-unified .video-result{margin:0;border:0;padding:12px;width:100%;max-height:100%;overflow:auto;background:transparent;color:white}
#videoPage.studio-unified .video-result-heading h2,#videoPage.studio-unified #videoJobMessage,#videoPage.studio-unified #videoJobState{color:#d5e2f3}
#videoPage.studio-unified #videoPlayer{max-height:330px;background:#101928;object-fit:contain}
#videoPage.studio-unified .video-result a,#videoPage.studio-unified .video-result button{min-height:44px;font-size:13px;margin:6px}
#videoPage.studio-unified #videoEditor .ve-intro{display:none}
#videoPage.studio-unified #videoEditor .ve-grid{grid-template-columns:72px minmax(0,1fr);grid-template-areas:'rail preview' 'rail composer';gap:12px;align-items:start}
#videoPage.studio-unified #videoEditor .ve-main{grid-area:composer;display:block}
#videoPage.studio-unified #videoEditor .ve-main>.ve-card{padding:16px 18px;border-radius:18px;border:1px solid #cfdbe6;box-shadow:none}
#videoPage.studio-unified #videoEditor .ve-main>.ve-card>.ve-heading{display:none}
#videoPage.studio-unified #videoEditor .ve-preview{grid-area:preview;position:static;border-radius:18px;padding:12px;border:1px solid var(--studio-line);margin:0}
#videoPage.studio-unified #videoEditor .ve-preview>.ve-heading{display:none}
#videoPage.studio-unified #videoEditor .ve-empty,#videoPage.studio-unified #vePlayer{height:clamp(280px,42vh,520px);max-height:520px;min-height:260px;border:0;border-radius:12px;background:#142033;object-fit:contain;width:100%;margin:0;color:#c0cede}
#videoPage.studio-unified #videoEditor .ve-empty strong{color:#f1f5fa}
.studio-edit-tools{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
#videoPage.studio-unified #vePrompt{min-height:70px;max-height:180px;font-size:16px;border:0;background:transparent;padding:6px 0}
#videoPage.studio-unified .ve-label{font-size:12px;color:#6c7e91}
#videoPage.studio-unified #veStatus{font-size:12px;margin-bottom:0}
#videoPage.studio-unified .ve-compose-actions{margin-top:10px;border-top:1px solid #edf1f5;padding-top:12px}
#videoPage.studio-unified #veSend{min-height:44px;border-radius:10px;box-shadow:none;background:#225da2;margin-left:auto}
.studio-drawer .ve-assets{grid-template-columns:repeat(2,minmax(0,1fr))}
.studio-drawer .ve-timeline{margin:0;padding:0}
.studio-drawer .ve-settings{margin-top:20px}
.studio-drawer .ve-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.studio-drawer .ve-export-bar{position:sticky;bottom:-30px;background:white;padding:16px 0;border-top:1px solid #dce5ed;gap:12px;z-index:2}
#videoPage.studio-unified button:focus-visible,#videoPage.studio-unified select:focus-visible,#videoPage.studio-unified textarea:focus-visible,#videoPage.studio-unified summary:focus-visible{outline:3px solid #e9ab22;outline-offset:3px}
@media(min-width:1500px){#videoPage.studio-unified .video-workspace,#videoPage.studio-unified #videoEditor .ve-grid{max-width:1250px;margin:0 auto}}
@media(max-width:760px){
 #videoPage.studio-unified{padding:8px 10px 24px!important}
 #videoPage.studio-unified .video-studio-header{flex-wrap:wrap;padding:8px 0 12px;gap:10px}
 #videoPage.studio-unified .video-studio-title h1{font-size:21px}
 #videoPage.studio-unified .video-studio-title>p{display:none}
 #videoPage.studio-unified .ve-tabs{margin:0 0 0 auto}
 #videoPage.studio-unified .ve-tabs button{font-size:11px;min-height:40px;padding:8px}
 #videoPage.studio-unified .video-workspace,#videoPage.studio-unified #videoEditor .ve-grid{grid-template-columns:1fr;grid-template-areas:'rail' 'canvas' 'composer';gap:9px}
 #videoPage.studio-unified #videoEditor .ve-grid{grid-template-areas:'rail' 'preview' 'composer'}
 #videoPage.studio-unified .studio-rail{flex-direction:row;justify-content:flex-start;gap:4px;padding:0;overflow:auto}
 .studio-rail-button{flex-direction:row;width:auto;min-height:44px;padding:8px 12px;font-size:11px;gap:7px;background:#eaf0f6;border-radius:9px;white-space:nowrap}
 .studio-rail-icon{font-size:17px}
 #videoPage.studio-unified #videoPreviewPanel,#videoPage.studio-unified #videoEditor .ve-preview{padding:8px;border-radius:13px}
 .studio-canvas,#videoPage.studio-unified #videoEditor .ve-empty,#videoPage.studio-unified #vePlayer{height:clamp(210px,30dvh,340px);min-height:210px;border-radius:9px}
 .studio-canvas-empty{padding:18px;max-width:300px}
 .studio-canvas-empty h2{font-size:21px;margin:13px 0 8px}
 .studio-canvas-empty p{font-size:12px}
 .studio-canvas-context{font-size:11px;padding-top:6px;gap:6px}
 .studio-canvas-context button{font-size:11px;padding:7px!important}
 #videoPage.studio-unified #videoForm,#videoPage.studio-unified #videoEditor .ve-main>.ve-card{padding:12px;border-radius:13px}
 .studio-composer-tools{gap:6px;padding-top:8px}
 .studio-composer-tools button,.studio-composer-tools select{font-size:11px!important;padding:8px!important}
 .studio-composer-tools #studioModel{max-width:160px;overflow:hidden;text-overflow:ellipsis}
 .studio-composer-tools #studioAssistant{font-size:0!important;min-width:44px}
 .studio-composer-tools #studioAssistant:after{content:'GPT';font-size:11px}
 .studio-composer-tools #studioIntent{max-width:calc(100% - 135px);flex:1}
 .studio-composer-tools #videoSend{min-width:125px}
 .studio-context-note,#videoPage.studio-unified #videoReadyReason{font-size:10px}
 .studio-drawer{inset:auto 0 0;margin:0;width:100vw;max-width:100vw;height:86dvh;max-height:86dvh;border-radius:22px 22px 0 0;border:0}
 .studio-drawer-heading{padding:13px 16px}.studio-drawer-heading h2{font-size:16px}.studio-drawer-body{padding:14px 16px 24px}
 .studio-drawer .ve-options{grid-template-columns:1fr 1fr}
 #videoPage.studio-unified #videoPlayer{max-height:240px}
 .studio-filmstrip{gap:6px}.studio-scene-tile{flex-basis:110px;max-width:calc((100% - 12px)/3)}
 .studio-scene-tile img,.studio-scene-placeholder{height:52px}
}
/* Keep the canvas and composer together; result actions remain outside the player. */
#videoPage.studio-unified .video-studio-header{background:none;border:0;border-radius:0;min-height:58px;padding:6px 0 12px}
#videoPage.studio-unified .ve-tabs{display:flex;width:auto}
#videoPage.studio-unified .ve-tabs button{flex:initial;white-space:nowrap;min-height:44px}
#videoPage.studio-unified .studio-canvas{height:clamp(240px,32vh,360px);min-height:240px}
#videoPage.studio-unified #videoResult{height:100%;max-height:100%;display:flex;flex-direction:column;padding:8px 12px;overflow:hidden}
#videoPage.studio-unified #videoResult[hidden]{display:none}
#videoPage.studio-unified .video-result-heading{padding:0;margin:0 0 5px;flex-shrink:0}
#videoPage.studio-unified .video-result-heading h2{font-size:13px;margin:0}
#videoPage.studio-unified #videoPlayer{height:calc(100% - 34px);flex:1;min-height:0;width:100%;max-height:none;margin:0}
#videoPage.studio-unified #videoJobState{color:#255b8b}
#videoPage.studio-unified #videoJobMessage,#videoPage.studio-unified #videoStoryboardStatus{font-size:12px;padding:0;background:none;margin:6px 0 0;color:#45617e}
.studio-clip-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px}
.studio-clip-actions[hidden]{display:none}
.studio-clip-actions a,.studio-clip-actions button{min-height:44px!important;font-size:12px!important;padding:8px 12px!important;margin:0!important}
#videoPage.studio-unified .studio-composer-tools select{display:block!important}
#videoPage.studio-unified .studio-drawer .video-scene-frame{max-height:240px}
#videoPage.studio-unified .studio-drawer #videoStoryboard article{border:0;padding:0;background:none}
@media(max-width:760px){
 #videoPage.studio-unified .video-studio-title h1{font-size:19px}
 #videoPage.studio-unified .ve-tabs button{font-size:11px;padding:8px}
 #videoPage.studio-unified .studio-canvas{height:230px;min-height:210px}
 #videoPage.studio-unified .studio-canvas-context{padding-top:6px;min-height:32px}
 #videoPage.studio-unified .studio-scene-tile img,#videoPage.studio-unified .studio-scene-placeholder{height:42px}
 body:has(#videoPage.studio-unified.active) .bizhub-voice-open{bottom:12px!important}
}
/* Voice remains in Assistant; the floating launcher cannot cover primary actions. */
body:has(#videoPage.studio-unified.active) .bizhub-voice-open{display:none!important}
.studio-canvas.studio-show-scene #videoResult{display:none!important}
.studio-library{border-top:1px solid #dce5ed;margin-top:22px;padding-top:20px}
.studio-library label{display:block;font-size:14px;font-weight:600;margin-bottom:10px}
#videoPage.studio-unified .studio-library select{display:block!important;width:100%;min-height:44px;margin-bottom:12px}
.studio-library-clip{padding:14px 0;border-bottom:1px solid #dce5ed}
.studio-library-clip strong,.studio-library-clip small{display:block;font-size:13px;margin-bottom:6px}
.studio-library-clip video{width:100%;max-height:220px;background:#142033;border-radius:10px}
.studio-library-clip button,.studio-library-clip a{display:inline-flex;align-items:center;min-height:44px;font-size:12px;margin:10px 8px 0 0}
.ve-source-preview{display:flex;flex-wrap:wrap;gap:12px;padding:10px}
.ve-source-preview strong{width:100%;overflow-wrap:anywhere}
.ve-source-preview video,.ve-source-preview img{width:100%;height:clamp(210px,32vh,360px);object-fit:contain;background:#142033;border-radius:12px}
.ve-source-preview audio{width:100%;margin:60px 0}
.ve-source-preview .ghost-btn{min-height:44px}
.ve-source-preview[hidden],.ve-show-source #vePlayer,.ve-show-source #veEmpty,.ve-show-source #veDownload,.ve-show-source #veSrt,.ve-show-source #veOutputNote{display:none!important}
#videoPage.studio-unified .studio-drawer .ve-asset{flex-wrap:wrap}
#videoPage.studio-unified .studio-drawer .ve-asset button{min-height:44px;font-size:12px}
#videoPage.studio-unified .studio-canvas-empty h2{color:#f4f7fc}
#videoPage.studio-unified .studio-canvas-empty p{color:#b2c0d2}
/* Mobile conversation access stays available without moving the video canvas. */
#studioMobileAgent{display:none}
@media(max-width:760px){
 #videoPage.active #studioMobileAgent{display:block;position:fixed;bottom:calc(12px + env(safe-area-inset-bottom));right:16px;z-index:1050;min-height:44px;border:1px solid #1670ca;background:#087cef;color:white;border-radius:24px;padding:10px 18px;box-shadow:0 3px 16px #18334f33}
 #videoPage.studio-unified{padding-bottom:80px!important}
 #videoPage .studio-agent-panel.studio-mobile-open{display:flex!important;flex-direction:column;position:fixed;left:10px;right:10px;bottom:calc(66px + env(safe-area-inset-bottom));top:auto;max-height:65dvh;z-index:1049;overflow:auto;border:1px solid #9cb7d7;box-shadow:0 4px 25px #18334f33}
 .studio-mobile-open .studio-drawer-heading{padding:8px 12px}
 .studio-mobile-open .studio-agent-guide,.studio-mobile-open .video-quick-actions{display:none}
 .studio-mobile-open .studio-drawer-body{padding:8px 12px;flex:1;overflow:auto;min-height:55px}
 .studio-mobile-open .video-conversation,.studio-mobile-open .ve-conversation{max-height:18dvh;margin-bottom:8px}
 #videoPage.studio-unified .studio-mobile-open #videoForm,.studio-mobile-open #veChat{position:sticky;bottom:0;flex-shrink:0;margin:0;padding:8px 12px;border:0;border-radius:0;background:#fff}
 .studio-mobile-open textarea{min-height:44px!important;max-height:80px}
 .studio-mobile-open .studio-composer-tools{gap:4px;flex-wrap:wrap}
}
@media(max-width:760px){
 #videoPage .studio-agent-panel.studio-mobile-open{max-height:48dvh}
 #videoPage.studio-unified .studio-mobile-open #videoForm,.studio-mobile-open #veChat{max-height:32dvh;overflow:auto}
 .studio-mobile-open #studioBriefContext{display:none}
 .studio-mobile-open #videoReadyReason,.studio-mobile-open #videoAgentStatus,.studio-mobile-open #videoStoryboardStatus,.studio-mobile-open #videoJobMessage{max-height:40px;overflow:auto;margin:4px 0}
 .studio-mobile-open .video-conversation,.studio-mobile-open .ve-conversation{max-height:10dvh}
}
/* A single history scroller: nested capped logs clipped long Thai replies. */
#videoPage .studio-agent-panel{display:flex;flex-direction:column;min-height:0;align-self:start;top:80px;max-height:calc(var(--studio-viewport-height,100dvh) - 96px);overflow:hidden}
#videoPage .studio-agent-panel>.studio-drawer-heading,#videoPage .studio-agent-panel>.studio-agent-guide{flex-shrink:0;position:static}
#videoPage .studio-agent-panel>.studio-drawer-body{min-height:0;overflow-y:auto;flex:1 1 auto;overscroll-behavior:contain;scroll-padding-block:12px;overflow-anchor:none}
#videoPage .studio-agent-panel .video-conversation,#videoPage .studio-agent-panel .ve-conversation{display:block;max-height:none;overflow:visible;margin-bottom:16px}
#videoPage .studio-agent-panel .video-chat-message,#videoPage .studio-agent-panel .ve-bubble{margin-bottom:12px}
@media(max-width:1100px){
 #videoPage .studio-agent-panel{max-height:min(520px,calc(var(--studio-viewport-height,100dvh) - 100px))}
}
@media(max-width:760px){
 #videoPage .studio-agent-panel.studio-mobile-open{max-height:calc(var(--studio-viewport-height,100dvh) * .65);bottom:calc(var(--studio-viewport-bottom,0px) + 66px + env(safe-area-inset-bottom));overflow:hidden}
 #videoPage.studio-unified .studio-mobile-open #videoForm,#videoPage .studio-mobile-open #veChat{position:static;flex:0 0 auto;min-height:0;max-height:calc(var(--studio-viewport-height,100dvh) * .32);overflow:auto}
 #videoPage.active #studioMobileAgent{bottom:calc(var(--studio-viewport-bottom,0px) + 12px + env(safe-area-inset-bottom))}
}
/* Chat attachments: thumbnails above the composer and inside sent messages. */
#videoPage .studio-composer-attachments:empty{display:none}
#videoPage .studio-composer-attachments{display:flex;gap:8px;overflow-x:auto;padding:4px 0 8px;margin:0}
#videoPage .studio-composer-attachments .creative-reference{flex:0 0 auto;width:96px;padding:6px;gap:4px}
#videoPage .studio-composer-attachments .creative-reference img{width:84px;height:64px;object-fit:cover;border-radius:8px}
#videoPage .studio-composer-attachments .creative-reference>span{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#videoPage .studio-composer-attachments .video-reference-role{font-size:11px;padding:2px 4px;min-height:28px}
#videoPage .video-chat-attachments-sent{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px;font-size:12px}
#videoPage .video-chat-attachments-sent img{width:72px;height:72px;object-fit:cover;border-radius:8px}
#videoPage .video-scene-dialogue{margin:6px 0 0;padding:6px 8px;border-radius:8px;background:rgba(37,99,235,.08);font-size:13px;line-height:1.45}
/* Chat-first creation: no action select in the composer; actions live in the chat. */
#videoPage #studioIntent[hidden],#videoPage #studioAssistant[hidden]{display:none!important}
#videoPage .video-chat-actions{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 12px;justify-content:flex-start}
#videoPage .video-chat-actions button{min-height:44px;padding:10px 16px;border-radius:12px;font-weight:600}
/* Selfie avatar style picker and the sharper-version offer on a finished draft. */
.studio-selfie-dialog{width:min(420px,calc(100vw - 32px));border:0;border-radius:20px;padding:20px;box-shadow:0 24px 60px -20px rgba(8,40,100,.45)}
.studio-selfie-dialog::backdrop{background:rgba(9,20,40,.45)}
.studio-selfie-dialog h3{margin:0 0 12px;font-size:18px}
.studio-selfie-dialog img{display:block;width:100%;max-height:260px;object-fit:cover;border-radius:14px;margin-bottom:12px}
.studio-selfie-styles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}
.studio-selfie-styles button{min-height:44px}
.studio-selfie-dialog p{font-size:13px;color:#5b6f8c;margin:6px 0 12px}
.video-upgrade{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px}
.video-upgrade p{flex-basis:100%;margin:0;font-size:13px;color:#5b6f8c}
