#messagesArea > .message:has(.reply-preview) { min-width: min(270px,78vw); width: fit-content !important; }
.reply-preview .reply-snippet { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; word-break: normal; overflow-wrap: normal; max-width: 100%; }
#sidebar .panel-close, #contactCard, #sidebar button, .context-menu { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#sidebar .panel-close { display: grid; place-items: center; }
.message-link { color: #5140b5; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; overflow-wrap: anywhere; border-radius: 3px; }
:root[data-theme="dark"] .message-link { color: #dacbff; }
.message-link:active { background: var(--accent-soft); }
.feature-dialog { position: fixed; inset: var(--app-top) 0 auto; height: var(--app-height); padding: 20px; z-index: 4900; display: grid; place-items: center; background: #09071588; }
.feature-dialog[hidden] { display: none; }
.feature-card { width: min(440px,100%); max-height: 100%; overflow-y: auto; padding: 24px; border-radius: 24px; background: var(--surface); color: var(--text); box-shadow: 0 12px 60px #0003; }
.feature-card h2 { margin: 0 0 12px; font-size: 21px; line-height: 1.4; }
.feature-card p { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0 0 16px; }
.feature-card .feature-actions { display: flex; gap: 10px; margin-top: 20px; }
.feature-card button { min-height: 44px; padding: 10px 16px; font: inherit; white-space: normal; }
.feature-card .feature-actions > * { flex: 1; }
#externalLinkAddress { display: block; padding: 12px; background: var(--surface-soft); border-radius: 12px; overflow-wrap: anywhere; font-size: 14px; user-select: text; }
#messagesArea .message:has(.pinger-audio) { min-width: min(280px,80vw); width: min(320px,80vw) !important; }
.pinger-audio { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 10px; align-items: center; width: 100%; padding: 4px 0; }
.pinger-audio audio { display: none; }
.pinger-audio .audio-toggle { width: 44px; height: 44px; padding: 11px; border-radius: 50%; border: 0; background: var(--action,var(--accent)); color: white; display: grid; place-items: center; }
.pinger-audio .audio-track { min-width: 0; }
.pinger-audio input { width: 100%; margin: 0; height: 30px; accent-color: var(--accent); display: block; padding: 0; }
.pinger-audio .audio-clock { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; line-height: 18px; font-variant-numeric: tabular-nums; }
.profile-details { padding: 0 20px 20px; overflow-wrap: anywhere; }
.profile-details dt { color: var(--muted); margin-top: 14px; font-size: 12px; }
.profile-details dd { color: var(--text); margin: 4px 0 0; line-height: 1.5; white-space: pre-wrap; }
.settings-section textarea, .settings-section input[type="date"] { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-soft); color: var(--text); font: inherit; font-size: 16px; box-sizing: border-box; }
.settings-section textarea { resize: vertical; min-height: 90px; }
.connection-status { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 12; max-width: calc(100% - 30px); border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px; background: var(--surface); color: var(--muted); font-size: 12px; box-shadow: 0 3px 12px #0001; }
.reaction-picker{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;padding:6px;min-width:278px}.reaction-picker[hidden]{display:none}.reaction-picker button{padding:8px 2px;border:0;border-radius:10px;background:transparent;font-size:24px;min-height:42px}.message-reactions{display:flex;flex-wrap:wrap;gap:5px;align-self:flex-start;margin-top:6px}.message-reactions button{color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:4px 8px;font-size:14px;min-height:30px}.message-reactions .is-mine{border-color:var(--accent);background:var(--accent-soft)}.channel-avatar{height:52px;width:52px;flex:0 0 52px;border-radius:50%;display:grid;place-items:center;background:#7763df;color:white;font-size:23px}.channel-members{font-size:13px;color:var(--muted);display:block}.channel-row .chat-item{width:100%;text-align:start}.channel-row .chat-right time{font-size:12px;color:var(--muted)}.channel-join-bar{padding:12px 16px calc(12px + var(--sab,0px));background:var(--surface);text-align:center;flex:0 0 auto}.channel-join-bar[hidden]{display:none}.channel-join-bar button{width:100%}.channel-readonly .input-area,.channel-readonly #sidebar-stickers,.channel-readonly #messageStylePanel,.channel-readonly .composer,.channel-readonly #composer,.channel-readonly .input-container{display:none!important}.is-channel #toggleMute,.is-channel #archive,.is-channel #clearChat,.is-channel #blockUser,.is-channel #deletechat,.is-channel #renameChat,.is-channel #callButton{display:none!important}body:not(.is-channel) #channelShare,body:not(.is-channel) #channelLeave{display:none!important}.is-channel #menuDropdown #channelLeave{display:block}.is-channel:not(.channel-readonly) #channelLeave{display:none!important}.channel-post{align-self:flex-start;max-width:min(88%,540px)!important;min-width:180px}.channel-post .chat-media-image{max-width:100%;border-radius:14px;display:block;max-height:400px;object-fit:contain}.channel-post .text-content{white-space:pre-wrap}.channel-address{display:flex;align-items:center;gap:2px;color:var(--muted);font-size:14px;min-width:0}.channel-address input{min-width:0;width:100%;flex:1}.channel-load-older{align-self:center;border:1px solid var(--border);border-radius:18px;color:var(--text);background:var(--surface);padding:8px 16px;margin:8px}.channel-load-older[hidden]{display:none}.channel-error{color:var(--danger)}.feature-card small{color:var(--muted)}.feature-card input,.feature-card textarea{box-sizing:border-box;width:100%;font:inherit;border:1px solid var(--border);border-radius:12px;color:var(--text);background:var(--surface-raised);padding:12px}.feature-card textarea{resize:vertical}.profile-details .ui-secondary{width:100%;margin-top:14px}.channel-post .upload-spinner{display:inline-block;width:18px;height:18px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:upload-spin .8s linear infinite}

.is-channel #presenceInline,.is-channel #typingIndicator{display:none!important}.channel-public-link{display:block;overflow-wrap:anywhere;color:var(--accent)}.profile-details p{white-space:pre-wrap}.profile-details h3{font-size:13px;color:var(--muted);font-weight:500;margin:16px 0 8px}
