.agent-top{display:flex;justify-content:space-between;align-items:center;gap:10px}.agent-top h1{font-size:26px;margin:0}.agent-top button{padding:5px 12px}.agent-body{display:flex;flex-direction:column;min-height:0;flex:1}.agent-history{display:flex;gap:8px;margin:18px 0}.agent-history select{min-width:0;flex:1}.agent-history button{padding:8px}
#agent-messages{flex:1;overflow:auto;padding:0 2px 14px;min-height:100px;scrollbar-width:thin}.agent-message{padding:14px 2px;border-bottom:1px solid var(--line);font-size:13px;line-height:1.6}.agent-message p{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0}.agent-message>span{font-weight:700}.agent-message.user{background:var(--paper);padding:12px;border-radius:8px;border:0;margin-top:12px}.agent-message small{display:block;color:var(--muted);margin-top:8px}.agent-message button{margin-top:8px}.agent-intro{font-size:14px;line-height:1.65;margin:22px 0}.agent-example{text-align:left;line-height:1.6;font-size:13px}#agent-error{font-size:12px;color:#9a3f2c;white-space:pre-wrap;max-height:100px;overflow:auto}#agent-form{border-top:1px solid var(--line);padding-top:12px}#agent-form label{margin:0 0 6px}#agent-message{width:100%;min-height:90px;max-height:200px;font:inherit;font-size:13px}.agent-compose{display:flex;justify-content:space-between;align-items:center;margin-top:10px}.agent-compose label{cursor:pointer;margin:0!important}#agent-file-name{font-size:12px;overflow-wrap:anywhere;margin-top:6px}.agent-empty,.agent-batch{padding:24px;margin-bottom:20px}.agent-empty p{line-height:1.7}.agent-batch h2{font-size:22px;margin:0 0 12px}.agent-batch>p{line-height:1.6}.agent-batch table{min-width:690px}.agent-batch td,.agent-batch th{padding:10px}.agent-batch input:not([type=checkbox]){width:100%;min-width:100px;padding:8px}.agent-batch input[data-field=state]{min-width:55px;width:70px}.agent-build-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}.agent-previews{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:15px}.agent-previews article{border:1px solid var(--line);padding:18px;border-radius:9px;overflow-wrap:anywhere}.agent-previews article p{line-height:1.6;font-size:13px}.agent-previews article button,.agent-previews article a{margin:4px 5px 4px 0}.agent-batch details p{font-size:12px;line-height:1.6}
.sidebar[hidden]{display:none!important}

[data-agent-edit] table{min-width:0;table-layout:fixed;width:100%}
[data-agent-edit] th:first-child{width:42px}
[data-agent-edit] th:last-child{width:95px}
[data-agent-edit] td{white-space:normal;overflow-wrap:anywhere;vertical-align:top}
[data-agent-edit] pre{max-height:320px;overflow:auto}
#site-editor{width:min(820px,94vw);max-height:90vh;overflow:auto}#site-editor label{display:block;margin:14px 0}#site-editor select,#site-editor textarea,#site-editor input:not([type=checkbox]){width:100%;padding:10px}.editor-images{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:14px 0}.editor-images img{width:100%;height:130px;object-fit:contain}.editor-images button{width:100%}.editor-images p{font-size:12px}.editor-selected{max-width:100%;max-height:240px;object-fit:contain}#editor-error{color:#a12727}

/* Chat is the homepage workspace, never a fixed sidebar. */
#agent-panel{background:#fff;border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;padding:24px;box-sizing:border-box;min-width:0;height:calc(100dvh - 130px);min-height:480px}
#agent-panel[hidden],#agent-results[hidden]{display:none!important}
.chat-workspace{max-width:1050px;margin:0 auto;display:flex;flex-direction:column;gap:28px}
#agent-home{min-width:0}#agent-results{scroll-margin-top:24px}
.agent-body{min-height:0}.agent-history{margin:18px 0}.agent-history select{max-width:100%}
#agent-messages{padding:8px 8px 24px}.agent-message{font-size:15px;padding:20px 0}.agent-message.user{padding:16px 20px;margin-left:8%;margin-bottom:10px}.agent-intro{font-size:20px;max-width:600px;margin:8vh auto 24px;text-align:center}.agent-example{display:block;margin:0 auto 30px;font-size:14px}
#agent-form{padding-top:16px}#agent-message{font-size:15px;min-height:80px;resize:vertical}.agent-compose{gap:12px}.agent-compose button{min-width:100px}#agent-form .sub{margin-bottom:0}
@media(max-width:820px){#agent-panel{padding:16px;height:calc(100dvh - 210px);min-height:450px}.chat-workspace{gap:20px}.agent-top h1{font-size:23px}.agent-message.user{margin-left:3%}.agent-intro{font-size:18px;margin-top:30px}.agent-batch{padding:16px}.agent-batch h2{font-size:20px}}
