.chat-inbox,.chat-room{max-width:760px;margin:0 auto}
.chat-inbox-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 0}
.chat-list{display:grid;gap:8px}
.chat-list-row{width:100%;display:flex;align-items:center;gap:12px;text-align:left;padding:14px;color:var(--ink)}
.chat-list-copy{min-width:0;flex:1}
.chat-list-copy b{display:block;font-size:13px}
.chat-list-copy small{display:block;margin-top:4px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-list-meta{display:flex;align-items:flex-end;flex-direction:column;gap:7px;color:var(--muted);font-size:10px}
.chat-list-meta i{display:grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:50%;background:var(--purple);color:#fff;font-style:normal;font-size:10px}
.chat-empty{padding:36px 20px;text-align:center}
.chat-empty-icon{display:grid;place-items:center;width:46px;height:46px;margin:0 auto 12px;border-radius:14px;background:var(--purple2);color:var(--purple);font-size:25px}
.chat-empty h2{font:800 18px Segoe UI;margin:0}
.chat-empty p{max-width:360px;margin:8px auto 16px;color:var(--muted);font-size:12px;line-height:1.5}
.chat-room{height:calc(100dvh - 175px);min-height:420px;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:19px;overflow:hidden;box-shadow:var(--shadow)}
.chat-room-head{display:flex;align-items:center;gap:10px;padding:12px 15px;border-bottom:1px solid var(--line)}
.chat-room-head>div{min-width:0;flex:1}
.chat-room-head b,.chat-room-head small{display:block}
.chat-room-head b{font-size:13px}
.chat-room-head small{margin-top:3px;color:var(--muted);font-size:10px}
.chat-lock{padding:6px 9px;border-radius:20px;background:var(--surface2);color:var(--muted);font-size:10px}
.chat-messages{flex:1;overflow:auto;display:flex;flex-direction:column;gap:10px;padding:17px}
.chat-message{max-width:min(78%,520px);align-self:flex-start}
.chat-message>div{padding:11px 13px;border-radius:15px 15px 15px 4px;background:var(--surface2);font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-message time{display:block;margin:4px 4px 0;color:var(--muted);font-size:9px}
.chat-message.mine{align-self:flex-end}
.chat-message.mine>div{background:var(--purple);color:#fff;border-radius:15px 15px 4px 15px}
.chat-message.mine time{text-align:right}
.chat-first-message{align-self:center;margin:auto 0;color:var(--muted);font-size:12px;text-align:center}
.chat-compose{display:flex;align-items:flex-end;gap:9px;padding:11px;border-top:1px solid var(--line)}
.chat-compose textarea{flex:1;min-height:42px;max-height:120px;resize:vertical;padding:11px 13px;border:1px solid var(--line);border-radius:14px;background:var(--bg);color:var(--ink);font:inherit;font-size:13px}
.chat-safety{margin:0;padding:0 14px 10px;color:var(--muted);font-size:9px}
body.dark .chat-list-row,body.dark .chat-room{background:var(--surface);color:var(--ink)}
@media(max-width:600px){.chat-inbox-actions{align-items:flex-start;flex-direction:column}.chat-room{height:calc(100dvh - 160px);min-height:380px}.chat-messages{padding:12px}.chat-message{max-width:88%}}
