/* Agency messenger/run layout adaptation over unchanged lifted route sheets. */
[hidden]{display:none!important}#home-panel{padding:0}main{padding-top:0}#notice:empty{display:none}.view{display:none}.view.active{display:block}form.thread-composer{display:block;margin:0}.thread-composer textarea{width:100%;min-width:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}pre{white-space:pre-wrap;overflow-wrap:anywhere}#run-failure{color:var(--danger,#ae2534)}#run-limits{display:grid;gap:10px;padding:12px}#run-limits label{font-size:12px}#run-limits input{width:100%}#create-agent{display:grid}#agent-dialog article{padding:24px}#agent-dialog header{display:flex;justify-content:space-between}.bottom-nav{z-index:20}.run-summary{min-width:0;overflow-wrap:anywhere}#run-steps article{display:block}#runs-panel{max-width:1200px;margin:auto}.run-actions button{font-size:12px}
/* Standalone shell adaptation: the lifted composer has no attachment column. */
.thread-entry-row{grid-template-columns:minmax(0,1fr) 44px;gap:10px}
.thread-search{flex-direction:row}.thread-search input{width:100%}
.thread-sidebar>header{flex-wrap:wrap}.thread-sidebar h2,.thread-sidebar .eyebrow{white-space:nowrap}
#pa{height:calc(100dvh - 165px);min-height:420px}
.view.active{animation:none!important;transform:none!important}
.brand{min-width:0}.brand>div{min-width:0}.brand p{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bottom-nav{display:none}body:has(#home-panel:not([hidden])) .bottom-nav{display:flex}
@media(max-width:1279px){.messenger-shell:not(.context-open) .agent-context{display:none}.messenger-shell.context-open .agent-context{display:grid;position:fixed;inset:80px 12px 90px auto;transform:none;width:min(400px,calc(100vw - 24px))}}
@media(max-width:767px){
 .topbar{flex-wrap:nowrap;gap:8px;padding:10px}.brand{gap:6px;flex:1}.brand h1{font-size:17px}.brand p{font-size:11px;max-width:140px}.mark img{width:32px;height:32px}.header-actions{flex-wrap:nowrap;gap:4px}.header-actions button{font-size:12px;padding:6px 9px}
 #pa{height:calc(100dvh - 135px);min-height:0}.thread-entry-row{grid-template-columns:minmax(0,1fr) 40px}.thread-entry-row>textarea{font-size:16px;min-height:88px}
 .messenger-shell.context-open .agent-context{inset:8px 8px 80px;width:auto;height:auto}
}

/* Three shell children: header, scrolling messages, composer. */
.chat-thread{grid-template-rows:auto minmax(0,1fr) auto}
.bottom-nav button.active{background:var(--brand-soft,#eaf4ff)!important;color:var(--brand,#0071e3)!important}
body[data-view=pa] #home-panel{display:flex;flex-direction:column;flex:1;min-height:0}
@media(max-width:767px){body[data-view=pa] main{height:auto}}
