/* Avatar dropdown (homepage header and phone top bar) and profile photos */
.avatar-img, .avatar-initials { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; object-fit: cover; }
.avatar-initials { font-weight: 800; font-size: 14px; color: #fff; background: linear-gradient(135deg, #ec4899, #7c3aed); }
.user-menu { position: relative; }
.user-menu-btn { width: 42px; height: 42px; padding: 2px; border-radius: 50%; border: 2px solid rgba(56, 189, 248, .45); background: #0d2240; cursor: pointer;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .12); }
.user-menu-btn:hover { border-color: #22d3ee; }
.user-menu-pop { position: absolute; z-index: 90; right: 0; top: calc(100% + 10px); width: 270px; padding: 8px 0; border-radius: 16px;
  background: linear-gradient(180deg, #11294b, #0a1a33); border: 1.5px solid rgba(56, 189, 248, .32); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); color: #eef7ff; }
.user-menu-pop[hidden] { display: none; }
.user-menu-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px 14px; border-bottom: 1px solid rgba(56, 189, 248, .16); margin-bottom: 6px; }
.user-menu-head .avatar-img, .user-menu-head .avatar-initials { width: 46px; height: 46px; flex: 0 0 46px; font-size: 17px; }
.user-menu-head div { min-width: 0; display: flex; flex-direction: column; }
.user-menu-head strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-head span { font-size: 12px; color: #8ea6c6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-item { display: block; width: 100%; padding: 12px 16px; border: 0; background: none; color: #eef7ff; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.user-menu-item:hover { background: rgba(34, 211, 238, .1); text-decoration: none; }
.user-menu-item.danger { color: #f87171; }
.user-menu-foot { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(56, 189, 248, .16); }
.mobilebar .user-menu-btn { width: 36px; height: 36px; }
.photo-edit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.photo-edit .photo-preview { width: 72px; height: 72px; }
.photo-edit .avatar-initials { font-size: 24px; }
.terms h3 { margin: 22px 0 6px; }
.terms p { margin: 0; color: var(--muted); line-height: 1.6; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 12px; }
.avatar-choice { width: 100%; aspect-ratio: 1; padding: 3px; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; transition: transform .12s ease; }
.avatar-choice:hover { transform: scale(1.08); border-color: rgba(34, 211, 238, .5); }
.avatar-choice.chosen { border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34, 211, 238, .25); }
.avatar-choice .avatar-img { display: block; }
.avatar-circle { display: inline-block; width: var(--s, 40px); height: var(--s, 40px); flex: 0 0 var(--s, 40px); border-radius: 50%; overflow: hidden; vertical-align: middle; background: #0d2240; }
.avatar-circle .avatar-img { display: block; width: 100%; height: 100%; }
.inbox-avatar { padding: 0; overflow: hidden; background: #0d2240; }
.inbox-avatar .avatar-img { display: block; }
