/* Profile pictures (src/ui/avatar.tsx) and the Profile photo section (/profile). */
.av { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden;
  width: var(--av, 32px); height: var(--av, 32px); border-radius: 50%; color: #fff; font-weight: 700; line-height: 1;
  font-size: calc(var(--av, 32px) * 0.38); letter-spacing: .02em; vertical-align: middle; user-select: none; }
.av > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background: #fff; }
/* Leaderboard circles (their own colours and sizes) can carry a photo too. */
.lb-av { position: relative; overflow: hidden; }
.lb-av > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Name + picture side by side in lists and tables. */
.av-name { display: inline-flex; align-items: center; gap: 10px; min-width: 0; vertical-align: middle; }
.av-name.sm { gap: 6px; }
.av-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.av-row > .av { align-self: flex-start; }
.tm-row .av-row { flex: 1 1 260px; }

/* Profile → Profile photo */
.pp { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; margin: 4px 0 20px; }
.pp h2 { margin: 0; font-size: 17px; }
.pp-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pp-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pp-acts form { margin: 0; }
.pp-note { margin: 0; }
.pp-err { margin: 0; color: var(--err-ink); font-size: 14px; }
.pp-crop { display: grid; gap: 12px; justify-items: center; }
.pp-crop[hidden] { display: none; }
.pp-view { position: relative; width: min(300px, 100%); aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: #111; touch-action: none; cursor: grab; }
.pp-view:active { cursor: grabbing; }
.pp-view img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; pointer-events: none; }
/* The square is what's saved; the circle shows how it looks in the menu and lists. */
.pp-view::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .45); outline: 2px solid rgba(255, 255, 255, .9); outline-offset: -2px; pointer-events: none; }
.pp-zoom { display: flex; flex-direction: row; align-items: center; gap: 10px; width: min(300px, 100%); font-size: 14px; }
.pp-zoom input { flex: 1; width: auto; padding: 0; accent-color: var(--accent); }
.pp-crop .pp-acts { justify-content: center; }
