.app-shell{grid-template-columns:clamp(170px,18vw,250px) minmax(0,1fr) 280px}
.sidebar,.stage,.companion,.sidebar-head>div{min-width:0}
.sidebar-head .icon-button{flex-shrink:0}
.project-list{min-height:65px;flex-shrink:1}
.stage{display:flex;flex-direction:column}
#standard-stage{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0}
#skills-stage-bar{flex-shrink:0;margin-bottom:10px}
.stage-meta{flex-shrink:0;flex-wrap:wrap}
.stage h1{flex-shrink:0;overflow-wrap:anywhere}
#scene-subtitle{flex-shrink:0;overflow-wrap:anywhere}
.scene-card{flex:1;min-height:0;height:auto;min-width:0}
.companion>*,.sidebar-head,.flow-label{flex-shrink:0}
.companion .speech-card{overflow-wrap:anywhere}
.companion .control-key-list{gap:6px}
.control-key-list button span{min-width:0;overflow-wrap:anywhere}
.topbar>div,.topbar-actions{min-width:0}
.topbar-actions{flex-wrap:wrap;justify-content:flex-end}
.topbar-actions>*{flex-shrink:0}
#ai-settings{margin:0}
.section-head,.brief-head{gap:10px;flex-wrap:wrap}
.section-head>*{min-width:0}
.task{grid-template-columns:30px minmax(0,1fr) auto}
.task>div{min-width:0;overflow-wrap:anywhere}
.task .task-ai-field{grid-column:2/-1;grid-row:2;margin-top:4px;min-width:0;max-width:none}
.task>.skill-picker{grid-column:2/-1;grid-row:3;justify-self:start;margin:2px 0}
.task>.task-mouse-actions{grid-row:4}
.task>.daily-task-review{grid-row:5}
.task-ai-select{max-width:100%;min-width:0}
.wf-node header{flex-wrap:wrap}
.wf-node header span{min-width:80px}
.wf-node input,.wf-node textarea{min-width:0}
.wf-tools label{min-width:160px}
.daily-card-head{flex-wrap:wrap}
.daily-grid{grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr))}
.daily-chat .daily-actions select{max-width:100%;min-width:0}
dialog:not(.embedded){max-height:calc(100dvh - 32px);max-width:calc(100vw - 32px);overflow:auto}
dialog .modal-actions,dialog footer{flex-wrap:wrap}
dialog input:not([type=checkbox]):not([type=radio]),dialog select,dialog textarea{max-width:100%;min-width:0}
dialog pre,.brief,.info-card{overflow-wrap:anywhere}
#execution-detail{white-space:pre-wrap;overflow-wrap:anywhere}
.wm-meta{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.wm-meta label,.wm-meta input{min-width:0}
#workspace-form{min-height:0}
.agent-stage{min-height:0;padding:0}
.agent-head>div{min-width:0}
.agent-context{max-width:45%;white-space:normal;overflow-wrap:anywhere}
.agent-messages{min-height:70px}
.agent-form textarea{min-width:0}
.execution-bar{left:20px;right:20px;max-width:900px;margin:auto}
@media(max-width:1200px){
 .app-shell{grid-template-columns:180px minmax(0,1fr) 240px}
 .stage{padding:18px}.scene-card{padding:16px}.companion{padding:12px}
 .compact-voice{flex-wrap:wrap}.companion .compact-voice .ghost-button{flex:1 1 90px}
 .block-board nav.block-categories{flex-wrap:wrap;width:96%}
 .block-page{padding-inline:4%;gap:8px}
 .block-page .editable-block{padding:8px 18px 8px 9px}
}
@media(max-width:950px){
 .app-shell{grid-template:64px calc(100dvh - 88px) auto/160px minmax(0,1fr);gap:10px;padding-inline:10px;overflow-y:auto;grid-auto-rows:auto}
 .stage{grid-column:2;min-height:calc(100dvh - 88px)}
 .companion{grid-column:2;grid-row:3;max-height:420px}
 body.workspace-view .app-shell,body.boardroom-view .app-shell{overflow:hidden}
 body.workspace-view .stage,body.boardroom-view .stage{min-height:0}
 .sidebar{grid-column:1;grid-row:2;position:sticky;top:0;max-height:calc(100dvh - 88px);padding:14px 10px}
 .topbar{padding:0}.topbar .eyebrow{font-size:10px}.topbar-actions{gap:5px}
 .topbar-actions button,.device-pill{font-size:11px;padding:6px 8px}
 .wm-layout{grid-template-columns:130px minmax(0,1fr);gap:10px}
 .wm-meta{grid-template-columns:minmax(0,1fr)}
 .wm-filter{gap:5px}.wm-filter input{width:120px!important}
 #workspace-dialog .wm-toolbar button{padding:6px!important;font-size:11px}
}
@media(max-height:760px){
 .stage h1{font-size:25px;margin-top:12px}.stage>div>p{margin-bottom:12px}
 .sidebar .project-list{height:100px;margin:10px 0}
 .companion-visual{height:210px}
 #workspace-form{overflow:auto}.wm-layout{flex:1 0 300px}
 .agent-head{padding-bottom:8px}.agent-head h1{font-size:20px}.agent-suggestions{margin:5px 0}
}
