.profile-directory {
  margin: 0; padding: 14px var(--side) 24px; scroll-margin-top: 12px;
  color: var(--ink); background: var(--surface);
}
.directory-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.directory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.profile-card {
  display: flex; min-width: 0; flex-direction: column; overflow: hidden;
  border: 1px solid #51445e; border-radius: 14px; background: #241d32;
  box-shadow: inset 0 1px #ffffff0b;
}
.profile-photo-slot {
  --glow: #66538975;
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; width: 100%; aspect-ratio: 1; place-items: center;
  border-bottom: 1px solid #4b3b57;
  background: radial-gradient(ellipse at 22% 8%,var(--glow),transparent 78%),linear-gradient(145deg,#30273e,#231b30);
}
.profile-photo-slot:has(> img) { display: block; aspect-ratio: auto; }
/* Uploaded photos can carry the editor's previous inline crop dimensions. */
.profile-photo-slot > img {
  display: block; width: 100%; height: auto !important; position: static !important; aspect-ratio: auto 1 / 1;
}
.profile-card:nth-child(3n + 2) .profile-photo-slot { --glow: #71486680; }
.profile-card:nth-child(3n) .profile-photo-slot { --glow: #475f7277; }
.profile-photo-slot::before, .profile-photo-slot::after {
  content: ""; position: absolute; z-index: -1; width: 120%; aspect-ratio: 2.4;
  right: -45%; bottom: -8%; border: 1px solid #d4c0e31c; border-radius: 100%; transform: rotate(-26deg);
}
.profile-photo-slot::after { bottom: -17%; right: -41%; }
.profile-photo-slot svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.profile-photo-slot svg { width: 26px; height: 26px; color: #bcaccb; stroke-width: 1.4; }
.profile-info { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 11px 12px 12px; }
.profile-tag {
  display: inline-flex; align-items: center; justify-content: center; min-height: 32px;
  padding: 5px 12px; border: 1px solid #f3ecff99; border-radius: 10px;
  background: linear-gradient(135deg, #eee6ff, #d6c4f4); color: #30213f;
  font-size: .875rem; font-weight: 700; line-height: 1.4;
  box-shadow: inset 0 1px #ffffff80, 0 2px 6px #0002;
}
.profile-telegram { display: flex; align-items: center; gap: 5px; color: #c8bed3; font-size: .875rem; line-height: 1.4; }
.profile-telegram svg { width: 14px; height: 14px; flex: none; color: #ccb6ea; }
.profile-card:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
@media (hover: hover) { .profile-card:hover { border-color: #bba0d0; } }
@media (prefers-reduced-motion: no-preference) {
  .profile-card { transition: transform .16s ease, border-color .16s ease; }
  .profile-card:active { transform: scale(.98); }
}
