.chat-layout{display:grid;grid-template-columns:250px minmax(0,1fr);gap:18px;min-height:580px;height:calc(100dvh - 195px);max-height:900px}
.chat-projects{overflow:auto;border:1px solid var(--line);border-radius:16px;background:var(--panel);padding:12px}
.chat-projects h3{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.09em;margin:8px 9px 14px}
.chat-project{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--txt);padding:13px 10px;cursor:pointer;margin-bottom:4px}
.chat-project:hover,.chat-project.active{background:var(--panel2);border-color:var(--line)}
.chat-project.active{border-color:var(--accent)}
.chat-project-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600}
.chat-count{display:inline-flex;align-items:center;justify-content:center;background:var(--accent);color:var(--bg);border-radius:20px;font-size:11px;min-width:21px;height:21px;padding:0 6px;font-weight:800}
.chat-count[hidden]{display:none}
.chat-room{min-width:0;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--panel)}
.chat-room-head{padding:19px 22px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px}
.chat-room-head h3{margin:0 0 4px;font-size:16px;letter-spacing:-.02em}
.chat-room-head p{margin:0;font-size:12px;color:var(--muted)}
.chat-room-symbol{display:grid;place-items:center;width:38px;height:38px;flex-shrink:0;background:var(--panel3);border-radius:12px;color:var(--accent);font-size:20px}
.chat-history{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:18px 22px;scrollbar-gutter:stable}
.chat-history-tools{text-align:center;margin-bottom:18px}
.chat-history-tools[hidden]{display:none}
.chat-message{display:flex;flex-direction:column;align-items:flex-start;margin:0 0 17px;gap:5px}
.chat-message.mine{align-items:flex-end}
.chat-message-meta{display:flex;align-items:center;flex-wrap:wrap;gap:7px;font-size:11px;color:var(--muted)}
.chat-message-meta b{color:var(--txt);font-weight:600}
.chat-role{font-size:10px;color:var(--accent2)}
.chat-bubble{max-width:min(85%,680px);padding:11px 14px;border:1px solid var(--line);border-radius:2px 13px 13px 13px;background:var(--panel2);font-size:13px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.mine .chat-bubble{background:color-mix(in srgb,var(--accent) 12%,var(--panel));border-color:color-mix(in srgb,var(--accent) 32%,var(--line));border-radius:13px 2px 13px 13px}
.chat-day{text-align:center;color:var(--muted);font-size:11px;margin:10px 0 20px}
.chat-empty{height:100%;min-height:210px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;color:var(--muted);gap:8px;padding:26px}
.chat-empty b{font-size:16px;color:var(--txt)}
.chat-empty span{font-size:13px;max-width:330px;line-height:1.6}
.chat-composer{padding:15px 20px;border-top:1px solid var(--line);background:var(--panel)}
.chat-composer label{display:block;font-size:12px;color:var(--muted);margin:0 0 8px}
.chat-composer textarea{min-height:82px;max-height:220px;width:100%;line-height:1.5;resize:vertical}
.chat-compose-footer{display:flex;align-items:center;gap:10px;margin-top:10px;font-size:11px;color:var(--muted)}
.chat-compose-footer .btn{margin-left:auto}
.chat-error{font-size:12px;color:var(--blocker);margin:8px 0 0;min-height:0}
.chat-error:empty{display:none}
.chat-sync{font-size:12px;color:var(--muted)}
.chat-new{align-self:center;margin:0 0 10px}
.chat-new[hidden]{display:none}
@media(max-width:900px){.chat-layout{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);height:calc(100dvh - 215px);min-height:560px;gap:10px}.chat-projects{display:flex;align-items:center;overflow-x:auto;padding:7px;flex-shrink:0}.chat-projects h3{display:none}.chat-project{width:auto;flex-shrink:0;margin:0 5px 0 0;padding:9px 11px}.chat-project-name{max-width:180px}.chat-room{min-height:440px}}
@media(max-width:600px){.chat-room-head{padding:14px}.chat-history{padding:12px}.chat-composer{padding:12px}.chat-bubble{max-width:94%}.chat-shortcut{display:none}.chat-layout{min-height:590px;height:calc(100dvh - 190px)}}
