/* Mobile overrides are explicitly scoped; the Video Editor is excluded. */
@media(max-width:760px){
 :is(#studioHome,#studioOpening,#documentsWorkspace,#scheduleWorkspace,#scriptBreakdownWorkspace,#productionBreakdownWorkspace,#sceneLibrary,#shotListManager,#annotationEditor,#helpOverlay){max-width:100vw;max-height:100dvh;overscroll-behavior:contain;overflow-y:auto;overflow-x:hidden;padding-bottom:max(16px,env(safe-area-inset-bottom))}
 :is(#studioHome,#documentsWorkspace,#scheduleWorkspace,#scriptBreakdownWorkspace,#productionBreakdownWorkspace,#sceneLibrary,#shotListManager,#annotationEditor,#screenplayWorkspace,#greenlightWorkspace,#colorWorkspace,#scoringStageWorkspace,#animatorWorkspace,#twoDAnimationWorkspace) :is(button,select){min-height:40px;touch-action:manipulation}
 :is(#studioHome,#documentsWorkspace,#scheduleWorkspace,#scriptBreakdownWorkspace,#productionBreakdownWorkspace,#sceneLibrary,#shotListManager,#annotationEditor,#screenplayWorkspace,#greenlightWorkspace,#colorWorkspace,#scoringStageWorkspace,#animatorWorkspace,#twoDAnimationWorkspace) :is(input:not([type=range]):not([type=checkbox]):not([type=color]),textarea){font-size:16px;max-width:100%;min-width:0}
 :is(.studioHomeShell,.documentsShell,.scheduleShell,.breakdownShell,.sceneLibraryShell,.shotListManagerShell){width:100%;max-width:100%;min-width:0;padding:16px}
 :is(.studioHomeTop,.documentsTop,.scheduleHeader,.sceneLibraryHeader){display:flex;flex-wrap:wrap;gap:12px;align-items:center}
 :is(.studioHomeActions,.documentsActions,.sceneLibraryActions){display:flex;flex-wrap:wrap;gap:8px;width:100%}
 :is(.studioHomeActions,.documentsActions,.sceneLibraryActions)>button{flex:1 1 130px;margin:0}
 .studioHomeBrand{font-size:clamp(21px,6vw,32px);overflow-wrap:anywhere}.studioHomeProject{overflow-wrap:anywhere}
 .studioGrid,.studioOverview{grid-template-columns:1fr!important}.studioSummary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.studioCard{min-width:0;white-space:normal}
 .documentsLayout,.documentsTemplateLayout{grid-template-columns:1fr}.documentsCategories,.documentsTemplateCategories{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;max-width:100%;padding-bottom:8px}.documentsCategories button,.documentsTemplateCategories button{flex-shrink:0;width:auto;white-space:nowrap}
 .documentsGrid,.documentsTemplateCards{grid-template-columns:1fr}.documentsToolbar{flex-wrap:wrap}.documentsToolbar input{width:100%}
 .documentsModal{padding:10px}.documentsModalCard{width:100%;max-width:100%;max-height:calc(100dvh - 20px);overflow:auto;padding:16px}.documentsTemplateDetail{position:static;max-height:none}
 .documentsEditorShell{width:100%;height:100dvh;max-height:100dvh}.documentsEditorBar{flex-wrap:wrap;gap:8px;padding:10px}.documentsEditorBody{padding:14px;overflow:auto;min-height:0}.documentsEditorTitle{min-width:0;max-width:100%}.documentsModalActions{position:sticky;bottom:0;background:#141b23;padding:10px 0;display:flex;flex-wrap:wrap;gap:8px}
 .scheduleColumns,.shootDayFields{grid-template-columns:1fr}.scheduleColumn,.shootDayList{min-width:0}.scheduleHeader h1{font-size:22px}.scheduleHeader p{font-size:12px;line-height:1.5}.scheduleSceneCard,.shootDay{overflow-wrap:anywhere}
 #scriptBreakdownContent,#productionBreakdownContent{min-width:0;overflow-x:auto} .breakdownShell table{min-width:560px} .breakdownShell :is(header,h2){overflow-wrap:anywhere}
 #screenplayWorkspace{height:100dvh;max-height:100dvh;overflow:hidden}.screenplayHeader{flex-wrap:wrap;height:auto;gap:6px;padding:8px}.screenplayHeaderGroup{min-width:0;flex-wrap:wrap;gap:6px}.screenplayHeaderTitle{flex:1 1 100%;order:-1}.screenplayHeaderTitle input{width:100%;min-width:0}.screenplayHeaderGroup:last-of-type{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:3px}.screenplayHeaderGroup button{flex-shrink:0}
 .screenplayBody{min-height:0;grid-template-columns:1fr;overflow:hidden}.screenplayNavigator{max-height:100px;overflow:auto;width:100%;border-bottom:1px solid #47515b}.screenplayEditorArea{min-width:0;min-height:0;overflow:auto}.screenplayToolbar{flex-wrap:wrap;gap:6px;position:sticky;top:0;z-index:4}.screenplayPages{padding:12px 8px;min-width:0;overflow-x:auto}.screenplayStatusBar{flex-wrap:wrap;height:auto;min-height:24px;font-size:10px}
 #shotPanel .storyboardHeader{gap:8px;padding:10px}.storyboardActions{max-width:100%;overflow-x:auto;gap:8px}.storyboardActions button{flex-shrink:0}#shotPanel .storyboardTitle{font-size:13px;overflow-wrap:anywhere}#shotPanel .storyboardCard{max-width:100%!important}.annotationEditorShell{width:100%;max-width:100%;max-height:100dvh;overflow:auto;padding:10px}.annotationTools{display:flex;flex-wrap:wrap;gap:6px}.annotationTools button{width:auto;flex:1 1 65px}
 body.planner-reference:not(.video-editor-open) #plannerMenubar{height:84px;padding-top:env(safe-area-inset-top);align-content:center;overflow:visible}#plannerMenubar>button,#plannerMenubar summary,#plannerMenubar #assetsToggle{min-height:36px;padding-inline:7px}
 body.planner-reference:not(.camera-monitor-active):not(.video-editor-open) .plannerViewportCanvas{top:84px!important;height:calc(100dvh - 84px)!important}
 body.planner-reference.planner-animation-open:not(.camera-monitor-active):not(.video-editor-open) .plannerViewportCanvas{height:calc(100dvh - 84px - var(--planner-timeline-height))!important}
 body.planner-reference #panel{top:84px;width:min(300px,calc(100vw - 40px));height:calc(100dvh - 84px);padding-bottom:max(18px,env(safe-area-inset-bottom));overflow:auto}body.planner-reference.planner-animation-open #panel{height:calc(100dvh - 84px - var(--planner-timeline-height))!important}
 body.planner-reference #panel :is(button,select){min-height:40px}body.planner-reference #panel input:not([type=range]):not([type=checkbox]){font-size:16px}
 #plannerMenubar .plannerMenuPopup,body.planner-reference #assetsDropdown{position:fixed;top:84px;left:8px;right:8px;width:auto;max-height:calc(100dvh - 100px);overflow:auto}#plannerMenubar .plannerMenuPopup button,#plannerMenubar .assetsMenuItem{min-height:40px;font-size:12px}
 body.planner-reference{--planner-timeline-height:min(280px,42dvh)}body.planner-reference #shotPlannerTimeline{grid-template-rows:48px minmax(0,1fr)}body.planner-reference #shotPlannerTimeline .plannerTransport{height:48px;min-height:48px;overflow-x:auto}body.planner-reference #shotPlannerTimeline .plannerTransport button{min-height:36px}#plannerInspectorToggle{width:36px;height:48px}#plannerMenubar #plannerLeavePoseMode{min-height:40px}
 body.camera-monitor-active #cameraViewToolbar .cameraParameterPopup button{min-height:42px}body.camera-monitor-active .cameraParameterPopup{top:58px;left:8px;right:8px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 100px);overflow:auto}body.camera-monitor-active :is(#cameraViewExitButton,#cameraViewHelpButton,#cameraViewUiToggle,#cameraViewUiShowButton){min-height:40px}body.camera-monitor-active #cameraMonitorStatus{padding-bottom:env(safe-area-inset-bottom);height:calc(58px + env(safe-area-inset-bottom))}
 #animatorWorkspace{height:100dvh;grid-template-rows:48px minmax(0,1fr) min(210px,32dvh)}#animatorWorkspace .animatorTop{min-height:48px;overflow-x:auto;flex-wrap:nowrap;gap:6px}#animatorWorkspace .animatorTop>*{flex-shrink:0}#animatorWorkspace .animatorTop button{min-height:38px}#animatorWorkspace .animatorMain{grid-template-columns:minmax(0,1fr)}#animatorWorkspace .animatorTimeline{min-height:0;overflow:auto}#animatorWorkspace .animatorPlayback{overflow-x:auto;flex-wrap:nowrap}#animatorWorkspace .animatorPlayback>*{flex-shrink:0}#animatorWorkspace .animatorPanel.mobile-open{bottom:min(210px,32dvh);max-height:calc(68dvh - 64px);overflow:auto}#animatorWorkspace .animatorTextMenu .animatorMenuPopup{max-height:65dvh;overflow:auto}
 #twoDAnimationWorkspace{height:100dvh;max-height:100dvh}.twoDMobileTop{padding-top:env(safe-area-inset-top);overflow-x:auto}.twoDMobileTop button,.twoDMobileTools button{min-width:40px;min-height:40px}.twoDMobileTools{overflow-x:auto;max-width:100%;padding-bottom:env(safe-area-inset-bottom)}.twoDNewCard{max-height:calc(100dvh - 24px);max-width:calc(100vw - 24px);overflow:auto}.twoDNewGrid{grid-template-columns:1fr}.twoDMobileMoreMenu{max-height:calc(100dvh - 110px);overflow:auto}.twoDSide{max-width:calc(100vw - 16px)}
 #greenlightWorkspace{height:100dvh}.glTopbar{gap:6px}.glTopbar label{flex:1 1 120px;min-width:0}.glTopbar input,.glTopbar select{width:100%;max-width:100%}.glTopbar button{flex:1 1 100px}.glBody{grid-template-columns:54px minmax(0,1fr)}.glSidebar{overflow-y:auto}.glNavButton{min-height:46px!important}.glMetricsGrid{grid-template-columns:1fr}.glMain,.glWorkspaceView{min-width:0;overflow:auto}.glViewHeader,.glViewTools{flex-wrap:wrap;gap:8px}.glTableWrap{max-width:100%;overflow:auto}
 #colorWorkspace{height:100dvh;overflow:auto;grid-template-rows:auto auto auto auto}.coTop{flex-wrap:wrap;gap:6px;padding:8px;position:sticky;top:0;z-index:10;background:#171d24}.coTop .coClipTitle{flex:1 1 100%;min-width:0}.coMain{display:flex;flex-direction:column;min-height:0}.coClips{max-height:180px;overflow:auto}.coViewer{min-height:260px}.coViewerStage{height:230px;min-height:180px}.coScopes{min-height:170px;max-height:240px}.coBottom{display:flex;flex-direction:column;min-height:0}.coTools,.coNodePane{min-height:260px;overflow:auto}.coToolTabs,.coTransport,.coScopeTabs{overflow-x:auto;flex-wrap:nowrap}.coToolTabs button,.coTransport button{flex-shrink:0}.coPrimaries{display:flex;flex-wrap:wrap}.coWheelGroup{flex:1 1 140px;min-width:0}.coPrimarySliders,.coRangeGrid,.coWindowLayout{grid-template-columns:1fr}.coNodeGraph{min-height:230px;overflow:auto}
 #scoringStageWorkspace{height:100dvh;overflow:auto;grid-template-rows:auto minmax(0,1fr)}.scoringStageHeader{height:auto;flex-wrap:wrap;gap:8px;padding:8px}.scoringStageHeader label{flex:1 1 80px;min-width:0}.scoringStageHeader input,.scoringStageHeader select{max-width:100%}.scoringStageMain{display:flex;flex-direction:column;overflow:auto;min-height:0}.scoringStagePanel{max-height:260px;overflow:auto;flex-shrink:0}.scoringStagePicture{min-height:360px;flex-shrink:0}.scoringStageViewer{min-height:180px}.scoringStageTransport{overflow-x:auto;flex-wrap:nowrap;min-height:48px}.scoringStageTransport>*{flex-shrink:0}.scoringStageTimeline{min-height:150px;overflow:auto}.scoringStageInstrumentDrawer{max-height:85dvh;overflow:auto}.scoringStagePianoTop{flex-wrap:wrap;gap:6px}.scoringStageHelpDialog{max-height:calc(100dvh - 20px);overflow:auto}.scoringStageKeyboard{overflow-x:auto;touch-action:pan-x}
}
@media(max-height:500px) and (max-width:950px){
 body.planner-reference{--planner-timeline-height:38dvh}
 body.camera-monitor-active #cameraViewToolbar .toolbarRow,.cameraParameter summary{min-height:44px;height:44px}body.camera-monitor-active #cameraViewExitButton,body.camera-monitor-active #cameraViewHelpButton{top:52px}body.camera-monitor-active #cameraMonitorStatus{height:40px}body.camera-monitor-active #cameraZoomControl{bottom:48px}body.camera-monitor-active #cameraViewUiToggle{bottom:48px}body.camera-monitor-active #cameraShutterButton{top:42%}#plannerCameraRecord{top:calc(42% + 48px)}
 .documentsModalCard,.sceneLibraryShell,.annotationEditorShell{max-height:calc(100dvh - 16px);overflow:auto}
}
@media(max-width:760px){
 #screenplayWorkspace .screenplayHeader{height:auto;flex-wrap:wrap;gap:6px;padding:8px;overflow:visible}#screenplayWorkspace .screenplayHeaderTitle{flex:1 1 100%;min-width:0}#screenplayWorkspace .screenplayHeaderGroup:last-of-type{flex:1 1 100%;overflow-x:auto}#screenplayWorkspace .screenplayToolbar{width:100%;margin:0 0 10px;padding:6px;flex-wrap:wrap;overflow:visible}#screenplayWorkspace .screenplayTitlePage{min-height:650px}#screenplayWorkspace .screenplayTitlePageMain{padding:80px 20px 160px}#screenplayWorkspace .screenplayTitlePageBy{margin:50px 0 16px}#screenplayWorkspace .screenplayTitlePageContact{left:16px;bottom:50px;width:55%!important}#screenplayWorkspace .screenplayTitlePageDraft{right:16px;bottom:50px;width:30%!important}
}
