*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Google Sans',Roboto,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:#f8f9fa;color:#202124}
.chat{max-width:720px;margin:0 auto;background:#fff;min-height:100vh;border-left:1px solid #dadce0;border-right:1px solid #dadce0}
header{padding:20px 24px;border-bottom:1px solid #dadce0;position:sticky;top:0;background:#fff;z-index:10}
header h1{font-size:18px;font-weight:500;color:#202124}
header p{font-size:12px;color:#5f6368;margin-top:4px}
.messages{padding:16px 24px;display:flex;flex-direction:column;gap:3px}
.date-sep{text-align:center;margin:20px 0 12px}
.date-sep span{background:#e8eaed;padding:4px 14px;font-size:11px;color:#5f6368;border-radius:16px;font-weight:500}
.msg{display:flex;flex-direction:column;margin-bottom:1px}
.msg-self{align-items:flex-end}
.msg-other{align-items:flex-start}
.msg-row{display:flex;align-items:flex-end;gap:8px;max-width:80%}
.msg-self .msg-row{flex-direction:row-reverse}
.msg-other .msg-row{flex-direction:row}
.avatar{width:28px;height:28px;border-radius:50%;flex-shrink:0;object-fit:cover;align-self:flex-end}
.avatar-initial{width:28px;height:28px;border-radius:50%;flex-shrink:0;background:#5f6368;color:#fff;font-size:13px;font-weight:600;display:flex;align-items:center;justify-content:center;align-self:flex-end}
.msg-self .avatar-initial{background:#1967d2}
.avatar-spacer{width:28px;flex-shrink:0}
.sender-name{font-size:12px;font-weight:500;margin-bottom:2px;margin-top:10px}
.msg-self .sender-name{text-align:right;padding-right:40px;color:#1967d2}
.msg-other .sender-name{text-align:left;padding-left:40px;color:#5f6368}
.bubble{padding:8px 14px;position:relative;word-wrap:break-word;flex:0 1 auto;min-width:0}
.msg-self .bubble{background:#d3e3fd;border-radius:20px 4px 4px 20px}
.msg-other .bubble{background:#f1f3f4;border-radius:4px 20px 20px 4px}
.text{font-size:14px;line-height:1.5;color:#202124}
.text a{color:#1a73e8;text-decoration:none}
.text a:hover{text-decoration:underline}
.text.empty{font-style:italic;color:#80868b;font-size:12px}
.time{font-size:10px;color:#80868b;margin-top:3px}
.msg-self .time{text-align:right}
.media-card{border:1px solid #dadce0;overflow:hidden;flex:0 1 auto;min-width:0}
.msg-self .media-card{border-radius:20px 4px 4px 20px}
.msg-other .media-card{border-radius:4px 20px 20px 4px}
.media-card .media-item{margin:0}
.media-card .media-image{margin:0}
.media-card .media-image img{max-width:100%;display:block;border-radius:0;cursor:pointer}
.media-card .media-image a{display:block;text-decoration:none}
.media-audio{display:flex;flex-direction:column;gap:4px;padding:10px 14px}
.audio-chip{display:flex;align-items:center;gap:6px;color:#1a73e8;font-size:13px;font-weight:500}
.audio-icon{flex-shrink:0;color:#1a73e8}
audio{width:100%;height:32px;border-radius:16px}
.media-video{margin:0}
.media-video video{width:100%;display:block;background:#000;border-radius:0}
.video-label{display:flex;align-items:center;gap:6px;padding:6px 12px;font-size:12px;color:#5f6368}
.video-label svg{flex-shrink:0}
.dl-link{display:inline-flex;align-items:center;color:#5f6368;margin-left:auto;padding:2px;border-radius:4px;transition:color .15s}
.dl-link:hover{color:#1a73e8}
.media-file{margin:0}
.file-chip{display:flex;align-items:center;gap:8px;padding:10px 14px;font-size:13px;color:#3c4043;text-decoration:none;transition:background .15s;background:transparent}
.file-chip:hover{background:#f8f9fa}
.file-icon{display:flex;align-items:center;flex-shrink:0}
.file-name{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:200px}
.dl-icon{flex-shrink:0;color:#5f6368;margin-left:auto}
@media(max-width:600px){.chat{border:none}.msg-row{max-width:95%}}