/* Slack — main app styles. Aubergine sidebar, white chat pane. */
* { box-sizing: border-box; margin: 0; padding: 0; scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
[hidden] { display: none !important; }
:root {
  --aubergine:#350d36; --aubergine-2:#3f0e40; --hover:rgba(255,255,255,.12);
  --active:#1164a3; --ink:#1d1c1d; --muted:#616061; --line:#e2e2e2;
  --plum:#611f69; --green:#2eb67d; --red:#e01e5a;
}
html, body { height: 100%; }
body { font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
.icon-btn { width: 34px; height: 34px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.icon-btn:hover { background: var(--hover); }
.icon-btn.sm { width: 26px; height: 26px; font-size: 15px; }

.app { display: grid; grid-template-columns: 68px 260px 1fr; height: 100dvh; }
.app.thread-open { grid-template-columns: 68px 260px 1fr 380px; }

/* Rail */
.rail { background: var(--aubergine); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 10px; }
.rail-ws { width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--aubergine);
  font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.workspace-company-icon { display: grid; place-items: center; width: 100%; height: 100%; padding: 0; border-radius: inherit; }
.workspace-company-icon img { display: block; height: 100%; width: 100%; max-width: 100%; object-fit: contain; }
:is(.mobile-workspace-icon, .rail-ws):has(.workspace-company-icon) { background: transparent; }
.rail-btn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); color: #fff; font-size: 20px; }
.rail-spacer { flex: 1; }
.rail-avatar, .avatar { border-radius: 8px; color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; position: relative; flex: none; }
.rail-avatar { width: 40px; height: 40px; font-size: 14px; }
.avatar { width: 36px; height: 36px; font-size: 13px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; border-radius: 6px; }
.presence-symbol { position: relative; display: inline-block; flex-shrink: 0; width: var(--presence-size, 10px); height: var(--presence-size, 10px); color: #2bac76; vertical-align: middle; }
.presence-symbol::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; }
.presence-symbol.away { color: #9b9c9f; }
.presence-symbol.away::before { background: transparent; border: 2px solid currentColor; }
.presence-symbol.paused::before { border: 0; border-radius: 0; background: transparent url("../icons/mobile/presence-snoozed.png") center / contain no-repeat; }
.presence-symbol.away.paused::before { filter: grayscale(1); opacity: .8; }
.presence { position: absolute; right: -2px; bottom: -2px; --presence-size: 11px; border-radius: 50%; border: 2px solid var(--aubergine-2); }
.presence.paused { --presence-size: 16px; }

/* Sidebar */
.sidebar { background: var(--aubergine-2); color: #e8d5e8; display: flex; flex-direction: column; min-height: 0; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.ws-name { color: #fff; font-weight: 800; font-size: 17px; }
.sidebar-head .icon-btn { color: #fff; background: rgba(255,255,255,.15); border-radius: 50%; }
.sidebar-scroll { overflow-y: auto; padding: 10px 8px; flex: 1; }
.channel-group-title { padding: 12px 10px 4px; font-size: 12px; font-weight: 600; color: #cbb3cb; text-transform: uppercase; }
.side-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 6px 10px; border-radius: 6px; color: #e8d5e8; font-size: 15px; }
.side-item:hover { background: var(--hover); }
.side-item.subtle { opacity: .85; }
.side-section { display: flex; align-items: center; justify-content: space-between; padding: 16px 10px 4px; font-size: 13.5px; color: #cbb3cb; }
.side-section .icon-btn { color: #cbb3cb; }
.chan { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; padding: 5px 10px; border-radius: 6px; font-size: 15px; color: #e8d5e8; }
.chan:hover { background: var(--hover); }
.chan.active { background: var(--active); color: #fff; }
.chan .hash { opacity: .7; }
.chan .badge, .side-item .badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.chan.unread { font-weight: 700; color: #fff; }
.unread-dot { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: currentColor; }
.progressive-batch { display: contents; }
.progressive-more { display: block; min-height: 36px; margin: 12px auto; }
.sidebar-foot { padding: 10px; border-top: 1px solid rgba(255,255,255,.12); }
.profile-chip { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 600; width: 100%; text-align: left; }

/* Main pane */
.main { display: flex; flex-direction: column; min-width: 0; background: #fff; }
.main-head { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.main-head h2 { font-size: 17px; }
.pane-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw; }
.main-head-actions { margin-left: auto; display: flex; gap: 4px; }
.main-head .icon-btn:hover { background: #eee; }
.message-list { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.msg { display: flex; gap: 10px; padding: 6px 8px; border-radius: 8px; position: relative; }
.msg:hover { background: #f8f8f8; }
.msg-body { min-width: 0; flex: 1; }
.msg-meta { display: flex; gap: 8px; align-items: baseline; }
.msg-author { font-weight: 800; font-size: 15px; }
.msg-time { color: var(--muted); font-size: 12px; }
.msg-text { font-size: 15px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.msg-text code { background: #f4f4f4; border: 1px solid #ddd; border-radius: 4px; padding: 0 4px; font-size: 13.5px; }
.msg-text .mention { color: var(--active); background: #e8f3fb; border-radius: 4px; padding: 0 3px; font-weight: 600; }
.msg-actions { position: absolute; right: 10px; top: -12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; display: none; padding: 2px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.msg:hover .msg-actions { display: flex; }
.msg-actions button { padding: 4px 7px; border-radius: 6px; font-size: 14px; }
.msg-actions button:hover { background: #eee; }
.reactions { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.reaction { border: 1px solid var(--line); background: #f6f6f6; border-radius: 12px; padding: 1px 8px; font-size: 13px; }
.reaction.mine { border-color: var(--active); background: #e8f3fb; }
.thread-link { color: var(--active); font-size: 13px; margin-top: 4px; font-weight: 600; }
.pinned-tag { font-size: 12px; color: var(--muted); }
.empty-note { color: var(--muted); text-align: center; padding: 40px 20px; }

/* Composer */
.composer { padding: 10px 18px 16px; position: relative; }
.composer-box { border: 1px solid #b9b9b9; border-radius: 10px; overflow: hidden; }
.composer-tools { display: flex; gap: 2px; background: #f8f8f8; padding: 4px 8px; border-bottom: 1px solid #eee; }
.composer-tools button { padding: 4px 8px; border-radius: 5px; color: #444; }
.composer-tools button:hover { background: #e8e8e8; }
.composer textarea { width: 100%; border: 0; outline: none; resize: none; font: inherit; font-size: 15px; padding: 10px 12px; max-height: 140px; }
.send-btn { float: right; margin: 0 8px 8px; background: #007a5a; color: #fff; width: 34px; height: 30px; border-radius: 6px; }
.emoji-pop, .mention-pop { position: absolute; bottom: 92px; left: 26px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.15); padding: 8px; z-index: 30; max-width: 300px; }
.emoji-pop button { font-size: 20px; padding: 4px; }
.mention-pop button { display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: 6px; }
.mention-pop button:hover { background: #eee; }

/* Thread pane */
.thread { border-left: 1px solid var(--line); display: flex; flex-direction: column; background: #fff; min-width: 0; }
.thread-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.thread-head .icon-btn:hover { background: #eee; }

/* Modals */
.modal-back { position: fixed; inset: 0; background: rgba(29,28,29,.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 440px; max-height: 88dvh; overflow-y: auto; padding: 24px; }
.modal h3 { font-size: 20px; margin-bottom: 14px; }
.modal label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.modal input, .modal select { font: inherit; font-weight: 400; padding: 10px; border: 1px solid #999; border-radius: 6px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.btn { padding: 9px 16px; border-radius: 6px; font-weight: 700; }
.btn.primary { background: #007a5a; color: #fff; }
.btn.plain { border: 1px solid #bbb; }
.btn.danger { background: var(--red); color: #fff; }

/* Mobile */
.only-mobile { display: none; }
.bottom-nav { display: none; }
.mobile-shell { display: none; }
.mobile-overlay { display: none; }
.self-only { display: none; }
.conversation-only, .mobile-channel-tabs { display: none; }
.channel-member { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.huddle-button { background: #4a154b; }
.huddle-overlay { position: fixed; inset: 0; z-index: 60; background: #0009; display: flex; align-items: center; justify-content: center; padding: 20px; }
.huddle-dialog { --huddle-text: #f8f8f8; --huddle-link-background: transparent; --huddle-icon-filter: none; width: min(760px, 100%); height: min(680px, 90dvh); display: flex; flex-direction: column; border-radius: 8px; background: #1a1d21; color: var(--huddle-text); border: 1px solid #414348; overflow: hidden; }
.huddle-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; }
.huddle-heading h2 { font-size: 20px; overflow-wrap: anywhere; }
.huddle-heading p { color: #b9b9bd; font-size: 14px; margin-top: 5px; }
.huddle-controls { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 16px; }
.huddle-control { display: grid; place-items: center; width: 48px; height: 48px; background: #303338; border: 1px solid #555; border-radius: 50%; }
.huddle-control:disabled { opacity: .4; cursor: not-allowed; }
.huddle-control[aria-pressed=true] { background: #68404b; }
.huddle-leave { background: #b32d42; }
.huddle-error { padding: 12px 20px; background: #48282e; color: #f8f8f8; font-size: 14px; }
.huddle-link-fallback { display: flex; flex-direction: column; gap: 5px; padding: 0 20px 15px; font-size: 13px; }
.huddle-link-fallback input { padding: 8px; color: #fff; background: #303338; border: 1px solid #616061; border-radius: 4px; min-width: 0; }
.huddle-summary { position: fixed; right: 18px; bottom: calc(94px + env(safe-area-inset-bottom)); z-index: 47; max-width: calc(100% - 36px); display: flex; align-items: center; gap: 10px; padding: 10px 18px; color: #dfc8e6; background: #332537; border: 1px solid #604668; border-radius: 8px; text-align: left; }
.huddle-dialog { position: relative; }
.huddle-surface { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.huddle-heading > div { flex: 1; min-width: 0; }
.huddle-heading .huddle-leave { padding: 11px 18px; border-radius: 24px; font: inherit; font-size: 14px; font-weight: 700; color: #fff; background: #ce275b; }
.huddle-connected[data-theme=nature] .huddle-dialog { background: #8aa9af url('../icons/mobile/huddle-scene.jpg') center/cover no-repeat; }
.huddle-connected[data-theme=dark] .huddle-dialog { background: #242529; }
.huddle-connected[data-theme=light] .huddle-dialog { background: #d9eef0; }
.huddle-connected:is([data-theme=nature], [data-theme=light]) .huddle-dialog { --huddle-text: #1a1d21; --huddle-link-background: #ffffffd9; --huddle-icon-filter: brightness(0); }
.huddle-connected .huddle-heading { color: var(--huddle-text); text-shadow: none; }
.huddle-connected .huddle-heading p { color: var(--huddle-text); }
.huddle-heading .icon-btn img { filter: var(--huddle-icon-filter); }
.huddle-participants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; align-content: center; flex: 1; padding: 17px; min-height: 0; overflow-y: auto; }
.huddle-person-tile, .huddle-invite-tile { position: relative; aspect-ratio: 1; min-width: 0; border-radius: 18px; overflow: hidden; }
.huddle-person-tile { background: #f2c744; }
.huddle-person-tile > img { width: 100%; height: 100%; object-fit: cover; }
.huddle-person-tile > video { width: 100%; height: 100%; object-fit: cover; }
.huddle-person-tile > span { position: absolute; bottom: 10px; left: 9px; display: flex; align-items: center; gap: 5px; border-radius: 20px; background: #4c4c48; color: #fff; padding: 4px 10px; font-size: 13px; font-weight: 700; }
.huddle-person-tile > span img { width: 16px; height: 16px; }
.huddle-invite-tile { background: #242529b3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; font: inherit; font-size: 14px; font-weight: 700; }
.huddle-invite-tile img { width: 25px; height: 25px; }
.huddle-copy-link { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--huddle-text); background: var(--huddle-link-background); font: inherit; font-size: 13px; padding: 8px; }
.huddle-copy-link img { width: 18px; height: 18px; filter: var(--huddle-icon-filter); }
.huddle-options { position: absolute; inset: auto 0 0; background: #222529; color: #f8f8f8; border-radius: 18px 18px 0 0; max-height: 74%; overflow-y: auto; padding-bottom: max(18px, env(safe-area-inset-bottom)); z-index: 2; }
.huddle-options > header { display: flex; align-items: center; gap: 16px; padding: 22px 17px; }
.huddle-options header h2 { flex: 1; min-width: 0; font-size: 16px; }
.huddle-options header button { width: 24px; height: 24px; }
.huddle-option-row { display: flex; align-items: center; gap: 18px; width: 100%; color: inherit; padding: 16px 22px; font: inherit; font-size: 16px; text-align: left; text-decoration: none; min-height: 52px; }
.huddle-option-row > img { width: 21px; height: 21px; flex-shrink: 0; }
.huddle-option-row > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.huddle-option-row small { font-size: 13px; color: #b9b9bd; }
.huddle-option-row:disabled { opacity: .55; cursor: not-allowed; }
.huddle-options > h3, .huddle-options footer { padding: 22px 17px 12px; border-top: 1px solid #45474a; margin-top: 10px; font-size: 16px; }
.huddle-options footer { padding: 5px 0; }
.huddle-option-fields { padding: 10px 17px 24px; display: flex; flex-direction: column; gap: 18px; }
.huddle-option-fields label { display: flex; flex-direction: column; gap: 9px; font-size: 15px; }
.huddle-option-fields input, .huddle-option-fields select { background: #1a1d21; color: #f8f8f8; border: 1px solid #65676a; padding: 12px; font: inherit; min-width: 0; }
.huddle-option-fields button { background: #16835d; color: #fff; padding: 13px; border-radius: 8px; font: inherit; font-weight: 700; }
.huddle-option-fields p, .huddle-option-note { font-size: 14px; color: #b9b9bd; line-height: 1.5; }
.huddle-option-note { padding: 17px; }
.huddle-theme-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 17px; }
.huddle-theme-choices button { min-width: 0; color: #f8f8f8; font: inherit; font-size: 14px; }
.huddle-theme-choices img, .huddle-theme-choices span { display: block; width: 100%; height: 100px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; border: 1px solid #666; }
.huddle-theme-dark { background: #242529; }
.huddle-theme-light { background: #d9eef0; }
.huddle-reaction-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; padding: 17px 17px 35px; }
.huddle-reaction-grid button { font-size: 32px; width: 48px; height: 48px; }
.huddle-reaction-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.huddle-floating-reaction { position: absolute; left: 45%; bottom: 120px; font-size: 52px; animation: huddle-reaction-rise 2.5s ease-out forwards; }
@keyframes huddle-reaction-rise { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-200px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .huddle-floating-reaction { animation: none; } }
.huddle-chat-messages { max-height: 220px; overflow-y: auto; padding: 0 17px; }
.huddle-chat-messages p { display: flex; flex-direction: column; gap: 5px; padding: 10px 0; font-size: 14px; overflow-wrap: anywhere; }
.huddle-error button { margin-left: 12px; padding: 8px; color: inherit; text-decoration: underline; }
@media (max-width: 820px) {
  .huddle-overlay { padding: 0; }
  .huddle-overlay .huddle-dialog { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .huddle-heading { padding: max(52px, env(safe-area-inset-top)) 17px 24px; gap: 22px; }
  .huddle-heading h2 { font-size: 16px; font-weight: 400; }
  .huddle-heading p { font-size: 13px; color: #fff; }
  .huddle-controls { justify-content: space-between; gap: 14px; padding: 17px; }
  .huddle-control { width: 46px; height: 46px; background: #242529b3; border: none; }
  .huddle-copy-link { font-size: 12px; }
  .huddle-copy-link { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}
.personal-intro { padding: 24px; }
.personal-intro .mobile-person { display: none; }
.account-pages { position: fixed; inset: 0; z-index: 46; overflow-y: auto; background: #1a1d21; color: #f8f8f8; scrollbar-width: none; }
.account-page-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 27px; padding: 52px 18px 26px; min-height: 112px; background: inherit; border-bottom: 1px solid #383a3f; }
.account-page-header > button { width: 30px; height: 30px; display: grid; place-items: center; flex-shrink: 0; }
.account-page-header > h1 { flex: 1; min-width: 0; font-size: 20px; letter-spacing: 0; outline: none; }
.account-profile-main { padding: 17px 17px 12px; }
.account-profile-photo { aspect-ratio: 1; width: 100%; border-radius: 22px; overflow: hidden; background: var(--profile-color, #f2c744); margin-bottom: 16px; }
.account-profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.account-profile-main > h2 { font-size: 26px; line-height: 1.2; overflow-wrap: anywhere; margin: 14px 0 16px; }
.account-profile-job { color: #b9b9bd; margin: -5px 0 20px; }
.account-profile-line { display: flex; align-items: center; gap: 10px; font-size: 16px; margin: 16px 0; }
.account-profile-line img { width: 20px; height: 20px; flex-shrink: 0; }
.account-presence-line .presence-symbol { --presence-size: 12px; margin: 0 4px; }
.account-presence-line .presence-symbol.paused { --presence-size: 20px; margin: 0; }
.account-outline-button { display: block; width: 100%; min-height: 51px; margin-top: 10px; padding: 12px; border: 1px solid #484b50; border-radius: 14px; font: inherit; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.account-profile-status { color: #b9b9bd; padding: 12px 0 4px; overflow-wrap: anywhere; }
.account-contact { border-top: 1px solid #383a3f; padding: 24px 0 12px; }
.account-contact header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 17px 18px; }
.account-contact h2 { font-size: 17px; }
.account-contact header button { color: #2ba7c8; font-size: 16px; font-weight: 700; }
.account-contact-row { display: flex; align-items: center; gap: 26px; padding: 12px 24px 17px 28px; }
.account-contact-row img { width: 20px; height: 20px; flex-shrink: 0; }
.account-contact-row > span { flex: 1; min-width: 0; }
.account-contact-row strong { display: block; font-size: 18px; font-weight: 400; overflow-wrap: anywhere; }
.account-contact-row small { display: block; color: #b9b9bd; font-size: 15px; margin-top: 5px; }
.account-form-error { color: #f5b8b8; }
.mobile-shortcut-tabs { display: flex; border-bottom: 1px solid var(--mobile-line, #383a3f); min-height: 54px; }
.mobile-shortcut-tabs button { position: relative; flex: 1; min-width: 0; padding: 16px 8px; font-size: 16px; font-weight: 700; color: var(--mobile-muted, #b9b9bd); }
.mobile-shortcut-tabs button[aria-selected=true] { color: var(--mobile-text, #f8f8f8); }
.mobile-shortcut-tabs button[aria-selected=true]::after { content: ""; position: absolute; left: 25%; right: 25%; height: 3px; bottom: 0; border-radius: 3px 3px 0 0; background: #008b6b; }
.mobile-quick-tool { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; }
.mobile-quick-tool:disabled { opacity: .4; cursor: not-allowed; }
.mobile-overlay-create .mobile-dialog { position: fixed; inset: auto 17px calc(96px + env(safe-area-inset-bottom)); width: auto; max-width: none; max-height: calc(100dvh - 145px); padding: 16px; border: 1px solid #484b50; border-radius: 20px; transform: none; overflow-y: auto; }
.mobile-create-row { display: flex; align-items: center; gap: 18px; width: 100%; padding: 2px 0 23px; text-align: left; }
.mobile-create-icon { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; background: #38243e; border-radius: 8px; }
.mobile-create-icon img { width: 21px; height: 21px; }
.mobile-create-row > span:last-child { min-width: 0; }
.mobile-create-row strong { display: block; font-size: 16px; font-weight: 400; }
.mobile-create-row small { display: block; font-size: 14px; color: var(--mobile-muted, #b9b9bd); margin-top: 5px; line-height: 1.4; }
.mobile-create-message { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; background: #49134f; border-radius: 16px; font: inherit; font-size: 17px; font-weight: 700; }
.mobile-create-message img { width: 22px; height: 22px; }
.mobile-channel-intro { display: none; }
.avatar-photo, .mobile-message-day { display: none; }
.avatar-has-photo .avatar-photo { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar-has-photo .avatar-initials { display: none; }
.mobile-huddle-ready-tools { display: flex; justify-content: flex-end; gap: 22px; margin: 0 17px 5px; padding: 12px 20px; }
.mobile-huddle-ready-tools button { width: 28px; height: 28px; }
.mobile-huddle-ready-tools img { width: 24px; height: 24px; }
.mobile-huddle-ready { text-align: center; padding: 8px 17px 25px; }
.mobile-huddle-ready > img { width: 60px; height: 60px; background: #f2c744; border-radius: 14px; }
.mobile-huddle-ready h2 { font-size: 23px; line-height: 1.35; margin: 24px 0 10px; }
.mobile-huddle-ready p { font-size: 16px; line-height: 1.5; margin-top: 10px; }
.mobile-huddle-ready .mobile-green-button { display: flex; align-items: center; justify-content: center; gap: 13px; width: 100%; }
.mobile-huddle-ready button img { width: 24px; height: 24px; }
.mobile-recipient-search { display: flex; align-items: center; gap: 12px; padding: 15px 17px; border-bottom: 1px solid var(--mobile-line, #383a3f); font-size: 16px; }
.mobile-recipient-search input { min-width: 0; width: 100%; color: inherit; font: inherit; background: none; border: none; outline: none; }
#mobile-recipient-results .mobile-list-row small { display: block; font-size: 12px; padding-top: 5px; }
.mobile-member-choice { display: flex; align-items: center; gap: 12px; }
.mobile-member-choice > span:nth-child(2) { flex: 1; }
.mobile-member-choice input { width: 20px; height: 20px; accent-color: #2ba7c8; }
.mobile-panel-fields textarea { width: 100%; min-height: 100px; background: #222529; color: inherit; border: 1px solid #65676a; border-radius: 8px; padding: 12px; resize: vertical; font: inherit; }
@media (max-width: 820px) {
  .app.mobile-chat .mobile-channel-tabs { display: none; }
  .app.mobile-chat .main-head-actions #btn-search, .app.mobile-chat .main-head-actions #btn-pins { display: none; }
  .app.mobile-chat .mobile-conversation-title { border-radius: 14px; background: #212529; padding: 10px 12px; min-height: 44px; flex: 1; }
  .mobile-channel-summary { display: block; min-width: 0; text-align: left; }
  .mobile-channel-summary strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-channel-summary small { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 400; margin-top: 3px; }
  .mobile-channel-summary small img { width: 12px !important; height: 12px !important; }
  .app.mobile-chat .main-head { gap: 13px; }
  .mobile-channel-intro { display: block; padding: min(155px, 18dvh) 0 25px; }
  .mobile-channel-intro.mobile-channel-welcome { padding-top: 60px; }
  .mobile-channel-intro h2 { font-size: 22px; line-height: 1.35; margin-bottom: 20px; overflow-wrap: anywhere; }
  .mobile-channel-intro p { font-size: 16px; color: var(--mobile-muted); line-height: 1.6; margin: 0 0 18px; overflow-wrap: anywhere; }
  .mobile-channel-intro-action { display: flex; align-items: center; gap: 38px; width: 100%; text-align: left; text-decoration: none; color: inherit; }
  .mobile-channel-intro-action img { width: 22px; height: 22px; flex-shrink: 0; }
  .mobile-channel-intro-action > span { flex: 1; border-top: 1px solid var(--mobile-line); padding: 20px 0; font-size: 16px; }
  .app.mobile-chat .msg > .avatar { width: 42px; height: 42px; background: #f2c744 !important; border-radius: 10px; overflow: hidden; }
  .app.mobile-chat .msg .avatar-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
  .app.mobile-chat .msg .avatar-initials { display: none; }
  .app.mobile-chat .msg-consecutive > .avatar { visibility: hidden; }
  .app.mobile-chat .msg-consecutive .msg-meta { display: none; }
  .app.mobile-chat .msg-consecutive { padding-top: 3px; }
  .mobile-message-day { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
  .mobile-message-day::before, .mobile-message-day::after { content: ""; height: 1px; background: var(--mobile-line); flex: 1; }
  .mobile-message-day span { border: 1px solid var(--mobile-line); border-radius: 20px; padding: 5px 10px; font-size: 13px; font-weight: 700; }
}
.mobile-quick-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 28px 46px; min-height: 260px; }
.mobile-quick-empty > img { width: 108px; max-height: 140px; object-fit: contain; margin-bottom: 28px; }
.mobile-quick-empty > h2 { font-size: 20px; line-height: 1.4; max-width: 380px; margin-bottom: 16px; }
.mobile-quick-empty > h2:empty { display: none; }
.mobile-quick-empty > p { font-size: 16px; line-height: 1.5; color: var(--mobile-muted, #b9b9bd); max-width: 390px; }
.mobile-quick-filters { display: flex; flex-shrink: 0; gap: 9px; overflow-x: auto; padding: 15px 17px; scrollbar-width: none; overscroll-behavior-x: contain; }
.mobile-quick-filters button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; min-height: 40px; padding: 8px 12px; font: inherit; font-size: 13px; border: 1px solid var(--mobile-line, #383a3f); border-radius: 8px; color: var(--mobile-text, #f8f8f8); }
.mobile-quick-filters button img { width: 17px; height: 17px; }
.mobile-quick-filters button[aria-pressed=true] { background: #087da5; border-color: #087da5; color: #fff; }
.mobile-task-sort { padding: 0 17px 9px; }
.mobile-task-sort select { background: none; border: none; color: inherit; font: inherit; font-size: 14px; max-width: 100%; }
.mobile-task-sort option, .mobile-huddle-filters option { background: #222529; color: #f8f8f8; }
.mobile-file-row, .mobile-sent-row { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 15px 17px; text-align: left; color: inherit; text-decoration: none; }
.mobile-file-row > img { width: 24px; height: 24px; }
.mobile-file-row > span, .mobile-sent-row > span:nth-child(2) { flex: 1; min-width: 0; }
.mobile-file-row strong, .mobile-sent-row strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.mobile-file-row small, .mobile-sent-row small { display: block; font-size: 14px; margin-top: 7px; overflow-wrap: anywhere; line-height: 1.4; }
.mobile-file-row small, .mobile-sent-row time { color: var(--mobile-muted, #b9b9bd); }
.mobile-sent-row time { font-size: 12px; flex-shrink: 0; }
.mobile-sent-symbol { width: 39px; height: 39px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; background: #25282c; }
.mobile-sent-symbol img { width: 23px; height: 23px; }
.mobile-sent-date { padding: 20px 17px 6px; font-size: 14px; }
.mobile-scheduled-row { display: flex; align-items: center; gap: 12px; padding: 20px 17px; border-bottom: 1px solid var(--mobile-line, #383a3f); }
.mobile-scheduled-row > span { flex: 1; min-width: 0; }
.mobile-scheduled-row p { margin: 8px 0; overflow-wrap: anywhere; }
.mobile-scheduled-row small, .mobile-schedule-notice { color: var(--mobile-muted, #b9b9bd); font-size: 13px; line-height: 1.5; }
.mobile-schedule-notice { margin: 18px; }
.mobile-scheduled-row button img { width: 22px; height: 22px; }
.mobile-huddle-section { padding: 23px 17px 8px; }
.mobile-huddle-section h2 { font-size: 14px; margin-bottom: 20px; }
.mobile-huddle-section .mobile-list-row { padding: 12px 0; }
.mobile-huddle-section .mobile-list-row small { display: block; font-size: 12px; color: var(--mobile-muted, #b9b9bd); padding-top: 5px; }
.mobile-huddle-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.mobile-huddle-filters select { min-width: 0; max-width: 100%; background: none; color: inherit; border: 1px solid var(--mobile-line, #383a3f); border-radius: 8px; padding: 10px; font: inherit; font-size: 12px; }
.mobile-huddle-info { display: flex; align-items: flex-start; gap: 16px; background: #001c2c; border: 1px solid #003d58; border-radius: 8px; margin-top: 29px; padding: 16px; font-size: 14px; line-height: 1.5; }
.mobile-huddle-info img { width: 22px; height: 22px; flex-shrink: 0; }
.mobile-connect-notice { margin: 16px 17px; padding: 14px; border: 1px solid #5f4737; background: #302315; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.mobile-connect-learn { color: #2ba7c8; text-decoration: none; font-size: 15px; font-weight: 700; margin-top: 35px; line-height: 1.5; }
.mobile-empty-outline { font: inherit; font-size: 15px; border: 1px solid #484b50; border-radius: 8px; margin-top: 18px; padding: 12px 15px; }
.mobile-empty-outline:disabled, .mobile-quick-empty button:disabled { opacity: .65; cursor: not-allowed; }
.mobile-sheet-handle { display: block; height: 5px; width: 54px; background: #b9b9bd; border-radius: 6px; margin: 14px auto 10px; }
.mobile-overlay-sheet .mobile-dialog { position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: 90dvh; border-radius: 20px 20px 0 0; transform: none; overflow-y: auto; }
.mobile-overlay-sheet .mobile-panel-heading { padding-top: 13px; }
.mobile-quick-settings { padding: 7px 16px 20px; }
.mobile-quick-setting { display: flex; align-items: center; gap: 16px; min-height: 55px; padding: 8px 0; }
.mobile-quick-setting > img { width: 21px; height: 21px; flex-shrink: 0; }
.mobile-quick-setting > span { flex: 1; min-width: 0; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.mobile-quick-grip { width: 20px; flex-shrink: 0; touch-action: none; cursor: grab; }
.mobile-quick-grip img { width: 20px; height: 20px; opacity: .65; pointer-events: none; }
.mobile-quick-setting.is-dragging { background: #ffffff0c; }
.mobile-quick-setting .account-toggle { width: 50px; height: 30px; }
.mobile-quick-setting .account-toggle::before { width: 20px; height: 20px; top: 3px; left: 3px; }
.mobile-quick-setting .account-toggle:checked::before { left: 23px; }
.mobile-file-type-list { padding: 3px 17px 20px; }
.mobile-file-type-list label { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 0; font-size: 16px; }
.mobile-file-type-list input { width: 21px; height: 21px; accent-color: #2ba7c8; flex-shrink: 0; }
.mobile-sheet-done { color: #2ba7c8; font: inherit; font-size: 16px; font-weight: 700; display: block; padding: 10px 17px 20px; margin-left: auto; }
@media (max-width: 820px) {
  .mobile-shortcuts { scroll-snap-type: x proximity; scroll-padding-inline: 17px; overscroll-behavior-x: contain; }
  .mobile-shortcuts button { scroll-snap-align: start; user-select: none; }
  .mobile-shortcuts .mobile-shortcut-drafts { width: 135px; min-width: 135px; }
  .mobile-shortcuts .mobile-shortcut-assigned { width: 145px; min-width: 145px; }
  .mobile-shortcuts .mobile-shortcut-external { width: 175px; min-width: 175px; }
  .mobile-shortcuts .mobile-quick-config { width: 52px; min-width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; padding: 0; align-self: center; }
  .mobile-shortcuts .mobile-quick-config img { margin: 0; width: 22px; height: 22px; }
  .app.mobile-quick-view .bottom-nav { display: none; }
  .app.mobile-quick-view .mobile-shell { height: 100dvh; background: var(--mobile-bg); }
  .app.mobile-quick-view .mobile-header { align-items: center; flex-basis: 112px; gap: 30px; padding: 52px 17px 25px; border-bottom: 1px solid var(--mobile-line); }
  .app.mobile-quick-view .mobile-header h1 { font-size: 19px; font-weight: 700; }
  .app.mobile-quick-view .mobile-content { display: flex; flex-direction: column; border: 0; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
  .app.mobile-quick-view .mobile-shortcut-tabs { flex-shrink: 0; position: sticky; top: 0; background: var(--mobile-bg); z-index: 1; }
  .app.mobile-quick-view .mobile-draft { display: flex; align-items: center; gap: 20px; padding: 20px 17px; }
  .app.mobile-quick-view .mobile-draft > button:first-child { text-align: left; flex: 1; min-width: 0; }
  .app.mobile-quick-view .mobile-draft p { overflow-wrap: anywhere; font-size: 15px; margin-top: 10px; }
  .app.mobile-quick-view .mobile-draft img { width: 22px; height: 22px; }
  .mobile-screen-assigned .mobile-quick-empty img { width: 45px; height: 58px; }
  .mobile-screen-files .mobile-quick-empty img { width: 66px; height: 85px; margin-bottom: 20px; }
  .mobile-screen-external .mobile-quick-empty img { width: 112px; height: 110px; margin-bottom: 8px; }
}
.account-settings-section { padding: 22px 0 14px; border-bottom: 1px solid #383a3f; }
.account-settings-section h2 { font-size: 17px; margin: 0 17px 21px; }
.account-setting-row { display: flex; align-items: center; gap: 26px; width: 100%; text-align: left; padding: 16px 24px 17px 28px; color: inherit; text-decoration: none; min-height: 64px; }
.account-setting-row > img, .account-skin-icon { width: 20px; height: 20px; flex-shrink: 0; object-fit: contain; }
.account-skin-icon { font-size: 23px; line-height: 20px; }
.account-setting-copy { flex: 1; min-width: 0; }
.account-setting-copy strong { display: block; font-weight: 400; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.account-setting-copy small { display: block; font-size: 14px; line-height: 1.45; color: #b9b9bd; margin-top: 3px; overflow-wrap: anywhere; }
.account-toggle { appearance: none; -webkit-appearance: none; width: 56px; height: 34px; border-radius: 30px; background: #222529; border: 2px solid #74777b; position: relative; flex-shrink: 0; cursor: pointer; }
.account-toggle::before { content: ""; position: absolute; left: 5px; top: 5px; width: 20px; height: 20px; border-radius: 50%; background: #74777b; }
.account-toggle:checked { background: #2ba7c8; border-color: #2ba7c8; }
.account-toggle:checked::before { left: 27px; background: #fff; }
.account-toggle:focus-visible { outline: 2px solid #dfc8e6; outline-offset: 3px; }
.account-setting-row:disabled, .account-toggle:disabled { cursor: not-allowed; }
.account-setting-row:disabled, .account-setting-row.unavailable { opacity: .6; }
.account-choice-list { padding: 10px 0; }
.account-choice-list label { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; font-size: 16px; }
.account-choice-list input { accent-color: #2ba7c8; width: 18px; height: 18px; }
.account-empty { padding: 24px 18px; color: #b9b9bd; font-size: 15px; line-height: 1.5; }
body.settings-underline-links .msg-text a { text-decoration: underline; }
body:not(.settings-underline-links) .msg-text a { text-decoration: none; }
body.settings-reduce-motion *, body.settings-reduce-motion *::before, body.settings-reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-colour-mode=light] .account-pages { background: #fff; color: #1d1c1d; }
html[data-colour-mode=light] .account-setting-copy small, html[data-colour-mode=light] .account-profile-job { color: #616061; }
html[data-colour-mode=light] .account-settings-section, html[data-colour-mode=light] .account-contact, html[data-colour-mode=light] .account-page-header { border-color: #dedede; }
html[data-colour-mode=light] .account-pages img { filter: brightness(.2); }
html[data-colour-mode=light] .account-profile-photo img { filter: none; }
@media (max-width: 820px) {
  html[data-colour-mode=light] { --mobile-bg: #fff; --mobile-text: #1d1c1d; --mobile-muted: #616061; --mobile-line: #ddd; }
  html[data-colour-mode=light] .mobile-content, html[data-colour-mode=light] .bottom-nav, html[data-colour-mode=light] .main { color: #1d1c1d; background: #fff; }
  html[data-colour-mode=light] .mobile-content .mobile-icon, html[data-colour-mode=light] .bottom-nav img, html[data-colour-mode=light] .main-head img { filter: brightness(.3); }
  html[data-colour-mode=light] .mobile-tips .mobile-tip { background: #f2f2f2; color: #1d1c1d; }
  html[data-colour-mode=light] .mobile-tip small, html[data-colour-mode=light] .mobile-list-row, html[data-colour-mode=light] .mobile-empty p { color: #616061; }
  html[data-colour-mode=light] .mobile-dialog { background: #fff; color: #1d1c1d; }
}
@media (min-width: 821px) { .account-pages { inset: 30px max(24px, calc((100vw - 520px) / 2)); border: 1px solid #383a3f; border-radius: 8px; } }
@media (max-width: 820px) {
  .app, .app.thread-open { grid-template-columns: 1fr; }
  .rail, .sidebar { display: none; }
  .app.show-sidebar .sidebar { display: flex; position: fixed; inset: 0; z-index: 40; }
  .app.show-sidebar .main, .app.show-sidebar .rail { display: none; }
  .thread { position: fixed; inset: 0; z-index: 45; }
  .only-mobile { display: inline-flex; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav button { padding: 7px 0 5px; font-size: 19px; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted); }
  .bottom-nav button span { font-size: 10.5px; }
  .bottom-nav button.active { color: var(--plum); }
  .main { padding-bottom: 56px; }
}

@media (max-width: 820px) {
  :root { --mobile-bg: #1a1d21; --mobile-text: #f8f8f8; --mobile-muted: #b9b9bd; --mobile-line: #383a3f; --mobile-accent: #dfc8e6; }
  body { background: var(--mobile-bg); }
  .app, .app.thread-open { display: block; height: 100dvh; color: var(--mobile-text); }
  .app > .main, .app.show-sidebar > .sidebar { display: none; }
  .mobile-shell { display: flex; flex-direction: column; height: calc(100dvh - 86px - env(safe-area-inset-bottom)); background: linear-gradient(#411345, #230827 145px); }
  .mobile-header { display: flex; align-items: flex-end; flex: 0 0 106px; gap: 16px; padding: max(24px, env(safe-area-inset-top)) 17px 15px; min-width: 0; }
  .mobile-header h1 { font-size: 24px; font-weight: 750; line-height: 1.2; flex: 1; min-width: 0; letter-spacing: 0; }
  .mobile-workspace { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; }
  .mobile-workspace-icon { width: 34px; height: 34px; border-radius: 8px; background: #303438; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; flex-shrink: 0; }
  .mobile-workspace-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; font-size: 23px; }
  @media (max-width: 360px) {
    .mobile-header { gap: 12px; }
    .mobile-workspace { gap: 8px; }
    .mobile-workspace-name { font-size: 20px; }
  }
  .mobile-header .mobile-icon { width: 17px; height: 17px; flex-shrink: 0; }
  .mobile-header-tool { width: 34px; height: 34px; background: #ffffff0d; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
  .mobile-profile { width: 34px; height: 34px; flex-shrink: 0; }
  .mobile-person { --avatar-color: #f2c744; width: 26px; height: 26px; border-radius: 7px; background: var(--avatar-color); position: relative; display: inline-flex; flex-shrink: 0; }
  .mobile-person img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
  .mobile-profile .mobile-person { width: 34px; height: 34px; }
  .mobile-presence { position: absolute; right: -3px; bottom: -2px; --presence-size: 11px; background: var(--mobile-bg); border: 2px solid var(--mobile-bg); border-radius: 50%; }
  .mobile-menu-presence { --presence-size: 12px; margin: 4px; }
  .mobile-content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; background: var(--mobile-bg); border-radius: 14px 14px 0 0; border-top: 1px solid #484047; padding-bottom: 24px; scrollbar-width: none; }
  .mobile-content::-webkit-scrollbar, .mobile-shortcuts::-webkit-scrollbar, .mobile-filters::-webkit-scrollbar { display: none; }
  .mobile-icon { object-fit: contain; flex-shrink: 0; }
  .mobile-shortcuts { display: flex; gap: 9px; overflow-x: auto; padding: 17px; scrollbar-width: none; }
  .mobile-shortcuts button { width: 107px; min-width: 107px; height: 95px; border: 1px solid var(--mobile-line); border-radius: 12px; text-align: left; padding: 16px; display: flex; flex-direction: column; align-items: flex-start; color: var(--mobile-muted); }
  .mobile-shortcuts .mobile-icon { width: 20px; height: 20px; margin-bottom: 10px; }
  .mobile-shortcuts span { font-size: 13px; white-space: nowrap; }
  .mobile-shortcuts small { font-size: 12px; margin-top: 3px; }
  .mobile-section { border-top: 1px solid var(--mobile-line); padding: 6px 0 9px; }
  .mobile-channel-group h3 { padding: 13px 18px 4px; color: var(--mobile-muted); font-size: 13px; font-weight: 600; text-transform: uppercase; }
  .mobile-section-heading, .mobile-list-row { width: 100%; display: flex; align-items: center; gap: 20px; padding: 13px 18px; min-height: 47px; text-align: left; }
  .mobile-section-heading { gap: 18px; font-size: 13px; min-height: 51px; }
  .mobile-section-heading strong { flex: 1; display: flex; align-items: center; gap: 3px; }
  .mobile-section-heading strong .mobile-icon { width: 15px; height: 15px; }
  .mobile-section-heading > .mobile-icon:last-child { width: 18px; height: 18px; }
  .mobile-list-row { color: var(--mobile-muted); font-size: 16px; }
  .mobile-list-row span:not(.mobile-person):not(.mobile-presence) { min-width: 0; overflow-wrap: anywhere; }
  .mobile-list-row > .mobile-icon { width: 24px; height: 24px; opacity: .75; }
  .mobile-list-row > span:not(.mobile-person):not(.unread-dot) { flex: 1; }
  .mobile-list-row.is-unread { color: var(--mobile-text); font-weight: 700; }
  .mobile-list-row > .unread-dot, .mobile-conversation .unread-dot { flex: 0 0 8px; }
  .mobile-dm-section { padding-bottom: 12px; }
  .mobile-tips { padding: 6px 17px 70px; }
  .mobile-tips-heading { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 24px; }
  .mobile-tips h2, .mobile-recent-places h2 { font-size: 14px; font-weight: 700; }
  .mobile-tips-heading button { font-size: 14px; font-weight: 700; }
  .mobile-tip { display: flex; width: 100%; gap: 13px; align-items: center; text-align: left; background: #414141; border-radius: 12px; padding: 14px; margin-bottom: 17px; color: var(--mobile-text); text-decoration: none; min-height: 80px; }
  .mobile-tip > img { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
  .mobile-tip > span { min-width: 0; }
  .mobile-tip strong { display: block; font-size: 16px; line-height: 1.25; margin-bottom: 6px; }
  .mobile-tip small { display: block; color: #cbc5cf; font-size: 15px; line-height: 1.4; }
  .mobile-compose { position: fixed; right: 18px; bottom: calc(96px + env(safe-area-inset-bottom)); width: 60px; height: 60px; border: 1px solid #58325f; border-radius: 18px; display: grid; place-items: center; background: #421448; box-shadow: 0 4px 12px #0003; z-index: 36; }
  .bottom-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); height: calc(86px + env(safe-area-inset-bottom)); background: var(--mobile-bg); border-top: 1px solid var(--mobile-line); padding: 13px 0 max(14px, env(safe-area-inset-bottom)); color: var(--mobile-accent); }
  .bottom-nav button { padding: 0; gap: 5px; color: #c8b7cf; font-size: 14px; }
  .bottom-nav button > span:last-child { font-size: 12px; line-height: 1.4; }
  .mobile-tab-icon { display: grid; place-items: center; width: 60px; height: 35px; border-radius: 24px; }
  .bottom-nav button.active { color: #f0def5; font-weight: 700; }
  .bottom-nav button.active .mobile-tab-icon { background: #504d58; }
  .bottom-nav button.active img { filter: brightness(1.15); }
  .mobile-people { display: flex; padding: 17px 17px 34px; }
  .mobile-people > button { display: flex; flex-direction: column; gap: 9px; font-size: 14px; align-items: center; max-width: 100px; }
  .mobile-person.large { width: 60px; height: 60px; border-radius: 14px; }
  .mobile-filters { display: flex; gap: 9px; overflow-x: auto; padding: 17px; scrollbar-width: none; }
  .mobile-filters button { height: 43px; padding: 0 16px; border: 1px solid var(--mobile-line); border-radius: 11px; display: inline-flex; gap: 9px; align-items: center; color: #ebddef; font-size: 13px; white-space: nowrap; flex-shrink: 0; }
  .mobile-filters button:first-child { min-width: 50px; justify-content: center; }
  .mobile-screen-dms .mobile-filters button:first-child { min-width: 84px; }
  .mobile-filters button.selected { background: #421448; border-color: #633d69; font-weight: 700; }
  .mobile-screen-dms .mobile-filters { padding-top: 4px; }
  .mobile-screen-dms .mobile-empty { padding-left: 18px; padding-right: 18px; }
  .mobile-screen-dms .mobile-empty h2 { font-size: 19px; }
  .mobile-empty { text-align: center; padding: 52px 30px 36px; }
  .mobile-empty-art { object-fit: contain; width: 110px; height: 86px; margin-bottom: 25px; }
  .mobile-empty h2 { font-size: 20px; line-height: 1.25; margin-bottom: 14px; font-weight: 750; letter-spacing: 0; }
  .mobile-empty p { font-size: 16px; line-height: 1.5; color: var(--mobile-muted); }
  .mobile-green-button { background: #16835d; border-radius: 14px; padding: 16px 20px; font-size: 17px; font-weight: 700; margin-top: 20px; }
  .mobile-screen-activity { position: relative; display: flex; flex-direction: column; }
  .mobile-screen-activity > * { flex-shrink: 0; }
  .mobile-screen-activity .mobile-empty { margin-top: auto; margin-bottom: 27px; padding: 0 28px 35px; }
  .mobile-screen-activity .mobile-empty-art { margin-bottom: 30px; }
  .mobile-unread-button { align-self: flex-end; margin: 0 18px 4px; padding: 20px; font-size: 16px; font-weight: 700; border: 1px solid var(--mobile-line); border-radius: 40px; background: #222529; }
  .mobile-search-form { display: flex; align-items: center; gap: 15px; margin: 15px 13px 17px; padding: 13px 16px; height: 47px; background: #424348; border: 1px solid #525358; border-radius: 16px; }
  .mobile-search-form input { background: none; border: 0; outline: 0; color: #f5edf7; font: inherit; font-size: 16px; width: 100%; min-width: 0; }
  .mobile-search-form input::placeholder { color: #cbb9d2; opacity: 1; }
  .mobile-search-form .mobile-icon { width: 20px; height: 20px; }
  .mobile-search-recents { padding: 0 0 10px; border-bottom: 1px solid var(--mobile-line); }
  .mobile-search-recents .mobile-list-row { color: var(--mobile-text); padding: 19px 20px; gap: 17px; min-height: 51px; }
  .mobile-search-recents .mobile-list-row > .mobile-icon:last-child { width: 16px; height: 16px; }
  .mobile-recent-places { padding-top: 25px; }
  .mobile-recent-places h2 { margin: 0 17px 16px; }
  .mobile-recent-places .mobile-list-row { color: var(--mobile-text); }
  .mobile-conversation { display: flex; padding: 12px 17px; gap: 10px; }
  .mobile-conversation > button:first-child { display: flex; gap: 12px; text-align: left; flex: 1; min-width: 0; }
  .mobile-conversation strong, .mobile-conversation small { display: block; }
  .mobile-conversation small { color: var(--mobile-muted); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
  .mobile-vip[aria-pressed=true] { background: #421448; border-radius: 4px; }
  .mobile-extra-back { display: flex; align-items: center; gap: 10px; margin: 16px; color: var(--mobile-accent); }
  .mobile-empty-note { padding: 24px; color: var(--mobile-muted); }
  .mobile-todo-form { display: flex; gap: 12px; padding: 16px; }
  .mobile-todo-form input { flex: 1; min-width: 0; background: #303338; color: #fff; border: 1px solid #555; padding: 12px; border-radius: 6px; font: inherit; }
  .mobile-todo { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
  .mobile-todo span { flex: 1; overflow-wrap: anywhere; }
  .mobile-todo input:checked + span { text-decoration: line-through; color: var(--mobile-muted); }
  .mobile-extra-heading, .mobile-draft { margin: 18px; text-align: left; }
  .mobile-draft p { margin-top: 10px; color: var(--mobile-muted); }
  .mobile-message-results { padding: 10px; }
  .app.mobile-chat .mobile-shell { display: none; }
  .app.mobile-chat > .main { display: flex; height: calc(100dvh - 86px - env(safe-area-inset-bottom)); padding-bottom: 0; color: var(--mobile-text); background: var(--mobile-bg); }
  .main-head { background: #321036; border-color: var(--mobile-line); }
  .pane-sub, .empty-note, .msg-time { color: var(--mobile-muted); }
  .composer-box { border-color: #555; background: #222529; }
  .composer-tools { background: #222529; border-color: var(--mobile-line); }
  .composer textarea, #thread-input { color: var(--mobile-text); background: transparent; }
  .msg:hover, .msg-actions, .emoji-pop, .mention-pop { background: #303338; color: var(--mobile-text); }
  .reaction { color: var(--mobile-text); background: #303338; border-color: #555; }
  .thread { background: var(--mobile-bg); color: var(--mobile-text); bottom: 86px; border-color: var(--mobile-line); }
  .modal { background: #222529; color: var(--mobile-text); border: 1px solid #444; border-radius: 12px; }
  .modal input, .modal select { color: var(--mobile-text); background: #303338; border-color: #616061; }
  .mobile-overlay { position: fixed; inset: 0; display: block; z-index: 48; color: var(--mobile-text); }
  .mobile-dialog { position: absolute; right: 17px; top: 92px; width: min(300px, calc(100% - 34px)); background: #222529; border: 1px solid #414348; border-radius: 18px; overflow: hidden; box-shadow: 0 8px 22px #0004; max-height: calc(100dvh - 110px); overflow-y: auto; }
  .mobile-profile-summary { display: flex; align-items: flex-end; gap: 16px; width: 100%; text-align: left; padding: 18px 16px 15px; color: var(--mobile-muted); font-size: 14px; border-bottom: 1px solid var(--mobile-line); }
  .mobile-profile-summary .mobile-person { width: 34px; height: 34px; }
  .mobile-menu-row { display: flex; align-items: center; width: 100%; padding: 14px 16px; gap: 12px; text-align: left; font-size: 16px; color: var(--mobile-text); text-decoration: none; min-height: 47px; }
  .mobile-menu-row .mobile-icon { width: 20px; height: 20px; }
  .mobile-menu-row > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .mobile-menu-row > .presence-symbol { flex: none; }
  .mobile-menu-row small { display: block; color: var(--mobile-muted); font-size: 14px; line-height: 1.5; margin-top: 3px; }
  .mobile-notification-row { padding-top: 17px; padding-bottom: 17px; }
  .mobile-notification-row > .mobile-icon:last-child { width: 16px; height: 16px; }
  .mobile-menu-divider { border-top: 1px solid var(--mobile-line); }
  .mobile-menu-row:hover, .mobile-history-row:hover { background: #ffffff07; }
  .mobile-overlay-history .mobile-dialog { width: min(126px, calc(100% - 34px)); right: 69px; }
  .mobile-history-title { font-size: 14px; padding: 18px 16px 12px; }
  .mobile-history-row { display: flex; align-items: center; gap: 9px; padding: 14px 16px; width: 100%; text-align: left; border-top: 1px solid var(--mobile-line); font-size: 16px; }
  .mobile-history-row .mobile-person, .mobile-history-row .mobile-icon { width: 22px; height: 22px; }
  .mobile-history-row > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-overlay-workspaces { background: #0002; }
  .mobile-overlay-workspaces .mobile-dialog { display: flex; flex-direction: column; inset: 0 4px 0 0; width: auto; max-height: none; border: 0; border-radius: 0 20px 20px 0; padding-top: max(43px, env(safe-area-inset-top)); }
  .mobile-workspaces-heading { display: flex; align-items: center; gap: 12px; padding: 20px 16px 22px; }
  .mobile-workspaces-heading h2 { flex: 1; font-size: 20px; min-width: 0; }
  .mobile-link-button { color: #2da4d1; font-size: 16px; font-weight: 600; }
  .mobile-workspaces-heading .mobile-icon { width: 18px; height: 18px; }
  .mobile-workspace-list { flex: 1; overflow-y: auto; padding: 4px 0; }
  .mobile-workspace-entry { display: flex; align-items: center; gap: 12px; padding: 10px 24px; }
  .mobile-workspace-select { display: flex; flex: 1; align-items: center; text-align: left; min-width: 0; gap: 16px; padding: 6px; }
  .mobile-workspace-select .mobile-workspace-icon { width: 60px; height: 60px; font-size: 28px; border-radius: 16px; }
  .mobile-workspace-select .mobile-workspace-icon.selected { outline: 3px solid #fff; outline-offset: 4px; }
  .mobile-workspace-select > span:last-child { flex: 1; min-width: 0; }
  .mobile-workspace-select strong, .mobile-workspace-select small { display: block; overflow-wrap: anywhere; }
  .mobile-workspace-select strong { font-size: 16px; line-height: 1.3; margin-bottom: 4px; }
  .mobile-workspace-select small { font-size: 14px; color: var(--mobile-muted); }
  .mobile-workspace-entry > button:last-child { flex-shrink: 0; width: 24px; }
  .mobile-workspaces-footer { border-top: 1px solid var(--mobile-line); padding: 8px 0 max(6px, env(safe-area-inset-bottom)); }
  .mobile-workspaces-footer .mobile-menu-row { padding: 17px; gap: 17px; }
  .mobile-overlay-form { background: #0005; display: flex; align-items: center; justify-content: center; padding: 17px; }
  .mobile-overlay-form .mobile-dialog { position: relative; top: auto; right: auto; width: 100%; max-width: 360px; max-height: 85dvh; border-radius: 14px; }
  .mobile-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-bottom: 1px solid var(--mobile-line); }
  .mobile-panel-heading h2 { font-size: 18px; }
  .mobile-panel-heading .mobile-icon { width: 18px; height: 18px; }
  .mobile-panel-fields { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
  .mobile-panel-fields > label:not(.mobile-preference) { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
  .mobile-panel-fields input:not([type=checkbox]) { font: inherit; background: #303338; color: #fff; border: 1px solid #616061; border-radius: 4px; padding: 12px; min-width: 0; }
  .mobile-panel-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .mobile-panel-fields .mobile-green-button { margin-top: 0; border-radius: 8px; font-size: 15px; padding: 12px 16px; }
  .mobile-panel-fields p { color: var(--mobile-muted); }
  .mobile-preference { display: flex; justify-content: space-between; align-items: center; gap: 18px; font-size: 15px; padding: 6px 0; }
  .mobile-preference input { accent-color: #16835d; width: 18px; height: 18px; }
  .mobile-presence.paused { --presence-size: 16px; right: -6px; bottom: -4px; }
  .mobile-compact .mobile-list-row { min-height: 37px; padding-top: 8px; padding-bottom: 8px; }
  .mobile-hide-unread .mobile-unread { display: none; }
  .app.mobile-chat.mobile-self > .main { height: 100dvh; }
  .app.mobile-chat.mobile-self .bottom-nav { display: none; }
  .app.mobile-self .main-head { height: 103px; min-height: 103px; background: var(--mobile-bg); padding: max(36px, env(safe-area-inset-top)) 8px 8px 17px; align-items: flex-end; gap: 20px; }
  .app.mobile-self #btn-back { width: 24px; height: 43px; flex-shrink: 0; }
  .app.mobile-self .pane-heading, .app.mobile-self .main-head-actions { display: none; }
  .app.mobile-self .mobile-conversation-title { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; height: 43px; padding: 2px 8px 2px 2px; border-radius: 10px; background: #222529; text-align: left; }
  .mobile-conversation-title .mobile-person { width: 39px; height: 39px; border-radius: 10px; }
  .mobile-conversation-title > span:last-of-type { font-size: 15px; font-weight: 700; min-width: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
  .mobile-conversation-title > .mobile-icon { width: 16px; height: 16px; }
  .app.mobile-self #message-list { padding: 17px; }
  .app.mobile-self .personal-intro { margin-top: auto; padding: 0 0 26px; }
  .app.mobile-self .personal-intro .mobile-person { display: inline-flex; width: 60px; height: 60px; border-radius: 15px; margin-bottom: 20px; }
  .app.mobile-self .personal-intro .mobile-presence { display: none; }
  .personal-intro h2 { font-size: 20px; line-height: 1.3; margin-bottom: 20px; }
  .personal-intro > p { font-size: 16px; line-height: 1.5; color: var(--mobile-muted); min-height: 96px; }
  .personal-notice { display: flex; align-items: flex-start; gap: 12px; background: #2b190e; border: 1px solid #534330; border-radius: 10px; padding: 16px 20px; margin-top: 25px; }
  .personal-notice > span { background: #84368d; padding: 3px 5px; border-radius: 4px; font-size: 12px; flex-shrink: 0; }
  .personal-notice p { font-size: 13px; line-height: 1.5; color: #f7f4f0; }
  .app.mobile-self .composer { padding: 0; }
  .app.mobile-self .composer-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; min-height: 66px; border: 1px solid var(--mobile-line); border-radius: 20px 20px 0 0; background: var(--mobile-bg); padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .app.mobile-self .composer-tools { display: none; }
  .app.mobile-self.self-formatting .composer-tools { display: flex; width: 100%; }
  .app.mobile-self #composer-input { flex: 1; width: 0; min-width: 0; padding: 6px 0; font-size: 16px; line-height: 1.5; }
  .app.mobile-self #composer-input::placeholder { color: var(--mobile-muted); opacity: 1; }
  .app.mobile-self .mobile-self-add { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #272a2f; flex-shrink: 0; }
  .app.mobile-self .mobile-self-voice { display: grid; place-items: center; width: 26px; height: 38px; flex-shrink: 0; }
  .app.mobile-self #btn-send { display: none; }
  .app.mobile-self.has-compose-text #btn-send { display: block; float: none; margin: 0; flex-shrink: 0; }
  .app.mobile-self.has-compose-text .mobile-self-voice { display: none; }
  .app.mobile-chat > .main { height: 100dvh; }
  .app.mobile-chat .bottom-nav { display: none; }
  .app.mobile-chat .main-head { height: 103px; min-height: 103px; background: var(--mobile-bg); padding: max(36px, env(safe-area-inset-top)) 12px 8px 17px; align-items: flex-end; gap: 12px; }
  .app.mobile-chat #btn-back { width: 24px; height: 43px; flex-shrink: 0; }
  .app.mobile-chat .pane-heading { display: none; }
  .app.mobile-chat .mobile-conversation-title { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; height: 43px; padding: 2px 8px; border-radius: 10px; background: #222529; text-align: left; }
  .app.mobile-chat .main-head-actions { margin-left: 0; height: 43px; align-items: center; }
  .app.mobile-chat .main-head-actions #btn-search, .app.mobile-chat .main-head-actions #btn-pins { display: none; }
  .app.mobile-chat .huddle-button { background: #272a2f; border-radius: 50%; width: 38px; height: 38px; }
  .mobile-channel-tabs button { display: flex; align-items: center; gap: 7px; min-height: 43px; font-size: 13px; color: var(--mobile-muted); padding: 0 0 11px; border-bottom: 3px solid transparent; }
  .mobile-channel-tabs button.active { border-bottom-color: #dfc8e6; color: #dfc8e6; font-weight: 700; }
  .app.mobile-self .mobile-channel-tabs, .app.mobile-self .main-head-actions { display: none; }
  .app.mobile-chat .composer { padding: 0; }
  .app.mobile-chat .composer-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; min-height: 66px; border: 1px solid var(--mobile-line); border-radius: 20px 20px 0 0; background: var(--mobile-bg); padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .app.mobile-chat .composer-tools { display: none; }
  .app.mobile-chat.self-formatting .composer-tools { display: flex; width: 100%; }
  .app.mobile-chat #composer-input { flex: 1; width: 0; min-width: 0; padding: 6px 0; font-size: 16px; line-height: 1.5; }
  .app.mobile-chat #composer-input::placeholder { color: var(--mobile-muted); opacity: 1; }
  .app.mobile-chat .mobile-self-add { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #272a2f; flex-shrink: 0; }
  .app.mobile-chat .mobile-self-voice { display: grid; place-items: center; width: 26px; height: 38px; flex-shrink: 0; }
  .app.mobile-chat #btn-send { display: none; }
  .app.mobile-chat.has-compose-text #btn-send { display: block; float: none; margin: 0; flex-shrink: 0; }
  .app.mobile-chat.has-compose-text .mobile-self-voice { display: none; }
  .huddle-overlay { padding: 0; }
  .huddle-dialog { width: 100%; height: 100dvh; border-radius: 0; border: 0; }
}
