.profile-avatar {
  display: inline-grid;
  position: relative;
  isolation: isolate;
  place-items: center;
  flex: 0 0 auto;
  width: var(--profile-avatar-size, 40px);
  height: var(--profile-avatar-size, 40px);
  overflow: hidden;
  border-radius: 50%;
  background: hsl(var(--profile-avatar-hue, 110) 33% 32%);
  color: #fff;
  font-size: calc(var(--profile-avatar-size, 40px) * .41);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.profile-avatar-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-summary { display: flex; align-items: center; gap: 15px; }
.profile-summary-avatar { --profile-avatar-size: 62px; }
.profile-summary-identity { min-width: 0; overflow-wrap: anywhere; }
.profile-summary-handle { margin-top: 4px; color: var(--muted); font-size: 14px; }
.account-controls .profile-avatar { --profile-avatar-size: 26px; }
button.profile-trigger { padding: 0; background: transparent; border: 0; border-radius: 50%; touch-action: manipulation; }
.profile-trigger > .profile-avatar { pointer-events: none; }
.profile-popup {
  position: fixed;
  z-index: 18;
  width: min(268px, 100vw - 16px);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 9px 10px 12px;
  border: 1px solid #565d69;
  border-radius: 12px;
  background: var(--raised);
  box-shadow: 0 8px 22px #0008;
}
.profile-popup-summary { display: flex; align-items: center; min-width: 0; gap: 10px; padding: 4px 0; }
.profile-popup-summary .profile-avatar { --profile-avatar-size: 46px; }
.profile-popup-identity { display: grid; min-width: 0; gap: 3px; overflow-wrap: anywhere; }
.profile-popup-identity strong { font-size: 15px; }
.profile-popup-identity span, .comment-handle { color: var(--muted); font-size: 13px; }
button.profile-popup-dismiss { flex: none; width: 32px; min-height: 32px; padding: 0; font-size: 18px; }
.comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; }
.comment-profile-button { width: 40px; height: 40px; }
.comment-profile-button > .profile-avatar { --profile-avatar-size: 34px; }
.comment-profile-button:hover > .profile-avatar, .comment-profile-button:focus-visible > .profile-avatar { outline: 1px solid var(--accent); }
.comment-identity { display: grid; min-width: 0; gap: 2px; line-height: 1.3; overflow-wrap: anywhere; }
.comment-item .comment-meta time { margin-left: 1px; }

.profile-handle-field { gap: 5px; }
.profile-handle-input { position: relative; display: flex; align-items: center; }
.profile-handle-prefix { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.profile-handle-input input { width: 100%; }
.profile-handle-input:has(.profile-handle-prefix:not([hidden])) input { padding-left: 28px; }
.profile-handle-status { color: var(--muted); font-size: 13px; margin: 0; }
.profile-handle-status:empty, .profile-picture-feedback:empty { display: none; }
.profile-handle-status[data-state="available"] { color: var(--accent); }
.profile-handle-status[data-state="invalid"], .profile-picture-feedback[data-state="invalid"] { color: #ffd0d1; }

.profile-picture { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 4px; }
.profile-picture-preview { --profile-avatar-size: 72px; display: flex; }
.profile-picture-info { display: grid; gap: 5px; min-width: 0; }
.profile-picture-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.profile-picture-feedback { margin: 0; color: var(--muted); font-size: 13px; }
