.user-avatar {
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px #ede9fe;
  color: var(--purple);
}
.avatar-picker {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid #e1dbee;
  border-radius: 20px;
  background: #fff;
}
.avatar-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.avatar-picker-head h3 { margin: 3px 0 2px; font-size: 21px; }
.avatar-picker-head p { margin: 0; color: var(--muted); font-size: 13px; }
.avatar-count {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f5f3ff;
  color: var(--purple);
  font-size: 10px;
  font-weight: 850;
}
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
}
.avatar-option { position: relative; cursor: pointer; }
.avatar-option > input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-choice {
  position: relative;
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  padding: 7px 7px 10px;
  border: 2px solid #ebe7f2;
  border-radius: 17px;
  background: #faf9fd;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.avatar-choice:hover {
  transform: translateY(-2px);
  border-color: #c4b5fd;
  box-shadow: 0 10px 24px #5b21b614;
}
.avatar-choice img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 14px;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 0 0 4px #fff, 0 5px 15px #2e106526;
}
.avatar-choice b {
  max-width: 100%;
  color: #342d4d;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar-choice i {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  opacity: 0;
  transform: scale(.6);
  transition: .16s ease;
}
.avatar-option > input:checked + .avatar-choice {
  border-color: var(--purple2);
  background: #f5f3ff;
  box-shadow: 0 0 0 3px #7c3aed14;
}
.avatar-option > input:checked + .avatar-choice i { opacity: 1; transform: scale(1); }
.avatar-option > input:focus-visible + .avatar-choice { outline: 3px solid #fbbf24; outline-offset: 2px; }
.avatar-save {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0 0 auto;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 24px #6d28d929;
}
@media (max-width: 760px) {
  .avatar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .avatar-picker { padding: 16px; }
  .avatar-picker-head { flex-direction: column; gap: 8px; }
  .avatar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .avatar-choice { min-height: 0; }
  .avatar-choice img { width: 100%; height: auto; }
  .avatar-save { width: 100%; }
}
