/* ENEXYZ responsive visual refresh — local assets only */
:root {
  --bg: #080e1a;
  --panel: #101a29;
  --panel-2: #142134;
  --panel-3: #1a2a40;
  --line: rgba(163, 184, 218, .13);
  --text: #edf3ff;
  --muted: #91a2bd;
  --green: #b49aff;
  --green2: #8b72f8;
  --mint: #8fe1ff;
  --anime-violet: #b49aff;
  --anime-cyan: #8fe1ff;
  --radius: 16px;
  --side: clamp(278px, 27vw, 380px);
  --shadow: 0 22px 70px rgba(0, 0, 0, .34);
}
html, body { width:100%; height:100%; background:var(--bg); color:var(--text); }
body { overflow:hidden; font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing:antialiased; }
button, input, textarea { font:inherit; }
button { -webkit-tap-highlight-color:transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline:2px solid var(--anime-cyan)!important; outline-offset:2px!important; }
#app.app {
  position:relative; z-index:2; display:grid;
  grid-template-columns:68px var(--side) minmax(0,1fr);
  width:100vw; height:100dvh; min-height:0; margin:0; border:0; border-radius:0; overflow:hidden;
  background:rgba(9, 15, 27, .56); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none;
}
.rail { min-width:0; padding:13px 7px max(12px, env(safe-area-inset-bottom)); gap:8px; align-items:center!important; background:rgba(9,15,27,.97)!important; border-right:1px solid var(--line)!important; }
.logo-mark { display:grid; place-items:center; width:44px!important; height:44px!important; flex:0 0 44px!important; margin:0 auto 7px!important; border:1px solid rgba(196,179,255,.26); border-radius:15px!important; background:linear-gradient(145deg,#c1a9ff,#8261ef)!important; color:#fff!important; box-shadow:0 8px 24px rgba(130,97,239,.28)!important; }
.rail-divider { width:30px!important; height:1px!important; flex:0 0 1px!important; background:var(--line)!important; margin:1px auto 5px!important; }
.rail .rail-btn { width:54px!important; min-height:58px!important; flex:0 0 58px!important; padding:8px 3px!important; border:1px solid transparent!important; border-radius:14px!important; background:transparent!important; color:#7f91ad!important; gap:5px!important; transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease!important; }
.rail .rail-btn:hover { color:#e2eaff!important; background:rgba(143,161,194,.09)!important; }
.rail .rail-btn.active { color:#d8ceff!important; background:linear-gradient(145deg,rgba(142,113,247,.23),rgba(93,107,197,.12))!important; border-color:rgba(173,151,255,.20)!important; box-shadow:inset 0 0 0 1px rgba(255,255,255,.015); }
.rail .rail-icon { display:grid!important; place-items:center; width:22px; height:22px; font-size:0!important; line-height:1!important; }
.rail .rail-caption { max-width:100%!important; white-space:normal!important; overflow-wrap:normal!important; font-size:10px!important; line-height:1.1!important; font-weight:600!important; letter-spacing:.01em!important; color:inherit!important; }
.rail .rail-spacer { flex:1 1 auto!important; min-height:14px!important; }
#railAvatar.user-orb { width:42px!important; height:42px!important; min-width:42px!important; flex:0 0 42px!important; border:1px solid rgba(180,154,255,.34)!important; border-radius:50%!important; background:linear-gradient(145deg,#1b2b44,#111c2e)!important; color:#d6ccff!important; font-size:0!important; }
.sidebar { min-width:0; min-height:0; background:rgba(14,23,37,.97)!important; border-right:1px solid var(--line)!important; }
.side-head { padding:19px 17px 13px!important; background:linear-gradient(180deg,rgba(31,43,67,.45),rgba(14,23,37,0))!important; }
.brand-line { min-height:34px!important; margin-bottom:11px; align-items:center!important; }
.sidebar-heading { display:flex; flex:1; flex-direction:column; gap:3px; min-width:0; }
.sidebar-heading strong { font-size:18px; line-height:1.15; font-weight:780; letter-spacing:-.035em; }
.sidebar-heading span { color:var(--muted); font-size:10px; line-height:1.2; letter-spacing:.025em; }
.head-actions { gap:7px!important; }
.profile-mini { display:flex!important; align-items:center; gap:10px!important; padding:10px; margin-top:0!important; border:1px solid rgba(161,182,218,.12)!important; border-radius:15px!important; background:rgba(255,255,255,.027)!important; }
.profile-mini .avatar { width:40px!important; height:40px!important; flex:0 0 40px!important; border-radius:13px!important; }
.profile-data { min-width:0; }
.profile-name { font-size:12px!important; font-weight:730!important; }
.profile-status { margin-top:4px!important; gap:5px!important; font-size:10px!important; color:var(--muted)!important; flex-wrap:wrap; }
.connection-status { font-size:9px!important; }
.search-wrap { display:flex; align-items:center; gap:9px; margin:2px 13px 11px!important; min-height:42px!important; padding:0 12px!important; border:1px solid rgba(163,184,218,.11)!important; border-radius:13px!important; background:rgba(5,11,21,.42)!important; }
.search-icon { display:grid; place-items:center; flex:0 0 16px; color:#899cba; font-size:0!important; }
.search-input { min-width:0; color:var(--text)!important; font-size:12px!important; }
.search-input::placeholder { color:#7f91ab!important; }
.shortcut { display:inline-grid; place-items:center; min-width:21px; height:22px; border:1px solid var(--line); border-radius:6px; color:#7486a2!important; font-size:10px!important; }
.tabs { display:flex; gap:5px!important; padding:0 13px 11px!important; }
.tab { border:1px solid transparent!important; border-radius:9px!important; padding:7px 11px!important; background:transparent!important; color:#8fa0ba!important; font-size:11px!important; font-weight:600!important; transition:background .16s ease,color .16s ease,border-color .16s ease!important; }
.tab:hover { color:var(--text)!important; background:rgba(255,255,255,.045)!important; }
.tab.active { color:#e4dcff!important; background:rgba(153,126,255,.14)!important; border-color:rgba(169,147,255,.18)!important; }
.section-label { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:5px 17px 8px!important; color:#9dacc4!important; font-size:10px!important; letter-spacing:.055em!important; font-weight:750!important; text-transform:uppercase; }
.section-label small { color:#7c8eaa!important; font-size:9px!important; letter-spacing:0; text-transform:none; }
#joinGroupBtn { padding:5px 8px!important; font-size:10px!important; text-transform:none; letter-spacing:0; background:rgba(147,126,245,.08)!important; border-color:rgba(169,147,255,.14)!important; white-space:nowrap; }
.room-list { padding:0 7px 10px!important; gap:3px!important; }
.room-item { margin:2px 0!important; padding:10px 9px!important; border:1px solid transparent!important; border-radius:13px!important; gap:11px!important; background:transparent!important; transition:background .15s ease,border-color .15s ease!important; }
.room-item:hover { background:rgba(147,167,203,.07)!important; }
.room-item.active { background:linear-gradient(100deg,rgba(139,114,248,.20),rgba(79,126,189,.12))!important; border-color:rgba(173,151,255,.19)!important; box-shadow:inset 2px 0 0 #ad96ff!important; }
.room-avatar { border-radius:14px!important; }
.room-title { color:#e7eefc!important; font-size:12px!important; font-weight:700!important; }
.room-preview, .room-time { color:#879ab5!important; font-size:10px!important; }
.people-block { padding:12px 15px max(12px,env(safe-area-inset-bottom))!important; border-top:1px solid var(--line)!important; background:rgba(8,14,24,.20)!important; }
.people-block .section-label { padding:0 0 8px!important; }
.people-list { gap:2px!important; }
.person-mini { border-radius:9px!important; padding:5px!important; }
.main { min-width:0; min-height:0; background:linear-gradient(155deg,rgba(15,23,39,.32),rgba(7,12,23,.48))!important; }
.chat-header { height:67px!important; flex:0 0 67px!important; padding:0 19px!important; gap:12px!important; border-bottom:1px solid var(--line)!important; background:rgba(12,20,33,.90)!important; box-shadow:0 6px 20px rgba(0,0,0,.08); backdrop-filter:blur(18px)!important; -webkit-backdrop-filter:blur(18px)!important; }
.chat-header .room-avatar { width:42px!important; height:42px!important; flex:0 0 42px!important; border-radius:14px!important; }
.chat-header-title { font-size:14px!important; font-weight:760!important; letter-spacing:-.01em; }
.chat-header-sub { margin-top:3px!important; color:#91a2bd!important; font-size:10px!important; }
.header-actions { gap:7px!important; }
.icon-btn { display:inline-grid; place-items:center; width:37px!important; height:37px!important; min-width:37px!important; padding:0!important; border:1px solid rgba(157,179,213,.15)!important; border-radius:12px!important; background:rgba(21,34,54,.68)!important; color:#aab9d3!important; font-size:0!important; transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease!important; }
.icon-btn:hover { color:#f1edff!important; background:rgba(139,114,248,.15)!important; border-color:rgba(177,156,255,.36)!important; transform:translateY(-1px); }
.icon-btn:active, .rail-btn:active, .composer-tool:active { transform:scale(.97); }
.ui-icon-svg { display:block; width:19px; height:19px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.ui-icon-svg.fill-icon { fill:currentColor; stroke:none; }
.icon-btn .ui-icon-svg, .rail-icon .ui-icon-svg { width:19px; height:19px; }
.pinned-banner { padding:8px 17px!important; background:linear-gradient(90deg,rgba(138,111,243,.12),rgba(25,36,57,.58))!important; border-bottom:1px solid rgba(169,147,255,.16)!important; }
.pinned-go { gap:11px!important; border-radius:10px!important; color:#e8e4ff!important; }
.pin-symbol { display:inline-grid; place-items:center; width:27px; height:27px; flex:0 0 27px; border-radius:9px; background:rgba(168,147,255,.14); color:#c8bcff; font-size:0!important; }
.messages { min-height:0; padding:22px clamp(14px,2.1vw,32px) 18px!important; background-color:rgba(7,13,23,.23)!important; background-blend-mode:normal!important; }
.message-row { max-width:min(78%,720px)!important; }
.bubble { border:1px solid rgba(169,190,225,.09)!important; border-radius:15px!important; box-shadow:0 5px 15px rgba(0,0,0,.09); }
.message-row.mine .bubble, .message-row.own .bubble { border-color:rgba(158,143,255,.16)!important; }
.composer-wrap { padding:10px clamp(12px,2vw,28px) max(10px,env(safe-area-inset-bottom))!important; border-top:1px solid var(--line)!important; background:rgba(10,17,29,.92)!important; backdrop-filter:blur(17px)!important; -webkit-backdrop-filter:blur(17px)!important; }
.composer-tools { margin-bottom:8px!important; }
.composer-tool-group { gap:6px!important; }
.composer-tool { min-height:34px!important; padding:7px 11px!important; border:1px solid rgba(156,180,215,.13)!important; border-radius:10px!important; background:rgba(25,39,60,.54)!important; color:#b3c4e0!important; gap:7px!important; font-size:11px!important; font-weight:650!important; transition:background .15s ease,border-color .15s ease,color .15s ease!important; }
.composer-tool:hover { color:#f2edff!important; border-color:rgba(177,156,255,.32)!important; background:rgba(139,114,248,.13)!important; }
.composer-tool .ui-icon-svg { width:16px; height:16px; color:#baaaff; }
.composer { gap:9px!important; min-height:54px!important; padding:6px!important; border:1px solid rgba(155,177,211,.15)!important; border-radius:18px!important; background:#121f31!important; box-shadow:inset 0 1px 0 rgba(255,255,255,.025),0 8px 24px rgba(0,0,0,.12)!important; }
.composer textarea { min-height:39px!important; max-height:150px!important; padding:10px 5px!important; color:#edf3ff!important; font-size:13px!important; line-height:1.4!important; }
.composer textarea::placeholder { color:#788ba8!important; }
.voice-btn { display:grid!important; place-items:center; width:39px!important; height:39px!important; min-width:39px!important; flex:0 0 39px!important; border:1px solid rgba(159,180,216,.14)!important; border-radius:13px!important; background:rgba(35,51,76,.72)!important; color:#bdc9e1!important; font-size:0!important; }
.voice-btn:hover { background:rgba(139,114,248,.17)!important; border-color:rgba(177,156,255,.33)!important; color:#f3edff!important; }
.send-btn { display:grid!important; place-items:center; width:42px!important; height:42px!important; min-width:42px!important; flex:0 0 42px!important; border:1px solid rgba(213,206,255,.20)!important; border-radius:15px!important; background:linear-gradient(145deg,#b7a0ff,#8270f2)!important; color:#fff!important; font-size:0!important; box-shadow:0 6px 18px rgba(129,103,239,.23)!important; transition:filter .16s ease,transform .16s ease!important; }
.send-btn:hover { filter:brightness(1.08); transform:translateY(-1px); }
.send-btn .ui-icon-svg { width:20px; height:20px; }
.composer-hint { padding:5px 4px 0!important; color:#7387a5!important; font-size:9px!important; }
.welcome { padding:clamp(16px,3vw,42px)!important; }
.welcome-card { max-width:530px!important; padding:clamp(22px,3vw,38px)!important; border:1px solid rgba(173,151,255,.19)!important; border-radius:26px!important; background:linear-gradient(145deg,rgba(21,31,51,.86),rgba(12,19,32,.87))!important; box-shadow:0 28px 90px rgba(0,0,0,.34),0 0 80px rgba(139,114,248,.06)!important; }
.welcome-emblem { display:grid; place-items:center; margin:0 auto 18px!important; width:68px!important; height:68px!important; border-radius:22px!important; background:linear-gradient(145deg,rgba(177,156,255,.25),rgba(112,179,255,.09))!important; border:1px solid rgba(177,156,255,.24)!important; color:#dcd2ff!important; font-size:0!important; }
.welcome h1 { font-size:clamp(28px,3vw,39px)!important; letter-spacing:-.045em!important; line-height:1.1!important; }
.welcome p { color:#a6b5cd!important; line-height:1.68!important; font-size:13px!important; }
.welcome-actions { gap:9px!important; margin-top:22px!important; }
.btn { min-height:42px; border-radius:12px!important; padding:10px 15px!important; font-size:12px!important; font-weight:700!important; transition:transform .16s ease,filter .16s ease,background .16s ease!important; }
.btn.primary { border:1px solid rgba(195,181,255,.25)!important; background:linear-gradient(145deg,#a994ff,#7d6aec)!important; color:#fff!important; box-shadow:0 8px 20px rgba(129,103,239,.18); }
.btn.secondary { border:1px solid rgba(157,179,213,.15)!important; background:rgba(30,45,68,.7)!important; color:#dce6fa!important; }
.btn:hover { transform:translateY(-1px); filter:brightness(1.07); }
.info-panel { background:rgba(15,24,39,.985)!important; border-left:1px solid var(--line)!important; box-shadow:-18px 0 48px rgba(0,0,0,.20)!important; }
.modal { border:1px solid rgba(166,187,223,.17)!important; border-radius:21px!important; background:rgba(15,24,39,.985)!important; box-shadow:var(--shadow)!important; }
.toast, .toast-item { border:1px solid rgba(163,184,218,.15)!important; border-radius:13px!important; background:rgba(17,29,47,.97)!important; }
.empty-list { color:#8295b2!important; }
[hidden] { display:none!important; }

@media (min-width:1360px) {
}
@media (min-width:761px) and (max-width:1050px) {
  :root { --side:clamp(276px,31vw,326px); }
  #app.app { grid-template-columns:62px var(--side) minmax(0,1fr); }
  .rail { padding-inline:4px; }
  .rail .rail-btn { width:52px!important; }
  .chat-header { padding-inline:13px!important; }
  .messages { padding-inline:14px!important; }
  .message-row { max-width:86%!important; }
}
@media (max-width:760px) {
  #app.app { display:grid!important; grid-template-columns:minmax(0,1fr)!important; grid-template-rows:minmax(0,1fr); width:100vw!important; height:100dvh!important; min-height:0!important; margin:0!important; border:0!important; border-radius:0!important; }
  .rail { display:none!important; }
  .sidebar { grid-column:1; grid-row:1; width:100%; border-right:0!important; background:rgba(13,22,36,.985)!important; }
  .app.chat-open .sidebar { display:none!important; }
  .main { display:none!important; grid-column:1; grid-row:1; min-height:0; }
  .app.chat-open .main { display:flex!important; }
  .side-head { padding:calc(11px + env(safe-area-inset-top)) 13px 11px!important; }
  .brand-line { min-height:38px!important; margin-bottom:10px; }
  .sidebar-heading strong { font-size:18px; }
  .sidebar-heading span { font-size:10px; }
  .profile-mini { padding:8px!important; border-radius:13px!important; }
  .profile-mini .avatar { width:37px!important; height:37px!important; flex-basis:37px!important; }
  .search-wrap { margin:0 12px 9px!important; min-height:43px!important; }
  .tabs { padding:0 12px 9px!important; }
  .tab { padding:8px 12px!important; }
  .section-label { padding-inline:14px!important; }
  .room-list { padding:0 7px 9px!important; }
  .room-item { padding:10px 9px!important; }
  .people-block { max-height:132px!important; overflow:auto; }
  .chat-header { height:58px!important; flex-basis:58px!important; padding:0 9px!important; gap:9px!important; }
  .chat-header .room-avatar { width:36px!important; height:36px!important; flex:0 0 36px!important; }
  .chat-header-title { font-size:13px!important; }
  .chat-header-sub { font-size:10px!important; }
  .header-actions { gap:5px!important; }
  .icon-btn { width:34px!important; min-width:34px!important; height:34px!important; border-radius:11px!important; }
  .icon-btn .ui-icon-svg { width:17px; height:17px; }
  .messages { padding:12px 9px max(12px,env(safe-area-inset-bottom))!important; }
  .message-row { max-width:94%!important; }
  .composer-wrap { padding:7px 8px max(8px,env(safe-area-inset-bottom))!important; }
  .composer-tool { min-height:32px!important; padding:6px 9px!important; border-radius:9px!important; }
  .composer-tools { margin-bottom:6px!important; }
  .composer { min-height:49px!important; border-radius:17px!important; gap:5px!important; padding:4px!important; }
  .composer textarea { min-height:37px!important; padding:9px 3px!important; font-size:16px!important; }
  .voice-btn { width:35px!important; min-width:35px!important; height:35px!important; flex-basis:35px!important; border-radius:12px!important; }
  .send-btn { width:39px!important; min-width:39px!important; height:39px!important; flex-basis:39px!important; border-radius:13px!important; }
  .composer-hint { font-size:9px!important; }
  .welcome { padding:18px 14px!important; }
  .welcome-card { width:100%; padding:24px 17px!important; border-radius:21px!important; }
  .welcome h1 { font-size:31px!important; }
  .welcome p { font-size:12px!important; }
  .welcome-actions { display:flex; flex-direction:column; }
  .welcome-actions .btn { width:100%; }
  .info-panel { max-width:min(360px,94vw)!important; }
  .media-viewer { padding:calc(8px + env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important; }
}
@media (max-width:390px) {
  .sidebar-heading span { display:none; }
  .profile-status { font-size:9px!important; }
  .connection-status { display:none; }
  .chat-header { gap:6px!important; }
  .chat-header .room-avatar { width:32px!important; height:32px!important; flex-basis:32px!important; }
  .icon-btn { width:31px!important; min-width:31px!important; height:31px!important; }
  .composer-tool { padding:5px 7px!important; }
  .composer-tool .ui-icon-svg { width:14px; height:14px; }
  .send-btn { width:37px!important; min-width:37px!important; height:37px!important; flex-basis:37px!important; }
}
@media (orientation:landscape) and (max-height:520px) and (max-width:900px) {
  .side-head { padding-block:6px!important; }
  .profile-mini { display:none!important; }
  .people-block { display:none!important; }
  .chat-header { height:48px!important; flex-basis:48px!important; }
  .composer-tools { display:none!important; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation-duration:.001ms!important; animation-iteration-count:1!important; transition-duration:.001ms!important; scroll-behavior:auto!important; }
}


/* Stability, tappable profile identities, and custom profiles */
.message-avatar-profile{cursor:pointer;border:1px solid rgba(196,159,255,.19);padding:0;display:grid;place-items:center;}
.message-avatar-profile:focus-visible,.message-profile-link:focus-visible,#activeAvatar:focus-visible,#activeTitle:focus-visible{outline:2px solid #9de8ff;outline-offset:3px;}
.message-profile-link{display:block;width:max-content;max-width:100%;padding:0;margin:0 0 3px;border:0;background:transparent;text-align:left;font:inherit;cursor:pointer;}
.message-profile-link:hover{text-decoration:underline;text-underline-offset:3px;}
#activeAvatar{cursor:pointer;}
#activeTitle{cursor:pointer;}
.public-profile-head{display:flex;align-items:center;gap:15px;padding:4px 0 15px;}
.public-profile-avatar{width:76px!important;height:76px!important;flex:0 0 76px;border-radius:50%;font-size:26px;}
.public-profile-identities{display:flex;flex-direction:column;gap:5px;min-width:0;}
.public-profile-display{font-size:17px;color:#f7efff;overflow-wrap:anywhere;}
.public-profile-handle{font-size:13px;color:#9de8ff;overflow-wrap:anywhere;}
.public-profile-status{font-size:11px;color:#a99abd;}
.public-profile-section{padding:12px 0;border-top:1px solid rgba(219,199,255,.12);}
.public-profile-label{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#a996c8;margin-bottom:7px;font-weight:800;}
.public-profile-bio,.public-profile-value{font-size:13px;line-height:1.55;color:#eee5fb;white-space:pre-wrap;overflow-wrap:anywhere;}
.public-profile-link{display:block;width:100%;padding:4px 0;color:#8fdfff;overflow-wrap:anywhere;text-decoration:none;}
.public-profile-link:hover{text-decoration:underline;}
#modalBody .field textarea{width:100%;resize:vertical;min-height:76px;padding:11px 13px;border-radius:12px;border:1px solid rgba(219,199,255,.18);background:rgba(5,2,12,.35);color:#f4edff;font:inherit;line-height:1.45;outline:none;}
#modalBody .field textarea:focus{border-color:rgba(196,159,255,.55);box-shadow:0 0 0 3px rgba(154,107,255,.08);}
#modalBody>.btn.primary{margin-top:10px;}


/* Profile-wide wallpaper and translucent glass treatment. The user's cover
   becomes the backdrop for the entire profile modal, not just its header. */
.modal.profile-glass-theme{
  isolation:isolate!important;position:relative!important;overflow-x:hidden!important;
  background:rgba(13,10,24,.64)!important;
  border:1px solid rgba(231,216,255,.27)!important;
  -webkit-backdrop-filter:blur(24px) saturate(135%)!important;
  backdrop-filter:blur(24px) saturate(135%)!important;
  box-shadow:0 28px 90px rgba(0,0,0,.46),inset 0 1px rgba(255,255,255,.08)!important;
}
.modal.profile-glass-theme::before{
  content:"";position:absolute;inset:0;z-index:-2;pointer-events:none;border-radius:inherit;
  background-image:var(--profile-wallpaper,linear-gradient(145deg,#171024,#10131f));
  background-size:cover;background-position:center;background-repeat:no-repeat;opacity:.5;
}
.modal.profile-glass-theme::after{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:inherit;
  background:linear-gradient(145deg,rgba(10,7,19,.55),rgba(9,12,23,.72));
}
.modal.profile-glass-theme>.modal-head,.modal.profile-glass-theme>#modalBody{position:relative;z-index:1;}
.modal.profile-glass-theme>.modal-head{
  padding:7px 0 14px;margin-bottom:14px;border-bottom:1px solid rgba(255,255,255,.14)!important;
}
.modal.profile-glass-theme .modal-sub{color:rgba(239,232,255,.76)!important;}
.modal.profile-glass-theme .profile-cover{border-color:rgba(255,255,255,.25);box-shadow:0 12px 32px rgba(0,0,0,.22);}
.modal.profile-glass-theme .public-profile-head,
.modal.profile-glass-theme .public-profile-section,
.modal.profile-glass-theme .profile-avatar-row{
  background:rgba(12,9,23,.32)!important;border:1px solid rgba(255,255,255,.13)!important;
  border-radius:15px;padding:12px!important;margin:8px 0 0!important;
  -webkit-backdrop-filter:blur(16px) saturate(130%);backdrop-filter:blur(16px) saturate(130%);
  box-shadow:inset 0 1px rgba(255,255,255,.035);
}
.modal.profile-glass-theme .public-profile-section{border-top:1px solid rgba(255,255,255,.13)!important;}
.modal.profile-glass-theme .public-profile-label{color:rgba(224,203,255,.85)!important;}
.modal.profile-glass-theme .public-profile-bio,.modal.profile-glass-theme .public-profile-value{color:rgba(255,251,255,.94)!important;}
.modal.profile-glass-theme .public-profile-status{color:rgba(235,227,249,.72)!important;}
.modal.profile-glass-theme .field input,.modal.profile-glass-theme .field textarea{
  background:rgba(8,6,16,.38)!important;border-color:rgba(255,255,255,.17)!important;
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
}
.modal.profile-glass-theme .result-item{background:rgba(9,7,18,.28)!important;border-color:rgba(255,255,255,.12)!important;}
.modal.profile-glass-theme .help-note,.modal.profile-glass-theme .fineprint{color:rgba(233,225,248,.68)!important;}
@media(max-width:540px){
  .modal.profile-glass-theme{background:rgba(13,10,24,.72)!important;-webkit-backdrop-filter:blur(18px) saturate(125%)!important;backdrop-filter:blur(18px) saturate(125%)!important;}
  .modal.profile-glass-theme .public-profile-head,.modal.profile-glass-theme .public-profile-section{padding:10px!important;}
}


/* Readable native typography: use the platform's best installed UI font; no remote font request. */
:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html, body, body *, body *::before, body *::after {
  font-family: var(--font-sans) !important;
  font-synthesis: none;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, textarea, select { font-family: var(--font-sans) !important; }

/* Keep long chat lists cheap to lay out without changing scroll position semantics. */
.room-item { content-visibility: auto; contain-intrinsic-size: auto 64px; }
.person-row { content-visibility: auto; contain-intrinsic-size: auto 34px; }
.message-row { contain: layout style; }

/* Device-aware visual quality: reduce GPU-heavy blur/shadows on low-power devices. */
html.perf-lite .grain { display: none !important; }
html.perf-lite .starfield { opacity: .09 !important; }
html.perf-lite .app,
html.perf-lite .sidebar,
html.perf-lite .rail,
html.perf-lite .chat-header,
html.perf-lite .composer-wrap,
html.perf-lite .bubble,
html.perf-lite .welcome-card,
html.perf-lite .modal,
html.perf-lite .modal-backdrop,
html.perf-lite .info-panel,
html.perf-lite .call-overlay,
html.perf-lite #callActiveActions,
html.perf-lite .call-restore-pill,
html.perf-lite .identity-setup-overlay,
html.perf-lite .media-viewer,
html.perf-lite .media-expand-btn {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html.perf-lite .app,
html.perf-lite .welcome-card,
html.perf-lite .bubble,
html.perf-lite .modal,
html.perf-lite .call-window,
html.perf-lite .call-avatar-ring,
html.perf-lite .toast { box-shadow: none !important; }
html.perf-lite .message-row,
html.perf-lite .toast,
html.perf-lite .call-restore-pill { animation: none !important; }
html.perf-balanced .grain { opacity: .025 !important; }
html.perf-high .starfield { opacity: .22; }

@media (pointer: coarse), (max-width: 760px) {
  .chat-header, .composer-wrap, .bubble, .modal-backdrop, .info-panel,
  .call-overlay, .call-restore-pill, .identity-setup-overlay {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .starfield { opacity: .11 !important; }
  html, body, body * { scroll-behavior: auto !important; }
}
