html, body { background:#dfe7ef; font-family:"Microsoft Yahei",sans-serif; }
.chat-box { height:100vh; padding-bottom:60px; }
@supports (height:100dvh) { .chat-box { height:100dvh; } }
.telegram-header { height:64px; flex:0 0 64px; display:flex; align-items:center; padding:0 16px; background:rgba(51,144,236,.28); color:#183a5a; box-sizing:border-box; border-bottom:1px solid rgba(51,144,236,.18); box-shadow:0 4px 18px rgba(45,75,105,.12); z-index:10; }
.telegram-back { color:#3390ec; text-decoration:none; font:34px/1 Arial,sans-serif; margin-right:12px; }
.telegram-avatar { width:42px; height:42px; flex:0 0 42px; border-radius:50%; background:rgba(255,255,255,.72); margin-right:11px; overflow:hidden; box-shadow:0 2px 8px rgba(45,75,105,.16); }
.telegram-avatar img { width:100%; height:100%; display:block; object-fit:cover; }
.telegram-info { min-width:0; flex:1; line-height:1.25; }
.telegram-title { font-size:16px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.telegram-subtitle { min-width:0; margin-top:4px; display:flex; align-items:center; font-size:12px; color:#6f8295; }
#service-presence { display:inline-flex; align-items:center; flex-shrink:0; }
#service-presence[hidden] { display:none; }
.service-status-dot { width:7px; height:7px; margin-right:5px; border-radius:50%; background:#94a3b8; }
#service-presence.is-online { color:#218854; }
.is-online .service-status-dot { background:#25b872; }
.service-status-note { min-width:0; margin-left:10px; padding-left:10px; border-left:1px solid rgba(111,130,149,.4); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#516b83; }
.service-status-note:empty { display:none; }
.service-status-note.no-divider { margin-left:0; padding-left:0; border-left:0; }
.chat-body { padding:15px 20px 66px; min-height:0; }
.chat-footer { position:relative; bottom:auto; flex:0 0 auto; width:100%; min-width:0; }
.message-input { min-width:0; }
.msg.right .bubble { background:#d9fdd3; color:#222; }
.msg.right.read .bubble::after { color:#3390ec; }
.msg.right.unread .bubble::after { color:#7d8b99; }
@media (max-width:380px) { .chat-body { padding-left:12px; padding-right:12px; } .chat-footer { padding:10px 12px; gap:6px; } .telegram-header { padding:0 12px; } }
