.avatar { overflow: hidden; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.profile-short-bio { max-width: 55ch; margin-top: 8px; font-size: 12px; line-height: 1.9; }
.editor-author-help { margin: -12px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.8; }

.profile-editor { max-width: 1120px; margin: 0 auto; padding: 28px 32px 96px; }
.profile-editor-breadcrumb { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; }
.profile-editor-breadcrumb a:hover { color: var(--action); }
.profile-editor-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 24px 0 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.profile-editor-heading h1 { margin: 6px 0; font-size: 32px; }
.profile-editor-heading p { font-size: 14px; }
.profile-editor-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr); gap: 24px; align-items: start; }
.profile-editor-grid .panel { min-width: 0; padding: 28px; }
.profile-editor-grid .panel h2 { margin-bottom: 20px; font-size: 20px; }
.profile-editor-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.profile-editor-fields .field:first-child { grid-column: 1 / -1; }
.profile-editor-grid .field small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; font-weight: 400; }
.profile-avatar-panel p { margin-bottom: 18px; font-size: 12px; }
.profile-avatar-preview { margin-bottom: 22px; }
.profile-avatar-preview .avatar { width: 112px; height: 112px; box-shadow: 0 0 0 6px var(--soft); }
.profile-photo-upload { position: relative; display: inline-flex; min-height: 44px; cursor: pointer; }
.profile-photo-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.profile-photo-upload:focus-within { outline: 3px solid var(--action); outline-offset: 4px; }
.profile-photo-upload:has(input:disabled) { opacity: .6; cursor: wait; }
.profile-avatar-panel .profile-photo-help { margin: 12px 0 0; line-height: 1.9; color: var(--muted); }
.profile-avatar-panel .profile-photo-status { min-height: 24px; margin: 12px 0; line-height: 1.8; color: var(--text); }
.profile-photo-status[data-error="true"] { color: #ab3535; }
.profile-sample-photos { padding-top: 16px; border-top: 1px solid var(--line); }
.profile-sample-photos summary { padding: 8px 0; min-height: 44px; font-size: 13px; cursor: pointer; }
.profile-sample-photos summary:focus-visible { outline: 2px solid var(--action); outline-offset: 4px; }
.profile-sample-photos .profile-avatar-choices { margin: 12px 0 16px; }
.profile-sample-photos small { display: block; color: var(--muted); font-size: 12px; line-height: 1.9; }
.profile-avatar-panel .profile-photo-storage { margin: 20px 0 0; color: var(--muted); line-height: 1.9; }
[data-theme="dark"] .profile-photo-status[data-error="true"] { color: #ffaaa1; }
.profile-avatar-choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.profile-avatar-choice { position: relative; display: block; cursor: pointer; }
.profile-avatar-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.profile-avatar-choice img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 2px solid transparent; border-radius: 50%; background: var(--soft); }
.profile-avatar-choice input:checked + img { border-color: var(--action); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--action); }
.profile-avatar-choice input:focus-visible + img { outline: 3px solid var(--action); outline-offset: 4px; }
.profile-editor-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .profile-editor { padding: 24px 20px 112px; }
  .profile-editor-heading { display: block; }
  .profile-editor-heading .btn { margin-top: 18px; }
  .profile-editor-grid { grid-template-columns: 1fr; }
  .profile-editor-fields { grid-template-columns: 1fr; }
  .profile-editor-fields .field:first-child { grid-column: auto; }
  .profile-editor-actions { grid-column: auto; }
}
