.profile-avatar-presets {
  min-width: 0;
  margin: 22px 0 18px;
  padding: 0;
  border: 0;
}
.profile-avatar-presets legend {
  padding: 0;
  color: var(--strong);
  font-size: 13px;
  font-weight: 600;
}
.profile-avatar-presets > p {
  margin: 5px 0 12px;
  font-size: 12px;
  line-height: 1.5;
}
.profile-avatar-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.profile-avatar-choice {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 9px 5px 8px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--panel);
  color: var(--strong);
  cursor: pointer;
}
.profile-avatar-choice:hover { border-color: var(--brand); }
.profile-avatar-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.profile-avatar-choice img {
  display: block;
  width: 72px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 14px;
}
.profile-avatar-choice > span {
  display: grid;
  min-height: 2.5em;
  place-items: center;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}
.profile-avatar-choice.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 1px var(--brand);
}
.profile-avatar-choice.is-selected::after {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  content: '\2713';
  font-size: 10px;
  line-height: 1;
}
.profile-avatar-choice:focus-within {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
.profile-avatar-preset-grid > p { grid-column: 1 / -1; }
@media (max-width: 480px) {
  .profile-avatar-preset-grid { gap: 7px; }
  .profile-avatar-choice { padding: 7px 4px; border-radius: 10px; }
  .profile-avatar-choice img { border-radius: 10px; }
  .profile-avatar-choice > span { font-size: 10px; }
}
