#main:has(.chat-workbench){max-width:none;padding:20px clamp(12px,2vw,32px) 16px}
.chat-bar,.chat-tools,.doc-toolbar,#chat-form>div{display:flex;align-items:center;justify-content:space-between;gap:12px}
.chat-bar{margin-bottom:16px}.chat-bar h1{font-size:clamp(22px,2.2vw,32px);margin:0}
.chat-tools details{position:relative}.chat-tools summary,.source-ref summary,.run-station summary{cursor:pointer}
.chat-tools details>div{position:absolute;z-index:3;right:0;width:260px;max-height:55vh;overflow:auto;padding:14px;background:white;border:1px solid var(--line);border-radius:8px;box-shadow:0 7px 22px #253d3518}
.chat-tools b,.chat-tools a,.chat-tools small{display:block}.chat-tools details a{padding:6px 0;border-bottom:1px solid var(--line)}.chat-tools b:not(:first-child){margin-top:12px}
.chat-workbench{display:grid;grid-template-columns:minmax(0,0.92fr) minmax(0,1.08fr);height:calc(100dvh - 152px);min-height:410px;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.conversation{display:flex;flex-direction:column;min-height:0;background:#fbfcf8}.chat-log{flex:1;overflow:auto;padding:clamp(15px,2vw,30px)}
.utterance{max-width:95%;margin-bottom:24px}.utterance small,.doc-toolbar,.plan-paper header small{font-size:11px;font-weight:700;letter-spacing:.05em;color:#526759}.utterance p{margin:5px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.from-user{margin-left:auto;background:#e9efe6;border-radius:12px 12px 2px 12px;padding:9px 14px;width:fit-content}
#chat-form{margin:0 14px 14px;padding:10px;border:1px solid #bdc9ba;background:white;border-radius:12px}
#chat-form textarea{width:100%;border:0;resize:vertical;min-height:52px;max-height:120px;padding:4px;background:transparent}
#chat-status{font-size:12px;color:var(--muted)}#chat-form button{padding:6px 12px}.sr-chat{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
.chat-document{overflow:auto;min-width:0;background:#edeee6;border-left:1px solid var(--line);padding:0 clamp(12px,2vw,30px) 24px}
.doc-toolbar{min-height:50px}.plan-paper{padding:clamp(20px,2.5vw,40px);background:var(--white);box-shadow:0 2px 10px #26362d0f;min-height:80%;border:1px solid var(--line);overflow-wrap:anywhere}
.plan-paper h2{font:normal clamp(24px,2.3vw,34px) Georgia,serif;line-height:1.2;margin:8px 0}.plan-paper header p,.paper-empty p,.run-station small,.source-ref small{color:var(--muted);font-size:12px}
.plan-paper h3{font:600 16px Georgia,serif;margin:26px 0 8px;border-bottom:1px solid var(--line);padding-bottom:6px}
.paper-rule{width:34px;height:3px;background:var(--gold);margin-bottom:16px}.run-row,.run-station{display:flex;gap:14px;padding:6px 0;font-size:13px}.run-row time{min-width:82px;font-variant-numeric:tabular-nums}.run-station p{white-space:pre-wrap}.source-ref{margin:6px 0}.plan-paper a{text-decoration:underline}
@media(max-width:850px){.chat-workbench{display:flex;flex-direction:column;height:auto;min-height:0}.conversation{height:48dvh;min-height:290px}.chat-document{border-left:0;border-top:1px solid var(--line);max-height:65dvh;min-height:200px}.plan-paper{min-height:180px}}
