:root {
  color-scheme: dark;
  --bg: #0b0e13;
  --panel: #10141b;
  --panel-raised: #151a23;
  --panel-hover: #1a202a;
  --line: #222833;
  --text: #f2f4f7;
  --muted: #838c9b;
  --faint: #596270;
  --accent: #b9f36a;
  --accent-deep: #9fd552;
  --accent-ink: #14200a;
  --purple: #b0a1ff;
  --danger: #ff777e;
  --font: "DM Sans", sans-serif;
  --display: "Manrope", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ui-icon { width: 17px; height: 17px; display: inline-block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.inline-status-icon { width: 13px; height: 13px; margin-right: 3px; color: var(--accent); vertical-align: -2px; }
.app-shell { width: 100%; height: 100dvh; min-height: 520px; display: grid; grid-template-columns: 260px minmax(380px, 1fr) 274px; overflow: hidden; }
.sidebar { display: flex; min-height: 0; flex-direction: column; background: #0e1117; border-right: 1px solid var(--line); padding: 22px 13px 12px; }
.brand { height: 47px; display: flex; align-items: center; padding: 0 10px; gap: 11px; }
.brand-mark, .empty-brand-mark { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; gap: 3px; border-radius: 10px; background: var(--accent); transform: rotate(-5deg); }
.brand-mark span, .empty-brand-mark span { display: block; width: 3px; border-radius: 4px; background: var(--accent-ink); transform: rotate(17deg); }
.brand-mark span:nth-child(1), .empty-brand-mark span:nth-child(1) { height: 11px; }
.brand-mark span:nth-child(2), .empty-brand-mark span:nth-child(2) { height: 19px; }
.brand-mark span:nth-child(3), .empty-brand-mark span:nth-child(3) { height: 14px; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-name { font: 800 18px var(--display); letter-spacing: -1.1px; }
.brand-name span { color: var(--accent); }
.brand-caption { color: #717988; font-size: 8px; font-weight: 700; letter-spacing: 2px; }
.sidebar-menu { display: none !important; margin-left: auto; }
.workspace-label { display: flex; align-items: center; gap: 8px; margin: 34px 9px 14px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 1.35px; }
.live-dot, .presence { width: 7px; height: 7px; display: inline-block; border-radius: 100%; background: var(--accent); box-shadow: 0 0 8px #b9f36a60; }
.workspace-chevron { margin-left: auto; font-size: 15px; }
.primary-nav { display: grid; gap: 3px; }
.nav-item { width: 100%; height: 38px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 7px; background: transparent; color: #9ba3b0; padding: 0 11px; text-align: left; font-size: 12px; }
.nav-item:hover { background: #161b23; color: var(--text); }
.nav-item.active { background: #1b222b; color: #f4f6f7; font-weight: 600; }
.nav-icon { width: 16px; display: grid; place-items: center; color: #8d96a4; text-align: center; }
.nav-icon .ui-icon { width: 16px; height: 16px; }
.active .nav-icon { color: var(--accent); }
.nav-count { margin-left: auto; color: var(--accent); font-size: 10px; }
.nav-count.subtle { color: #687180; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 35px 9px 11px; color: #717b89; font-size: 9px; font-weight: 700; letter-spacing: 1.3px; }
.tiny-icon { width: 23px; height: 23px; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #919aa8; font-size: 18px; }
.tiny-icon:hover { background: #222833; color: var(--text); }
.search-box { display: flex; align-items: center; gap: 9px; height: 34px; border: 1px solid #242a35; border-radius: 6px; background: #131820; color: var(--muted); padding: 0 9px; }
.conversation-search { margin: 0 2px 11px; }
.search-icon { width: 18px; height: 18px; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: none; background: none; color: var(--text); font-size: 11px; }
.search-box input::placeholder { color: #6f7886; }
kbd { flex: none; color: #788190; font-size: 9px; }
.conversation-list { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2b323e transparent; }
.conversation-item { position: relative; width: 100%; min-height: 67px; display: flex; align-items: center; border-radius: 7px; background: transparent; }
.conversation-open { width: 100%; min-width: 0; min-height: 67px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 7px; background: transparent; padding: 9px 34px 9px 8px; text-align: left; cursor: pointer; }
.conversation-item:hover { background: #171c24; }
.conversation-item.selected, .conversation-item.selected .conversation-open { background: #191f28; }
.pin-chat-button { width: 23px; height: 23px; position: absolute; top: 8px; right: 5px; display: grid; place-items: center; border: 0; border-radius: 5px; background: #171c24; color: #b4c0a6; opacity: 0; font-size: 15px; }
.conversation-item:hover .pin-chat-button, .conversation-item:focus-within .pin-chat-button, .conversation-item.selected .pin-chat-button { opacity: 1; }
.pin-chat-button:hover { background: #2b3423; color: var(--accent); }
.pin-chat-button .ui-icon, .inline-pin-icon { width: 14px; height: 14px; }
.avatar { position: relative; width: 36px; height: 36px; flex: none; display: grid; place-items: center; overflow: visible; border-radius: 12px; background: #444f5d; color: #f7f8fb; font: 700 12px var(--display); }
.avatar > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.avatar .presence { position: absolute; right: -2px; bottom: -1px; width: 10px; height: 10px; border: 2px solid #0e1117; }
.avatar .presence { z-index: 1; }
.avatar.lavender { background: #625789; }.avatar.coral { background: #a85c57; }.avatar.blue { background: #4a678a; }.avatar.gold { background: #92723c; }.avatar.mint { background: #3d7769; }
.avatar.avatar-you { background: #34441f; color: var(--accent); }
.conversation-copy { min-width: 0; flex: 1; }
.conversation-topline, .conversation-bottomline { display: flex; justify-content: space-between; gap: 6px; }
.conversation-topline strong { overflow: hidden; color: #e8ebef; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.conversation-topline time { flex: none; color: #747e8c; font-size: 9px; }
.conversation-bottomline { margin-top: 5px; }
.conversation-bottomline span:first-child { overflow: hidden; color: #828b99; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.unread-badge { flex: none; min-width: 16px; height: 16px; display: grid; place-items: center; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: 9px; font-weight: 700; }
.sidebar-bottom { margin-top: auto; }
.privacy-note { display: flex; align-items: center; gap: 10px; margin: 10px 5px 14px; border: 1px solid #252b33; border-radius: 7px; padding: 10px 9px; }
.lock-icon { color: var(--accent); font-size: 18px; }
.privacy-note strong, .privacy-note small { display: block; }
.privacy-note strong { font-size: 10px; font-weight: 600; }
.privacy-note small { margin-top: 3px; color: #77818f; font-size: 9px; }
.profile-card { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; border-top: 1px solid var(--line); background: transparent; padding: 13px 6px 3px; text-align: left; }
.profile-copy { min-width: 0; flex: 1; }
.profile-copy strong, .profile-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { font-size: 11px; font-weight: 600; }
.profile-copy small { margin-top: 3px; color: #7f8997; font-size: 9px; }
.profile-more { color: #828b99; font-size: 17px; }

.main-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.mobile-tabs { display: none; }
.topbar { height: 62px; flex: none; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 27px; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #7d8694; font-size: 11px; }
.breadcrumbs strong { color: #e5e8ed; font-weight: 600; }
.crumb-slash { color: #4d5562; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.encryption-status { color: #929aa7; font-size: 10px; }
.status-check { margin-right: 4px; color: var(--accent); }
.icon-button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #8a93a1; font-size: 16px; }
.icon-button:hover { border-color: #2c333e; background: #171c24; color: var(--text); }
.settings-button { font-size: 15px; }
.chat-panel { width: min(100%, 980px); min-height: 0; flex: 1; display: flex; flex-direction: column; align-self: center; }
.chat-header { min-height: 77px; flex: none; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #1b2029; padding: 0 29px; }
.chat-title-group { display: flex; align-items: center; gap: 11px; }
.chat-avatar { width: 39px; height: 39px; border-radius: 13px; background: #625789; font-size: 13px; }
.chat-avatar .presence { width: 10px; height: 10px; border: 2px solid var(--bg); }
.chat-title-group h1 { margin: 0; font: 700 14px var(--display); letter-spacing: -.2px; }
.chat-subtitle { margin-top: 4px; color: #929ba9; font-size: 10px; }
.online-label { color: var(--accent); font-size: 8px; vertical-align: 1px; }
.chat-header-actions { display: flex; gap: 4px; }
.chat-header-actions .icon-button { flex: 0 0 34px; width: 34px; height: 34px; color: #c0c8d2; }
#call-button { position: relative; }
.call-count { position: absolute; top: -3px; right: -4px; min-width: 15px; height: 15px; display: grid; place-items: center; border: 1px solid var(--bg); border-radius: 50%; background: var(--danger); padding: 0 3px; color: #1b0c0e; font-size: 8px; font-weight: 800; line-height: 1; }
.call-count.hidden { display: none; }
.message-area { position: relative; min-height: 0; flex: 1; overflow-y: auto; padding: 21px 30px 20px; scrollbar-color: #252c36 transparent; scrollbar-width: thin; }
.date-divider { position: relative; display: flex; justify-content: center; margin: 4px 0 23px; }
.date-divider::before { position: absolute; top: 50%; right: 0; left: 0; height: 1px; background: #1c222b; content: ""; }
.date-divider span { position: relative; z-index: 1; background: var(--bg); color: #717b89; padding: 0 12px; font-size: 9px; }
.message-list { display: flex; flex-direction: column; gap: 17px; }
.message-row { display: flex; align-items: flex-end; gap: 9px; }
.message-row.mine { justify-content: flex-end; }
.message-stack { max-width: min(76%, 560px); display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.mine .message-stack { align-items: flex-end; }
.message-author-line { display: flex; align-items: center; gap: 7px; padding-left: 2px; color: #dfe3e9; font-size: 10px; font-weight: 600; }
.message-author-line time { color: #737d8b; font-size: 9px; font-weight: 400; }
.message-bubble { border: 1px solid #222832; border-radius: 4px 12px 12px 12px; background: #171c24; padding: 10px 12px; color: #e0e4ea; font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.message-bubble:has(.message-image) { padding: 5px; }
.message-bubble > a:has(.message-image) { display: block; }
.message-link { color: #c3f17b; text-decoration: underline; text-underline-offset: 2px; }
.deleted-message { color: #8b949f; font-style: italic; }
.download-attachment { display: block; margin: 5px 1px 0 auto; border: 0; background: transparent; color: #a9bb95; font-size: 9px; }
.download-attachment .ui-icon { width: 13px; height: 13px; margin-right: 3px; vertical-align: -3px; }
.download-attachment:hover { color: var(--accent); }
.file-download-card { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; }
.mine .message-bubble { border-color: #344522; border-radius: 12px 4px 12px 12px; background: #252f1e; color: #e7f1db; }
.message-meta { display: flex; align-items: center; gap: 7px; color: #7b8593; font-size: 9px; }
.mine .message-meta { justify-content: flex-end; }
.read-mark { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); font-size: 11px; }
.read-mark .ui-icon { width: 13px; height: 13px; }
.message-image { display: block; width: min(300px, 100%); max-height: 240px; border-radius: 9px; object-fit: cover; }
.message-bubble video.message-image { background: #080a0e; object-fit: contain; }
.file-card { min-width: 230px; display: flex; align-items: center; gap: 10px; border: 1px solid #333c2a; border-radius: 8px; padding: 10px; }
.file-card-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 7px; background: #333d2c; color: var(--accent); font-size: 14px; }
.file-card-icon .ui-icon { width: 17px; height: 17px; }
.file-card-name { overflow: hidden; max-width: 200px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.file-card-size { margin-top: 3px; color: #899285; font-size: 9px; }
.file-card a { color: inherit; text-decoration: none; }
.audio-player { max-width: 245px; accent-color: var(--accent); }
.message-actions { display: flex; gap: 3px; opacity: 0; transition: opacity .12s ease; }
.message-row:hover .message-actions, .message-row:focus-within .message-actions { opacity: 1; }
.message-row.mine .message-actions { align-self: flex-end; }
.message-actions { flex-wrap: wrap; }
.message-action { width: 27px; height: 25px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #87919f; }
.message-action:hover { border-color: #303843; background: #1a2029; color: var(--accent); }
.message-action .ui-icon { width: 14px; height: 14px; }
.message-reactions { display: flex; flex-wrap: wrap; gap: 4px; }
.reply-quote { max-width: min(100%, 360px); display: flex; flex-direction: column; align-items: flex-start; gap: 3px; border: 0; border-left: 2px solid #9fcd68; border-radius: 4px; background: #20262d; padding: 6px 9px; color: #bbc4ce; text-align: left; }
.mine .reply-quote { border-left-color: #c3f17b; background: #303a29; }
.reply-quote strong { color: #c3f17b; font-size: 9px; }
.reply-quote span { max-width: 100%; overflow: hidden; color: #b0b8c3; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.reply-preview { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; border-left: 2px solid var(--accent); border-radius: 6px; background: #171c23; padding: 8px 10px; }
.reply-preview-copy { min-width: 0; flex: 1; }
.reply-preview-copy strong, .reply-preview-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-preview-copy strong { color: var(--accent); font-size: 10px; }
.reply-preview-copy small { margin-top: 3px; color: #8c96a4; font-size: 9px; }
.reply-preview > button { width: 25px; height: 25px; display: grid; flex: none; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #9aa4b1; }
.reply-preview > button:hover { background: #272e38; color: white; }
.reply-preview > button .ui-icon { width: 14px; height: 14px; }
.message-highlight .message-bubble, .message-highlight .reply-quote { animation: message-highlight 1.5s ease-out; }
@keyframes message-highlight { 30% { box-shadow: 0 0 0 2px #b9f36a; } }
.scroll-latest-button { position: absolute; z-index: 2; right: 18px; bottom: 14px; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #46523b; border-radius: 50%; background: #222a1c; color: var(--accent); box-shadow: 0 4px 15px #0008; }
.scroll-latest-button:hover { background: #334126; }
.scroll-latest-button .ui-icon { width: 18px; height: 18px; }
.call-event-row { justify-content: center; }
.call-event-row.mine { justify-content: flex-end; }
.call-event-bubble { display: flex; align-items: center; gap: 9px; border: 1px solid #303a31; border-radius: 9px; background: #171d18; padding: 9px 12px; color: #b8ef78; }
.call-event-bubble.missed { border-color: #594046; background: #21171a; color: #ff9299; }
.call-event-bubble > .ui-icon { width: 16px; height: 16px; }
.call-event-bubble strong, .call-event-bubble small { display: block; }
.call-event-bubble strong { font-size: 10px; }
.call-event-bubble small { margin-top: 3px; color: #89938a; font-size: 9px; }
.reaction-chip { min-height: 24px; display: flex; align-items: center; gap: 4px; border: 1px solid #303844; border-radius: 13px; background: #151a22; padding: 2px 7px; font-size: 12px; }
.reaction-chip span { color: #aab3bf; font-size: 9px; }
.reaction-chip.mine-reaction { border-color: #7e9f52; background: #25301d; }
.forwarded-label { display: flex; align-items: center; gap: 4px; color: #788493; font-size: 9px; }
.forwarded-label .ui-icon { width: 12px; height: 12px; }
.typing-indicator { display: flex; align-items: center; gap: 3px; height: 27px; padding-left: 37px; color: #7b8593; font-size: 9px; }
.typing-indicator span { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); animation: bounce 1s infinite alternate; }
.typing-indicator span:nth-child(2) { animation-delay: .15s; }.typing-indicator span:nth-child(3) { animation-delay: .3s; }
.typing-indicator small { margin-left: 4px; }
@keyframes bounce { to { transform: translateY(-3px); opacity: .5; } }
.composer-wrap { flex: none; padding: 0 28px 17px; }
.composer { display: flex; align-items: flex-end; gap: 10px; min-height: 54px; border: 1px solid #2b323d; border-radius: 10px; background: #131820; padding: 9px 10px; }
.composer:focus-within { border-color: #536344; box-shadow: 0 0 0 2px #b9f36a0c; }
.composer-tool { width: 27px; height: 27px; flex: none; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #8d96a3; font-size: 20px; }
.composer-tool:hover { background: #222832; color: var(--accent); }
.composer textarea { width: 100%; max-height: 120px; min-height: 27px; flex: 1; resize: none; border: 0; outline: none; background: transparent; padding: 5px 0 2px; color: #e6e9ed; font-size: 11px; line-height: 1.5; }
.composer textarea::placeholder { color: #727c89; }
.composer-tools { display: flex; align-items: center; gap: 3px; }
.character-count { display: none; color: #647080; font-size: 9px; }
.send-button { height: 32px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 7px; background: var(--accent); padding: 0 10px 0 12px; color: var(--accent-ink); font-size: 10px; font-weight: 700; }
.send-button:hover, .primary-button:hover { background: #c7ff7a; }
.send-button span:last-child { font-size: 14px; }
.send-button .ui-icon { width: 14px; height: 14px; }
.voice-button.recording { border-radius: 50%; background: #57282d; color: #ff8388; animation: pulse 1.1s infinite; }
.voice-button.recording-paused { animation: none; background: #342c1e; color: #f0c674; }
.voice-stop-button { color: #ff888e; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px #ff777e20; } }
.composer-footnote { display: flex; justify-content: space-between; padding: 7px 3px 0; color: #646e7b; font-size: 9px; }
.composer-footnote i { padding: 0 3px; color: #424a55; font-style: normal; }
.size-limit strong { color: #9099a6; font-weight: 500; }
.attachment-preview { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; border: 1px solid #2b323d; border-radius: 7px; background: #151a21; padding: 7px 10px; color: #cbd1d8; font-size: 10px; }
.attachment-preview button { margin-left: auto; border: 0; background: none; color: #a1aab7; font-size: 16px; }
.attachment-preview { flex-wrap: wrap; }
.attachment-preview-item { max-width: 100%; display: inline-flex; align-items: center; gap: 5px; }
.attachment-preview-item button { flex: none; margin-left: 2px; }
.pending-audio-preview { width: 180px; height: 28px; }
.modal-delete-actions { justify-content: flex-start; }
.hidden { display: none !important; }
.details-panel { min-height: 0; border-left: 1px solid var(--line); background: #0e1117; padding: 22px 16px; }
.app-shell.details-hidden { grid-template-columns: 260px minmax(380px, 1fr); }
.app-shell.details-hidden .details-panel { display: none; }
.details-top { display: flex; align-items: center; justify-content: space-between; color: #77818f; font-size: 9px; font-weight: 700; letter-spacing: 1.1px; }
.details-content { padding-top: 31px; }
.details-person { display: flex; flex-direction: column; align-items: center; padding-bottom: 25px; border-bottom: 1px solid var(--line); text-align: center; }
.details-person .avatar { width: 65px; height: 65px; border-radius: 21px; font-size: 21px; }
.details-person h2 { margin: 12px 0 3px; font: 700 14px var(--display); }
.details-person p { margin: 0; color: #838d9a; font-size: 10px; }
.details-person .details-presence { margin-top: 10px; color: #a9b29f; font-size: 9px; }
.details-presence .live-dot { width: 6px; height: 6px; margin-right: 5px; }
.profile-bio { max-width: 230px; margin-top: 8px !important; line-height: 1.5; overflow-wrap: anywhere; }
.profile-status { max-width: 230px; margin-top: 9px; border: 1px solid #303a2a; border-radius: 8px; background: #151b12; padding: 7px 9px; color: #d9e9c8; font-size: 10px; overflow-wrap: anywhere; }
.profile-status small { display: block; margin-top: 4px; color: #829075; font-size: 8px; }
.detail-section { padding: 19px 0; border-bottom: 1px solid var(--line); }
.detail-section h3 { margin: 0 0 12px; color: #9099a6; font-size: 9px; font-weight: 700; letter-spacing: .9px; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.media-thumb { aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 5px; background: #1a2029; color: #84906f; font-size: 19px; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shared-file { display: flex; align-items: center; gap: 8px; margin-top: 9px; color: #aeb6c1; font-size: 9px; }
.shared-file span:first-child { color: var(--accent); }
.members-row { display: flex; align-items: center; gap: -5px; }
.members-row .avatar { width: 27px; height: 27px; margin-right: -5px; border: 2px solid #0e1117; border-radius: 9px; font-size: 8px; }
.members-row .member-more { width: 27px; height: 27px; display: grid; place-items: center; margin-left: 4px; border-radius: 50%; background: #222832; color: #a2abb7; font-size: 8px; }
.details-action { width: 100%; border: 0; background: none; padding: 12px 0 0; color: #aeb8a3; text-align: left; font-size: 10px; }
.details-action:hover { color: var(--accent); }
.empty-panel { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; }
.empty-illustration { position: relative; width: 140px; height: 120px; display: grid; place-items: center; margin-bottom: 15px; }
.empty-brand-mark { width: 58px; height: 58px; gap: 5px; border-radius: 19px; box-shadow: 0 15px 60px #b9f36a20; }
.empty-brand-mark span { width: 5px; }.empty-brand-mark span:nth-child(1) { height: 18px; }.empty-brand-mark span:nth-child(2) { height: 30px; }.empty-brand-mark span:nth-child(3) { height: 22px; }
.empty-orbit { position: absolute; width: 112px; height: 112px; border: 1px solid #252c36; border-radius: 50%; }
.bubble { position: absolute; z-index: 1; display: grid; place-items: center; border: 1px solid #333a45; border-radius: 10px; background: #171c24; color: var(--accent); }
.bubble-one { top: 3px; right: 5px; width: 28px; height: 27px; }.bubble-two { bottom: 10px; left: 3px; width: 41px; height: 28px; color: #b2a6fb; }
.eyebrow { margin: 9px 0 10px; color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: 2px; }
.empty-panel h1 { margin: 0; font: 700 29px/1.28 var(--display); letter-spacing: -1px; }
.empty-copy { max-width: 310px; margin: 12px 0 21px; color: #87909d; font-size: 11px; line-height: 1.7; }
.primary-button { min-height: 38px; display: flex; align-items: center; gap: 19px; border: 0; border-radius: 7px; background: var(--accent); padding: 0 13px; color: var(--accent-ink); font-size: 10px; font-weight: 700; }
.primary-button span { font-size: 14px; }
.primary-button .ui-icon { width: 14px; height: 14px; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: grid; gap: 8px; }
.toast { max-width: min(360px, calc(100vw - 40px)); border: 1px solid #353d49; border-radius: 8px; background: #191f28; padding: 11px 14px; color: #e7ebf0; box-shadow: 0 12px 36px #0008; font-size: 11px; animation: toast-in .18s ease-out; }
.toast.error { border-color: #744146; color: #ffb7bb; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: #05070ac9; padding: 20px; }
.modal { width: min(460px, 100%); max-height: min(680px, 90dvh); overflow: auto; border: 1px solid #303844; border-radius: 13px; background: #12171f; box-shadow: 0 22px 90px #0009; }
.modal-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #252c36; padding: 17px 20px; }
.modal-header h2 { margin: 0; font: 700 15px var(--display); }
.modal-body { padding: 20px; }
.modal-copy { margin: 0 0 17px; color: #8c96a4; font-size: 11px; line-height: 1.6; }
.field-label { display: block; margin: 14px 0 6px; color: #b4bbc5; font-size: 10px; font-weight: 600; }
.field-input, .field-textarea { width: 100%; border: 1px solid #323a46; border-radius: 7px; background: #0e1218; padding: 10px 11px; color: var(--text); font-size: 11px; }
.field-input::placeholder, .field-textarea::placeholder { color: #606a78; }
.field-textarea { min-height: 75px; resize: vertical; }
.profile-photo-editor { display: flex; align-items: center; gap: 14px; }
.profile-editor-avatar { width: 58px; height: 58px; border-radius: 18px; }
.profile-photo-editor > div:last-child { flex: 1; }
.profile-photo-editor .field-input { padding: 7px; }
.text-action { display: block; margin-top: 6px; border: 0; background: none; padding: 0; color: #aeb8a3; font-size: 9px; }
.text-action:hover { color: var(--accent); }
.profile-modal-actions { justify-content: space-between; }
.profile-modal-actions .ui-icon { width: 14px; height: 14px; margin-right: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.secondary-button { min-height: 35px; border: 1px solid #343c48; border-radius: 7px; background: transparent; padding: 0 12px; color: #c1c7d0; font-size: 10px; }
.secondary-button:hover { background: #202631; }
.modal .primary-button { min-height: 35px; }
.danger-action, .danger-action:hover { color: var(--danger); }
.danger-button { border-color: #663b40; background: #71363c; color: #fff; }
.danger-button:hover { background: #8a3d45; }
.call-mode-options { display: flex; gap: 9px; }
.call-mode-options > button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; }
.call-history-title { margin: 22px 0 8px; color: #818b99; font-size: 9px; letter-spacing: 1.2px; }
.call-history { display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.call-history-row { min-width: 0; display: flex; align-items: center; gap: 9px; border: 1px solid #2a313b; border-radius: 7px; padding: 8px; }
.call-history-icon { width: 27px; height: 27px; display: grid; flex: none; place-items: center; border-radius: 7px; background: #202a1b; color: var(--accent); }
.call-history-icon .ui-icon { width: 14px; height: 14px; }
.call-history-copy { min-width: 0; flex: 1; }
.call-history-copy strong, .call-history-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-history-copy strong { color: #e5e9ee; font-size: 10px; }
.call-history-copy small { margin-top: 3px; color: #8993a1; font-size: 9px; }
.call-history-row .small-action { flex: none; }
.call-stage { position: relative; min-height: 150px; display: grid; place-items: center; overflow: hidden; border: 1px solid #29313c; border-radius: 10px; background: radial-gradient(ellipse at 50% 40%, #252d38, #10141b 70%); }
.call-stage.call-ringing { animation: call-ring-pulse 1.5s ease-in-out infinite; }
@keyframes call-ring-pulse { 50% { border-color: #b9f36a; box-shadow: 0 0 22px #b9f36a36; } }
.call-avatar .avatar { width: 76px; height: 76px; border-radius: 24px; font-size: 22px; }
.call-stage audio { display: none; }
.call-modal-status { min-height: 17px; margin: 15px 0; color: #b9c1cb; text-align: center; font-size: 11px; }
.call-controls { display: flex; justify-content: center; gap: 14px; }
.call-control { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid #39414e; border-radius: 50%; background: #232a34; color: #f1f3f6; }
.call-control:hover { background: #303946; }
.call-control .ui-icon { width: 19px; height: 19px; }
.call-control.accept-call { border-color: #749b42; background: #769f40; color: #10170a; }
.call-control.accept-call:hover { background: #8bbd4b; }
.call-control.reject-call { border-color: #833b45; background: #a8404b; color: white; }
.call-control.reject-call:hover { background: #c24a56; }
.call-control.control-active { border-color: #8b4850; background: #63323a; color: #ffc4c8; }
.video-call-stage { min-height: 300px; aspect-ratio: 16 / 9; background: #080a0d; }
.group-call-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; max-height: min(55vh, 440px); overflow: auto; }
.group-call-tile { position: relative; min-height: 115px; overflow: hidden; border: 1px solid #303844; border-radius: 9px; background: #080a0d; }
.group-call-tile video { width: 100%; height: 100%; min-height: 115px; object-fit: cover; }
.group-call-tile video.audio-only-tile { opacity: .25; }
.group-call-tile span { position: absolute; right: 7px; bottom: 7px; left: 7px; color: white; font-size: 10px; text-shadow: 0 1px 4px #000; }
.modal:has(.group-call-grid) { width: min(760px, 100%); }
.call-remote-video { width: 100%; height: 100%; position: absolute; inset: 0; background: #080a0d; object-fit: contain; }
.call-local-video { width: 120px; height: 84px; position: absolute; right: 12px; bottom: 12px; border: 1px solid #ffffff50; border-radius: 7px; background: #141a22; object-fit: cover; }
.modal:has(.video-call-stage) { width: min(640px, 100%); }
.result-list { display: grid; gap: 8px; max-height: 270px; overflow-y: auto; margin-top: 13px; }
.result-row { display: flex; align-items: center; gap: 10px; border: 1px solid #2a313b; border-radius: 8px; padding: 9px; }
.result-row .result-info { min-width: 0; flex: 1; }
.result-info strong, .result-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-info strong { font-size: 10px; }.result-info small { margin-top: 3px; color: #818b99; font-size: 9px; }
.small-action { min-height: 28px; border: 1px solid #414b39; border-radius: 6px; background: #293321; padding: 0 9px; color: var(--accent); font-size: 9px; font-weight: 600; }
.small-action:disabled { border-color: #303741; background: #20252d; color: #818b99; cursor: default; }
.modal-note { margin-top: 14px; color: #737e8d; font-size: 9px; line-height: 1.55; }
.voice-modal-status { color: var(--accent); font-size: 11px; }
.connection-banner { position: fixed; right: 13px; bottom: 13px; z-index: 10; display: flex; align-items: center; gap: 7px; border: 1px solid #584a2d; border-radius: 7px; background: #1c1912; padding: 7px 10px; color: #e8c980; font-size: 9px; box-shadow: 0 4px 18px #0005; }
.connection-banner .banner-dot { width: 6px; height: 6px; border-radius: 50%; background: #eac476; }
.auth-form { display: grid; gap: 5px; }
.auth-tabs { display: flex; gap: 4px; margin-bottom: 15px; border-radius: 7px; background: #0c1015; padding: 3px; }
.auth-tab { flex: 1; border: 0; border-radius: 5px; background: transparent; padding: 8px; color: #87909e; font-size: 10px; }
.auth-tab.active { background: #232a34; color: #e6eaf0; }
.google-button { width: 100%; min-height: 39px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid #353d49; border-radius: 7px; background: #171c24; color: #e9edf2; font-size: 11px; font-weight: 600; }
.google-button:hover { border-color: #68717e; background: #1c222c; }
.google-logo { display: block; width: 18px; height: 18px; flex: 0 0 18px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 17px 0 13px; color: #717b89; font-size: 9px; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: #2a303a; content: ""; }
.auth-submit { width: 100%; justify-content: center; margin-top: 16px; }
.modal[aria-label="One last step"] .modal-note { margin-top: 10px; }
.sticker-upload { display: flex; align-items: center; gap: 11px; border: 1px dashed #414b39; border-radius: 8px; background: #171c18; padding: 12px; cursor: pointer; }
.sticker-upload > span:first-child { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: #2a3521; color: var(--accent); font-size: 19px; }
.sticker-upload > span:first-child .ui-icon { width: 19px; height: 19px; }
.sticker-upload strong, .sticker-upload small { display: block; }
.sticker-upload strong { color: #e5e9e1; font-size: 10px; }
.sticker-upload small { margin-top: 3px; color: #879184; font-size: 9px; }
.sticker-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.sticker-empty { grid-column: 1 / -1; margin: 7px 0; }
.sticker-item { position: relative; min-width: 0; text-align: center; }
.sticker-send { width: 100%; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border: 1px solid #2d3540; border-radius: 8px; background: #0e1218; padding: 5px; }
.sticker-send:hover { border-color: #697e4c; background: #171d14; }
.sticker-send img { width: 100%; height: 100%; object-fit: contain; }
.sticker-item > span { display: block; overflow: hidden; margin-top: 4px; color: #9da6b1; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.sticker-delete { position: absolute; top: -5px; right: -5px; width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid #3d4651; border-radius: 50%; background: #242a34; color: #e0a2a5; font-size: 12px; }
.request-decline { min-width: 26px; padding: 0 7px; color: #e1a0a3; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; max-height: 280px; overflow-y: auto; }
.emoji-choice { min-width: 0; aspect-ratio: 1; border: 1px solid transparent; border-radius: 7px; background: #171d25; font-size: 20px; }
.emoji-choice:hover { border-color: #546644; background: #222c1a; }
.emoji-custom { display: flex; gap: 7px; margin-top: 12px; }
.emoji-custom .field-input { min-width: 0; }
.emoji-custom .small-action { flex: none; }
.presence { flex: none; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 236px minmax(340px, 1fr); }
  .details-panel { display: none; }
  .app-shell.details-hidden { grid-template-columns: 236px minmax(340px, 1fr); }
}
@media (max-width: 700px) {
  .app-shell { grid-template-columns: 1fr; min-height: 0; }
  .sidebar { position: absolute; z-index: 5; inset: 0 auto 0 0; width: min(290px, 86vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: 10px 0 40px #0006; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-menu { display: grid !important; }
  .main-panel { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .mobile-tabs { position: fixed; z-index: 6; right: 0; bottom: 0; left: 0; height: calc(58px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); background: #10141b; padding: 5px 4px env(safe-area-inset-bottom); }
  .mobile-tab { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 7px; background: transparent; color: #8892a0; font-size: 9px; }
  .mobile-tab .ui-icon { width: 17px; height: 17px; }
  .mobile-tab.active { background: #1b222b; color: var(--accent); }
  .mobile-tab span { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
  .topbar { height: 53px; padding: 0 16px; }
  .encryption-status { display: none; }
  .chat-header { min-height: 68px; padding: 0 15px; }
  .chat-title-group { min-width: 0; gap: 8px; }
  .chat-title-group > div:last-child { min-width: 0; }
  .chat-title-group h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-header-actions { flex: none; gap: 2px; }
  .chat-header-actions .icon-button { flex-basis: 32px; width: 32px; height: 34px; }
  .message-area { padding: 15px 13px; }
  .scroll-latest-button { right: 10px; bottom: 9px; width: 34px; height: 34px; }
  .message-stack { max-width: 83%; }
  .composer-wrap { padding: 0 10px 11px; }
  .composer { gap: 5px; padding: 7px; }
  .composer-tools { gap: 0; }
  .message-actions { opacity: 1; }
  .emoji-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .character-count, .emoji-button { display: none; }
  .composer-footnote { padding-left: 2px; font-size: 8px; }
  .connection-banner { right: 8px; bottom: calc(66px + env(safe-area-inset-bottom)); }
  .pin-chat-button { opacity: .95; }
  body.demo-mode .connection-banner { bottom: calc(66px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .chat-title-group { gap: 8px; }
  .chat-header-actions .icon-button:nth-child(2) { display: none; }
  .mobile-tab { font-size: 8px; }
  .composer-tool { width: 24px; }
  .send-button { gap: 5px; padding: 0 8px; }
  .size-limit { display: none; }
}
