/* The shell owns the viewport; content panels own their scroll positions. */
html:has(body.client-redesign),body.client-redesign{height:100%;overflow:hidden}
.client-redesign .client-app-shell{display:grid;height:100dvh;min-height:0;grid-template-rows:minmax(0,1fr);overflow:hidden}
.client-redesign .client-workspace{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}
.client-workspace>header.client-topbar,.client-workspace>#rail,.client-workspace>#cloud-sync-status{flex:0 0 auto}
body.client-redesign main#app{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain}
.client-redesign .client-sidebar{overflow:hidden}
.client-redesign .project-navigation{overscroll-behavior:contain}

/* Keep long sign-up forms accessible without scrolling the document. */
body.client-redesign main#auth-root{height:100dvh;min-height:0;overflow:auto;overscroll-behavior:contain}

@media(min-width:1001px){
 body.client-redesign main#app:has(.guided-workspace){overflow:hidden}
 .client-redesign .guided-workspace{height:100%;min-height:0}
 .client-redesign .conversation.guided-onboarding{height:100%;min-height:0}
 .client-redesign .guided-chat-scroll{min-height:0;overflow:auto;overscroll-behavior:contain}
 .client-redesign .guided-project-stage{min-height:0}
 .client-redesign .guided-stage-content{min-height:0;overflow:auto;overscroll-behavior:contain}
}

/* Short windows still expose the composer and actions within the chat pane. */
@media(min-width:1001px) and (max-height:650px){
 .client-redesign .conversation.guided-onboarding{overflow:auto;overscroll-behavior:contain}
 .client-redesign .guided-chat-scroll{flex:0 0 auto;overflow:visible}
}

/* Small screens keep the existing stacked panels inside the content scroller. */
@media(max-width:1000px){
 .client-redesign .guided-workspace{min-height:100%}
}
