.profile-menu-anchor { position:relative; display:flex; flex:none; }
.profile-menu { position:absolute; top:calc(100% + 10px); right:0; z-index:20; width:min(240px,calc(100vw - 34px)); padding:6px; border-radius:12px; color:var(--media-text,var(--ink)); }
/* The account popup uses an opaque surface even with the shared frosted skin. */
#profile-menu {
  border:1px solid var(--media-line);
  background:var(--aero-solid,var(--media-panel));
  box-shadow:0 12px 32px #0002;
  -webkit-backdrop-filter:none; backdrop-filter:none;
}
.profile-menu[hidden], .mobile-bottom-nav > button[hidden] { display:none!important; }
.profile-menu-name { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:9px 11px 11px; color:var(--muted); font-size:12px; font-weight:600; }
.profile-menu button { display:flex; align-items:center; gap:11px; width:100%; min-height:44px; padding:10px 11px; border:0; border-radius:7px; background:transparent; color:inherit; font:inherit; font-size:13px; text-align:left; cursor:pointer; touch-action:manipulation; }
.profile-menu button:hover, .profile-menu button:focus-visible { background:var(--media-hover); }
.profile-menu button:focus-visible { outline:2px solid var(--media-focus); outline-offset:-2px; }
.profile-menu svg { width:19px; height:19px; flex:none; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.profile-menu-appearance { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; padding:7px 5px; border-block:1px solid var(--media-line); }
.profile-menu-appearance-label { grid-column:1/-1; padding:1px 6px 2px; color:var(--media-muted); font-size:12px; font-weight:600; }
.profile-menu .profile-menu-theme { justify-content:center; padding:8px 3px; font-size:12px; font-weight:600; text-align:center; }
.profile-menu .profile-menu-theme[aria-checked=true] { background:var(--media-accent-soft); color:var(--media-accent); font-weight:750; }
@media (max-width:760px) {
  .mobile-bottom-nav { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .mobile-bottom-nav.has-torrents { grid-template-columns:repeat(6,minmax(0,1fr)); }
}
body.tv-mode .profile-menu button { min-height:48px; font-size:17px; }
