.workspace.with-chat{grid-template-columns:260px minmax(300px,1fr) minmax(320px,30%)}
.safety-code{display:block;font:16px/1.7 ui-monospace,monospace;overflow-wrap:anywhere;padding:16px;background:var(--panel);border:1px solid var(--line);border-radius:12px;user-select:all}.safety-dialog p{font-size:14px;line-height:1.6}
.web-voice-note{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:16px;border-top:1px solid var(--line)}.web-voice-note span{font-size:13px;flex:1;min-width:120px}.web-voice-note audio{width:100%;height:36px}
.web-chat{display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--bg);border-left:1px solid var(--line)}
.web-chat-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;border-bottom:1px solid var(--line)}
.web-chat-head h2{font-size:20px;overflow-wrap:anywhere}.web-chat-head small{font-size:11px}.web-chat-actions{display:flex;gap:5px}.web-chat-search{display:flex;align-items:center;gap:10px;padding:12px 24px}.web-chat-search input{min-height:38px!important;font-size:13px}
.web-messages{flex:1;min-height:120px;overflow:auto;padding:18px 24px;display:flex;flex-direction:column;gap:12px;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.web-message{align-self:flex-start;max-width:min(600px,85%);background:var(--panel);border:1px solid var(--line);border-radius:16px 16px 16px 5px;padding:10px 14px;overflow-wrap:anywhere;flex-shrink:0}
.web-message.own{align-self:flex-end;background:color-mix(in srgb,var(--primary),var(--panel) 80%);border-radius:16px 16px 5px 16px}.web-message-text{white-space:pre-wrap;font-size:14px;line-height:1.55}.web-message blockquote{border-left:3px solid var(--accent);margin:0 0 9px;padding-left:10px;color:var(--muted);font-size:12px}
.web-message footer{display:flex;gap:8px;align-items:center;justify-content:flex-end;color:var(--muted);font-size:10px}.web-message footer .text-btn{font-size:11px;min-height:28px}.web-message footer small{font-size:10px}
.web-compose{border-top:1px solid var(--line);padding:18px 24px;display:flex;gap:10px;align-items:flex-end}.web-compose textarea{resize:vertical;min-height:46px;max-height:150px;border:1px solid var(--line);background:var(--panel);border-radius:12px;padding:12px 14px;color:var(--text);font:inherit;flex:1;min-width:0;text-align:left;direction:ltr}.web-compose .primary{min-width:46px}.web-chat>.feedback{padding:0 24px}.web-chat-empty{margin:auto;text-align:center;color:var(--muted);font-size:14px;max-width:380px;line-height:1.6}#webReply{display:flex;gap:12px;padding:12px 24px;align-items:center;border-top:1px solid var(--line)}#webReply span{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px}#webChatUnlock{margin:12px 24px}
.web-attachment img,.web-attachment video{max-width:100%;max-height:360px;border-radius:10px;display:block;margin-bottom:8px;object-fit:contain}.web-attachment audio{max-width:100%;display:block}.web-file{font-size:12px;white-space:normal;text-align:left}.web-preview{width:100%;min-height:100px;color:var(--muted);font-size:13px;margin-bottom:8px}.loading::before{content:'';display:inline-block;width:18px;height:18px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite;margin-right:9px;flex-shrink:0}.drop-ready{outline:2px solid var(--accent);outline-offset:-4px}.sidebar-settings{padding:12px 20px;border-top:1px solid var(--line);display:flex;gap:8px}.sidebar-settings button{flex:1;font-size:13px}
@media(max-width:1100px){.workspace.with-chat{grid-template-columns:220px minmax(300px,1fr)}.workspace.with-chat .web-chat{position:fixed;right:12px;bottom:12px;top:92px;width:min(400px,calc(100vw - 24px));z-index:8;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow)}}
@media(max-width:700px){.workspace:has(.web-chat:not([hidden])) .sidebar{display:none}.web-chat{height:calc(100dvh - 66px);border-left:0}.web-chat-head{padding:15px}.web-chat-search{padding:10px 15px}.web-messages{padding:15px}.web-compose{padding:12px 15px}.web-chat-head h2{font-size:17px}.web-chat-head small{font-size:10px}.web-chat-actions{gap:0}.web-chat-actions .icon-btn{width:36px}.workspace.with-chat .web-chat{top:76px;bottom:10px;height:auto}.web-message{max-width:90%}}

/* Contextual tools leave more room for the conversation. */
.web-message footer .web-retry{width:38px;height:38px;padding:8px;display:inline-grid;place-items:center;border-radius:50%;border:1px solid var(--line);background:var(--panel);color:var(--text)}.web-retry svg{width:21px;height:21px}.web-waiting{display:inline-flex;align-items:center;gap:6px;font-size:11px}.web-waiting::before{content:'';width:12px;height:12px;border:1.5px solid currentColor;border-radius:50%;background:linear-gradient(currentColor,currentColor) center 2px/1px 4px no-repeat,linear-gradient(currentColor,currentColor) 6px 6px/3px 1px no-repeat}.web-message footer{flex-wrap:wrap}
.web-chat-search[hidden]{display:none}.web-reactions{display:flex;flex-wrap:wrap;gap:5px}.web-reactions button{min-width:40px;min-height:36px;padding:5px 8px;border-radius:12px}.web-reactions button[aria-pressed=true]{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 15%,var(--panel))}.web-edited{font-size:10px;color:var(--muted)}.web-edit-dialog textarea{width:100%;resize:vertical;min-height:110px}.web-chat-menu button{text-align:left;min-height:44px}
