.sgo-chat-grid{display:grid;grid-template-columns:minmax(155px,260px) minmax(0,1fr);gap:1rem}
.sgo-chat-grid:has(.sgo-chat-threads[hidden]){grid-template-columns:minmax(0,1fr)}
.sgo-chat-main,.sgo-chat-threads{min-width:0;border:1px solid var(--line,#d8dde2);border-radius:12px;padding:.85rem;background:var(--surface,#fff);color:var(--text,#17212b)}
.sgo-chat-threads input{width:100%;margin-bottom:.65rem}
.sgo-chat-threads>div{max-height:28rem;overflow:auto}.sgo-chat-threads .chat-thread{display:block;width:100%;text-align:left;margin-bottom:.35rem}
.sgo-chat-notice:not(:empty){background:#fff8dc;color:#312600;padding:.55rem;border-radius:6px}
.sgo-chat-log{display:flex;flex-direction:column;gap:.55rem;overflow:auto;max-height:min(55vh,600px);min-height:9rem;padding:.4rem;background:#edf2f6;border-radius:9px;margin:.55rem 0}
.sgo-chat-message{align-self:flex-start;max-width:min(85%,550px);min-width:0;border-radius:10px;background:#fff;color:#16232e;padding:.55rem .7rem;overflow-wrap:anywhere}
.sgo-chat-message.mine{align-self:flex-end;background:#fff0b8}
.sgo-chat-message p{margin:.25rem 0;white-space:pre-wrap}
.sgo-chat-message small{display:block;color:#43515e;margin-top:.25rem}
.sgo-chat-media{margin:.4rem 0}.sgo-chat-media img,.sgo-chat-media video,.sgo-chat-media audio{display:block;max-width:100%;max-height:24rem}
.sgo-chat-compose{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.65rem}
.sgo-chat-compose[hidden],.sgo-chat-threads[hidden],.sgo-chat-main button[hidden],.sgo-chat-badge[hidden]{display:none}
.sgo-chat-compose textarea,.sgo-chat-compose small,.sgo-chat-file:not(:empty){width:100%}
.sgo-chat-file{overflow-wrap:anywhere}.sgo-chat-compose button{white-space:normal}
.sgo-chat-legacy{margin:.5rem 0;max-height:14rem;overflow:auto;padding:.6rem;background:#edf2f6;color:#16232e;overflow-wrap:anywhere}
.sgo-chat-badge{display:inline-grid;place-items:center;min-width:1.35rem;height:1.35rem;padding:.1rem;border-radius:999px;background:#f4b400;color:#151515;font-weight:bold;font-size:.7rem}
@media(max-width:700px){.sgo-chat-grid{grid-template-columns:minmax(0,1fr)}.sgo-chat-threads>div{max-height:12rem}.sgo-chat-main,.sgo-chat-threads{padding:.55rem}.sgo-chat-message{max-width:92%}}

.sgo-chat-toolbar{display:flex;align-items:center;gap:.35rem;width:100%;min-width:0}
.sgo-chat-toolbar textarea{flex:1;min-width:0;width:auto;min-height:2.6rem;border-radius:1.25rem;resize:vertical}
.sgo-chat-toolbar .sgo-chat-icon{flex:none;min-width:2.65rem;padding:.5rem;font-size:1.15rem}
.sgo-chat-recording{align-self:center;color:#b42318;font-weight:700;font-variant-numeric:tabular-nums}
.sgo-chat-recording[hidden]{display:none}
.sgo-chat-recording::before{content:"";display:inline-block;width:.65rem;height:.65rem;margin-right:.4rem;border-radius:50%;background:#d92d20}
@media(prefers-reduced-motion:no-preference){.sgo-chat-recording::before{animation:sgo-chat-recording-pulse 1s ease-in-out infinite alternate}}
@keyframes sgo-chat-recording-pulse{to{opacity:.35}}
