.project-agent-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.project-agent-layout:has(.project-agent){grid-template-columns:minmax(0,1fr) 370px}.project-agent{min-width:0;border:1px solid #dbe3ef;border-radius:10px;background:#fff;display:flex;flex-direction:column;height:calc(100vh - 180px);min-height:460px;position:sticky;top:10px;overflow:hidden}.project-agent header{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid #e5eaf1}.project-agent-scope{padding:8px 12px;font-size:12px;background:#f8fafc}.project-agent-scope label{margin-top:6px}.project-agent-scope select{width:100%;padding:6px}.project-agent-log{flex:1;overflow:auto;padding:12px;min-height:160px;overflow-wrap:anywhere}.project-agent-log article{padding:9px;margin-bottom:9px;border-radius:8px;background:#f8fafc;font-size:13px}.project-agent-log article strong{font-size:11px;color:#64748b}.project-agent-log .agent-user{background:#eff6ff}.project-agent-log .agent-tool{font:11px/1.5 monospace;white-space:pre-wrap;max-height:150px;overflow:auto}.project-agent-compose{padding:10px;border-top:1px solid #e5eaf1}.project-agent-compose textarea{width:100%;min-height:80px;resize:vertical}.project-agent-compose>div{display:flex;justify-content:space-between;margin-top:6px}.project-agent-compose small{font-size:10px;color:#94a3b8}.project-agent>.form-error{padding:8px;margin:0;overflow-wrap:anywhere}.project-agent>details{max-height:260px;overflow:auto}.project-agent-layout>.project-view-content{min-width:0}@media(max-width:1000px){.project-agent-layout:has(.project-agent){grid-template-columns:minmax(0,1fr)}.project-agent{position:fixed;right:8px;bottom:8px;top:70px;width:min(400px,calc(100vw - 16px));height:auto;z-index:80;box-shadow:0 8px 30px #33415533}}
.project-agent-settings{padding:10px;border-top:1px solid #e5eaf1;max-height:320px;overflow:auto;flex-shrink:0;font-size:12px}.project-agent-settings select{width:100%}.project-agent header,.project-agent-scope,.project-agent-compose{flex-shrink:0}.project-agent-settings .local-api-panel,.project-agent-settings .chatgpt-panel{margin-top:8px}.project-agent pre{white-space:pre-wrap;overflow-wrap:anywhere}

/* This grid is the flex child between the project toolbar and the viewport bottom. */
.project-workspace .project-agent-layout{flex:1;min-height:0;min-width:0;grid-template-rows:minmax(0,1fr)}
@media(min-width:1001px){.project-workspace .project-agent-layout>.project-agent{height:100%;min-height:0;position:relative;top:auto}}

@media(max-width:640px){
 .workspace-shell.compact-shell.project-workspace{display:flex;flex-direction:column;height:100dvh;min-height:0;overflow:hidden}
 .workspace-shell.compact-shell.project-workspace>main{display:flex;flex-direction:column;flex:1;min-height:0;height:auto;overflow:hidden}
 .workspace-shell.compact-shell.project-workspace>main>.content{flex:1;height:auto;min-height:0}
}
