/* Account menu presentation based on kuratlielia's public User Menu preview (MIT). */
:is(.reference-home,.call-shell) #account-menu.account-menu-trigger {
  display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:4px 10px 4px 4px;
  border:1px solid rgba(var(--theme-text-primary-rgb,244,244,246),.28); border-radius:999px;
  background:rgba(var(--theme-surface-card-rgb,12,12,14),.42); box-shadow:none;
  max-width:min(320px,calc(100vw - 150px));
  color:var(--theme-text-primary,#f4f4f5); font-size:14px; font-weight:500;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .15s ease;
}
:is(.reference-home,.call-shell) #account-menu.account-menu-trigger:hover,
:is(.reference-home,.call-shell) #account-menu.account-menu-trigger[aria-expanded="true"] {
  background:rgba(var(--theme-surface-elevated-rgb,17,17,19),.85);
  border-color:rgba(var(--theme-text-primary-rgb,244,244,246),.42);
}
:is(.reference-home,.call-shell) #account-menu.account-menu-trigger:active {transform:scale(.97);}
:is(.reference-home,.call-shell) #account-menu.account-menu-trigger:focus-visible {outline:2px solid var(--theme-focus,#88baff); outline-offset:3px;}
#account-menu.account-menu-trigger .avatar {width:32px; height:32px; flex:0 0 32px;}
#account-menu.account-menu-trigger>span:not(.avatar) {display:flex; align-items:center; gap:8px; min-width:0;}
#account-menu.account-menu-trigger strong {font-size:14px; font-weight:500; line-height:1.2; min-width:0;}
#account-menu.account-menu-trigger small {display:flex; align-items:center; gap:5px; flex:none; font-size:12px; font-weight:500;}
#account-menu.account-menu-trigger small [data-activity-label] {display:block; max-width:90px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
#account-menu.account-menu-trigger small>i {width:5px; height:5px;}
.account-chip .account-menu-chevron {width:14px; height:14px; flex:none; color:var(--theme-text-secondary,#aaa); transition:transform .22s ease;}
.account-chip[aria-expanded="true"] .account-menu-chevron {transform:rotate(180deg);}
:is(.reference-home,.call-shell)>.profile-popover.account-user-menu {
  position:fixed; z-index:35; display:block; width:min(272px,calc(100vw - 24px));
  padding:6px; gap:0; border:1px solid color-mix(in srgb,var(--theme-text-primary,#f4f4f5) 9%,var(--theme-surface-elevated,#171719));
  border-radius:26px; color:var(--theme-text-primary,#f4f4f5);
  background:rgba(var(--theme-surface-base-rgb,7,7,8),.99);
  box-shadow:0 20px 48px rgba(var(--theme-shadow-rgb,0,0,0),.15),0 3px 10px rgba(var(--theme-shadow-rgb,0,0,0),.06);
  overflow:auto; transform-origin:top right; animation:account-menu-in .22s cubic-bezier(.22,1.2,.4,1) both;
}
.account-user-menu:focus {outline:none;}
:is(.reference-home,.call-shell)>.account-user-menu header {display:flex; align-items:center; min-height:58px; padding:8px 8px 10px; border:0; gap:12px;}
.account-user-menu header>div {display:flex; align-items:center; gap:12px; width:100%; min-width:0;}
:is(.reference-home,.call-shell)>.account-user-menu header .avatar-large {width:40px; height:40px; flex-basis:40px; border:1px solid rgba(var(--theme-text-primary-rgb,244,244,246),.10);}
.account-user-menu header .account-menu-identity {display:block; min-width:0; flex:1;}
.account-user-menu header .account-menu-name-row {display:flex; align-items:center; gap:6px; min-width:0;}
:is(.reference-home,.call-shell)>.account-user-menu header strong {font-size:14px; font-weight:550; line-height:1.4; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
:is(.reference-home,.call-shell)>.account-user-menu header .account-menu-status {display:inline-flex; align-items:center; gap:5px; margin:0; padding:3px 6px; border-radius:6px; flex:none; font-size:12px; font-weight:500; line-height:1.4; max-width:112px; color:var(--own-activity-text,var(--theme-success-text,#82d7a9)); background:rgba(var(--theme-text-primary-rgb,244,244,246),.045);}
.account-user-menu header .account-menu-status [data-activity-label] {display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:inherit; font-size:inherit;}
.account-user-menu header .account-menu-status .profile-online-dot {width:5px; height:5px; flex:none;}
:is(.reference-home,.call-shell)>.account-user-menu header .account-menu-username {display:block; margin:2px 0 0; color:var(--theme-text-muted,#99999e); font-size:11px; line-height:1.4; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.account-user-menu .profile-actions {position:relative; display:grid; gap:0; isolation:isolate;}
.account-menu-divider {height:1px; margin:6px -6px; background:rgba(var(--theme-text-primary-rgb,244,244,246),.04);}
:is(.reference-home,.call-shell)>.account-user-menu .profile-actions>.text-button {
  position:relative; z-index:1; display:flex; align-items:center; gap:12px; width:100%; min-height:40px;
  padding:0 12px; border:0; border-radius:20px; color:var(--theme-text-primary,#f4f4f5);
  background:transparent; box-shadow:none; font-size:14px; font-weight:400; text-align:left; text-decoration:none;
  animation:account-menu-item-in .2s ease both; animation-delay:calc(var(--item-index,0)*20ms);
}
:is(.reference-home,.call-shell)>.account-user-menu .profile-actions>.text-button:hover,
:is(.reference-home,.call-shell)>.account-user-menu .profile-actions>.text-button:focus-visible {border:0; outline:none; background:transparent; box-shadow:none; text-decoration:none;}
.account-user-menu .profile-actions>.text-button:focus-visible {outline:1px solid var(--theme-focus,#88baff)!important; outline-offset:-1px;}
.account-user-menu .profile-actions svg {width:16px; height:16px; flex:none; color:var(--theme-text-muted,#a5a5aa);}
.account-user-menu #open-profile-activity>span {flex:1;}
.account-user-menu #open-profile-activity>svg:last-child {width:14px; height:14px;}
:is(.reference-home,.call-shell)>.account-user-menu .profile-actions>.profile-logout {color:var(--theme-danger-text,#cf767e);}
.account-user-menu .profile-logout svg {color:inherit;}
.account-menu-highlight {position:absolute; inset:0 0 auto; z-index:0; height:40px; border-radius:20px; opacity:0; pointer-events:none; background:rgba(var(--theme-text-primary-rgb,244,244,246),.055); transition:transform .2s cubic-bezier(.2,.8,.2,1),height .2s,opacity .12s,background .15s;}
.account-menu-highlight.is-danger {background:rgba(var(--theme-danger-rgb,235,78,104),.10);}
.account-menu-theme-row {display:flex; align-items:center; gap:12px; min-height:44px; padding:0 6px 0 12px; font-size:14px;}
.account-menu-theme-row>span {flex:1;}
.account-theme-segments {position:relative; display:grid; grid-template-columns:repeat(3,1fr); width:100px; height:30px; padding:2px; border-radius:999px; background:rgba(var(--theme-text-primary-rgb,244,244,246),.06);}
.account-theme-thumb {position:absolute; left:2px; top:2px; bottom:2px; width:calc((100% - 4px)/3); border:1px solid rgba(var(--theme-text-primary-rgb,244,244,246),.08); border-radius:999px; background:var(--theme-surface-elevated,#222225); box-shadow:0 1px 3px rgba(var(--theme-shadow-rgb,0,0,0),.10); transform:translateX(calc(var(--theme-index,1)*100%)); transition:transform .22s cubic-bezier(.2,.8,.2,1); pointer-events:none;}
.account-theme-segments button {position:relative; display:grid; place-items:center; width:100%; height:26px; padding:0; border:0; border-radius:999px; color:var(--theme-text-muted,#a5a5aa); background:none; cursor:pointer;}
.account-theme-segments button svg {width:15px; height:15px; color:inherit;}
.account-theme-segments button[aria-checked="true"],.account-theme-segments button[aria-pressed="true"] {color:var(--theme-text-primary,#f4f4f5);}
.account-theme-segments button:focus-visible {outline:1px solid var(--theme-focus,#88baff); outline-offset:-1px;}
:is(.reference-home,.call-shell)>.account-user-menu.is-closing {pointer-events:none; animation:account-menu-out .12s ease both;}
.account-user-menu.is-closing .profile-actions>.text-button {animation:none;}
@keyframes account-menu-in {from {opacity:0; transform:translateY(-6px) scale(.94); filter:blur(2px);} to {opacity:1; transform:none; filter:none;}}
@keyframes account-menu-out {to {opacity:0; transform:translateY(-4px) scale(.97);}}
@keyframes account-menu-item-in {from {opacity:0; transform:translateY(-3px);} to {opacity:1; transform:none;}}
@media(max-width:560px) {:is(.reference-home,.call-shell)>.profile-popover.account-user-menu {width:calc(100vw - 24px); border-radius:26px; transform-origin:bottom center;}}
@media(prefers-reduced-motion:reduce) {.account-user-menu,.account-user-menu *,.account-menu-chevron,#account-menu.account-menu-trigger {animation:none!important; transition:none!important;}}
