/* Shared profile images use the existing avatar geometry and semantic colors. */
.profile-avatar{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:50%;overflow:hidden;background:var(--soft);color:var(--text-secondary);vertical-align:middle}
.profile-avatar>img,.avatar>img,.comment-avatar>img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.profile-avatar>.avatar-initial,.avatar>.avatar-initial,.comment-avatar>.avatar-initial{line-height:1;display:block}
.creator-link .profile-avatar{width:22px;height:22px;font-size:10px;margin-right:6px}
.profile-editor.share-dialog{width:min(610px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;border-radius:16px;padding:26px;color:var(--text);background:var(--surface-raised);border-color:var(--border);box-shadow:var(--shadow-popover)}
.profile-editor form{display:block;margin:0}
.profile-editor-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}
.profile-editor-head h2{margin:0;font-size:18px;font-weight:550}
.profile-editor .share-close{color:var(--text-secondary);background:transparent;flex-shrink:0}
.profile-avatar-section{display:flex;gap:22px;align-items:center;margin-bottom:20px}
.profile-avatar-large{width:84px;height:84px;font-size:30px}
.profile-avatar-options{min-width:0;flex:1}
.profile-avatar-buttons{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.profile-editor .profile-editor-hint{color:var(--text-tertiary);font-size:12px;line-height:1.6;margin:9px 0 0}
.avatar-presets{border:0;padding:0;margin:14px 0 0;min-width:0}
.avatar-presets legend{font-size:12px;color:var(--text-secondary);padding:0;margin-bottom:8px}
.avatar-presets>div{display:flex;gap:9px;flex-wrap:wrap}
.avatar-preset{border:2px solid transparent;background:transparent;padding:3px;border-radius:50%;width:44px;height:44px;display:grid;place-items:center}
.avatar-preset>img{display:block;width:34px;height:34px;border-radius:50%}
.avatar-preset:hover{background:var(--surface-hover)}
.avatar-preset[aria-pressed=true]{border-color:var(--focus);background:var(--surface)}
.profile-avatar-buttons [hidden]{display:none}
.avatar-crop{display:grid;justify-items:center;gap:13px;padding:22px 18px 18px;border-radius:12px;background:var(--soft);margin-bottom:20px}
.avatar-crop[hidden]{display:none}
.avatar-crop-preview{width:min(260px,100%);aspect-ratio:1;border-radius:50%;overflow:hidden;background:var(--surface);box-shadow:0 0 0 1px var(--border)}
.avatar-crop canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;border-radius:50%}
.avatar-crop canvas.dragging{cursor:grabbing}
.avatar-crop canvas:focus-visible{outline:3px solid var(--focus);outline-offset:-4px}
.avatar-crop-tools{display:flex;align-items:center;gap:13px}
.avatar-crop-tools .button{width:38px;min-height:38px;padding:0;font-size:20px;background:var(--surface);border:1px solid var(--border);border-radius:50%}
.avatar-crop-tools output{min-width:46px;text-align:center;font-size:12px;font-variant-numeric:tabular-nums;color:var(--text-secondary)}
.avatar-crop-help{font-size:12px;color:var(--text-secondary);line-height:1.6;text-align:center;margin:0}
.avatar-crop-help span{display:block;color:var(--text-tertiary);font-size:11px;margin-top:3px}
.profile-editor .profile-image-status{font-size:12px;color:var(--text-secondary);margin:0 0 15px}
.profile-editor .profile-image-status:empty{display:none}
.profile-editor-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.profile-editor-fields .field{margin:0;min-width:0}
.profile-editor-fields .field>label{display:block;font-size:12px;color:var(--text-secondary);margin-bottom:7px}
.profile-editor-fields input,.profile-editor-fields textarea{width:100%;font-size:14px;padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text)}
.profile-editor-fields textarea{resize:vertical;min-height:72px;max-height:180px;line-height:1.6}
.profile-bio-field,.profile-website-field{grid-column:1/-1}
.profile-editor .profile-editor-error{font-size:12px;color:var(--danger);line-height:1.5;margin:14px 0 0}
.profile-editor-error:empty{display:none}
.profile-editor-footer{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}
.profile-editor [aria-busy=true]{cursor:progress}
@media(max-width:540px){.profile-editor.share-dialog{padding:22px 18px}.profile-avatar-section{gap:16px;align-items:flex-start}.profile-avatar-large{width:64px;height:64px;font-size:24px}.profile-avatar-buttons .button{min-height:42px}.profile-editor-fields{grid-template-columns:1fr;gap:16px}.profile-editor-fields input,.profile-editor-fields textarea{font-size:16px}.profile-bio-field,.profile-website-field{grid-column:auto}.avatar-crop{padding:18px 14px}.avatar-crop-preview{width:min(230px,100%)}.profile-editor-footer .button{min-height:44px}.avatar-crop-tools .button{width:44px;min-height:44px}}
@media(max-width:360px){.profile-avatar-section{flex-direction:column}.profile-avatar-options{width:100%}}
