:root {
  color-scheme: dark;
  --base: #101011;
  --panel: #171718;
  --panel-raised: #1d1d1f;
  --panel-hover: #242426;
  --line: #2a2a2d;
  --line-soft: #222224;
  --text: #eeeef0;
  --muted: #929297;
  --dim: #66666c;
  --white: #f4f4f5;
  --green: #69c995;
  --danger: #df7174;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--base); color: var(--text); min-width: 360px; min-height: 100vh; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { display: grid; grid-template-columns: 68px 246px minmax(400px, 1fr) 228px; height: 100vh; min-height: 560px; overflow: hidden; background: var(--base); }
.server-rail { display: flex; align-items: center; flex-direction: column; gap: 11px; padding: 15px 0; background: #0c0c0d; border-right: 1px solid #1f1f21; }
.brand-mark, .server-button, .server-add, .rail-utility { border: 0; display: grid; place-items: center; cursor: pointer; }
.brand-mark { width: 42px; height: 42px; border-radius: 15px; color: #111; background: #eeeef0; transition: border-radius .16s, background .16s; }
.brand-mark:hover { border-radius: 12px; background: #fff; }
.brand-mark svg { width: 24px; height: 24px; }
.rail-divider { height: 1px; width: 29px; background: #2a2a2d; margin: 2px 0 1px; }
.server-button { position: relative; width: 42px; height: 42px; border-radius: 15px; background: #202022; color: #b9b9bd; font-size: 11px; font-weight: 700; letter-spacing: .04em; transition: border-radius .16s, background .16s; }
.server-button:hover { border-radius: 12px; background: #2d2d30; color: white; }
.server-button.selected { border-radius: 12px; background: #dedee0; color: #131315; }
.server-button.selected::before { position: absolute; content: ''; width: 3px; height: 21px; left: -13px; top: 10px; border-radius: 0 3px 3px 0; background: #f3f3f4; }
.server-add { width: 42px; height: 42px; border-radius: 15px; background: #1b1b1d; color: #aaaab0; font-size: 24px; font-weight: 300; }
.server-add:hover { border-radius: 12px; background: #29292b; color: white; }
.rail-spacer { flex: 1; }
.rail-utility { width: 32px; height: 32px; border: 1px solid #303033; border-radius: 50%; background: transparent; color: #a1a1a6; font-weight: 600; }

.channel-sidebar { display: flex; min-width: 0; flex-direction: column; background: #151516; border-right: 1px solid #242426; }
.community-heading { display: flex; align-items: center; gap: 11px; width: 100%; padding: 15px 14px; text-align: left; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; cursor: pointer; }
.community-heading:hover { background: #1a1a1b; }
.community-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 37px; height: 37px; border-radius: 12px; background: #303033; color: #f0f0f1; font-size: 11px; font-weight: 700; }
.community-title { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.community-title strong { overflow: hidden; color: #ececee; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.community-title small { color: #77777d; font-size: 11px; }
.chevron { align-self: flex-start; color: #77777d; font-size: 17px; }
.channel-list { padding: 19px 10px 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; height: 23px; padding: 0 5px; color: #77777c; font-size: 9px; font-weight: 700; letter-spacing: .11em; }
.section-heading button { width: 22px; height: 22px; border: 0; background: transparent; color: #77777d; cursor: pointer; font-size: 17px; }
.section-heading button:hover { color: #eeeef0; }
.channel-button, .voice-channel { display: flex; align-items: center; gap: 9px; width: 100%; height: 35px; margin-top: 3px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; color: #99999f; text-align: left; cursor: pointer; font-size: 12px; }
.channel-button:hover, .voice-channel:hover { background: #202022; color: #dfdfe2; }
.channel-button.active { background: #242426; color: #f1f1f2; }
.channel-hash { color: #717177; font-family: 'Space Grotesk', sans-serif; font-size: 17px; }
.channel-button.active .channel-hash { color: #d6d6d9; }
.channel-dot { width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: var(--green); }
.voice-heading { margin-top: 24px; }
.voice-channel { color: #adadb2; }
.voice-wave { width: 17px; color: #8f8f95; font-size: 11px; letter-spacing: -3px; }
.voice-count { display: grid; place-items: center; width: 18px; height: 18px; margin-left: auto; border-radius: 5px; background: #29292b; color: #b8b8bd; font-size: 10px; }
.voice-members { display: flex; align-items: center; gap: -3px; padding: 3px 0 6px 34px; }
.mini-avatar { display: grid; place-items: center; width: 19px; height: 19px; margin-left: -3px; border: 2px solid #151516; border-radius: 50%; color: #151516; font-size: 8px; font-weight: 700; }
.avatar-lia { background: #b9a8a0; }
.avatar-caio { background: #9da8b5; }
.voice-member-label { margin-left: 4px; color: #74747a; font-size: 10px; }
.sidebar-spacer { flex: 1; min-height: 14px; }
.connection-card { margin: 0 10px 9px; padding: 10px; border: 1px solid #303033; border-radius: 9px; background: #1a1a1c; }
.connection-status { display: flex; align-items: center; gap: 7px; color: #d4d4d7; font-size: 11px; }
.live-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px #69c99544; }
.connection-actions { display: flex; justify-content: space-between; margin-top: 10px; }
.connection-actions button { border: 0; background: transparent; color: #96969c; cursor: pointer; font-size: 10px; }
.connection-actions button:hover { color: white; }
.user-panel { display: flex; align-items: center; gap: 8px; min-height: 63px; padding: 9px 10px; border-top: 1px solid var(--line-soft); background: #111112; }
.self-avatar, .member-avatar { position: relative; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #161617; font-weight: 700; }
.self-avatar { width: 33px; height: 33px; background: #b5b5ba; font-size: 13px; }
.presence { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border: 2px solid #151516; border-radius: 50%; background: var(--green); }
.user-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.user-copy strong { font-size: 11px; font-weight: 600; }
.user-copy small { overflow: hidden; color: #77777d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.user-control { display: grid; place-items: center; width: 26px; height: 29px; border: 0; border-radius: 6px; background: transparent; color: #87878d; cursor: pointer; }
.user-control:hover { background: #252527; color: white; }
.user-control svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.user-control.is-active { color: var(--green); background: #202922; }
.user-control.is-muted { color: var(--danger); background: #2d2021; }

.chat-column { position: relative; display: flex; min-width: 0; flex-direction: column; background: #111112; }
.chat-topbar { z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 68px; min-height: 68px; padding: 0 22px; border-bottom: 1px solid #242426; background: #111112; }
.current-channel { display: flex; align-items: center; gap: 11px; min-width: 0; }
.top-hash { color: #7c7c82; font-family: 'Space Grotesk', sans-serif; font-size: 25px; }
.current-channel h1 { margin: 0; color: #f0f0f1; font-family: 'Space Grotesk', 'Segoe UI', sans-serif; font-size: 14px; font-weight: 600; }
.current-channel p { margin: 3px 0 0; color: #77777d; font-size: 10px; }
.current-channel > div { min-width: 0; }
.current-channel h1, .current-channel p {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.online-pill { display: flex; align-items: center; gap: 7px; margin-right: 2px; color: #a5a5aa; font-size: 10px; white-space: nowrap; }
.online-pill .live-dot { width: 6px; height: 6px; }
.icon-button { display: grid; place-items: center; width: 31px; height: 31px; border: 0; border-radius: 7px; background: transparent; color: #88888e; cursor: pointer; font-size: 21px; }
.icon-button:hover { background: #222224; color: #e4e4e6; }
.share-button { display: flex; align-items: center; gap: 7px; height: 32px; margin-left: 5px; padding: 0 10px; border: 1px solid #38383b; border-radius: 7px; background: #1c1c1e; color: #e2e2e4; cursor: pointer; font-size: 10px; font-weight: 600; white-space: nowrap; }
.share-button:hover { border-color: #525256; background: #252527; }
.share-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.conversation { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow: auto; padding: 22px 24px 12px; scrollbar-color: #38383b transparent; scrollbar-width: thin; }
.channel-welcome { padding: 20px 0 22px; }
.welcome-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 13px; border: 1px solid #343437; border-radius: 14px; background: #1b1b1d; color: #d5d5d8; font-family: 'Space Grotesk', sans-serif; font-size: 25px; }
.channel-welcome h2 { margin: 0; color: #e9e9eb; font-family: 'Space Grotesk', 'Segoe UI', sans-serif; font-size: 20px; letter-spacing: -.03em; }
.channel-welcome h2 span { color: #aaaab0; }
.channel-welcome p { margin: 7px 0 0; color: #77777d; font-size: 11px; }
.day-divider { display: flex; align-items: center; gap: 13px; margin: 0 0 17px; color: #68686e; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.day-divider::before, .day-divider::after { height: 1px; flex: 1; background: #252527; content: ''; }
.message-list { display: flex; flex-direction: column; gap: 19px; }
.message { display: flex; gap: 11px; align-items: flex-start; }
.message-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 12px; color: #171718; font-size: 11px; font-weight: 700; }
.message-avatar.avatar-felipe { background: #b5b5ba; }
.message-avatar.avatar-lia { background: #b9a8a0; }
.message-avatar.avatar-caio { background: #9da8b5; }
.message-avatar.avatar-other, .member-avatar.avatar-other { background: linear-gradient(145deg, #c5c5ca, #85858c); }
.message-body { min-width: 0; padding-top: 1px; }
.message-heading { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.message-heading strong { color: #e5e5e7; font-size: 11px; font-weight: 600; }
.message-heading time { color: #66666c; font-size: 9px; }
.message-text { margin: 0; color: #b7b7bc; font-size: 11px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-image { display: block; max-width: min(380px, 100%); max-height: 260px; margin-top: 9px; border: 1px solid #343437; border-radius: 9px; object-fit: contain; background: #19191b; }
.message-reactions { display: flex; gap: 5px; margin-top: 7px; }
.reaction { padding: 3px 7px; border: 1px solid #2d2d30; border-radius: 12px; background: #1a1a1c; color: #a9a9ae; font-size: 9px; }
.composer-wrap { padding: 10px 20px 11px; background: linear-gradient(0deg, #111112 76%, #11111200); }
.composer { display: flex; align-items: center; gap: 9px; min-height: 45px; padding: 5px 7px; border: 1px solid #323235; border-radius: 10px; background: #1b1b1d; transition: border-color .16s, box-shadow .16s; }
.composer:focus-within { border-color: #535358; box-shadow: 0 0 0 2px #ffffff08; }
.attach-button, .emoji-button { display: grid; place-items: center; flex: 0 0 auto; width: 29px; height: 29px; border: 0; border-radius: 7px; background: transparent; color: #8c8c92; cursor: pointer; }
.attach-button { font-size: 23px; font-weight: 300; }
.emoji-button { font-size: 16px; }
.attach-button:hover, .emoji-button:hover { background: #2a2a2d; color: white; }
.composer-input-label { min-width: 0; flex: 1; }
.composer input[type="text"] { width: 100%; border: 0; outline: 0; background: transparent; color: #e5e5e7; font-size: 11px; }
.composer input::placeholder { color: #6f6f75; }
.send-button { display: grid; place-items: center; width: 31px; height: 31px; border: 0; border-radius: 7px; background: #d7d7d9; color: #151516; cursor: pointer; }
.send-button:hover { background: white; }
.send-button svg { width: 16px; height: 16px; fill: currentColor; }
.prototype-note { margin: 7px 0 0; color: #57575d; text-align: center; font-size: 9px; }
.screen-preview { position: absolute; z-index: 3; right: 17px; bottom: 83px; width: min(360px, calc(100% - 34px)); padding: 9px; border: 1px solid #454548; border-radius: 11px; background: #1a1a1c; box-shadow: 0 14px 50px #0009; }
.screen-preview[hidden] { display: none; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; padding: 1px 2px 8px; color: #d5d5d8; font-size: 10px; }
.preview-heading > span { display: flex; align-items: center; gap: 7px; }
.preview-heading button { width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: #a0a0a5; cursor: pointer; font-size: 18px; }
.preview-heading button:hover { background: #303033; color: white; }
.screen-preview video { display: block; width: 100%; max-height: 220px; border-radius: 6px; background: #09090a; object-fit: contain; }
.screen-preview p { margin: 7px 2px 1px; color: #76767c; font-size: 9px; }

.member-sidebar { padding: 20px 13px; border-left: 1px solid #242426; background: #131314; }
.member-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; color: #818187; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.member-total { display: grid; place-items: center; width: 19px; height: 18px; border-radius: 5px; background: #222224; color: #9b9ba1; font-size: 9px; letter-spacing: 0; }
.member-group-title { margin: 0 0 11px 4px; color: #69696f; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.member-row { display: flex; align-items: center; gap: 9px; min-height: 47px; padding: 5px 4px; border-radius: 7px; }
.member-row:hover { background: #1c1c1e; }
.member-avatar { width: 29px; height: 29px; font-size: 11px; }
.member-avatar .presence { width: 9px; height: 9px; border-color: #131314; }
.avatar-felipe { background: #b5b5ba; }
.member-row > div:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.member-row strong { color: #c9c9cc; font-size: 10px; font-weight: 500; }
.member-row small { overflow: hidden; color: #717177; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.you-badge { color: #77777d; font-size: 7px; font-weight: 700; letter-spacing: .08em; }
.member-divider { height: 1px; margin: 19px 1px; background: #29292b; }
.voice-call-card { padding: 11px 10px 10px; border: 1px solid #2b2b2e; border-radius: 9px; background: #19191b; }
.call-card-top { display: flex; align-items: center; gap: 7px; color: #d1d1d4; font-size: 10px; font-weight: 600; }
.call-wave { color: #929298; font-size: 11px; letter-spacing: -3px; }
.voice-call-card p { margin: 5px 0 10px 19px; color: #77777d; font-size: 9px; }
.join-call-button { width: 100%; height: 29px; border: 1px solid #39393c; border-radius: 6px; background: #242426; color: #d5d5d7; cursor: pointer; font-size: 9px; font-weight: 600; }
.join-call-button:hover { background: #303033; }
.join-call-button span { margin-right: 4px; color: #aaaab0; }
.toast { position: fixed; z-index: 10; bottom: 23px; left: 50%; max-width: min(440px, calc(100vw - 30px)); padding: 10px 14px; transform: translate(-50%, 12px); border: 1px solid #39393c; border-radius: 8px; background: #242426; color: #e9e9eb; box-shadow: 0 8px 30px #0008; font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (max-width: 1150px) {
  .app-shell { grid-template-columns: 62px 225px minmax(360px, 1fr); }
  .member-sidebar { display: none; }
}
@media (max-width: 760px) {
  body { min-width: 360px; }
  .app-shell { grid-template-columns: 54px minmax(0, 1fr); }
  .server-rail { padding-top: 11px; }
  .brand-mark, .server-button, .server-add { width: 37px; height: 37px; }
  .channel-sidebar { display: none; }
  .chat-topbar { height: 60px; min-height: 60px; padding: 0 13px; }
  .online-pill, #membersButton { display: none; }
  .current-channel p { display: block; }
  .share-button { width: 33px; justify-content: center; padding: 0; }
  .share-button span { display: none; }
  .conversation { padding: 16px 14px 10px; }
  .channel-welcome { padding-top: 12px; }
  .channel-welcome h2 { font-size: 17px; }
  .composer-wrap { padding: 9px 11px 10px; }
}

@media (max-width: 1150px) {
  .app-shell.mobile-members-open .member-sidebar { position: absolute; z-index: 8; top: 72px; right: 10px; bottom: 10px; display: block; width: min(250px, calc(100vw - 78px)); border: 1px solid rgba(255, 255, 255, .14); border-radius: 13px; background: rgba(23, 23, 26, .94); box-shadow: 0 18px 48px #0009; backdrop-filter: blur(25px); }
}
@media (max-width: 760px) {
  #membersButton { display: grid; }
  .app-shell.mobile-members-open .member-sidebar { top: 61px; right: 7px; bottom: 7px; }
}

/* Camada visual: vidro fosco escuro, com referências de interface macOS. */
:root {
  --base: #09090b;
  --panel: rgba(24, 24, 27, .61);
  --panel-raised: rgba(34, 34, 38, .68);
  --panel-hover: rgba(55, 55, 60, .58);
  --line: rgba(255, 255, 255, .12);
  --line-soft: rgba(255, 255, 255, .075);
  --text: #f4f4f5;
  --muted: #a4a4aa;
  --dim: #77777f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 18% 14%, rgba(113, 113, 122, .17), transparent 34%),
    radial-gradient(ellipse at 82% 82%, rgba(77, 77, 86, .16), transparent 38%),
    linear-gradient(135deg, #080809 0%, #111113 48%, #09090b 100%);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: -18%;
  background:
    radial-gradient(ellipse at 30% 35%, rgba(255, 255, 255, .055), transparent 21%),
    radial-gradient(ellipse at 72% 25%, rgba(168, 168, 178, .065), transparent 24%),
    radial-gradient(ellipse at 69% 77%, rgba(255, 255, 255, .035), transparent 26%);
  content: "";
  filter: blur(45px);
  pointer-events: none;
}

.app-shell {
  position: relative;
  height: calc(100vh - 28px);
  margin: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 23px;
  background: rgba(20, 20, 23, .48);
  box-shadow: 0 36px 100px rgba(0, 0, 0, .66), 0 8px 28px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .11);
  backdrop-filter: blur(34px) saturate(145%);
  -webkit-backdrop-filter: blur(34px) saturate(145%);
}

.server-rail {
  background: rgba(10, 10, 12, .48);
  border-right-color: rgba(255, 255, 255, .075);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
}

.channel-sidebar {
  background: rgba(24, 24, 27, .48);
  border-right-color: rgba(255, 255, 255, .08);
  backdrop-filter: blur(28px) saturate(130%);
  -webkit-backdrop-filter: blur(28px) saturate(130%);
}

.chat-column { background: rgba(15, 15, 17, .28); }
.member-sidebar {
  background: rgba(23, 23, 26, .48);
  border-left-color: rgba(255, 255, 255, .08);
  backdrop-filter: blur(28px) saturate(130%);
  -webkit-backdrop-filter: blur(28px) saturate(130%);
}

.chat-topbar {
  background: rgba(17, 17, 19, .36);
  border-bottom-color: rgba(255, 255, 255, .09);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.community-heading { border-bottom-color: rgba(255, 255, 255, .07); }
.community-heading:hover { background: rgba(255, 255, 255, .035); }
.community-avatar { border: 1px solid rgba(255, 255, 255, .11); background: linear-gradient(145deg, #4b4b50, #28282c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13); }
.brand-mark { border: 1px solid rgba(255, 255, 255, .22); background: linear-gradient(145deg, #fafafa, #c9c9cc); box-shadow: 0 4px 14px rgba(0, 0, 0, .3), inset 0 1px 0 #fff; }
.brand-mark:hover { background: linear-gradient(145deg, #fff, #e5e5e7); }
.server-button { border: 1px solid rgba(255, 255, 255, .065); background: rgba(255, 255, 255, .065); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.server-button:hover { background: rgba(255, 255, 255, .13); }
.server-button.selected { border-color: rgba(255, 255, 255, .42); background: linear-gradient(145deg, #f4f4f5, #c9c9cd); box-shadow: 0 5px 18px rgba(0, 0, 0, .3), inset 0 1px 0 #fff; }
.server-button.selected::before { background: #f5f5f6; box-shadow: 0 0 12px rgba(255, 255, 255, .28); }
.server-add { border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .045); }
.server-add:hover { background: rgba(255, 255, 255, .12); }
.rail-divider { background: rgba(255, 255, 255, .14); }

.channel-button, .voice-channel { transition: background .18s ease, color .18s ease, transform .18s ease; }
.channel-button:hover, .voice-channel:hover { background: rgba(255, 255, 255, .065); }
.channel-button.active { background: linear-gradient(100deg, rgba(255, 255, 255, .105), rgba(255, 255, 255, .045)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .045); }
.channel-button.active .channel-hash { color: #e5e5e7; }
.voice-channel.active { background: rgba(105, 201, 149, .09); color: #d7e8dc; box-shadow: inset 0 0 0 1px rgba(105, 201, 149, .12); }
.member-avatar.avatar-other { background: linear-gradient(145deg, #c5c5ca, #85858c); }

.user-panel { border-top-color: rgba(255, 255, 255, .075); background: rgba(9, 9, 11, .27); }
.self-avatar, .message-avatar, .member-avatar { box-shadow: 0 3px 10px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .2); }
.user-control { transition: background .16s ease, color .16s ease; }
.user-control:hover { background: rgba(255, 255, 255, .09); }

.icon-button { border: 1px solid transparent; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.icon-button:hover { border-color: rgba(255, 255, 255, .09); background: rgba(255, 255, 255, .075); }
.share-button { border-color: rgba(255, 255, 255, .15); background: linear-gradient(180deg, rgba(255, 255, 255, .105), rgba(255, 255, 255, .045)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 3px 9px rgba(0, 0, 0, .14); transition: .18s ease; }
.share-button:hover { border-color: rgba(255, 255, 255, .23); background: rgba(255, 255, 255, .14); transform: translateY(-1px); }
.share-button.is-active { border-color: rgba(105, 201, 149, .32); background: rgba(105, 201, 149, .12); color: #d8f1e2; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 20px rgba(105, 201, 149, .07); }
.resolution-control { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 9px; border: 1px solid rgba(255, 255, 255, .11); border-radius: 7px; background: rgba(255, 255, 255, .045); color: #929298; font-size: 9px; white-space: nowrap; }
.resolution-control select { min-width: 54px; border: 0; outline: 0; background: transparent; color: #e2e2e4; cursor: pointer; font: inherit; font-size: 10px; font-weight: 600; }
.resolution-control option { background: #202022; color: #f0f0f1; }
.resolution-control:focus-within { border-color: rgba(255, 255, 255, .25); }

.conversation { scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.welcome-icon { border-color: rgba(255, 255, 255, .14); background: linear-gradient(145deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .035)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .11), 0 8px 24px rgba(0, 0, 0, .18); }
.day-divider::before, .day-divider::after { background: rgba(255, 255, 255, .085); }
.message { animation: message-arrive .24s ease both; }
@keyframes message-arrive { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.message-avatar { border-radius: 13px; }
.message-text { color: #c4c4c9; line-height: 1.65; }
.message-image { border-color: rgba(255, 255, 255, .15); box-shadow: 0 8px 28px rgba(0, 0, 0, .28); }
.reaction { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .055); }

.composer-wrap { background: linear-gradient(0deg, rgba(13, 13, 15, .6) 70%, transparent); }
.composer { min-height: 48px; border-color: rgba(255, 255, 255, .15); border-radius: 13px; background: rgba(34, 34, 38, .68); box-shadow: 0 8px 28px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .075); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.composer:focus-within { border-color: rgba(255, 255, 255, .28); box-shadow: 0 0 0 3px rgba(255, 255, 255, .045), 0 8px 28px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .09); }
.attach-button, .emoji-button { border-radius: 9px; }
.attach-button:hover, .emoji-button:hover { background: rgba(255, 255, 255, .09); }
.send-button { border: 1px solid rgba(255, 255, 255, .7); background: linear-gradient(145deg, #f8f8f9, #c9c9ce); box-shadow: 0 3px 10px rgba(0, 0, 0, .25), inset 0 1px 0 #fff; transition: transform .16s ease, filter .16s ease; }
.send-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.prototype-note { color: #77777e; }

.connection-card, .voice-call-card, .screen-preview { border-color: rgba(255, 255, 255, .13); background: rgba(34, 34, 38, .56); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 8px 25px rgba(0, 0, 0, .15); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); }
.connection-actions button, .join-call-button { transition: background .16s ease, border-color .16s ease; }
.join-call-button { border-color: rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .075); }
.join-call-button:hover { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .12); }
.member-row { transition: background .16s ease; }
.member-row:hover { background: rgba(255, 255, 255, .045); }
.member-divider { background: rgba(255, 255, 255, .09); }
.member-heading { margin-bottom: 24px; }
.member-total { border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .055); }
.app-shell.members-collapsed { grid-template-columns: 68px 246px minmax(400px, 1fr); }
.app-shell.members-collapsed .member-sidebar { display: none; }
.message.search-match { padding-left: 7px; border-left: 2px solid rgba(235, 235, 239, .7); border-radius: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, .045), transparent 75%); }
.screen-preview { box-shadow: 0 20px 65px rgba(0, 0, 0, .58), inset 0 1px 0 rgba(255, 255, 255, .08); }
.screen-preview video { border: 1px solid rgba(255, 255, 255, .09); }
.toast { border-color: rgba(255, 255, 255, .15); background: rgba(39, 39, 43, .87); box-shadow: 0 13px 45px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .08); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }

@media (max-width: 1150px) {
  .app-shell { margin: 10px; height: calc(100vh - 20px); border-radius: 19px; }
  .app-shell.members-collapsed { grid-template-columns: 62px 225px minmax(360px, 1fr); }
}
@media (max-width: 760px) {
  .app-shell { margin: 6px; height: calc(100vh - 12px); border-radius: 16px; }
  .app-shell.members-collapsed { grid-template-columns: 54px minmax(0, 1fr); }
  .resolution-control { height: 31px; padding: 0 5px; }
  .resolution-control > span { display: none; }
  .resolution-control select { min-width: 49px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.community-buttons { display: flex; flex-direction: column; align-items: center; gap: 10px; max-height: 58vh; overflow: auto; scrollbar-width: none; }
.friends-panel { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow: auto; padding: 26px clamp(16px, 4vw, 48px); }
.friends-panel[hidden] { display: none; }
.friends-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 17px; border-bottom: 1px solid rgba(255, 255, 255, .085); }
.friends-panel-header h2 { margin: 0; font: 600 20px 'Space Grotesk', 'Segoe UI', sans-serif; }
.friends-panel-header .voice-stage-eyebrow { margin-bottom: 5px; }
.friends-tabs { display: flex; gap: 7px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.friends-tabs button { min-height: 30px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #96969d; cursor: pointer; font-size: 10px; }
.friends-tabs button:hover, .friends-tabs button.active { border-color: rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .07); color: #ededf0; }
.friends-tabs span { display: inline-grid; min-width: 17px; height: 17px; place-items: center; margin-left: 4px; border-radius: 6px; background: rgba(255, 255, 255, .1); }
.friends-content { display: flex; flex-direction: column; }
.friends-empty { max-width: 360px; margin: 48px auto; color: #929299; text-align: center; font-size: 11px; line-height: 1.6; }
.friend-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; padding: 9px 4px; border-bottom: 1px solid rgba(255, 255, 255, .055); }
.friend-identity { display: flex; align-items: center; gap: 11px; min-width: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.friend-identity > span:last-child { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.friend-identity strong { overflow: hidden; color: #ececef; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.friend-identity small { color: #82828a; font-size: 9px; }
.friend-avatar { position: relative; display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 13px; background: linear-gradient(145deg, #d7d7db, #83838a); color: #171719; font-size: 12px; font-weight: 700; }
.friend-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.friend-avatar .presence { right: -1px; bottom: -1px; border-color: #202023; }
.friend-actions { display: flex; gap: 6px; }
.friend-actions button { min-height: 29px; padding: 0 9px; border: 1px solid rgba(255, 255, 255, .11); border-radius: 8px; background: rgba(255, 255, 255, .055); color: #c7c7cc; cursor: pointer; font-size: 9px; }
.friend-actions button:hover { background: rgba(255, 255, 255, .12); color: white; }
.message { position: relative; }
.message-tools { display: flex; align-items: center; gap: 3px; min-height: 25px; margin: 4px 0 0 -5px; opacity: .62; transition: opacity .15s; }
.message:hover .message-tools, .message:focus-within .message-tools { opacity: 1; }
.message-tools button { min-height: 23px; padding: 0 6px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px; background: rgba(255, 255, 255, .045); color: #9999a0; cursor: pointer; font-size: 9px; }
.message-tools button:hover { background: rgba(255, 255, 255, .13); color: white; }
.message-reactions .reaction { cursor: pointer; }
.message-reactions .reaction:hover { border-color: rgba(255, 255, 255, .28); }
.message-reply-preview { display: block; max-width: min(420px, 100%); margin: 0 0 4px; padding: 2px 0 2px 8px; overflow: hidden; border: 0; border-left: 2px solid rgba(255, 255, 255, .22); background: transparent; color: #85858d; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font-size: 9px; }
.reply-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; padding: 5px 10px; border: 1px solid rgba(255, 255, 255, .11); border-bottom: 0; border-radius: 10px 10px 0 0; background: rgba(255, 255, 255, .055); color: #acacb3; font-size: 9px; }
.reply-banner[hidden] { display: none; }
.reply-banner button { width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: #aaaab0; cursor: pointer; font-size: 17px; }
.reply-banner + .composer { border-top-left-radius: 0; border-top-right-radius: 0; }
.message-self .message-body { min-width: min(0, 100%); }
.menu-dialog-body { display: flex; flex-direction: column; gap: 12px; padding: 23px; }
.menu-dialog-body h2 { margin: 0; font: 600 18px 'Space Grotesk', 'Segoe UI', sans-serif; }
.menu-dialog-body > p { margin: -6px 0 3px; color: #96969d; font-size: 11px; line-height: 1.5; }
.menu-dialog-actions { display: flex; flex-direction: column; gap: 7px; }
.menu-dialog-actions button { min-height: 36px; padding: 0 11px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; background: rgba(255, 255, 255, .055); color: #e1e1e4; text-align: left; cursor: pointer; font-size: 10px; }
.menu-dialog-actions button:hover { background: rgba(255, 255, 255, .12); }
.menu-dialog-actions .danger-action { color: #eaa4a6; border-color: rgba(223, 113, 116, .25); background: rgba(223, 113, 116, .08); }
.menu-dialog-body > #menuDialogClose, .menu-dialog-body > #closeHelpDialog { align-self: flex-end; min-height: 31px; padding: 0 11px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; background: rgba(255, 255, 255, .06); color: #c7c7cc; cursor: pointer; font-size: 10px; }
.voice-settings-dialog .profile-editor > select { min-height: 38px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 8px; background: rgba(0, 0, 0, .24); color: #e5e5e8; }
.voice-settings-dialog .profile-editor > select option { background: #202022; }
.voice-settings-dialog .toggle-row { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.voice-settings-dialog .toggle-row input { accent-color: #d9d9dd; }
.user-profile-actions button:not(:disabled) { background: rgba(255, 255, 255, .09); color: #dedee2; cursor: pointer; }
.user-profile-actions button:not(:disabled):hover { background: rgba(255, 255, 255, .15); }
.user-profile-actions button:disabled { opacity: .5; cursor: not-allowed; }
.voice-members-inline { display: flex; align-items: center; gap: 4px; min-height: 0; padding-left: 26px; }
.voice-members-inline:empty { display: none; }
.channel-unread { display: grid; min-width: 17px; height: 17px; place-items: center; margin-left: auto; padding: 0 4px; border-radius: 6px; background: rgba(238, 238, 242, .16); color: #ededf0; font-size: 9px; font-weight: 700; }
@media (max-width: 760px) {
  .app-shell.mobile-members-open .member-sidebar { position: absolute; z-index: 8; top: 61px; right: 8px; bottom: 8px; display: block; width: min(250px, calc(100vw - 78px)); border: 1px solid rgba(255, 255, 255, .14); border-radius: 13px; background: rgba(23, 23, 26, .94); box-shadow: 0 18px 48px #0009; backdrop-filter: blur(25px); }
  .friend-card { align-items: flex-start; }
  .friend-actions { flex-wrap: wrap; justify-content: flex-end; }
}

.voice-members { min-height: 22px; }
.voice-member-label { margin-left: 2px; }
.voice-count { min-width: 18px; }
.remote-media[hidden] { display: none; }
.remote-media {
  position: absolute;
  z-index: 4;
  top: 81px;
  right: 16px;
  left: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  max-height: 55vh;
  overflow: auto;
  pointer-events: none;
}
.remote-media.has-video {
  right: auto;
  left: 50%;
  width: min(900px, calc(100% - 32px));
  transform: translateX(-50%);
}
.remote-tile {
  position: relative;
  min-width: 0;
  min-height: 64px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 12px;
  background: rgba(31, 31, 35, .78);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}
.remote-tile video { display: none; width: 100%; max-height: 52vh; background: #050506; object-fit: contain; }
.remote-tile.has-video video { display: block; }
.remote-tile audio { display: none; }
.remote-tile-info { position: absolute; z-index: 1; right: 0; bottom: 0; left: 0; display: flex; align-items: center; gap: 8px; min-height: 39px; padding: 7px 10px; background: linear-gradient(0deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .08)); color: #f1f1f2; font-size: 10px; }
.remote-tile-avatar { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 9px; background: linear-gradient(145deg, #c5c5ca, #85858c); color: #161617; font-size: 10px; font-weight: 700; }
.remote-tile.has-video .remote-tile-avatar { display: none; }
.remote-tile-name { font-weight: 600; text-shadow: 0 1px 4px #000; }
@media (max-width: 760px) {
  .remote-media { top: 69px; right: 9px; left: 9px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .remote-media.has-video { width: calc(100% - 18px); }
}

/* Reflexos sutis sobre a base grafite deixam a translucidez perceptível. */
body {
  background:
    radial-gradient(ellipse at 15% 18%, rgba(211, 211, 218, .17), transparent 31%),
    radial-gradient(ellipse at 82% 78%, rgba(176, 176, 185, .14), transparent 36%),
    radial-gradient(ellipse at 63% 8%, rgba(255, 255, 255, .075), transparent 24%),
    linear-gradient(135deg, #080809 0%, #111113 48%, #09090b 100%);
}
body::before {
  background:
    radial-gradient(ellipse at 28% 32%, rgba(255, 255, 255, .105), transparent 23%),
    radial-gradient(ellipse at 74% 24%, rgba(195, 195, 204, .11), transparent 26%),
    radial-gradient(ellipse at 68% 78%, rgba(255, 255, 255, .075), transparent 28%);
  filter: blur(52px);
}
.app-shell { background: rgba(20, 20, 23, .38); backdrop-filter: blur(40px) saturate(155%); -webkit-backdrop-filter: blur(40px) saturate(155%); }
.server-rail { background: rgba(10, 10, 12, .37); }
.channel-sidebar { background: rgba(24, 24, 27, .37); }
.chat-column { background: rgba(15, 15, 17, .21); }
.member-sidebar { background: rgba(23, 23, 26, .37); }
.chat-topbar { background: rgba(17, 17, 19, .27); }

.app-shell[hidden], .auth-screen[hidden] { display: none; }
.auth-screen { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 28px 18px; }
.auth-card { width: min(448px, 100%); padding: 32px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 24px; background: rgba(25, 25, 29, .74); box-shadow: 0 28px 90px rgba(0, 0, 0, .56), inset 0 1px 0 rgba(255, 255, 255, .1); backdrop-filter: blur(36px) saturate(150%); -webkit-backdrop-filter: blur(36px) saturate(150%); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 27px; color: #f0f0f2; font-family: 'Space Grotesk', 'Segoe UI', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .19em; }
.auth-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255, 255, 255, .82); border-radius: 12px; background: linear-gradient(145deg, #f2f2f3, #bdbdc3); color: #121214; font-size: 18px; letter-spacing: 0; box-shadow: 0 5px 18px #0005, inset 0 1px 0 #fff; }
.auth-eyebrow { margin: 0 0 9px; color: #929299; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.auth-card h1 { margin: 0; color: #f2f2f4; font-family: 'Space Grotesk', 'Segoe UI', sans-serif; font-size: clamp(24px, 4vw, 30px); font-weight: 600; letter-spacing: -.045em; }
.auth-lede { margin: 9px 0 21px; color: #a2a2a8; font-size: 12px; line-height: 1.5; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 20px; border: 1px solid rgba(255, 255, 255, .075); border-radius: 11px; background: rgba(0, 0, 0, .19); }
.auth-tabs button { height: 34px; border: 0; border-radius: 8px; background: transparent; color: #96969d; cursor: pointer; font-size: 11px; font-weight: 600; }
.auth-tabs button.active { background: rgba(255, 255, 255, .11); color: #f3f3f5; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07); }
.auth-form { display: flex; flex-direction: column; gap: 9px; }
.auth-form[hidden] { display: none; }
.auth-form label, .profile-editor > label { margin-top: 5px; color: #c9c9ce; font-size: 10px; font-weight: 600; }
.auth-form input, .profile-editor input, .profile-editor textarea, .profile-editor select { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 9px; outline: 0; background: rgba(4, 4, 6, .3); color: #f0f0f2; font: inherit; font-size: 12px; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.auth-form input:focus, .profile-editor input:focus, .profile-editor textarea:focus, .profile-editor select:focus { border-color: rgba(255, 255, 255, .34); background: rgba(4, 4, 6, .44); box-shadow: 0 0 0 3px rgba(255, 255, 255, .05); }
.auth-form input::placeholder, .profile-editor input::placeholder, .profile-editor textarea::placeholder { color: #707077; }
.username-input { display: flex; align-items: center; min-height: 40px; padding-left: 12px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 9px; background: rgba(4, 4, 6, .3); color: #87878e; }
.username-input:focus-within { border-color: rgba(255, 255, 255, .34); box-shadow: 0 0 0 3px rgba(255, 255, 255, .05); }
.username-input input { min-height: 38px; padding-left: 4px; border: 0; background: transparent; box-shadow: none; }
.username-input input:focus { background: transparent; box-shadow: none; }
.field-hint { margin: -5px 0 2px 2px; color: #77777e; font-size: 9px; }
.auth-submit { min-height: 42px; margin-top: 10px; border: 1px solid rgba(255, 255, 255, .72); border-radius: 10px; background: linear-gradient(145deg, #f4f4f6, #c9c9cf); color: #171719; cursor: pointer; font-size: 11px; font-weight: 700; box-shadow: 0 5px 18px rgba(0, 0, 0, .22), inset 0 1px 0 #fff; transition: filter .16s ease, transform .16s ease; }
.auth-submit:hover { filter: brightness(1.06); transform: translateY(-1px); }
.auth-submit:disabled { opacity: .58; cursor: wait; transform: none; }
.auth-message { min-height: 16px; margin: 9px 0 0; color: #e6a2a4; font-size: 10px; line-height: 1.45; }
.auth-message:empty { display: none; }
.auth-footnote { margin: 14px 0 0; padding-top: 13px; border-top: 1px solid rgba(255, 255, 255, .075); color: #77777e; font-size: 9px; line-height: 1.6; }

.profile-dialog { width: min(560px, calc(100vw - 28px)); max-height: min(92vh, 780px); padding: 0; overflow: auto; border: 1px solid rgba(255, 255, 255, .16); border-radius: 20px; background: rgba(29, 29, 33, .92); color: var(--text); box-shadow: 0 28px 90px rgba(0, 0, 0, .62), inset 0 1px 0 rgba(255, 255, 255, .09); backdrop-filter: blur(34px) saturate(150%); -webkit-backdrop-filter: blur(34px) saturate(150%); }
.profile-dialog::backdrop { background: rgba(0, 0, 0, .54); backdrop-filter: blur(6px); }
.profile-editor { display: flex; flex-direction: column; gap: 9px; padding: 25px; }
.profile-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.profile-dialog-heading h2 { margin: 0; font-family: 'Space Grotesk', 'Segoe UI', sans-serif; font-size: 19px; font-weight: 600; }
.dialog-close { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; background: rgba(255, 255, 255, .045); color: #aaaab0; cursor: pointer; font-size: 20px; line-height: 1; }
.dialog-close:hover { background: rgba(255, 255, 255, .1); color: white; }
.profile-preview-row { display: flex; align-items: center; gap: 9px; min-height: 70px; padding: 10px; margin-bottom: 5px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 12px; background: rgba(255, 255, 255, .035); }
.profile-avatar-preview { position: relative; display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; overflow: hidden; border: 1px solid rgba(255, 255, 255, .23); border-radius: 16px; background: linear-gradient(145deg, #d6d6db, #87878f); color: #171719; font-size: 17px; font-weight: 700; }
.profile-avatar-preview img, .user-profile-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.profile-preview-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.profile-preview-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-preview-copy span { color: #8a8a91; font-size: 9px; }
.small-action { padding: 6px 8px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 7px; background: rgba(255, 255, 255, .05); color: #c8c8cd; cursor: pointer; font-size: 9px; }
.small-action:hover { background: rgba(255, 255, 255, .1); color: white; }
.small-action.remove-avatar { color: #d09294; }
.profile-editor > label { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; }
.profile-editor > label span { color: #77777e; font-size: 9px; font-weight: 400; }
.profile-editor textarea { min-height: 78px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.profile-editor select { appearance: none; }
.profile-privacy-note { margin: 1px 0 0; color: #77777e; font-size: 9px; line-height: 1.5; }
.profile-editor-actions { display: flex; align-items: center; gap: 8px; padding-top: 13px; margin-top: 4px; border-top: 1px solid rgba(255, 255, 255, .08); }
.profile-editor-actions > span { flex: 1; }
.profile-editor-actions button { min-height: 33px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 8px; cursor: pointer; font-size: 9px; font-weight: 600; }
.logout-button { background: rgba(207, 90, 96, .1); color: #dfa0a2; }
.logout-button:hover { background: rgba(207, 90, 96, .18); }
.dialog-cancel { background: rgba(255, 255, 255, .045); color: #c4c4c9; }
.dialog-submit { background: linear-gradient(145deg, #f4f4f5, #c9c9ce); color: #161618; }
.dialog-submit:hover { filter: brightness(1.07); }

.user-profile-dialog { width: min(390px, calc(100vw - 28px)); overflow: hidden; }
.user-profile-card { position: relative; min-height: 370px; padding-bottom: 20px; }
.user-profile-cover { height: 116px; background: radial-gradient(ellipse at 24% 32%, rgba(255, 255, 255, .18), transparent 39%), linear-gradient(135deg, #28282d, #111113 65%, #333338); }
.user-profile-close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.user-profile-avatar { position: relative; display: grid; place-items: center; width: 76px; height: 76px; margin: -38px 0 0 22px; overflow: hidden; border: 4px solid rgba(29, 29, 33, .96); border-radius: 24px; background: linear-gradient(145deg, #d6d6db, #87878f); color: #171719; font-size: 25px; font-weight: 700; }
.user-profile-main { padding: 12px 22px 0; }
.user-profile-main h2 { margin: 0; font-family: 'Space Grotesk', 'Segoe UI', sans-serif; font-size: 20px; font-weight: 600; }
.user-profile-username { margin: 4px 0 11px; color: #898990; font-size: 10px; }
.user-profile-status { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; color: #c5c5ca; font-size: 10px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.status-dot.status-idle { background: #d6b66e; }
.status-dot.status-dnd { background: #d9787b; }
.user-profile-about { min-height: 44px; padding: 11px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; background: rgba(255, 255, 255, .035); color: #c7c7cc; font-size: 10px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.user-profile-joined { color: #77777e; font-size: 9px; }
.user-profile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.user-profile-actions button { min-height: 34px; border: 1px solid rgba(255, 255, 255, .11); border-radius: 8px; background: rgba(255, 255, 255, .045); color: #84848b; font-size: 9px; }
.profile-trigger { cursor: pointer; }
.profile-trigger:hover { filter: brightness(1.1); }
.member-row[data-profile-user-id], .message-avatar[data-profile-user-id], .mini-avatar[data-profile-user-id] { cursor: pointer; }
.profile-trigger img, .member-avatar img, .message-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.profile-trigger img + .avatar-fallback, .member-avatar img + .avatar-fallback, .message-avatar img + .avatar-fallback { display: none; }
.member-avatar, .message-avatar { position: relative; overflow: hidden; }
.self-avatar { position: relative; padding: 0; border: 0; cursor: pointer; }

@media (max-width: 520px) {
  .auth-card { padding: 24px 20px; border-radius: 20px; }
  .profile-editor { padding: 19px; }
  .profile-preview-row { flex-wrap: wrap; }
  .profile-preview-copy { min-width: calc(100% - 70px); }
  .profile-editor-actions { flex-wrap: wrap; }
  .logout-button { margin-right: auto; }
  .profile-editor-actions > span { display: none; }
}

.conversation[hidden], .composer-wrap[hidden], .voice-stage[hidden] { display: none; }
.voice-stage { display: flex; min-height: 0; flex: 1; flex-direction: column; padding: 23px 25px 18px; }
.voice-stage-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 2px 2px 18px; border-bottom: 1px solid rgba(255, 255, 255, .075); }
.voice-stage-eyebrow { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; color: #929299; font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.voice-stage-eyebrow .live-dot { width: 6px; height: 6px; }
.voice-stage-heading h2 { margin: 0; font-family: 'Space Grotesk', 'Segoe UI', sans-serif; font-size: 21px; font-weight: 600; letter-spacing: -.035em; }
.voice-stage-heading > div:first-child > p:last-child { margin: 5px 0 0; color: #83838a; font-size: 10px; }
.voice-stage-count { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 9px; background: rgba(255, 255, 255, .035); color: #bfc0c5; font-size: 9px; white-space: nowrap; }
.voice-stage-count .live-dot { width: 6px; height: 6px; }
.voice-stage-panel { display: grid; min-height: 0; flex: 1; place-items: center; padding: 18px 2px; }
.voice-stage-empty { margin: 0; color: #77777e; font-size: 11px; }
.remote-media[hidden] { display: none; }
.voice-stage .remote-media { position: static; display: grid; width: 100%; max-height: 100%; grid-template-columns: repeat(auto-fit, minmax(min(215px, 100%), 1fr)); align-content: center; justify-content: center; gap: 12px; overflow: auto; pointer-events: auto; transform: none; }
.voice-stage .remote-media.has-video { position: static; left: auto; right: auto; width: 100%; max-height: 100%; transform: none; }
.voice-stage .remote-tile { display: flex; min-height: 220px; flex-direction: column; justify-content: center; border-color: rgba(255, 255, 255, .12); border-radius: 17px; background: radial-gradient(ellipse at 50% 28%, rgba(255, 255, 255, .07), transparent 52%), rgba(29, 29, 33, .63); pointer-events: auto; }
.voice-stage .remote-tile video { flex: 1; min-height: 170px; max-height: 52vh; object-fit: contain; }
.voice-stage .remote-tile.has-video { justify-content: flex-start; }
.voice-stage .remote-tile-info { justify-content: center; min-height: 42px; background: linear-gradient(0deg, rgba(0, 0, 0, .58), transparent); }
.voice-stage .remote-tile:not(.has-video) .remote-tile-info { inset: 0; flex-direction: column; justify-content: center; gap: 12px; min-height: 0; background: transparent; }
.voice-stage .remote-tile-avatar { width: 76px; height: 76px; margin: 0; overflow: hidden; border: 2px solid rgba(255, 255, 255, .22); border-radius: 25px; font-size: 26px; transition: box-shadow .15s ease, transform .15s ease; }
.voice-stage .remote-tile-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.remote-tile-identity { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 5px; }
.remote-tile-speaking { color: #9b9ba2; font-size: 9px; }
.remote-tile.is-speaking .remote-tile-speaking { color: #a2e1ba; }
.remote-tile:focus-visible { outline: 2px solid rgba(255, 255, 255, .72); outline-offset: 2px; }
.voice-stage .remote-tile.is-speaking .remote-tile-avatar { box-shadow: 0 0 0 4px rgba(105, 201, 149, .88), 0 0 28px rgba(105, 201, 149, .38); transform: scale(1.04); animation: voice-pulse 1.25s ease-in-out infinite; }
.voice-stage .remote-tile.is-speaking { border-color: rgba(105, 201, 149, .5); }
.voice-stage-controls { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 10px 2px; border-top: 1px solid rgba(255, 255, 255, .075); }
.stage-control, .stage-leave-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; background: rgba(255, 255, 255, .055); color: #d4d4d8; cursor: pointer; font-size: 10px; font-weight: 600; }
.stage-control:hover { background: rgba(255, 255, 255, .1); }
.stage-control.is-active { border-color: rgba(105, 201, 149, .36); background: rgba(105, 201, 149, .1); color: #91ddb1; }
.stage-control.is-muted { border-color: rgba(223, 113, 116, .28); background: rgba(223, 113, 116, .1); color: #e79b9d; }
.stage-control-icon { font-size: 13px; }
.stage-control-spacer { flex: 1; }
.stage-leave-button { border-color: rgba(213, 103, 107, .3); background: rgba(190, 73, 78, .16); color: #e6aaac; }
.stage-leave-button:hover { background: rgba(190, 73, 78, .25); }
.stage-control:disabled, .stage-leave-button:disabled { cursor: not-allowed; opacity: .55; }
.member-avatar[data-profile-user-id], .message-avatar[data-profile-user-id], .mini-avatar[data-profile-user-id] { cursor: pointer; }
@keyframes voice-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(105, 201, 149, .68), 0 0 16px rgba(105, 201, 149, .2); } 50% { box-shadow: 0 0 0 5px rgba(105, 201, 149, .92), 0 0 30px rgba(105, 201, 149, .44); } }
@media (max-width: 760px) {
  .voice-stage { padding: 16px 12px 12px; }
  .voice-stage-heading h2 { font-size: 18px; }
  .voice-stage .remote-tile { min-height: 170px; }
  .voice-stage .remote-tile-avatar { margin-bottom: 32px; }
  .voice-stage-controls { gap: 6px; }
  .stage-control, .stage-leave-button { min-height: 34px; gap: 5px; padding: 0 8px; font-size: 9px; }
}

.app-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 18px;
  background: rgba(32, 32, 36, .9);
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .1);
  backdrop-filter: blur(32px) saturate(150%);
  -webkit-backdrop-filter: blur(32px) saturate(150%);
}
.app-dialog::backdrop { background: rgba(0, 0, 0, .5); backdrop-filter: blur(5px); }
.app-dialog-form { display: flex; flex-direction: column; gap: 13px; padding: 25px; }
.app-dialog-form h2 { margin: 0; font-family: 'Space Grotesk', 'Segoe UI', sans-serif; font-size: 18px; font-weight: 600; }
.app-dialog-form p { margin: -7px 0 2px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.app-dialog-form label { color: #c8c8cd; font-size: 11px; font-weight: 600; }
.app-dialog-form input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 9px; outline: 0; background: rgba(0, 0, 0, .22); color: var(--text); font-size: 13px; }
.app-dialog-form input:focus { border-color: rgba(255, 255, 255, .38); box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }
.app-dialog-form input::placeholder { color: #73737a; }
.app-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 5px; }
.app-dialog-actions button { height: 34px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 600; }
.dialog-cancel { background: rgba(255, 255, 255, .045); color: #c4c4c9; }
.dialog-cancel:hover { background: rgba(255, 255, 255, .09); }
.dialog-submit { background: linear-gradient(145deg, #f4f4f5, #c9c9ce); color: #161618; }
.dialog-submit:hover { filter: brightness(1.07); }

/* Community navigation and room summary — keep the existing charcoal glass theme. */
.brand-mark { width: 52px; height: 46px; border-radius: 13px; }
.brand-wordmark { font-size: 10px; font-weight: 900; letter-spacing: .09em; color: #151519; }
.member-sidebar { overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #45454c transparent; }
.member-sidebar .member-heading { gap: 8px; margin-bottom: 20px; }
.member-sidebar #sidebarCommunityName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.sidebar-section-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 11px; color: #bdbdc3; font-weight: 750; font-size: 9px; letter-spacing: .07em; }
.sidebar-empty { color: #85858d; line-height: 1.6; font-size: 10px; margin: 9px 4px; }
.favorite-list, .room-overview-list { display: grid; gap: 7px; }
.favorite-item { min-width: 0; display: flex; align-items: stretch; gap: 3px; border: 1px solid rgba(255,255,255,.09); border-radius: 10px; background: rgba(255,255,255,.045); }
.favorite-item > button { border: 0; background: transparent; color: #e4e4e7; cursor: pointer; }
.favorite-item > button:first-child { display: flex; flex: 1; min-width: 0; gap: 9px; align-items: center; padding: 10px 8px; text-align: left; }
.favorite-item > button:first-child:hover { background: rgba(255,255,255,.065); border-radius: 9px; }
.favorite-item > button:first-child > span:first-child { color: #b4b4bb; }
.favorite-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; }
.favorite-text strong, .favorite-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-text strong { font-size: 11px; font-weight: 650; }
.favorite-text small { color: #919199; font-size: 9px; }
.favorite-remove { padding: 0 8px; color: #e2c78f !important; font-size: 16px; }
.favorite-remove:hover { color: white !important; }
.channel-entry { display: flex; align-items: center; gap: 3px; width: 100%; }
.channel-entry .channel-button, .channel-entry .voice-channel { flex: 1; min-width: 0; }
.channel-entry-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.channel-star { display: grid; place-items: center; flex: none; width: 25px; height: 32px; padding: 0; border: 0; background: transparent; color: #7f7f86; cursor: pointer; font-size: 18px; }
.channel-star:hover, .channel-star.is-favorite { color: #e2c78f; }
.channel-text-users { color: #90909a; font-size: 9px; }
.room-overview { border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: linear-gradient(125deg, rgba(255,255,255,.063), rgba(255,255,255,.026)); overflow: hidden; }
.room-summary-header { display: flex; align-items: center; gap: 5px; min-height: 56px; padding: 7px 6px 7px 3px; }
.room-expand { flex: none; width: 24px; height: 36px; border: 0; background: transparent; color: #bdbdc3; cursor: pointer; }
.room-expand:hover { color: #fff; }
.room-chevron { font-size: 20px; }
.room-summary-name { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 5px; }
.room-summary-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 650; color: #e7e7ea; }
.room-summary-name small { color: #96969e; font-size: 9px; line-height: 1.3; }
.room-action { padding: 7px 9px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; background: rgba(255,255,255,.08); color: #e6e6e9; cursor: pointer; font-size: 9px; font-weight: 650; }
.room-action:hover { background: rgba(255,255,255,.17); }
.room-action.is-joined { border-color: rgba(240,140,140,.2); color: #f1baba; }
.room-participants { padding: 1px 8px 9px 12px; border-top: 1px solid rgba(255,255,255,.07); }
.room-participant { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 4px; border: 0; border-radius: 7px; background: transparent; color: #c9c9cf; text-align: left; cursor: pointer; font-size: 10px; }
.room-participant:hover { background: rgba(255,255,255,.07); }
.room-participant .mini-avatar { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 8px; background: rgba(255,255,255,.15); overflow: hidden; }
.room-participant .mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-sidebar .member-divider { margin: 19px 0; }
.home-panel { flex: 1; min-height: 0; overflow-y: auto; padding: clamp(24px, 5vw, 64px); }
.home-panel[hidden] { display: none !important; }
.home-panel h2 { max-width: 620px; margin: 12px 0; font-size: clamp(25px, 3vw, 39px); letter-spacing: -.04em; color: #f3f3f5; }
.home-panel > p:not(.voice-stage-eyebrow) { max-width: 560px; color: #aeafb8; line-height: 1.75; font-size: 13px; }
.home-help-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; max-width: 750px; margin: 28px 0; }
.home-help-grid article { min-height: 118px; display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid rgba(255,255,255,.13); border-radius: 15px; background: rgba(255,255,255,.065); backdrop-filter: blur(20px); }
.home-help-grid strong { font-size: 12px; color: #f2f2f5; }
.home-help-grid span { font-size: 11px; line-height: 1.7; color: #b6b6be; }
.invite-dialog label { color: #d8d8dd; font-size: 11px; }
.invite-dialog input { width: 100%; min-height: 40px; box-sizing: border-box; padding: 8px 11px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; background: rgba(0,0,0,.25); color: #ececf0; }
.invite-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.invite-actions button { padding: 9px 12px; cursor: pointer; }
#inviteFeedback { min-height: 15px; color: #add9c0; }
.app-shell.voice-fullscreen { grid-template-columns: minmax(0,1fr) !important; }
.app-shell.voice-fullscreen .server-rail,
.app-shell.voice-fullscreen .channel-sidebar,
.app-shell.voice-fullscreen .member-sidebar { display: none !important; }
.app-shell.voice-fullscreen .chat-column { grid-column: 1; }
.app-shell.voice-fullscreen .voice-stage { flex: 1; min-height: 0; }
@media (max-width: 760px) {
  .brand-mark { width: 46px; height: 40px; }
  .brand-wordmark { font-size: 9px; }
  .home-help-grid { grid-template-columns: 1fr; }
  .home-panel { padding: 22px; }
}

/* Voice member controls (local per-user preferences) */
.remote-tile:not(.is-local) { cursor: pointer; }
.remote-tile:not(.is-local):hover { border-color: rgba(255,255,255,.32); }
.remote-tile.participant-muted .remote-tile-speaking::before { content: "🔇 "; }
.remote-tile.participant-video-hidden video { display: none !important; }
.remote-tile.is-video-featured { grid-column: 1 / -1; border-color: rgba(138,194,255,.65); box-shadow: 0 0 0 1px rgba(138,194,255,.15); }
.remote-tile.is-video-featured video { max-height: 70vh; }
.participant-dialog .menu-dialog-body { width: min(360px, calc(100vw - 45px)); }
.participant-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.participant-dialog-heading h2 { margin: 0; }
.participant-dialog-heading button { color: #eee; border: 0; border-radius: 6px; width: 28px; height: 28px; background: rgba(255,255,255,.1); cursor: pointer; font-size: 20px; }
.participant-control-toggle { display: flex; align-items: center; justify-content: space-between; color: #d7d7df; font-size: 12px; }
.participant-control-toggle input { width: 17px; height: 17px; accent-color: #86bdf5; cursor: pointer; }
.participant-volume-header { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: #d3d3da; }
.participant-dialog input[type="range"] { width: 100%; accent-color: #9bc7ff; cursor: pointer; }
.participant-volume-header output { color: #a9cbfa; font-size: 12px; }
.participant-control-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.participant-control-actions button { padding: 10px 8px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; background: rgba(255,255,255,.065); text-align: left; color: #e2e2e8; cursor: pointer; font-size: 10px; }
.participant-control-actions button:hover { background: rgba(255,255,255,.14); }
.participant-control-actions button:disabled { opacity: .4; cursor: not-allowed; }
.participant-help { margin: 0; font-size: 10px; color: #9999a3; line-height: 1.65; }

.desktop-update-panel { display: flex; flex-direction: column; gap: 10px; max-width: 660px; margin-top: 32px; padding: 18px; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; background: rgba(255,255,255,.05); }
.desktop-update-panel[hidden] { display: none !important; }
.desktop-update-panel h3 { margin: 0; color: #efeff2; font-size: 15px; }
.desktop-update-panel p { margin: 0; color: #b2b2bb; font-size: 11px; line-height: 1.6; }
.desktop-update-config { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.desktop-update-config label { flex-basis: 100%; color: #aaaab1; font-size: 10px; }
.desktop-update-config input { flex: 1; min-width: 200px; min-height: 34px; padding: 0 10px; border: 1px solid rgba(255,255,255,.17); border-radius: 7px; background: rgba(0,0,0,.23); color: #eee; font-size: 11px; }
.desktop-update-panel button { min-height: 34px; padding: 0 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; background: rgba(255,255,255,.09); color: #ececf0; cursor: pointer; font-size: 11px; }
.desktop-update-panel button:hover { background: rgba(255,255,255,.16); }
.desktop-update-panel button:disabled { cursor: wait; opacity: .6; }
.desktop-update-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.participant-audio-meter { display: flex; align-items: center; justify-content: center; gap: 3px; height: 23px; width: 48px; margin-top: 4px; }
.participant-meter-bar { width: 4px; height: 3px; border-radius: 3px; background: #777981; transition: height .09s ease, background .2s ease; }
.remote-tile.is-speaking .participant-meter-bar { background: #80d6a4; }
.remote-tile.participant-muted .participant-meter-bar { background: #b78888; }

/* Accessibility: auth and long modals remain scrollable on short laptop screens. */
.auth-screen { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; overflow-y: auto; overscroll-behavior: contain; padding: 18px; }
.auth-card { flex: 0 0 auto; margin: auto 0; max-height: none; }
.channel-sidebar { overflow: hidden; }
.channel-list { overflow-x: hidden; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.channel-rename { display: grid; place-items: center; flex: none; padding: 0; width: 22px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: #8e8e97; cursor: pointer; font-size: 15px; }
.channel-rename:hover { background: rgba(255,255,255,.08); color: white; }
.voice-preview-panel { flex: 1; min-height: 0; overflow-y: auto; padding: clamp(20px, 5vw, 52px); }
.voice-preview-panel[hidden] { display: none !important; }
.voice-preview-panel h2 { font-size: clamp(23px, 3vw, 34px); letter-spacing: -.035em; margin: 8px 0; }
#voicePreviewSubtitle { color: #aaaab4; font-size: 12px; line-height: 1.5; }
.voice-preview-members { display: grid; grid-template-columns: repeat(auto-fill,minmax(146px,1fr)); max-width: 840px; gap: 12px; margin: 22px 0 28px; }
.voice-preview-member { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; min-height: 150px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: rgba(255,255,255,.055); color: #eee; cursor: pointer; }
.voice-preview-member:hover { background: rgba(255,255,255,.11); }
.voice-preview-avatar { display: grid; place-items: center; width: 64px; height: 64px; border: 2px solid rgba(255,255,255,.25); border-radius: 21px; overflow: hidden; background: rgba(255,255,255,.12); font-weight: 750; font-size: 22px; }
.voice-preview-avatar img { width: 100%; height: 100%; object-fit: cover; }
.voice-preview-member strong { max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.voice-preview-member small { color: #9aa2a6; font-size: 10px; }
.voice-preview-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.voice-preview-actions button { cursor: pointer; padding: 11px 17px; border-radius: 9px; }
.voice-preview-footnote { font-size: 11px; color: #8d8d98; margin-top: 16px; }
#voiceRoomsSection[hidden] { display: none !important; }

/* Global favorites and active rooms in the right sidebar. */
.active-voice-heading { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 2px 12px; border: none; border-radius: 7px; background: transparent; color: #c8c8ce; text-align: left; cursor: pointer; font-size: 10px; font-weight: 750; letter-spacing: .055em; }
.active-voice-heading:hover { background: rgba(255,255,255,.06); }
#activeVoiceChevron { font-size: 18px; color: #c6d2df; font-weight: 400; }
.active-voice-badge { display: grid; place-items: center; margin-left: auto; width: 22px; height: 20px; border-radius: 6px; background: rgba(255,255,255,.1); color: #dedee5; letter-spacing: 0; }
#activeVoiceBody[hidden], #voiceRoomsSection[hidden] { display: none !important; }
.share-quality-dialog .menu-dialog-body { width: min(385px, calc(100vw - 36px)); }
.share-quality-dialog select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 9px; color: #e8e8f0; background: #26262d; }
.share-quality-dialog label { font-size: 12px; color: #e3e3e8; }
.share-quality-dialog p { font-size: 11px; color: #a6a6ae; line-height: 1.6; }
#shareScreenButton.is-active { border-color: rgba(108,205,146,.65); color: #b8f3cb; background: rgba(58,122,78,.2); }
.voice-stage-controls { flex-wrap: wrap; }

/* Unified dark glass controls, including the share dialog and voice toolbar. */
.voice-stage-controls .stage-control,
.voice-stage-controls .stage-leave-button,
.share-quality-dialog button,
.voice-preview-actions button,
.dialog-submit,
.send-button {
  background: rgba(255,255,255,.075);
  color: #ebebf0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  font-weight: 600;
}
.voice-stage-controls .stage-control:hover,
.share-quality-dialog button:hover,
.voice-preview-actions button:hover,
.dialog-submit:hover,
.send-button:hover { background: rgba(255,255,255,.14); color: #fff; filter: none; }
.voice-stage-controls .stage-control.is-active { border-color: rgba(105,201,149,.45); background: rgba(105,201,149,.12); color: #aae9c1; }
.voice-stage-controls .stage-control.is-muted { border-color: rgba(223,113,116,.35); background: rgba(223,113,116,.1); color: #ebb1b3; }
.voice-stage-controls #shareScreenButton.is-active { border-color: rgba(105,201,149,.45); background: rgba(105,201,149,.12); color: #aae9c1; }
.voice-stage-controls .stage-leave-button { border-color: rgba(223,113,116,.28); color: #e7adad; }
.share-quality-dialog .dialog-submit,
.share-quality-dialog .dialog-cancel { min-height: 37px; }
.share-quality-dialog .dialog-submit:hover { filter: none; }
.remote-tile.is-screen-sharing:not(.has-video) .remote-tile-speaking::after { content: " · aguardando transmissão"; color: #b2bfd3; }
.remote-tile.is-screen-sharing.has-video { border-color: rgba(106,182,237,.45); }

/* Voice toolbar layout and direct device selection. */
#connectionCard { display: none !important; }
.voice-stage-controls .stage-control-group { display: inline-flex; align-items: stretch; min-height: 38px; border: 1px solid rgba(255,255,255,.17); border-radius: 10px; background: rgba(255,255,255,.07); overflow: hidden; }
.voice-stage-controls .stage-control-group .stage-control { min-height: 36px; border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 0 10px; }
.voice-stage-controls .stage-control-group .stage-control-arrow { min-width: 27px; min-height: 36px; padding: 0 6px; border: 0; border-left: 1px solid rgba(255,255,255,.13); border-radius: 0; background: transparent; color: #d2d2d7; cursor: pointer; font-size: 18px; }
.voice-stage-controls .stage-control-group .stage-control-arrow:hover,
.voice-stage-controls .stage-control-group .stage-control:hover { background: rgba(255,255,255,.09); }
.voice-stage-controls .stage-control-group:has(.is-active) { border-color: rgba(105,201,149,.38); }
.voice-stage-controls .stage-control-group:has(.is-muted) { border-color: rgba(223,113,116,.3); }
.device-quick-dialog .menu-dialog-body { width: min(390px, calc(100vw - 40px)); max-height: min(85vh, 570px); overflow-y: auto; }
.device-quick-list { display: grid; gap: 6px; max-height: 240px; margin: 12px 0; overflow-y: auto; }
.device-option { min-height: 37px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.11); border-radius: 9px; background: rgba(255,255,255,.045); color: #e4e4e9; text-align: left; cursor: pointer; font-size: 11px; }
.device-option:hover { background: rgba(255,255,255,.11); }
.device-option.selected { border-color: rgba(105,201,149,.44); background: rgba(105,201,149,.09); color: #b8eecd; }
.remember-login-row { display: flex; align-items: center; gap: 9px; color: #c8c8cd; font-size: 11px; cursor: pointer; line-height: 1.5; }
.auth-form .remember-login-row input { width: 15px; height: 15px; min-height: 15px; padding: 0; margin: 0; accent-color: #92c7a7; }
.auth-form .remember-login-row span { flex: 1; }
.auth-form .auth-submit,
.auth-form .auth-submit:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.19); color: #eeeef0; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); filter: none; }

/* Screen sharing: dominant screen above a compact strip of voice participants. */
.voice-stage .voice-stage-panel { min-height: 0; overflow: hidden; padding: 8px 2px; }
.voice-stage .remote-media.has-video {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
}
.voice-stage .remote-media.has-video .remote-tile.has-video {
  order: -1;
  flex: 0 0 100%;
  width: 100%;
  height: clamp(240px, 55vh, 660px);
  min-height: 210px;
  max-height: calc(100% - 118px);
  display: flex;
  align-items: stretch;
  justify-content: center;
  border-color: rgba(116,181,222,.42);
  background: rgba(5,5,7,.96);
}
.voice-stage .remote-media.has-video .remote-tile.has-video video {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  object-fit: contain;
}
.voice-stage .remote-media.has-video .remote-tile:not(.has-video) {
  order: 1;
  flex: 0 0 116px;
  width: 116px;
  min-height: 90px;
  height: 90px;
  border-radius: 12px;
}
.voice-stage .remote-media.has-video .remote-tile:not(.has-video) .remote-tile-info {
  gap: 4px;
  padding: 5px;
  justify-content: center;
}
.voice-stage .remote-media.has-video .remote-tile:not(.has-video) .remote-tile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  margin: 0;
  font-size: 13px;
}
.voice-stage .remote-media.has-video .remote-tile:not(.has-video) .remote-tile-name { font-size: 9px; }
.voice-stage .remote-media.has-video .remote-tile:not(.has-video) .remote-tile-speaking { font-size: 8px; }
.voice-stage .remote-media.has-video .remote-tile:not(.has-video) .participant-audio-meter { transform: scale(.65); transform-origin: center; }
.voice-stage .remote-media.has-video .remote-tile:not(.has-video) .remote-tile-identity { gap: 1px; }
.voice-stage .remote-media.has-video .remote-tile.has-video .remote-tile-info {
  bottom: 0;
  min-height: 30px;
  padding: 5px 9px;
  background: linear-gradient(0deg, rgba(0,0,0,.78), rgba(0,0,0,.12));
}
.voice-stage .remote-media.has-video .remote-tile.is-local-screen .remote-tile-name::before { content: "● "; color: #7bd8a2; }
@media (max-width: 760px) {
  .voice-stage .remote-media.has-video .remote-tile.has-video { height: 43vh; min-height: 180px; max-height: calc(100% - 100px); }
  .voice-stage .remote-media.has-video .remote-tile:not(.has-video) { flex-basis: 88px; width: 88px; min-height: 78px; height: 78px; }
}

/* Unified Nexo-style screen and window picker. */
.share-quality-dialog { width: min(790px, calc(100vw - 30px)); max-width: 790px; max-height: min(90vh, 820px); overflow: auto; border-radius: 22px; }
.share-quality-dialog .menu-dialog-body { width: 100%; max-width: none; padding: 24px; }
.share-quality-dialog .menu-dialog-body h2 { font-size: 21px; }
.share-picker-tabs { display: flex; gap: 8px; padding: 4px; margin: 10px 0 13px; border: 1px solid rgba(255,255,255,.11); border-radius: 12px; background: rgba(0,0,0,.17); }
.share-picker-tabs button { flex: 1; min-height: 37px; border: none; border-radius: 9px; color: #a9abb4; background: transparent; cursor: pointer; font-size: 12px; font-weight: 650; }
.share-picker-tabs button.selected { background: rgba(255,255,255,.15); color: #f1f1f5; }
.share-source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; max-height: 300px; overflow: auto; padding: 3px; scrollbar-width: thin; }
.share-source-grid[hidden], .share-picker-tabs[hidden], .share-source-hint[hidden] { display: none !important; }
.share-source-card { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 7px; border: 1px solid rgba(255,255,255,.14); border-radius: 13px; color: #c6c7cf; background: rgba(255,255,255,.055); cursor: pointer; text-align: left; }
.share-source-card:hover { border-color: rgba(255,255,255,.38); background: rgba(255,255,255,.11); }
.share-source-card.selected { border-color: rgba(126,218,170,.85); box-shadow: 0 0 0 2px rgba(126,218,170,.13); background: rgba(65,136,101,.13); }
.share-source-card img { width: 100%; height: 110px; object-fit: contain; background: #0b0d11; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; }
.share-source-card span { overflow: hidden; padding: 9px 3px 3px; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.share-source-hint { margin: 9px 0 12px; color: #abaeb7; font-size: 11px; }
.share-no-sources { grid-column: 1 / -1; color: #abadb5; padding: 17px; font-size: 12px; text-align: center; }
.share-quality-dialog select { margin: 5px 0 11px; }
.share-quality-dialog .dialog-submit:disabled { opacity: .45; cursor: not-allowed; }
.screen-preview { display: none !important; }
.voice-stage .remote-tile.has-video video { object-fit: contain; object-position: center; }
.voice-stage .remote-tile.is-local-screen video { pointer-events: none; }
.voice-stage .remote-tile:fullscreen { width: 100vw !important; height: 100vh !important; max-height: 100vh !important; border: none; background: #050507; }
.voice-stage .remote-tile:fullscreen video { max-height: 100vh !important; height: 100% !important; object-fit: contain; }

/* v0.2.7: the transmission settings live ON the video, not in the bottom toolbar. */
#shareScreenButton[hidden] { display: none !important; }
.screen-tile-toolbar {
  position: absolute;
  z-index: 12;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 24px);
  padding: 7px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 13px;
  background: rgba(18,21,27,.75);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  box-shadow: 0 7px 25px rgba(0,0,0,.35);
}
.screen-tile-toolbar button {
  min-height: 31px;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: #f3f3f5;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.screen-tile-toolbar button:hover, .screen-tile-toolbar button:focus-visible {
  background: rgba(255,255,255,.2);
  outline: none;
}
.screen-tile-toolbar button:last-child {
  border-color: rgba(230,125,130,.32);
  color: #ffcccc;
  background: rgba(195,82,90,.18);
}
.screen-tile-toolbar button:last-child:hover { background: rgba(195,82,90,.33); }
.share-change-source-button {
  display: block;
  margin: 8px 0 10px;
  padding: 11px 13px;
  border: 1px solid rgba(135,206,175,.38);
  border-radius: 10px;
  background: rgba(80,144,116,.15);
  color: #d3f8e6;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.share-change-source-button:hover { background: rgba(80,144,116,.27); }
.share-change-source-button[hidden] { display: none !important; }
@media (max-width: 760px) {
  .screen-tile-toolbar { top: 6px; right: 6px; padding: 5px; gap: 4px; }
  .screen-tile-toolbar button { font-size: 9px; padding: 4px 7px; min-height: 28px; }
}

/* Transmission overlay appears only when the pointer enters the shared video.
   Keyboard focus also reveals it for accessibility. */
.voice-stage .remote-tile.is-local-screen .screen-tile-toolbar {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-7px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.voice-stage .remote-tile.is-local-screen:hover .screen-tile-toolbar,
.voice-stage .remote-tile.is-local-screen:focus-within .screen-tile-toolbar {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
/* Fullscreen video fills the viewport; toolbar stays reachable on hover. */
.voice-stage .remote-tile.nexo-fullscreen-target:fullscreen {
  position: relative !important;
  display: flex !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 0 !important;
  max-height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #050507 !important;
  border: 0 !important;
}
.voice-stage .remote-tile.nexo-fullscreen-target:fullscreen video {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  object-fit: contain !important;
}
.voice-stage .remote-tile.nexo-fullscreen-target:fullscreen .screen-tile-toolbar {
  position: absolute;
  z-index: 2147483646;
  top: 20px;
  right: 20px;
}

/* Native Electron fullscreen expands the stream, rather than the entire room UI. */
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video {
  position: fixed !important;
  inset: 0 !important;
  z-index: 200000 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #020304 !important;
}
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video video {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video .remote-tile-info {
  display: none;
}
.app-shell.nexo-video-fullscreen .remote-media,
.app-shell.nexo-video-fullscreen .voice-stage,
.app-shell.nexo-video-fullscreen .voice-stage-panel {
  overflow: visible !important;
}
.screen-live-viewers {
  position: absolute;
  z-index: 13;
  top: 12px;
  left: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(156,233,193,.35);
  border-radius: 11px;
  color: #d4f9e8;
  background: rgba(9,25,19,.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}
.voice-stage .remote-tile.is-local-screen .screen-live-viewers { opacity: 1; visibility: visible; }
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video .screen-live-viewers { top: 20px; left: 20px; }

/* v0.2.9: keep all transmission controls inside the actual screen viewport.
   Backdrop filters on ancestors establish fixed-position containing blocks
   and previously pushed the rightmost buttons beyond the display boundary. */
.app-shell.nexo-video-fullscreen {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video {
  left: 0 !important;
  right: auto !important;
  top: 0 !important;
  bottom: auto !important;
  transform: none !important;
}
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video .screen-tile-toolbar {
  top: clamp(18px, 2.2vh, 30px) !important;
  right: clamp(34px, 3vw, 58px) !important;
  left: auto !important;
  box-sizing: border-box;
  max-width: calc(100vw - 104px) !important;
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  justify-content: flex-end;
  align-content: flex-start;
}
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video .screen-tile-toolbar button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video .screen-live-viewers {
  top: clamp(18px, 2.2vh, 30px);
  left: clamp(24px, 2.6vw, 48px);
}
@media (max-width: 900px) {
  .app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video .screen-tile-toolbar {
    right: 28px !important;
    max-width: calc(100vw - 56px) !important;
    gap: 4px;
    padding: 5px;
  }
  .app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video .screen-tile-toolbar button {
    font-size: 10px;
    padding: 5px 7px;
  }
}

/* v0.2.9: show the actual sent/decoded resolution (not just the selection). */
.screen-quality-indicator {
  position: absolute;
  z-index: 15;
  right: 14px;
  bottom: 52px;
  max-width: calc(100% - 28px);
  padding: 7px 10px;
  border: 1px solid rgba(128,180,226,.45);
  border-radius: 9px;
  background: rgba(8,15,24,.83);
  color: #e0edfc;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
  text-align: right;
  pointer-events: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video .screen-quality-indicator {
  right: clamp(24px, 2.6vw, 48px);
  bottom: clamp(20px, 2.2vh, 34px);
}
.share-effective-quality {
  padding: 10px 12px;
  margin: 12px 0;
  border: 1px solid rgba(128,180,226,.27);
  border-radius: 10px;
  background: rgba(36,69,104,.14);
  color: #cae3fc !important;
  font-size: 11px !important;
  line-height: 1.55;
}

/* Voice processing controls: dark-glass UI and compact switches. */
.voice-settings-dialog { width: min(495px, calc(100vw - 30px)); max-height: min(88vh, 760px); overflow: hidden; }
.voice-settings-dialog .profile-editor { max-height: min(88vh, 760px); overflow-y: auto; scrollbar-width: thin; }
.voice-settings-dialog .toggle-row {
  display: flex;
  flex-direction: row;
  gap: 15px;
  min-height: 34px;
  padding: 4px 0;
  margin: 0;
  color: #e5e6eb;
  font-size: 11px;
}
.voice-settings-dialog .toggle-row input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: #8ccead;
}
.voice-settings-dialog .voice-audio-hint {
  color: #a8aab3;
  font-size: 10px;
  line-height: 1.55;
  padding: 0 0 2px;
  margin: -4px 0 5px;
}
.voice-settings-dialog .voice-audio-status {
  border: 1px solid rgba(139,204,166,.25);
  border-radius: 9px;
  background: rgba(54,109,77,.12);
  padding: 11px 12px;
  color: #c8ead5;
  font-size: 10px;
  line-height: 1.55;
}

/* Omni topbar update controls; small, consistent with the dark glass theme. */
.nexo-topbar-brand { display: flex; align-items: center; gap: 6px; color: #e4e5e9; white-space: nowrap; padding-right: 5px; font-size: 10px; }
.nexo-topbar-brand strong { font-size: 11px; letter-spacing: .11em; font-weight: 800; }
.nexo-topbar-brand span { font-size: 9px; color: #8e97a6; letter-spacing: .02em; }
.topbar-update-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 33px; padding: 0 11px;
  border: 1px solid rgba(164,207,183,.28); border-radius: 9px;
  background: rgba(74,120,91,.14); color: #d3eadb;
  white-space: nowrap; font-size: 10px; font-weight: 700; cursor: pointer;
  transition: background .16s, border-color .16s;
}
.topbar-update-button:hover, .topbar-update-button:focus-visible {
  background: rgba(102,163,123,.25); border-color: rgba(154,220,179,.55);
}
.topbar-update-button[hidden], .update-indicator[hidden] { display: none !important; }
.topbar-update-button .topbar-update-icon { font-size: 20px; line-height: 0.9; font-weight: 400; transform-origin: center; }
.topbar-update-button.is-busy .topbar-update-icon { animation: nexo-update-rotation 1.1s linear infinite; }
@keyframes nexo-update-rotation { to { transform: rotate(360deg); } }
.update-indicator { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #77e5a9; box-shadow: 0 0 0 4px rgba(119,229,169,.09); }
.nexo-update-dialog {
  width: min(505px, calc(100vw - 30px)); max-height: min(90vh, 720px);
  overflow: auto; border: 1px solid rgba(191,211,204,.2); border-radius: 21px;
  background: rgba(21,24,28,.97); box-shadow: 0 32px 86px rgba(0,0,0,.65);
}
.nexo-update-dialog::backdrop { background: rgba(0,0,0,.62); backdrop-filter: blur(8px); }
.nexo-update-dialog-content { display: flex; flex-direction: column; gap: 15px; padding: 25px; }
.nexo-update-dialog-heading { display: flex; align-items: center; gap: 14px; }
.nexo-update-symbol { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; font-size: 29px; color: #c9efda; border: 1px solid rgba(127,208,170,.31); border-radius: 14px; background: rgba(105,201,149,.1); }
.nexo-update-eyebrow { margin: 0 0 5px; font-size: 9px; font-weight: 750; letter-spacing: .14em; color: #91ab9c; }
.nexo-update-dialog-heading h2 { margin: 0; font-size: 18px; color: #e9eef0; font-weight: 650; }
.nexo-update-close { margin-left: auto; align-self: flex-start; width: 29px; height: 29px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; color: #b7bbc2; background: rgba(255,255,255,.045); font-size: 22px; cursor: pointer; }
.nexo-update-close:hover { background: rgba(255,255,255,.13); }
.nexo-update-versions { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 10px; color: #9fabab; }
#topbarAvailableVersion { padding: 5px 8px; border-radius: 8px; background: rgba(255,255,255,.065); color: #d3dfd8; }
.nexo-update-status { margin: 0; min-height: 38px; padding: 12px 13px; border: 1px solid rgba(255,255,255,.11); border-radius: 11px; background: rgba(255,255,255,.045); color: #d3d7d9; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.nexo-update-progress { height: 7px; border-radius: 7px; background: rgba(255,255,255,.09); overflow: hidden; }
.nexo-update-progress[hidden] { display: none !important; }
.nexo-update-progress-bar { width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#63a781,#91e5b5); transition: width .16s ease; }
.nexo-update-advanced { border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.025); padding: 12px; }
.nexo-update-advanced summary { color: #b3bcc0; font-size: 11px; cursor: pointer; font-weight: 600; }
.nexo-update-advanced p { color: #929ba0; line-height: 1.55; font-size: 10px; margin: 12px 0; }
.nexo-update-advanced label { display: block; margin: 7px 0 5px; font-size: 10px; color: #c4cccf; }
.nexo-update-url-row { display: flex; gap: 7px; }
.nexo-update-url-row input { width: 100%; min-width: 0; height: 35px; padding: 0 9px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; outline: none; color: #e7e8e9; background: rgba(2,3,5,.38); font-size: 11px; }
.nexo-update-url-row button { min-height: 35px; padding: 0 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; color: #e6e7e8; background: rgba(255,255,255,.09); font-size: 10px; cursor: pointer; }
.nexo-update-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.nexo-update-dialog-actions button { min-height: 37px; padding: 0 13px; border: 1px solid rgba(255,255,255,.15); border-radius: 9px; background: rgba(255,255,255,.08); color: #f0f2f2; cursor: pointer; font-size: 11px; font-weight: 650; }
.nexo-update-dialog-actions .dialog-submit { border-color: rgba(129,203,159,.33); background: rgba(75,131,95,.21); color: #d5f5e0; }
.nexo-update-dialog-actions button:disabled { opacity: .5; cursor: wait; }
@media(max-width:1200px){.nexo-topbar-brand{display:none}.topbar-update-button{padding:0 9px}}
@media(max-width:760px){.topbar-update-button #topbarUpdateLabel{display:none}.topbar-update-button{width:33px;padding:0}.nexo-update-dialog-content{padding:18px}}

/* v0.2.11 — native Windows titlebar + update arrow beside Minimize. */
.nexo-window-titlebar {
  position: fixed;
  z-index: 90;
  top: env(titlebar-area-y, 0px);
  left: env(titlebar-area-x, 0px);
  width: env(titlebar-area-width, calc(100vw - 138px));
  height: env(titlebar-area-height, 36px);
  min-height: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px 0 14px;
  background: #101013;
  border-bottom: 1px solid rgba(255,255,255,.08);
  -webkit-app-region: drag;
  app-region: drag;
  user-select: none;
}
.nexo-window-titlebar[hidden] { display: none !important; }
.nexo-window-titlebar .nexo-topbar-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 0;
  flex: 0 1 auto;
}
.nexo-window-titlebar .nexo-topbar-brand strong { font-size: 11px; }
.nexo-window-titlebar .nexo-topbar-brand span { font-size: 10px; }
.nexo-window-titlebar #topbarUpdateButton {
  flex: 0 0 30px;
  width: 30px;
  height: 28px;
  min-height: 28px;
  margin-left: auto;
  padding: 0;
  border-radius: 7px;
  -webkit-app-region: no-drag;
  app-region: no-drag;
}
.nexo-window-titlebar #topbarUpdateButton[hidden] { display: none !important; }
.nexo-window-titlebar #topbarUpdateButton .topbar-update-icon {
  display: block;
  font-size: 21px;
  line-height: 1;
}
body.nexo-desktop-window .app-shell {
  height: calc(100vh - 36px);
  min-height: 0;
  margin-top: 36px;
}
body.nexo-desktop-window .auth-screen {
  top: 36px;
}
body.nexo-desktop-window:has(.app-shell.nexo-video-fullscreen) .nexo-window-titlebar {
  display: none !important;
}
@media (max-width: 760px) {
  .nexo-window-titlebar { padding-left: 10px; }
  .nexo-window-titlebar .nexo-topbar-brand { display: inline-flex !important; }
  .nexo-window-titlebar #topbarUpdateButton { width: 29px; }
}

/* Friends entry point: visible from every conversation, not buried in AM. */
.topbar-friend-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 32px; padding: 0 11px; border-radius: 9px;
  border: 1px solid rgba(113, 204, 160, .35);
  background: rgba(90, 180, 132, .13); color: #d6f5e0;
  font-size: 11px; font-weight: 650; white-space: nowrap; cursor: pointer;
}
.topbar-friend-button:hover, .topbar-friend-button:focus-visible {
  border-color: rgba(113, 204, 160, .62); background: rgba(90, 180, 132, .22);
}
.friend-plus-mark { font-size: 19px; line-height: 1; font-weight: 400; }
.my-nexo-username {
  margin: 8px 0 0; padding: 5px 8px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.11); background: rgba(255,255,255,.045);
  color: #aaaeb5; font-size: 11px; cursor: pointer; text-align: left;
}
.my-nexo-username strong { color: #e1e8ef; font-weight: 650; }
.my-nexo-username:hover, .my-nexo-username:focus-visible {
  background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.25);
}
@media (max-width: 760px) {
  .topbar-friend-button { width: 33px; padding: 0; }
  .topbar-friend-button > span:last-child { display: none; }
  .friends-panel-header { align-items: flex-start; }
}

/* Direct invitations: server membership and live voice/text chat invitations. */
.topbar-invite-chat-button, .topbar-inbox-button {
  display: inline-flex; position: relative; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 0 11px; border: 1px solid rgba(137,169,212,.28);
  border-radius: 9px; background: rgba(99,133,178,.11); color: #d9e6f7;
  font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.topbar-invite-chat-button:hover, .topbar-inbox-button:hover,
.topbar-invite-chat-button:focus-visible, .topbar-inbox-button:focus-visible {
  border-color: rgba(137,169,212,.58); background: rgba(99,133,178,.24);
}
.pending-invite-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: #d84b62; color: white; font-size: 10px; font-weight: 800;
}
.pending-invite-count[hidden] { display: none; }
.friend-invite-dialog, .invite-inbox-dialog { width: min(490px,calc(100vw - 26px)); max-height: min(680px,85vh); }
.friend-invite-dialog .menu-dialog-body, .invite-inbox-dialog .menu-dialog-body { gap: 14px; }
.friend-invite-dialog label { color: #d0d5dc; font-size: 11px; }
#inviteFriendSearch {
  min-height: 40px; padding: 8px 12px; width: 100%; box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.15); border-radius: 9px;
  background: rgba(0,0,0,.24); color: #eef1f8; outline-offset: 2px;
}
.invitation-list { display: flex; flex-direction: column; gap: 8px; min-height: 55px; max-height: min(400px,52vh); overflow: auto; }
.invitation-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 63px; padding: 10px 11px; border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px; background: rgba(255,255,255,.052);
}
.invitation-row-info { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.invitation-row-info strong { color: #eff2f8; font-size: 12px; overflow-wrap: anywhere; }
.invitation-row-info small { color: #a1a9b6; font-size: 10px; overflow-wrap: anywhere; line-height: 1.5; }
.invitation-row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.invitation-row-actions button { padding: 8px 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; background: rgba(135,166,208,.14); color: #e5edfa; font-size: 10px; cursor: pointer; white-space: nowrap; }
.invitation-row-actions button:hover { background: rgba(135,166,208,.26); }
.invitation-row-actions button:disabled { opacity: .52; cursor: not-allowed; }
.invitation-row-actions button[data-invite-response="decline"] { background: rgba(255,255,255,.06); color: #bbc0c9; }
.invitation-empty { padding: 24px 12px; color: #a1a7b1; text-align: center; font-size: 11px; line-height: 1.6; }
.invitation-notification-button { display: inline-flex; align-items: center; margin: 8px 0 14px; padding: 9px 12px; border: 1px solid rgba(124,194,236,.3); border-radius: 10px; background: rgba(76,137,182,.16); color: #e3edf7; font: 600 11px/1.4 'Segoe UI',sans-serif; cursor: pointer; }
.invitation-notification-button:hover:not(:disabled) { background: rgba(76,137,182,.28); }
.invitation-notification-button:disabled { opacity: .6; cursor: default; }
.invitation-notification-button[hidden] { display: none !important; }
@media (max-width: 920px) {
  .topbar-invite-chat-button > span, .topbar-inbox-button > span:not(.pending-invite-count) { display: none; }
  .topbar-invite-chat-button, .topbar-inbox-button { padding: 0 9px; }
  .invite-voice-stage > span { display: none; }
}
@media (max-width: 530px) {
  .invitation-row { flex-wrap: wrap; }
  .invitation-row-actions { width: 100%; justify-content: flex-end; }
  .chat-topbar { padding-inline: 9px; }
  .topbar-actions { gap: 4px; }
}


/* Any selected broadcast (including a friend's) can occupy the viewport. */
.voice-stage .remote-tile.is-screen-sharing:not(.is-local-screen) .screen-receiver-toolbar {
  opacity: 0; visibility: visible; pointer-events: none;
  transform: translateY(-7px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.voice-stage .remote-tile.is-screen-sharing:not(.is-local-screen):hover .screen-receiver-toolbar,
.voice-stage .remote-tile.is-screen-sharing:not(.is-local-screen):focus-within .screen-receiver-toolbar {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
.screen-receiver-toolbar button:last-child,
.screen-receiver-toolbar button:last-child:hover {
  color: #deebfd; background: rgba(75,117,166,.22);
  border-color: rgba(135,177,225,.32);
}
.screen-reconnect-status {
  position: absolute; z-index: 9; bottom: 38%; left: 50%;
  width: max-content; max-width: calc(100% - 28px);
  transform: translateX(-50%);
  padding: 10px 14px; border: 1px solid rgba(169,188,224,.26);
  border-radius: 12px; background: rgba(12,18,31,.84); color: #e5edfb;
  font-size: 12px; line-height: 1.45; text-align: center;
  pointer-events: none;
}
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video,
.voice-stage .remote-tile.nexo-fullscreen-target:fullscreen {
  position: fixed !important; inset: 0 !important; z-index: 200000 !important;
  width: 100vw !important; height: 100vh !important; min-height: 0 !important;
  max-height: 100vh !important; margin: 0 !important; padding: 0 !important;
  transform: none !important; border: 0 !important; border-radius: 0 !important;
  background: #020304 !important;
}
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video video,
.voice-stage .remote-tile.nexo-fullscreen-target:fullscreen video {
  display: block !important; width: 100% !important; height: 100% !important;
  max-height: 100% !important; object-fit: contain !important;
}
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video .screen-receiver-toolbar,
.voice-stage .remote-tile.nexo-fullscreen-target:fullscreen .screen-receiver-toolbar {
  position: absolute !important;
  top: clamp(18px,2.2vh,30px) !important; right: clamp(28px,3vw,54px) !important;
  left: auto !important; z-index: 200002 !important;
  max-width: calc(100vw - 80px) !important; box-sizing: border-box;
}
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video .screen-reconnect-status {
  bottom: 20%; left: 50%; transform: translateX(-50%);
}
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video .remote-tile-info {
  display: none;
}


/* Sharing sound is explicit: Windows loopback can include all app audio. */
.share-system-audio-row {
  display:flex;align-items:center;gap:12px; padding:12px; margin:13px 0 8px;
  border:1px solid rgba(146,199,241,.29);border-radius:12px;background:rgba(82,135,174,.11);
}
.share-system-audio-row input {width:19px;height:19px;accent-color:#82c8f8;flex:0 0 auto;cursor:pointer;}
.share-system-audio-row span {display:flex;flex-direction:column;gap:5px;}
.share-system-audio-row strong {font-size:12px;color:#e0ecff;}
.share-system-audio-row small {font-size:10px;line-height:1.6;color:#b0bdd0;}
.share-audio-status {font-size:10px;color:#afcbe0;line-height:1.6;margin:7px 0 13px;}

/* Actionable invitation: visible even when system notifications are disabled. */
.nexo-incoming-invitation {
  position: fixed; z-index: 2147483000;
  top: clamp(46px, 6vh, 88px); right: clamp(12px,2vw,34px);
  width: min(370px,calc(100vw - 24px)); box-sizing: border-box;
  padding: 15px 17px; border: 1px solid rgba(127,190,236,.48);
  border-radius: 16px; color: #eff5fe;
  background: rgba(18,27,41,.95); box-shadow: 0 18px 65px rgba(0,0,0,.55);
  backdrop-filter: blur(22px) saturate(145%); -webkit-backdrop-filter: blur(22px) saturate(145%);
  pointer-events: auto;
}
.nexo-incoming-invitation[hidden] { display: none !important; }
.nexo-invite-alert-header { display:flex;align-items:center;justify-content:space-between;gap:9px; }
.nexo-invite-alert-header strong { color:#a9d8ff;font-size:11px;letter-spacing:.07em; }
.nexo-invite-alert-header button {
  border:0;background:transparent;color:#c0d4e8;font-size:22px;cursor:pointer;
}
.nexo-invite-alert-description { color:#e0e8f3;font-size:13px;line-height:1.6;margin:10px 0 15px; }
.nexo-invite-alert-actions { display:flex;gap:7px;flex-wrap:wrap; }
.nexo-invite-alert-actions button {
  cursor:pointer;border:1px solid rgba(167,207,241,.30);border-radius:9px;
  background:rgba(109,167,209,.19);color:#e1f0ff;font-size:11px;
  font-weight:600;padding:9px 10px;
}
.nexo-invite-alert-actions button:first-child {background:rgba(72,163,114,.25);border-color:rgba(136,223,168,.36);}
.nexo-invite-alert-actions button:disabled {opacity:.5;cursor:not-allowed;}
.nexo-invite-alert-actions button:hover:not(:disabled) {background:rgba(109,167,209,.33);}

/* Permanent updater entry in account controls; titlebar arrow stays contextual. */
.update-user-control[hidden], .profile-update-cta[hidden] { display: none !important; }
.update-user-control { color: #a5dbfc; border-color: rgba(133,192,237,.28); }
.update-user-control:hover, .update-user-control:focus-visible { background: rgba(90,157,209,.19); color: #e1f3ff; }
.profile-update-cta { width: 100%; min-height: 40px; padding: 9px 13px; margin: 2px 0 4px; border: 1px solid rgba(131,181,231,.34); border-radius: 10px; background: rgba(83,141,208,.12); color: #d9ebff; font-size: 12px; text-align: left; font-weight: 600; cursor: pointer; }
.profile-update-cta:hover, .profile-update-cta:focus-visible { background: rgba(92,169,235,.25); border-color: rgba(131,191,240,.58); }

/* v0.2.13 — titlebar's ONLY update arrow, just LEFT of native Minimize. */
.nexo-window-titlebar {
  box-sizing: border-box !important;
  padding-right: 0 !important;
  overflow: visible;
}
.nexo-window-titlebar #topbarUpdateButton {
  position: absolute !important;
  top: 2px !important;
  right: 2px !important;
  left: auto !important;
  width: 34px !important;
  height: 32px !important;
  min-height: 32px !important;
  min-width: 34px !important;
  flex: none !important;
  margin: 0 !important;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(106,165,143,.12);
  box-sizing: border-box;
  z-index: 100;
  -webkit-app-region: no-drag !important;
  app-region: no-drag !important;
}
.nexo-window-titlebar #topbarUpdateButton:hover,
.nexo-window-titlebar #topbarUpdateButton:focus-visible {
  background: rgba(95,189,146,.26);
  border-color: rgba(130,227,176,.34);
}
.nexo-window-titlebar #topbarUpdateButton[hidden] { display: none !important; }

/* Main broadcast above individually selectable live video thumbnails.
   Keep players in the same DOM nodes to avoid stopping or muting WebRTC. */
.voice-stage .remote-media.has-video {
  display: flex; flex-wrap: wrap; justify-content: flex-start;
  align-items: flex-start; align-content: flex-start;
  gap: 10px; height: 100%; min-height: 0; max-height: 100%;
  overflow-x: hidden; overflow-y: auto; padding: 2px 3px 5px;
  box-sizing: border-box;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-primary {
  order: -10; flex: 0 0 100%; width: 100%; box-sizing: border-box;
  height: clamp(225px, calc(100% - 148px), 700px);
  min-height: 225px; max-height: none;
  border-color: rgba(106,187,242,.67); background: #040609;
  box-shadow: 0 0 0 1px rgba(104,181,236,.13), 0 12px 34px rgba(0,0,0,.3);
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-primary video {
  display: block; flex: 1 1 auto; width: 100%; height: 100%;
  min-height: 0; max-height: 100%; object-fit: contain; background: #040609;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary {
  order: -5; flex: 0 0 clamp(148px,19vw,220px);
  width: clamp(148px,19vw,220px); height: 122px;
  min-height: 122px; max-height: 122px;
  border: 1px solid rgba(145,182,213,.34); border-radius: 12px;
  box-sizing: border-box; background: #070b10; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary:hover,
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary:focus-visible {
  border-color: rgba(126,204,255,.8); background: rgba(21,40,57,.97);
  box-shadow: 0 0 0 2px rgba(119,190,242,.17);
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary video {
  display: block; flex: 1 1 auto; width: 100%; height: 100%;
  min-height: 0; max-height: 100%; object-fit: contain; pointer-events: none;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary::after {
  content: "↗ Ver como principal"; position: absolute; z-index: 8;
  top: 8px; left: 8px; display: block;
  max-width: calc(100% - 16px); padding: 5px 7px;
  border-radius: 7px; background: rgba(11,20,31,.85);
  color: #e0edfa; font-size: 9px; font-weight: 650;
  white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
  pointer-events: none;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary .remote-tile-info {
  min-height: 23px; padding: 3px 6px;
  background: linear-gradient(0deg, rgba(0,0,0,.82), transparent);
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary .screen-tile-toolbar,
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary .screen-live-viewers,
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary .screen-quality-indicator,
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary .screen-reconnect-status {
  display: none !important;
}
/* A broadcaster whose first frame has not arrived stays underneath the
   playing main stream instead of taking over the stage with a blank tile. */
.voice-stage .remote-media.has-video .remote-tile.is-stream-pending {
  order: -4; flex: 0 0 clamp(148px,19vw,220px);
  width: clamp(148px,19vw,220px);
  height: 122px; min-height: 122px; max-height: 122px;
  border: 1px dashed rgba(140,187,226,.4); border-radius: 12px;
  background: rgba(14,21,32,.95); box-sizing: border-box;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-pending::after {
  content: "Aguardando imagem"; position: absolute; z-index: 8;
  top: 8px; left: 8px; max-width: calc(100% - 16px);
  padding: 5px 7px; border-radius: 7px;
  background: rgba(9,16,25,.84); color: #c8d7e6;
  font-size: 9px; font-weight: 650; pointer-events: none;
}
.voice-stage .remote-media.has-video .remote-tile:not(.has-video):not(.is-stream-primary):not(.is-stream-secondary):not(.is-stream-pending) {
  order: 1; flex: 0 0 100px; width: 100px;
  height: 93px; min-height: 93px;
}
@media (max-width: 800px) {
  .voice-stage .remote-media.has-video .remote-tile.is-stream-primary {
    height: clamp(185px, calc(100% - 135px), 500px); min-height: 185px;
  }
  .voice-stage .remote-media.has-video .remote-tile.is-stream-secondary,
  .voice-stage .remote-media.has-video .remote-tile.is-stream-pending {
    flex-basis: min(42%,190px); width: min(42%,190px);
    height: 104px; min-height: 104px; max-height: 104px;
  }
}
@media (max-height: 680px) {
  .voice-stage .remote-media.has-video .remote-tile.is-stream-primary {
    height: clamp(160px, calc(100% - 115px), 425px); min-height: 160px;
  }
  .voice-stage .remote-media.has-video .remote-tile.is-stream-secondary,
  .voice-stage .remote-media.has-video .remote-tile.is-stream-pending {
    height: 95px; min-height: 95px; max-height: 95px;
  }
}

/* One global shortcut bar across the communities rail and the channels column. */
.app-shell { grid-template-rows: 68px minmax(0, 1fr); }
.global-navigation { grid-column: 1 / 3; grid-row: 1; position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; padding: 0 14px; border-right: 1px solid #242426; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(21,21,24,.82); }
.app-shell > .server-rail { grid-column: 1; grid-row: 2; min-height: 0; }
.app-shell > .channel-sidebar { grid-column: 2; grid-row: 2; min-height: 0; }
.app-shell > .chat-column { grid-column: 3; grid-row: 1 / -1; min-height: 0; }
.app-shell > .member-sidebar { grid-column: 4; grid-row: 1 / -1; min-height: 0; }
.global-nav-button { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 43px; width: 43px; height: 43px; padding: 0; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #a7a7b0; cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.global-nav-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.global-nav-button:hover, .global-nav-button:focus-visible, .global-nav-button[aria-pressed="true"], .global-nav-button[aria-expanded="true"] { color: #f2f2f5; background: rgba(255,255,255,.075); border-color: rgba(255,255,255,.10); }
.global-nav-button:focus-visible { outline: 2px solid #c1c1cc; outline-offset: 2px; }
.global-nav-button::after { content: attr(data-tooltip); position: absolute; top: calc(100% + 9px); left: 50%; z-index: 200; width: max-content; max-width: 230px; padding: 8px 10px; border: 1px solid #3b3b42; border-radius: 8px; background: #242428; color: #f0f0f3; font: 500 11px/1.3 'Segoe UI',sans-serif; white-space: nowrap; box-shadow: 0 5px 18px #0006; opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, -3px); transition: opacity .12s, transform .12s, visibility .12s; }
.global-nav-button:hover::after, .global-nav-button:focus-visible::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.global-navigation .global-nav-count { position: absolute; top: 2px; right: 0; display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border: 2px solid #19191c; border-radius: 8px; background: #e4e4e9; color: #141416; font-size: 8px; font-weight: 750; line-height: 1; }
.global-navigation .global-nav-count[hidden] { display: none; }
.notifications-dialog { width: min(430px, calc(100vw - 32px)); padding: 0; }
.notifications-dialog .dialog-content { padding: 24px; }
.notifications-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notifications-heading h2 { margin: 5px 0 0; font-size: 20px; }
.notification-close { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #ffffff09; color: #aaaab4; cursor: pointer; font-size: 23px; line-height: 1; }
.notification-close:hover { color: white; background: #ffffff13; }
.notifications-description { margin: 14px 0 18px; color: #93939d; font-size: 12px; line-height: 1.6; }
.notifications-list { display: grid; gap: 6px; max-height: min(440px, 60vh); overflow-y: auto; }
.notification-entry { display: flex; align-items: center; width: 100%; gap: 12px; padding: 12px 10px; border: 1px solid transparent; border-radius: 11px; background: #ffffff04; color: #e5e5eb; text-align: left; cursor: pointer; }
.notification-entry:hover, .notification-entry:focus-visible { background: #ffffff0c; border-color: #ffffff14; }
.notification-entry-mark { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px; background: #ffffff09; font-size: 18px; color: #b5b5c1; }
.notification-entry-copy { display: grid; gap: 4px; flex: 1; min-width: 0; }
.notification-entry-copy strong { overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 600; }
.notification-entry-copy small { color: #92929d; font-size: 10px; line-height: 1.5; }
.notification-entry-count { color: #c6c6cf; font-size: 10px; }
.notifications-empty { display: flex; flex-direction: column; align-items: center; padding: 27px 10px; text-align: center; }
.notifications-empty > span { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 15px; border-radius: 50%; background: #ffffff09; color: #c6c6d0; font-size: 20px; }
.notifications-empty strong { color: #e0e0e7; font-size: 13px; }
.notifications-empty p { max-width: 250px; margin: 9px 0 0; color: #8f8f99; font-size: 11px; line-height: 1.7; }
.app-shell.voice-fullscreen { grid-template-rows: minmax(0, 1fr) !important; }
.app-shell.voice-fullscreen > .global-navigation { display: none; }
.app-shell.voice-fullscreen > .chat-column { grid-column: 1; grid-row: 1; }
@media (max-width:760px) {
  .app-shell { grid-template-rows: 60px minmax(0,1fr); }
  .global-navigation { grid-column: 1 / -1; padding: 0 12px; }
  .app-shell > .chat-column { grid-column: 2; grid-row: 2; }
  .app-shell.voice-fullscreen > .chat-column { grid-column: 1; grid-row: 1; }
}

/* Presence colors must agree across avatars, friends and profile cards. */
.presence.status-online, .status-dot.status-online { background: var(--green); }
.presence.status-idle, .status-dot.status-idle { background: #d6b66e; }
.presence.status-dnd, .status-dot.status-dnd { background: #d9787b; }
.presence.status-offline, .status-dot.status-offline,
.presence.status-invisible, .status-dot.status-invisible { background: #777780; }

/* Profile status can be changed where the presence indicator is displayed. */
.self-profile-copy { min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.self-profile-copy:hover strong { color: #fff; }
.self-profile-copy:focus-visible { outline: 2px solid #c1c1cc; outline-offset: 4px; border-radius: 3px; }
.presence.status-busy, .status-dot.status-busy { background: #e5a45b; }
.user-profile-dialog { overflow: visible; }
.user-profile-cover { border-radius: 18px 18px 0 0; }
.user-profile-status-control { position: relative; width: fit-content; margin-bottom: 12px; }
button.user-profile-status { min-height: 28px; margin: 0; padding: 5px 8px; border: 1px solid #ffffff10; border-radius: 7px; background: #ffffff05; font: inherit; font-size: 11px; cursor: pointer; }
button.user-profile-status:hover:not(:disabled), button.user-profile-status[aria-expanded="true"] { background: #ffffff0d; border-color: #ffffff28; }
button.user-profile-status:disabled { padding-left: 0; border-color: transparent; background: transparent; cursor: default; }
.profile-status-caret { margin-left: 6px; color: #9999a3; }
.profile-status-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 215px; padding: 6px; border: 1px solid #ffffff20; border-radius: 10px; background: #252529; box-shadow: 0 12px 35px #0008; }
.profile-status-menu[hidden] { display: none; }
.profile-status-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: #d9d9e1; font: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.profile-status-menu button:hover, .profile-status-menu button:focus-visible { background: #ffffff0c; outline: none; }
.profile-status-menu button:disabled { opacity: .6; cursor: wait; }
.profile-status-check { margin-left: auto; visibility: hidden; color: #d7d7df; }
.profile-status-menu [aria-checked="true"] .profile-status-check { visibility: visible; }
/* All transient notices stay above the bottom controls. JS also handles wrapping. */
.toast { bottom: 104px; }
/* General settings: categories above, their controls below. */
.app-settings-dialog { width: min(680px,calc(100vw - 28px)); max-height: calc(100dvh - 40px); padding: 0; overflow: hidden; }
.settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 23px 26px 18px; }
.settings-heading h2 { margin: 5px 0 0; font-size: 21px; }
.settings-tabs { display: flex; gap: 5px; padding: 0 26px 12px; overflow-x: auto; border-bottom: 1px solid #ffffff12; }
.settings-tabs button { flex: 0 0 auto; padding: 9px 14px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #9696a1; font-size: 12px; cursor: pointer; }
.settings-tabs button[aria-selected="true"] { background: #ffffff0b; border-color: #ffffff18; color: #f0f0f5; }
.settings-tabs button:focus-visible { outline: 2px solid #babac7; outline-offset: -2px; }
.settings-content { max-height: calc(100dvh - 267px); min-height: 290px; overflow-y: auto; padding: 22px 26px; }
.settings-content section[hidden] { display: none; }
.settings-content h3 { margin: 0 0 7px; font-size: 16px; font-weight: 600; }
.settings-description { margin: 0 0 18px; color: #92929f; font-size: 11px; line-height: 1.7; }
.settings-form { display: flex; flex-direction: column; gap: 10px; padding: 0; }
.settings-form > label, .settings-grid label { color: #cacad3; font-size: 11px; }
.settings-form select { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #ffffff1b; border-radius: 8px; background: #17171c; color: #e0e0e8; font: inherit; font-size: 12px; }
.settings-form .toggle-row { margin: 0; min-height: 35px; }
.settings-form input[type="checkbox"] { accent-color: #b7b7c8; }
.settings-form input[type="range"] { width: 100%; accent-color: #b7b7c8; }
.settings-volume-heading { display: flex; justify-content: space-between; margin-top: 12px; color: #cacad3; font-size: 11px; }
.settings-sound-list { display: grid; margin: 8px 0; }
.settings-sound-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #ffffff0a; }
.settings-sound-list label { display: flex; gap: 10px; align-items: center; color: #bcbcc9; font-size: 11px; }
.settings-sound-list button { padding: 6px 9px; border: 1px solid #ffffff16; border-radius: 6px; background: #ffffff06; color: #bdbdca; font-size: 10px; cursor: pointer; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-grid > div { display: grid; gap: 9px; }
.settings-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 14px; }
.settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 26px; border-top: 1px solid #ffffff12; }
.settings-footer p { margin: 0; color: #a9c5b7; font-size: 11px; line-height: 1.5; }
.settings-footer .is-error { color: #e2a8ac; }
.settings-content .desktop-update-panel { margin: 0 0 20px; padding: 16px; }
/* Every cropped image is constrained to its actual avatar or cover box. */
.remote-tile-avatar, .mini-avatar, .voice-preview-avatar { position: relative; overflow: hidden; }
.remote-tile-avatar img, .mini-avatar img, .voice-preview-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.user-profile-cover { position: relative; height: auto; aspect-ratio: 3 / 1; overflow: hidden; }
.user-profile-cover img, .profile-cover-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.user-profile-cover img[hidden], .profile-cover-preview img[hidden] { display: none; }
.profile-cover-preview { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 1; overflow: hidden; border-radius: 12px; background: linear-gradient(135deg,#373741,#17171d); color: #9f9fac; font-size: 12px; }
.profile-cover-actions { display: flex; gap: 8px; margin: 8px 0 14px; }
.profile-photo-hint { margin: -4px 0 4px; color: #9393a0; font-size: 10px; line-height: 1.6; }
.image-crop-dialog { width: min(720px,calc(100vw - 28px)); max-height: calc(100dvh - 30px); padding: 0; }
.image-crop-body { padding: 24px; }
.image-crop-body > p { color: #a1a1af; font-size: 12px; line-height: 1.6; }
#imageCropCanvas { display: block; width: 100%; height: auto; border-radius: 10px; background: #141417; touch-action: none; cursor: grab; }
#imageCropCanvas:active { cursor: grabbing; }
.crop-zoom-controls { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.crop-zoom-controls > button:not(.small-action) { width: 30px; height: 30px; border: 1px solid #ffffff1f; border-radius: 7px; background: #ffffff09; color: #dddde6; font-size: 20px; cursor: pointer; }
.crop-zoom-controls input { flex: 1; min-width: 40px; accent-color: #c4c4d4; }
.crop-zoom-controls output { min-width: 40px; color: #bdbdcb; font-size: 11px; }
.crop-feedback { min-height: 0; color: #e2a8ac; font-size: 11px; }
@media (max-width:520px) { .settings-heading,.settings-content { padding-left: 18px; padding-right: 18px; } .settings-tabs { padding-left: 14px; padding-right: 14px; gap: 0; } .settings-tabs button { padding: 9px 11px; } .settings-content { max-height: calc(100dvh - 275px); } .crop-zoom-controls { gap: 6px; flex-wrap: wrap; } }

.compact-settings-button { display: none; }
@media(max-width:760px) { .compact-settings-button { display: grid; place-items: center; } }

.app-settings-dialog .dialog-submit, .image-crop-dialog .dialog-submit { min-height: 34px; padding: 8px 14px; border: 1px solid #ffffff25; border-radius: 8px; background: #dedee6; color: #202026; font: 600 11px 'Segoe UI',sans-serif; cursor: pointer; }
.app-settings-dialog .dialog-cancel, .image-crop-dialog .dialog-cancel { min-height: 34px; padding: 8px 14px; border: 1px solid #ffffff20; border-radius: 8px; background: #ffffff07; color: #bdbdc9; font: 500 11px 'Segoe UI',sans-serif; cursor: pointer; }
.app-settings-dialog button:disabled, .image-crop-dialog button:disabled { cursor: wait; opacity: .6; }
/* The default voice rooms fit ten people without a scrolling participant list. */
.voice-stage.voice-audio-only .remote-media { position: relative; inset: auto; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 12px; width: 100%; height: 100%; min-height: 0; max-height: 100%; overflow: hidden; }
.voice-stage.voice-audio-only .remote-tile { width: auto; min-width: 0; min-height: 0; height: 100%; margin: 0; padding: 8px; overflow: hidden; }
.voice-stage.voice-audio-only .remote-tile video { display: none; }
.voice-stage.voice-audio-only .remote-tile:not(.has-video) .remote-tile-info { position: static; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 100%; min-width: 0; padding: 8px; background: transparent; }
.voice-stage.voice-audio-only .remote-tile-avatar { flex: 0 0 auto; position: relative; width: clamp(38px,5vw,76px); height: clamp(38px,5vw,76px); margin: 0; border-radius: 20px; font-size: 24px; }
.voice-stage.voice-audio-only .remote-tile-identity { min-width: 0; width: 100%; text-align: center; }
.voice-stage.voice-audio-only .remote-tile-name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.voice-stage.voice-audio-only .remote-tile-speaking { font-size: 9px; }
.voice-stage.voice-audio-only .voice-stage-empty { display: none; }
.voice-stage.voice-audio-only .remote-tile.is-speaking { border-color: #69c99599; box-shadow: inset 0 0 0 1px #69c99530; }
.presence { z-index: 3; pointer-events: none; }
.member-avatar, .friend-avatar { overflow: visible; }
.member-avatar > img, .friend-avatar > img { z-index: 1; }
.community-online-count { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; border: 2px solid #19191c; border-radius: 8px; background: #77bd93; color: #112016; font-size: 8px; font-weight: 750; }
.server-button[data-community-id] { position: relative; }
#friendRequestsBadge, #notificationsBadge { background: #e45b68; color: white; border-radius: 999px; }
@media(max-width:760px) {
 .voice-stage.voice-audio-only .remote-media { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(5,minmax(0,1fr)); gap: 5px; }
 .voice-stage.voice-audio-only .remote-tile { padding: 3px; }
 .voice-stage.voice-audio-only .remote-tile:not(.has-video) .remote-tile-info { flex-direction: row; gap: 5px; padding: 3px; }
 .voice-stage.voice-audio-only .remote-tile-avatar { width: 32px; height: 32px; border-radius: 10px; font-size: 15px; }
 .voice-stage.voice-audio-only .remote-tile-identity { flex: 1; width: auto; text-align: left; }
 .voice-stage.voice-audio-only .remote-tile-name { font-size: 9px; }
 .voice-stage.voice-audio-only .remote-tile-speaking, .voice-stage.voice-audio-only .participant-audio-meter { display: none; }
}
@media(max-height:700px) and (min-width:761px) { .voice-stage.voice-audio-only .remote-tile-avatar { width: 45px; height: 45px; border-radius: 15px; font-size: 18px; } .voice-stage.voice-audio-only .remote-tile:not(.has-video) .remote-tile-info { gap: 5px; padding: 2px; } }

.voice-stage.voice-audio-only .remote-tile-avatar { padding: 0; cursor: pointer; }
@media(min-width:761px) {
 .voice-stage.voice-audio-only .remote-media[data-voice-count="1"] { grid-template-columns: minmax(0,300px); grid-template-rows: minmax(0,1fr); }
 .voice-stage.voice-audio-only .remote-media[data-voice-count="1"] .remote-tile { max-height: 300px; align-self: center; }
 .voice-stage.voice-audio-only .remote-media[data-voice-count="2"] { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: minmax(0,1fr); }
 .voice-stage.voice-audio-only .remote-media[data-voice-count="3"], .voice-stage.voice-audio-only .remote-media[data-voice-count="4"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .voice-stage.voice-audio-only .remote-media[data-voice-count="5"], .voice-stage.voice-audio-only .remote-media[data-voice-count="6"] { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
/* The full profile is a taller card centered in the viewport. */
.user-profile-dialog { width: min(470px,calc(100vw - 28px)); max-height: calc(100dvh - 32px); margin: auto; overflow: auto; }
.user-profile-card { display: flex; flex-direction: column; min-height: min(680px,calc(100dvh - 36px)); padding-bottom: 24px; }
.user-profile-cover { flex: 0 0 auto; }
.user-profile-avatar { flex: 0 0 auto; width: 88px; height: 88px; margin-top: -44px; margin-left: 26px; border-radius: 27px; font-size: 30px; }
.user-profile-main { display: flex; flex: 1; flex-direction: column; min-height: 0; padding: 16px 26px 0; }
.user-profile-main h2 { font-size: 24px; }
.user-profile-username { margin-bottom: 18px; font-size: 12px; }
.user-profile-about { min-height: 90px; font-size: 12px; line-height: 1.7; }
.user-profile-joined { margin-top: auto; padding-top: 24px; }
.user-profile-status-control { margin-top: 10px; }
.profile-master-badge { align-self: flex-start; margin: -7px 0 14px; padding: 5px 8px; border: 1px solid #ddba722e; border-radius: 6px; color: #cdb780; font-size: 9px; }
.profile-master-badge[hidden] { display: none; }
.profile-status-duration { display: grid; gap: 7px; margin-bottom: 8px; }
.profile-status-duration[hidden] { display: none; }
.profile-status-duration label { color: #9595a3; font-size: 10px; }
.profile-status-duration select { width: 100%; padding: 8px 10px; border: 1px solid #ffffff16; border-radius: 7px; background: #202026; color: #c5c5d0; font-size: 11px; }
.profile-status-duration small { color: #9292a0; font-size: 10px; }
.profile-switch-account { margin-top: 18px; padding: 12px 0 0; border: 0; border-top: 1px solid #ffffff10; background: transparent; color: #b0b0bf; font-size: 11px; text-align: left; cursor: pointer; }
.profile-switch-account[hidden] { display: none; }
#profileEditorDialog { width: min(550px,calc(100vw - 28px)); max-height: calc(100dvh - 32px); }
.profile-username-field { display: flex; align-items: center; gap: 8px; padding-left: 11px; border: 1px solid #ffffff1c; border-radius: 8px; background: #ffffff05; color: #858594; }
.profile-editor .profile-username-field input { min-width: 0; padding-left: 0; border: 0; background: transparent; }
.profile-field-feedback { min-height: 14px; margin: -4px 0 2px; color: #98bdab; font-size: 10px; }
.profile-field-feedback.is-error { color: #e0a0a5; }
#profileEditorDurationRow { display: grid; gap: 8px; }
#profileEditorDurationRow[hidden] { display: none; }
.saved-account-list { display: grid; gap: 7px; margin: 20px 0; }
.saved-account { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px; border: 1px solid #ffffff12; border-radius: 10px; background: #ffffff05; color: #dddde5; text-align: left; cursor: pointer; }
.saved-account:disabled { cursor: default; opacity: .7; }
.saved-account > span:nth-child(2) { display: grid; gap: 5px; min-width: 0; }
.saved-account strong { font-size: 12px; }
.saved-account small { color: #8e8e9b; font-size: 10px; }
.saved-account-avatar { position: relative; display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; overflow: hidden; border-radius: 12px; background: #c2c2cc; color: #24242a; }
.saved-account-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.saved-account-state { margin-left: auto; color: #a2a2b1; font-size: 10px; }
.auth-saved-accounts { display: grid; gap: 7px; margin-top: 18px; }
.auth-saved-accounts[hidden] { display: none; }
.auth-saved-accounts > p { color: #9595a3; font-size: 11px; }
.auth-return-account { padding: 10px 0; border: 0; background: transparent; color: #b8b8c6; cursor: pointer; }

.profile-status-menu.opens-up { top: auto; bottom: calc(100% + 6px); }
/* A room invitation is a persistent private-chat message with an in-app
   join action. Keep it visible when reading the conversation history. */
.message-room-invite {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  width: min(370px, 100%); margin-top: 9px; padding: 13px 15px;
  border: 1px solid rgba(102,172,224,.38); border-radius: 13px;
  background: linear-gradient(135deg, rgba(45,91,135,.3), rgba(19,27,40,.7));
  box-sizing: border-box;
}
.message-room-invite-kicker { color: #83c6f6; font-size: 9px; font-weight: 800; letter-spacing: .09em; }
.message-room-invite strong { color: #f3f6fb; font-size: 14px; line-height: 1.35; }
.message-room-invite small { color: #b1bfcd; font-size: 11px; }
.message-room-invite button {
  margin-top: 6px; border: 1px solid rgba(156,207,249,.6);
  border-radius: 9px; padding: 9px 15px;
  background: rgba(40,123,189,.62); color: #fff;
  font: 700 11px/1.4 'Segoe UI',sans-serif; cursor: pointer;
}
.message-room-invite button:hover:not(:disabled) { background: rgba(57,147,210,.85); }
.message-room-invite button:disabled { opacity: .5; cursor: default; }
.message-room-invite-status { color: #bad4e5; font-size: 11px; font-weight: 600; }
.message-clip { width: min(500px,100%); margin-top: 10px; overflow: hidden; border: 1px solid #ffffff18; border-radius: 10px; background: #121216; }
.message-clip video { display: block; width: 100%; max-height: 340px; background: #09090c; }
.message-clip p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 12px; color: #adadbc; font-size: 10px; }
.message-clip p strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; white-space: nowrap; }
.message-clip p span { flex: 0 0 auto; color: #777786; }


/* Update 008: overlay controls are hidden until the viewer points at the
   broadcast (or focuses its controls with the keyboard). Applies equally
   to local and received screens; thumbnails remain click-to-promote. */
.voice-stage .remote-tile.has-video .screen-tile-toolbar {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transform: translateY(-7px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.voice-stage .remote-tile.has-video:hover .screen-tile-toolbar,
.voice-stage .remote-tile.has-video:focus-within .screen-tile-toolbar {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
/* Previous rules used a 34–58px edge offset and several fixed containing
   blocks. Bound every fullscreen toolbar to the actual visible viewport,
   including compact windows and the Electron native fullscreen mode. */
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video .screen-tile-toolbar,
.voice-stage .remote-tile.nexo-fullscreen-target:fullscreen .screen-tile-toolbar {
  position: absolute !important;
  top: max(12px, env(safe-area-inset-top, 0px)) !important;
  right: max(12px, env(safe-area-inset-right, 0px)) !important;
  left: auto !important;
  width: max-content;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100vh - 28px) !important;
  margin: 0 !important;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  z-index: 200002 !important;
}
@media (max-width: 600px) {
  .app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video .screen-tile-toolbar,
  .voice-stage .remote-tile.nexo-fullscreen-target:fullscreen .screen-tile-toolbar {
    top: 8px !important;
    right: 8px !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px) !important;
    gap: 4px;
    padding: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .voice-stage .remote-tile.has-video .screen-tile-toolbar {
    transition: none;
    transform: none;
  }
}


/* Update 011: room occupancy appears only on the chat/server icon. */
/* A custom photo is edge-to-edge inside the chat icon, without browser
   button padding or an inset border. The member count remains overlaid. */
.server-button:has(> .server-icon-image) {
  padding: 0;
  border: 0;
  background: transparent;
}
.server-button > .server-icon-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}
.server-button > .community-online-count {
  z-index: 2;
}
#appShell:has(#friendsPanel[hidden]) .chat-topbar .online-pill {
  display: none;
}

/* Update 016 — streams begin as compact previews. Explicitly watched streams
   form an equal-size mosaic, or one focused stream above equal smaller tiles.
   Keep the DOM and WebRTC media players in place during all layout changes. */
.voice-stage .remote-media.has-video {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  padding: 3px 5px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior-y: contain;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-equal {
  order: -12;
  flex: 0 0 var(--nexo-equal-basis, 100%);
  width: var(--nexo-equal-basis, 100%);
  height: var(--nexo-equal-height, 340px);
  min-height: 160px;
  max-height: none;
  box-sizing: border-box;
  border-color: rgba(107,192,245,.55);
  background: #05080b;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-primary {
  order: -12;
  flex: 0 0 100%;
  width: 100%;
  height: clamp(205px, calc(100% - 176px), 670px);
  min-height: 205px;
  max-height: none;
  box-sizing: border-box;
  border-color: rgba(117,210,255,.78);
  background: #05080b;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary {
  order: -10;
  flex: 0 0 var(--nexo-secondary-basis, 46%);
  width: var(--nexo-secondary-basis, 46%);
  height: clamp(130px, 22vh, 215px);
  min-height: 130px;
  max-height: none;
  box-sizing: border-box;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-equal video,
.voice-stage .remote-media.has-video .remote-tile.is-stream-primary video,
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary video {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  background: #030405;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-preview {
  order: 2;
  flex: 0 0 210px;
  width: 210px;
  height: 128px;
  min-height: 128px;
  max-height: 128px;
  box-sizing: border-box;
  border: 1px solid rgba(124,176,219,.43);
  border-radius: 13px;
  background: #070c12;
  cursor: pointer;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-preview video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  flex: 1 1 auto;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-pending {
  order: 3;
  flex: 0 0 210px;
  width: 210px;
  height: 115px;
  min-height: 115px;
  max-height: 115px;
  box-sizing: border-box;
}
.voice-stage .remote-media.has-video .remote-tile.is-voice-participant {
  order: 20;
  display: flex;
  flex: 0 0 122px;
  width: 122px;
  height: 112px;
  min-height: 112px;
  max-height: 112px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 13px;
}
.voice-stage .remote-media.has-video .remote-tile.is-voice-participant .remote-tile-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px;
  min-height: 0;
  background: transparent;
  text-align: center;
}
.voice-stage .remote-media.has-video .remote-tile.is-voice-participant .remote-tile-avatar {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  min-width: 47px;
  min-height: 47px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  font-size: 17px;
}
.voice-stage .remote-media.has-video .remote-tile.is-voice-participant .remote-tile-identity {
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  gap: 2px;
  text-align: center;
}
.voice-stage .remote-media.has-video .remote-tile.is-voice-participant .remote-tile-name,
.voice-stage .remote-media.has-video .remote-tile.is-voice-participant .remote-tile-speaking {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
}
.voice-stage .remote-media.has-video .remote-tile.is-voice-participant .remote-tile-name { font-size: 10px; }
.voice-stage .remote-media.has-video .remote-tile.is-voice-participant .remote-tile-speaking { font-size: 8px; }
.voice-stage .remote-media.has-video .remote-tile.is-voice-participant .participant-audio-meter {
  display: none;
}
.voice-stage .remote-tile-avatar {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0;
}
.voice-stage .remote-tile-avatar img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  border-radius: inherit;
}
.voice-stage .remote-tile-identity {
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 100%;
}
.voice-stage .remote-tile-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-preview .screen-tile-toolbar,
.voice-stage .remote-media.has-video .remote-tile.is-stream-preview .screen-quality-indicator,
.voice-stage .remote-media.has-video .remote-tile.is-stream-preview .screen-reconnect-status {
  display: none !important;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary::after {
  content: none !important;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary .screen-live-viewers,
.voice-stage .remote-media.has-video .remote-tile.is-stream-equal .screen-live-viewers {
  display: block !important;
}
.screen-live-viewers[hidden], .stream-preview-watch[hidden] { display: none !important; }
.voice-stage .remote-tile .stream-preview-watch {
  position: absolute;
  z-index: 14;
  top: 49%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  min-height: 35px;
  min-width: 108px;
  padding: 8px 12px;
  border: 1px solid rgba(163,226,249,.5);
  border-radius: 10px;
  background: rgba(8,23,34,.91);
  color: #eff8ff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 5px 20px #000b;
}
.voice-stage .remote-tile .stream-preview-watch:hover,
.voice-stage .remote-tile .stream-preview-watch:focus-visible {
  background: rgba(29,72,94,.97);
  outline: 2px solid #bfe6ff;
  outline-offset: 2px;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-preview .screen-live-viewers {
  top: 5px;
  left: 5px;
  padding: 3px 6px;
  font-size: 9px;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-equal .remote-tile-info,
.voice-stage .remote-media.has-video .remote-tile.is-stream-primary .remote-tile-info,
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary .remote-tile-info,
.voice-stage .remote-media.has-video .remote-tile.is-stream-preview .remote-tile-info {
  justify-content: center;
  text-align: center;
  min-height: 27px;
  padding: 4px 8px;
}
.voice-stage .remote-media.has-video .remote-tile.is-stream-equal .remote-tile-name,
.voice-stage .remote-media.has-video .remote-tile.is-stream-primary .remote-tile-name,
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary .remote-tile-name,
.voice-stage .remote-media.has-video .remote-tile.is-stream-preview .remote-tile-name {
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .voice-stage .remote-media.has-video .remote-tile.is-stream-preview,
  .voice-stage .remote-media.has-video .remote-tile.is-stream-pending {
    flex-basis: min(46%, 205px);
    width: min(46%, 205px);
    height: 112px;
    min-height: 112px;
    max-height: 112px;
  }
  .voice-stage .remote-media.has-video .remote-tile.is-voice-participant {
    flex-basis: 94px;
    width: 94px;
    height: 95px;
    min-height: 95px;
    max-height: 95px;
  }
  .voice-stage .remote-media.has-video .remote-tile.is-stream-primary {
    height: clamp(175px, calc(100% - 150px), 500px);
    min-height: 175px;
  }
  .voice-stage .remote-media.has-video .remote-tile.is-stream-secondary {
    height: 130px;
    min-height: 130px;
    max-height: none;
  }
}
@media (max-height: 610px) {
  .voice-stage .remote-media.has-video .remote-tile.is-stream-equal {
    min-height: 155px;
  }
  .voice-stage .remote-media.has-video .remote-tile.is-stream-primary {
    height: clamp(170px, calc(100% - 133px), 440px);
    min-height: 170px;
  }
}

/* Stream and voice cards never share a flex row. Prevent animation of
   flex basis/height while users promote a transmission. */
.voice-stage .remote-media.has-video > .remote-tile.is-voice-participant:not(.has-video):not(.is-stream-primary):not(.is-stream-secondary):not(.is-stream-pending) {
  order: 20;
  flex: 0 0 122px;
  width: 122px;
  height: 112px;
  min-height: 112px;
  max-height: 112px;
}
@media (max-width: 760px) {
  .voice-stage .remote-media.has-video > .remote-tile.is-voice-participant:not(.has-video):not(.is-stream-primary):not(.is-stream-secondary):not(.is-stream-pending) {
    flex-basis: 94px;
    width: 94px;
    height: 95px;
    min-height: 95px;
    max-height: 95px;
  }
}
.voice-stage .remote-media.has-video::before {
  content: "";
  flex: 0 0 100%;
  order: 10;
  height: 0;
  min-height: 0;
  padding: 0;
  margin: -10px 0 0;
  pointer-events: none;
}
.voice-stage .remote-media.has-video > .remote-tile {
  transition-property: border-color, background-color, box-shadow !important;
  transition-duration: .14s !important;
}

/* Update 016 — independent chat history scrolling in any viewport. */
.app-shell { min-height: 0; height: 100dvh; }
.chat-column { min-height: 0; min-width: 0; max-height: 100%; overflow: hidden; }
.chat-topbar { flex: 0 0 auto; }
.conversation {
  flex: 1 1 0%;
  min-height: 0;
  height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
.message-list { min-width: 0; padding-bottom: 12px; }
.composer-wrap { flex: 0 0 auto; }
.friends-panel { min-height: 0; overflow: hidden; }
.friends-panel .friends-content {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

/* Game capture picker: refresh when a game starts after opening the dialog. */
.share-picker-tabs #shareSourceRefresh {
  margin-left: auto;
  white-space: nowrap;
  padding-inline: 10px;
  background: rgba(68,130,170,.16);
  border: 1px solid rgba(118,190,223,.25);
  border-radius: 8px;
  cursor: pointer;
}
.share-picker-tabs #shareSourceRefresh[disabled] { opacity: .6; cursor: wait; }
.share-picker-tabs #shareSourceRefresh[hidden] { display: none; }
.share-game-capture-hint {
  margin: 8px 0 10px;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.5;
  color: #bbc9da;
  border: 1px solid rgba(125,185,225,.22);
  border-radius: 9px;
  background: rgba(46,82,111,.12);
}
.share-game-capture-hint[hidden] { display:none !important; }

/* Presence in the right sidebar and in the friends view. */
.member-row .member-row-info { display:flex;flex-direction:column;gap:4px;min-width:0;flex:1; }
.member-row .member-playing, .friend-playing {
  display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:10px;line-height:1.3;color:#9bd3ed;text-align:left;
}
.friend-identity .friend-playing {font-size:10px;color:#8ad3ef;}
/* Update 016 — participant options are centered and can scroll if the window
   is short. Voice and broadcast sound settings are in separate groups. */
#participantDialog {
  position: fixed !important;
  inset: 0 !important;
  box-sizing: border-box;
  margin: auto !important;
  padding: 0;
  width: min(430px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: min(680px, calc(100dvh - 28px));
  overflow-x: hidden;
  overflow-y: auto;
  transform: none !important;
}
#participantDialog .menu-dialog-body {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 21px;
}
#participantDialog .participant-dialog-heading h2 { text-align: left; }
#participantDialog .participant-control-actions button { text-align: center; }
.participant-stream-audio-controls[hidden] { display: none !important; }
.participant-stream-audio-controls { display: grid; gap: 8px; padding-bottom: 9px; }
.participant-audio-separator {
  width: 100%;
  margin: 10px 0 8px;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.13);
}


/* Mini Central 0.2.20: expanded across the communities rail, black by default. */
.app-shell > .channel-sidebar { position:relative; z-index:4; overflow:visible; }
.app-shell > .server-rail { position:relative; z-index:1; padding-bottom:145px; }
.app-shell .user-panel.mini-central {
  --mini-color:#000000;
  position:absolute; bottom:0; left:-68px; width:calc(100% + 68px);
  box-sizing:border-box; min-height:132px; padding:12px 12px 15px;
  background-color:var(--mini-color);background-position:center;
  background-size:cover; background-repeat:no-repeat; border-top:1px solid #38404a;
  border-right:1px solid #303239;box-shadow:0 -7px 23px #0008;
  display:flex;flex-direction:column;justify-content:flex-end;gap:12px;
  isolation:isolate;z-index:28;
}
.app-shell .mini-central::before {content:""; position:absolute;inset:0;
  background:linear-gradient(90deg,rgba(0,0,0,.56),rgba(0,0,0,.26));z-index:-1;
  pointer-events:none;}
.mini-central-header {font-size:9px;letter-spacing:.15em;font-weight:750;color:#e4edf4;text-shadow:0 1px 3px #000b;}
.mini-central-content {display:flex;gap:9px;align-items:center;min-width:0;}
.app-shell .mini-central .self-avatar {width:48px;height:48px;min-width:48px;min-height:48px;font-size:19px;
  box-shadow:0 3px 14px #0009;}
.mini-central-ident {min-width:0;flex:1;display:flex;flex-direction:column;gap:4px;}
.mini-central-ident .user-copy {width:100%;min-width:0;}
.mini-central-ident .user-copy strong {font-size:13px;line-height:1.3;color:#fff;text-shadow:0 1px 3px #000a;}
.mini-central-ident .user-copy small {font-size:10px;color:#e7ebef;text-shadow:0 1px 3px #000a;}
#miniCentralGame {display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;color:#a4e0fb;font-size:10px;font-weight:650;text-shadow:0 1px 3px #000c;}
#miniCentralGame[hidden]{display:none!important;}
.mini-central-buttons {display:grid;grid-template-columns:repeat(3,26px);gap:2px;flex:none;align-items:center;}
.mini-central-buttons .user-control {width:26px;height:29px;border-radius:7px;color:#f4f4f5;
  background:rgba(5,9,12,.4);}
.mini-central-buttons .user-control.is-muted {color:#f5aaa9;background:rgba(107,28,38,.25);}
.mini-central-buttons .user-control svg {width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.65;
  stroke-linecap:round;stroke-linejoin:round;}
@media(max-width:1150px){.app-shell .user-panel.mini-central{left:-62px;width:calc(100% + 62px);}}
@media(max-width:760px){
 .app-shell > .channel-sidebar{display:none;}
 .app-shell > .server-rail{padding-bottom:0;}
}
.global-navigation .rail-utility,.topbar-actions .rail-utility{
  display:grid;place-items:center;width:31px;height:31px;flex:none;cursor:pointer;
  border:1px solid #50535a;border-radius:9px;color:#d3d6de;background:#17181cb8;
}
.mini-central-editor {display:grid;gap:9px;margin:14px 0;padding:15px;border:1px solid rgba(255,255,255,.11);
  border-radius:13px;background:rgba(255,255,255,.025);}
.mini-central-editor h3 {margin:0;font-size:14px;color:#eee;}
.mini-central-editor p {margin:0;color:#a1a5af;font-size:11px;line-height:1.5;}
.mini-central-preview {height:125px;padding:12px;border:1px solid #40444b;
  background-color:#000;background-size:cover;background-position:center;
  border-radius:10px;display:flex;flex-direction:column;justify-content:flex-end;gap:5px;color:#fff;
  text-shadow:0 1px 3px #000b;}
.mini-central-preview span {font-size:9px;letter-spacing:.13em;opacity:.9;}
.mini-central-preview strong {font-size:14px;}
.mini-central-preview small {font-size:10px;color:#b8ebff;}
.mini-central-editor-actions,.mini-central-color-controls {display:flex;align-items:center;flex-wrap:wrap;gap:8px;}
.mini-central-color-controls input[type=color] {width:46px;height:36px;border:1px solid #656674;
  border-radius:8px;padding:3px;background:transparent;cursor:pointer;}
.mini-central-swatches {display:flex;flex-wrap:wrap;gap:7px;}
.mini-central-swatches button {width:25px;height:25px;border-radius:7px;border:2px solid #646775;cursor:pointer;}
.mini-central-swatches button.is-selected{outline:2px solid #e7f1ff;outline-offset:2px;}
.mini-central-editor .toggle-row {display:flex;justify-content:space-between;gap:10px;align-items:center;}
.share-game-screen-warning {color:#ffda98;font-size:10px;margin:6px 0 0;}

/* Mini Central — profile at upper left, bare controls at lower right. */
.app-shell .user-panel.mini-central {
  min-height: 140px;
  padding: 14px 14px 12px;
  gap: 0;
  justify-content: flex-start;
  align-items: stretch;
}
.app-shell .mini-central .mini-central-content {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  grid-template-rows: minmax(52px, auto) minmax(28px, 1fr);
  column-gap: 11px;
  row-gap: 7px;
  align-items: start;
  width: 100%;
  flex: 1 1 auto;
  min-height: 110px;
  min-width: 0;
}
.app-shell .mini-central .self-avatar {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  justify-self: start;
  width: 49px;
  height: 49px;
  min-width: 49px;
  min-height: 49px;
}
.app-shell .mini-central .mini-central-ident {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  align-self: start;
  justify-self: stretch;
  gap: 4px;
}
.app-shell .mini-central .mini-central-ident .user-copy {
  width: 100%;
  min-width: 0;
  align-self: stretch;
  text-align: left;
}
.app-shell .mini-central .mini-central-ident .user-copy strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.app-shell .mini-central .mini-central-buttons {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  justify-self: end;
  align-self: end;
  gap: 11px;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.app-shell .mini-central .mini-central-buttons button.user-control {
  display: grid;
  place-items: center;
  flex: 0 0 23px;
  width: 23px;
  height: 27px;
  min-width: 23px;
  min-height: 27px;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: #e1e5eb;
  cursor: pointer;
  transition: color .16s ease, opacity .16s ease, filter .16s ease;
}
.app-shell .mini-central .mini-central-buttons button.user-control svg {
  display: block;
  width: 20px;
  height: 20px;
  pointer-events: none;
}
.app-shell .mini-central .mini-central-buttons button.user-control:hover,
.app-shell .mini-central .mini-central-buttons button.user-control:focus-visible {
  color: #fff;
  filter: drop-shadow(0 0 3px rgba(235, 247, 255, .48));
}
.app-shell .mini-central .mini-central-buttons button.user-control.is-active {
  color: #8ce0a9;
}
.app-shell .mini-central .mini-central-buttons button.user-control.is-muted {
  color: #ff9497;
}
.app-shell .mini-central .mini-central-buttons button.user-control:disabled {
  opacity: .42;
  cursor: default;
}

/* Conversation replies: immediately follow the original, slightly indented. */
.message-list > .message-thread-reply {
  margin-left: calc(var(--thread-depth, 1) * 19px);
  margin-top: -10px;
  padding-left: 14px;
  border-left: 1px solid rgba(151, 192, 224, .28);
  position: relative;
  max-width: calc(100% - 45px);
}
.message-list > .message-thread-reply .message-thread-icon {
  position: absolute;
  top: 5px;
  left: -8px;
  width: 16px;
  height: 17px;
  line-height: 17px;
  font-size: 16px;
  text-align: center;
  font-weight: 700;
  color: #9ac3e6;
  background: #111112;
  pointer-events: none;
}
.message-list > .message-thread-reply .message-body {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 620px) {
  .message-list > .message-thread-reply {
    margin-left: calc(var(--thread-depth, 1) * 12px);
    padding-left: 12px;
    max-width: calc(100% - 20px);
  }
}

/* Compact Mini Central: match the message composer footer at the same baseline. */
.app-shell > .server-rail { padding-bottom: 92px; }
.app-shell .user-panel.mini-central {
  box-sizing: border-box;
  height: 88px;
  min-height: 88px;
  max-height: 88px;
  padding: 7px 12px 8px;
  justify-content: flex-start;
  align-items: stretch;
}
.app-shell .mini-central .mini-central-content {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: minmax(42px, 1fr) 22px;
  column-gap: 9px;
  row-gap: 1px;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-items: start;
}
.app-shell .mini-central .self-avatar {
  grid-column: 1;
  grid-row: 1;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  font-size: 16px;
}
.app-shell .mini-central .mini-central-ident {
  grid-column: 2;
  grid-row: 1;
  gap: 0;
  line-height: 1.1;
  align-self: start;
}
.app-shell .mini-central .mini-central-ident .user-copy strong {
  font-size: 12px;
  line-height: 15px;
}
.app-shell .mini-central .mini-central-ident .user-copy small {
  font-size: 9px;
  line-height: 11px;
}
.app-shell .mini-central #miniCentralGame {
  font-size: 9px;
  line-height: 11px;
}
.app-shell .mini-central .mini-central-buttons {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  gap: 9px;
}
.app-shell .mini-central .mini-central-buttons button.user-control {
  width: 24px;
  min-width: 24px;
  height: 22px;
  min-height: 22px;
  flex: 0 0 24px;
}
.app-shell .mini-central .mini-central-buttons button.user-control svg {
  width: 18px;
  height: 18px;
}
@media (max-width: 760px) {
  .app-shell > .server-rail { padding-bottom: 0; }
}

/* Mini Central polish: larger vertically centered portrait, stronger bare icons. */
.app-shell .mini-central .mini-central-content {
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 29px;
  column-gap: 11px;
  row-gap: 0;
  align-items: start;
}
.app-shell .mini-central .self-avatar {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
  justify-self: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  font-size: 20px;
}
.app-shell .mini-central .mini-central-ident {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  gap: 1px;
  min-width: 0;
}
.app-shell .mini-central .mini-central-ident .user-copy strong {
  font-size: 13px;
  line-height: 16px;
}
.app-shell .mini-central .mini-central-ident .user-copy small {
  font-size: 10px;
  line-height: 12px;
}
.app-shell .mini-central #miniCentralGame {
  font-size: 10px;
  line-height: 12px;
}
.app-shell .mini-central .mini-central-buttons {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  align-self: end;
  gap: 12px;
}
.app-shell .mini-central .mini-central-buttons button.user-control {
  flex: 0 0 29px;
  width: 29px;
  min-width: 29px;
  height: 29px;
  min-height: 29px;
  padding: 0;
}
.app-shell .mini-central .mini-central-buttons button.user-control svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.8;
}

/* Voice-first default: all audio-only rooms use square participant cards.
   Preserve stream video tiles and keep voice participants below any shares. */
#voiceStage .remote-media:not(.has-video) {
  position: static;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: auto;
  align-content: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}
#voiceStage .remote-media:not(.has-video)[data-voice-count="1"] {
  grid-template-columns: minmax(0, 280px);
  grid-template-rows: auto;
}
#voiceStage .remote-media:not(.has-video)[data-voice-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 235px));
  grid-template-rows: auto;
}
#voiceStage .remote-media:not(.has-video):is([data-voice-count="3"], [data-voice-count="4"]) {
  grid-template-columns: repeat(2, minmax(0, 220px));
  grid-template-rows: auto;
}
#voiceStage .remote-media:not(.has-video):is([data-voice-count="5"], [data-voice-count="6"]) {
  grid-template-columns: repeat(3, minmax(0, 190px));
  grid-template-rows: auto;
}
#voiceStage .remote-media:not(.has-video) > .remote-tile.is-voice-participant:not(.has-video) {
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  aspect-ratio: 1 / 1;
  padding: 0;
  margin: 0;
  border-radius: 15px;
  overflow: hidden;
}
#voiceStage .remote-media.has-video > .remote-tile.is-voice-participant:not(.has-video):not(.is-screen-sharing) {
  flex: 0 0 118px;
  width: 118px;
  height: 118px;
  min-height: 118px;
  max-height: 118px;
  padding: 0;
  border-radius: 13px;
  box-sizing: border-box;
}
/* The avatar is the entire photo card, rather than a small centered button. */
#voiceStage .remote-media .remote-tile.is-voice-participant:not(.has-video) .remote-tile-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  margin: 0;
  gap: 0;
  background: transparent;
  text-align: center;
  overflow: hidden;
}
#voiceStage .remote-media .remote-tile.is-voice-participant:not(.has-video) .remote-tile-info::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(0, 0, 0, .02) 0%,
    rgba(0, 0, 0, .12) 30%,
    rgba(0, 0, 0, .55) 62%,
    rgba(0, 0, 0, .93) 100%);
}
#voiceStage .remote-media .remote-tile.is-voice-participant:not(.has-video) .remote-tile-avatar {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  flex: none;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: linear-gradient(155deg, #3e586a, #161c2c 72%);
  color: #f4f7ff;
  font-size: clamp(22px, 4vw, 56px);
  text-shadow: 0 2px 5px #000c;
  pointer-events: none;
  transform: none;
  box-shadow: none;
  animation: none;
}
#voiceStage .remote-media .remote-tile.is-voice-participant:not(.has-video) .remote-tile-avatar img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center;
  border-radius: inherit;
}
#voiceStage .remote-media .remote-tile.is-voice-participant:not(.has-video).is-speaking .remote-tile-avatar {
  transform: none;
  box-shadow: none;
  animation: none;
}
#voiceStage .remote-media .remote-tile.is-voice-participant:not(.has-video) .remote-tile-identity {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 8px 7px 9px;
  gap: 3px;
  color: #fff;
  text-align: center;
  pointer-events: none;
}
#voiceStage .remote-media .remote-tile.is-voice-participant:not(.has-video) .remote-tile-name {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  font-size: clamp(10px, 1.2vw, 14px);
  font-weight: 750;
  line-height: 1.25;
  color: #fff;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  text-shadow: 0 2px 5px #000, 0 0 8px #000c;
}
#voiceStage .remote-media .remote-tile.is-voice-participant:not(.has-video) .remote-tile-speaking {
  display: block;
  width: 100%;
  margin: 0;
  font-size: clamp(9px, .9vw, 11px);
  line-height: 1.25;
  color: #dce3ef;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px #000, 0 0 8px #000;
}
#voiceStage .remote-media .remote-tile.is-voice-participant:not(.has-video).is-speaking .remote-tile-speaking {
  color: #9bf7bc;
}
#voiceStage .remote-media .remote-tile.is-voice-participant:not(.has-video) .participant-audio-meter {
  display: flex;
  transform: none;
  width: 48px;
  height: 13px;
  margin: 0;
}
#voiceStage .remote-media.has-video .remote-tile.is-voice-participant:not(.has-video) .remote-tile-identity {
  padding: 4px 5px 6px;
  gap: 2px;
}
#voiceStage .remote-media.has-video .remote-tile.is-voice-participant:not(.has-video) .remote-tile-name {
  font-size: 11px;
}
#voiceStage .remote-media.has-video .remote-tile.is-voice-participant:not(.has-video) .remote-tile-speaking {
  font-size: 9px;
}
/* Both Mini Central controls always have an explicit status color. */
/* Instant state feedback also works in background and hidden Electron windows. */
.app-shell .mini-central .mini-central-buttons button.user-control:is(#micButton, #miniCentralAudioButton) {
  transition: none;
}
.app-shell .mini-central .mini-central-buttons button.user-control:is(#micButton, #miniCentralAudioButton).is-active,
.app-shell .mini-central .mini-central-buttons button.user-control:is(#micButton, #miniCentralAudioButton).is-active:hover,
.app-shell .mini-central .mini-central-buttons button.user-control:is(#micButton, #miniCentralAudioButton).is-active:focus-visible {
  color: #70e9a4;
}
.app-shell .mini-central .mini-central-buttons button.user-control:is(#micButton, #miniCentralAudioButton).is-muted,
.app-shell .mini-central .mini-central-buttons button.user-control:is(#micButton, #miniCentralAudioButton).is-muted:hover,
.app-shell .mini-central .mini-central-buttons button.user-control:is(#micButton, #miniCentralAudioButton).is-muted:focus-visible {
  color: #ff747c;
}
@media (max-width: 760px) {
  #voiceStage .remote-media:not(.has-video) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    align-content: start;
    gap: 8px;
    overflow-y: auto;
  }
  #voiceStage .remote-media:not(.has-video):is([data-voice-count="1"], [data-voice-count="2"], [data-voice-count="3"], [data-voice-count="4"], [data-voice-count="5"], [data-voice-count="6"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }
  #voiceStage .remote-media:not(.has-video)[data-voice-count="1"] {
    grid-template-columns: minmax(0, min(100%, 250px));
    justify-content: center;
  }
  #voiceStage .remote-media.has-video > .remote-tile.is-voice-participant:not(.has-video):not(.is-screen-sharing) {
    flex-basis: 94px;
    width: 94px;
    height: 94px;
    min-height: 94px;
    max-height: 94px;
  }
  #voiceStage .remote-media.has-video .remote-tile.is-voice-participant:not(.has-video) .participant-audio-meter {
    display: none;
  }
}

/* Viewer's own exit: revealed with the existing hover/focus transmission tools. */
.voice-stage .remote-tile.is-stream-watching .screen-receiver-toolbar .screen-receiver-exit {
  color: #ffe4e7;
  background: rgba(163, 48, 60, .34);
  border-color: rgba(255, 139, 151, .48);
}
.voice-stage .remote-tile.is-stream-watching .screen-receiver-toolbar .screen-receiver-exit:hover,
.voice-stage .remote-tile.is-stream-watching .screen-receiver-toolbar .screen-receiver-exit:focus-visible {
  color: #fff;
  background: rgba(194, 61, 76, .62);
  border-color: rgba(255, 168, 181, .75);
}
.voice-stage .remote-tile:not(.is-stream-watching) .screen-receiver-exit {
  display: none !important;
}

/* Wider, side-by-side capture dialog: sources + settings without page scrolling. */
#shareQualityDialog.share-quality-dialog {
  box-sizing: border-box;
  width: min(1080px, calc(100vw - 28px));
  max-width: 1080px;
  max-height: min(96dvh, 980px);
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 20px;
}
#shareQualityDialog.share-quality-dialog .menu-dialog-body {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  padding: 18px 22px 17px;
  gap: 9px;
}
#shareQualityDialog .share-dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(265px, 1fr);
  gap: 19px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}
#shareQualityDialog .share-dialog-sources,
#shareQualityDialog .share-dialog-options {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  gap: 8px;
}
#shareQualityDialog .share-picker-tabs {
  flex: none;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 3px;
  gap: 5px;
}
#shareQualityDialog .share-source-grid {
  box-sizing: border-box;
  flex: 1 1 auto;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  align-content: start;
  min-height: 215px;
  max-height: min(51dvh, 460px);
  overflow-y: auto;
  gap: 10px;
  padding: 4px;
}
#shareQualityDialog .share-source-card img {
  height: clamp(84px, 12dvh, 124px);
}
#shareQualityDialog .share-source-card span {
  padding: 6px 2px 2px;
}
#shareQualityDialog .share-source-hint,
#shareQualityDialog .share-game-capture-hint {
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
}
#shareQualityDialog .share-dialog-options > label:not(.share-system-audio-row) {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}
#shareQualityDialog .share-dialog-options > select {
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  flex: 0 0 40px;
  min-height: 40px;
  margin: 0 0 3px;
}
#shareQualityDialog .share-dialog-options > p {
  margin: 0;
  font-size: 10px;
  line-height: 1.5;
}
#shareQualityDialog .share-dialog-options .share-system-audio-row {
  box-sizing: border-box;
  margin: 4px 0 0;
  min-width: 0;
}
#shareQualityDialog .share-dialog-options .share-system-audio-row small {
  line-height: 1.4;
}
#shareQualityDialog .invite-actions {
  padding-top: 2px;
  margin: 0;
}
#shareQualityDialog[data-settings-only="true"] .share-dialog-sources { display: none; }
#shareQualityDialog[data-settings-only="true"] .share-dialog-layout {
  grid-template-columns: minmax(0, 1fr);
}
/* Compact windows can scroll; standard desktop-sized windows need not. */
@media (max-width: 780px) {
  #shareQualityDialog.share-quality-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }
  #shareQualityDialog.share-quality-dialog .menu-dialog-body {
    padding: 16px;
  }
  #shareQualityDialog .share-dialog-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }
  #shareQualityDialog .share-source-grid {
    min-height: 120px;
    max-height: 32dvh;
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  }
}

/* A watched secondary stream must also expose the exit control on hover. */
.voice-stage .remote-media.has-video .remote-tile.is-stream-secondary.is-stream-watching .screen-receiver-toolbar {
  display: flex !important;
}

/* Receiver action appears immediately on pointer hover or keyboard focus. */
.voice-stage .remote-tile.is-screen-sharing:not(.is-local-screen) .screen-receiver-toolbar {
  transition: none;
}

/* GPU upscaling renders only the viewed stream. Keep native video decoding and
   audio unchanged; release WebGL resources when viewing stops. */
#voiceStage .remote-tile.nexo-upscaling-active {
  position: relative;
}
#voiceStage .remote-tile.nexo-upscaling-active > video {
  opacity: 0;
}
#voiceStage .remote-tile > canvas.nexo-upscale-canvas {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  max-height: 100%;
  border: 0;
  border-radius: inherit;
  padding: 0;
  background: #04070b;
  pointer-events: none;
}
#voiceStage .remote-tile > canvas.nexo-upscale-canvas[hidden] {
  display: none !important;
}
#voiceStage .remote-tile.nexo-upscaling-active .screen-tile-toolbar,
#voiceStage .remote-tile.nexo-upscaling-active .screen-receiver-toolbar,
#voiceStage .remote-tile.nexo-upscaling-active .screen-quality-indicator,
#voiceStage .remote-tile.nexo-upscaling-active .screen-reconnect-status,
#voiceStage .remote-tile.nexo-upscaling-active .screen-live-viewers,
#voiceStage .remote-tile.nexo-upscaling-active .stream-preview-watch {
  z-index: 12;
}
#shareQualityDialog .share-dialog-options .share-mode-hint {
  font-size: 10px;
  line-height: 1.35;
  color: #aebdcc;
  margin: 0 0 4px;
}
#settingsPanelAudio #micSensitivity {
  width: 100%;
  accent-color: #70e9a4;
  cursor: pointer;
}
#settingsPanelAudio #micSensitivity:disabled {
  opacity: .5;
  cursor: not-allowed;
}
#settingsPanelAudio #micSensitivityValue {
  font-weight: 700;
  color: #a8ebcd;
}

/* Friends: authenticated attention notification and right-click action. */
.friend-attention-menu { position:fixed; z-index:20000; min-width:190px; padding:6px; color:#fff; background:#152538ee; border:1px solid #6b819c; border-radius:12px; box-shadow:0 16px 42px #000a; backdrop-filter:blur(16px); }
.friend-attention-menu[hidden], .attention-popup[hidden] { display:none!important; }
.friend-attention-menu button { width:100%; text-align:left; border:0; border-radius:7px; color:inherit; background:transparent; padding:12px; cursor:pointer; }
.friend-attention-menu button:hover, .friend-attention-menu button:focus-visible { background:#375273; }
.attention-setting { margin:12px 0 8px; }
.attention-popup { position:fixed; right:22px; bottom:22px; z-index:19000; display:flex; align-items:center; gap:12px; max-width:min(345px,calc(100vw - 32px)); border:1px solid #6687a6; border-radius:16px; color:#fff; background:#14273deb; backdrop-filter:blur(17px); box-shadow:0 15px 40px #000b; padding:12px; }
.attention-avatar { width:70px; height:70px; flex:none; border-radius:11px; background:#34506c; display:grid; place-items:center; overflow:hidden; font-size:31px; font-weight:700; }
.attention-avatar img { display:block; width:100%; height:100%; object-fit:cover; }
.attention-info { display:flex; flex:1; min-width:0; flex-direction:column; gap:5px; font-size:13px; }
.attention-info strong { display:block; font-size:15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#attentionDismiss { align-self:flex-start; background:transparent; border:0; padding:0 4px; color:#fff; font-size:22px; cursor:pointer; }
.attention-shake .attention-avatar { animation:nexoAttentionShake .52s ease-in-out 3; }
@keyframes nexoAttentionShake { 0%,100%{transform:rotate(0)} 20%,60%{transform:rotate(-10deg)} 40%,80%{transform:rotate(10deg)} }
@media(prefers-reduced-motion:reduce){.attention-shake .attention-avatar{animation:none}}

/* A visible green badge marks an update confirmed by the official public manifest. */
.nexo-window-titlebar #topbarUpdateButton.has-published-release .topbar-update-icon { color:#a2f0b9; }
.nexo-window-titlebar #topbarUpdateButton.has-published-release::after {
  content:""; position:absolute; top:2px;right:2px;width:6px;height:6px;
  border-radius:50%;background:#83eeb1;box-shadow:0 0 6px #74e8a3;
}

/* Settings window: use the available monitor space, without nested or horizontal scrollbars. */
.app-settings-dialog[open] {
  display: flex;
  flex-direction: column;
  width: min(860px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}
.app-settings-dialog .settings-heading,
.app-settings-dialog .settings-tabs,
.app-settings-dialog .settings-footer { flex: 0 0 auto; }
.app-settings-dialog .settings-tabs {
  flex-wrap: wrap;
  overflow-x: hidden;
  overflow-y: visible;
  gap: 5px;
}
.app-settings-dialog .settings-content {
  flex: 0 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.app-settings-dialog .settings-content > section,
.app-settings-dialog .settings-content .settings-form {
  min-width: 0;
  max-width: 100%;
}
.app-settings-dialog .settings-content .profile-editor {
  max-height: none;
  overflow: visible;
}
.app-settings-dialog .settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.app-settings-dialog .settings-volume-heading,
.app-settings-dialog .settings-sound-list > div,
.app-settings-dialog .toggle-row { min-width: 0; }
.app-settings-dialog .settings-content input,
.app-settings-dialog .settings-content select {
  max-width: 100%;
}
@media(max-width: 520px) {
  .app-settings-dialog[open] { width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .app-settings-dialog .settings-content { max-height: none; }
  .app-settings-dialog .settings-tabs { flex-wrap: wrap; }
  .app-settings-dialog .settings-grid { grid-template-columns: minmax(0,1fr); }
}

/* Comfortable compact spacing keeps the short panels clear at 1366x768. */
.app-settings-dialog .settings-heading { padding-top: 17px; padding-bottom: 12px; }
.app-settings-dialog .settings-tabs { padding-bottom: 8px; }
.app-settings-dialog .settings-content { padding-top: 16px; padding-bottom: 16px; }
.app-settings-dialog .settings-sound-list { margin-top: 2px; margin-bottom: 2px; }
.app-settings-dialog .settings-sound-list > div { padding-top: 6px; padding-bottom: 6px; }
.app-settings-dialog .settings-sound-list > div { padding-top: 5px; padding-bottom: 5px; }

/* Keep Settings at the audio panel's full intrinsic height, independent of tab.
   On small screens clamp to the visible viewport and scroll only the content. */
.app-settings-dialog[open] {
  height: min(1260px, calc(100dvh - 28px));
  min-height: 0;
  max-height: calc(100dvh - 28px);
  box-sizing: border-box;
}
.app-settings-dialog .settings-content {
  flex: 1 1 auto;
  min-height: 0;
}
@media(max-width:520px) {
  .app-settings-dialog[open] {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }
}

/* Omni 0.2.40 — quality readout never covers transmission settings.
   Both local and received video only reveal quality on hover / keyboard
   focus; settings stay at the upper-right, quality stays lower-left. */
.voice-stage .remote-tile.has-video .screen-quality-indicator {
  top:auto !important;
  right:auto !important;
  left:clamp(9px,1.5vw,17px) !important;
  bottom:clamp(11px,2vw,19px) !important;
  width:max-content;
  max-width:calc(100% - 34px);
  box-sizing:border-box;
  opacity:0;
  visibility:hidden;
  transform:translateY(6px);
  transition:opacity .15s ease,transform .15s ease,visibility .15s ease;
  pointer-events:none !important;
}
.voice-stage .remote-tile.has-video:hover .screen-quality-indicator,
.voice-stage .remote-tile.has-video:focus-within .screen-quality-indicator {
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}
.app-shell.nexo-video-fullscreen .remote-tile.nexo-fullscreen-target.has-video .screen-quality-indicator,
.voice-stage .remote-tile.nexo-fullscreen-target:fullscreen .screen-quality-indicator {
  top:auto !important;
  right:auto !important;
  bottom:max(17px,env(safe-area-inset-bottom,0px)) !important;
  left:max(18px,env(safe-area-inset-left,0px)) !important;
  max-width:calc(100vw - 36px) !important;
}
@media (prefers-reduced-motion: reduce) {
  .voice-stage .remote-tile.has-video .screen-quality-indicator {
    transition:none;transform:none;
  }
}

/* Omni voice-time stat: compact profile card in the space to the right of the name. */
.nexo-voice-profile-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(165px, 210px);
  align-items: start;
  gap: 12px;
  min-width: 0;
  margin-bottom: 17px;
}
.nexo-voice-profile-identity { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding-top: 6px; }
.nexo-voice-profile-identity h2 { max-width: 100%; overflow-wrap: anywhere; }
.nexo-voice-profile-identity .user-profile-username { max-width: 100%; overflow-wrap: anywhere; margin: 4px 0 10px; }
.nexo-voice-profile-identity .profile-master-badge { width: fit-content; margin: 0; }
.nexo-voice-profile-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  padding: 14px 15px 12px;
  border: 1px solid rgba(147, 184, 192, .22);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(70, 103, 117, .19), rgba(37, 38, 45, .24));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
  box-sizing: border-box;
}
.nexo-voice-profile-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #aab8c1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  white-space: nowrap;
}
.nexo-voice-profile-icon { font-size: 16px; line-height: 1; filter: saturate(.8); }
.nexo-voice-profile-value {
  display: block;
  max-width: 100%;
  color: #f1f7f8;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-size: clamp(20px, 2.5vw, 25px);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: .015em;
  line-height: 1.18;
  white-space: nowrap;
}
.nexo-voice-profile-status { display: flex; align-items: center; gap: 6px; color: #99a7ad; font-size: 10px; }
.nexo-voice-profile-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #76848b; }
.nexo-voice-profile-stat.is-live .nexo-voice-profile-dot { background: #70d7a6; box-shadow: 0 0 0 3px rgba(112,215,166,.12); }
.nexo-voice-profile-stat.is-live .nexo-voice-profile-status { color: #a8dfc3; }
.nexo-voice-profile-footnote { color: #79858d; font-size: 8px; line-height: 1.3; }
@media (max-width: 440px) {
  .nexo-voice-profile-header { grid-template-columns: minmax(0, 1fr) minmax(140px, 165px); gap: 8px; }
  .nexo-voice-profile-stat { padding: 10px 10px 9px; gap: 6px; }
  .nexo-voice-profile-value { font-size: 19px; }
  .nexo-voice-profile-label { font-size: 8px; gap: 5px; }
  .nexo-voice-profile-footnote { font-size: 7px; }
}
@media (max-width: 350px) {
  .nexo-voice-profile-header { grid-template-columns: minmax(0,1fr); }
  .nexo-voice-profile-stat { max-width: 190px; }
}

html[data-nexo-theme="light"] .nexo-voice-profile-stat {
  border-color: #9db6c7;
  background: linear-gradient(145deg, #e8f3f8, #dceaf1);
  box-shadow: inset 0 1px 0 #ffffffce;
}
html[data-nexo-theme="light"] .nexo-voice-profile-label { color: #486c82; }
html[data-nexo-theme="light"] .nexo-voice-profile-value { color: #18394d; }
html[data-nexo-theme="light"] .nexo-voice-profile-status { color: #537288; }
html[data-nexo-theme="light"] .nexo-voice-profile-stat.is-live .nexo-voice-profile-status { color: #19784a; }
html[data-nexo-theme="light"] .nexo-voice-profile-footnote { color: #5b7585; }
