.profile-avatar img, .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.profile-avatar-editor { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.profile-avatar-editor .profile-avatar { width: 72px; height: 72px; margin: 0; flex: 0 0 72px; }
.avatar-upload-label { position: relative; display: inline-flex; cursor: pointer; overflow: hidden; }
.avatar-upload-label input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.avatar-upload-label:focus-within { outline: 2px solid var(--navi-accent); outline-offset: 3px; }
.profile-avatar-editor .muted { margin: 9px 0 0; font-size: 12px; }
@media (max-width: 480px) { .profile-avatar-editor { align-items: flex-start; gap: 12px; } }
.profile-avatar-entry { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 12px; }
.profile-avatar-entry .profile-avatar { margin-bottom: 0; }
.avatar-edit-button { border: 0; padding: 3px 8px; background: transparent; color: var(--navi-accent, #d93630); font-size: 12px; cursor: pointer; }
.avatar-edit-button:hover { text-decoration: underline; }
.avatar-dialog { width: min(460px, calc(100vw - 32px)); box-sizing: border-box; padding: 24px; border: 1px solid #d8dee8; border-radius: 16px; color: #25334b; background: #fff; }
.avatar-dialog::backdrop { background: rgb(0 0 0 / 40%); }
.avatar-dialog h2 { margin: 0 0 22px; font-size: 20px; }
html[data-theme="dark"] .avatar-dialog { background: #282828; color: #ededed; border-color: #444; }
.profile-avatar-entry { flex-direction: row; justify-content: center; gap: 10px; }
.avatar-edit-button, .avatar-close-button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 7px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; color: inherit; }
.avatar-edit-button { color: var(--navi-accent, #d93630); }
.avatar-edit-button svg, .avatar-close-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.avatar-edit-button:hover, .avatar-close-button:hover { background: rgb(128 128 128 / 12%); }
.avatar-dialog { width: min(420px, calc(100vw - 32px)); padding: 0; overflow: auto; max-height: calc(100vh - 40px); }
.avatar-dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid rgb(128 128 128 / 18%); }
.avatar-dialog-header h2 { margin: 0; font-size: 18px; }
.avatar-dialog .profile-avatar-editor { flex-direction: column; align-items: center; text-align: center; margin: 0; padding: 24px 24px 8px; gap: 20px; }
.avatar-dialog .profile-avatar { width: 96px; height: 96px; flex-basis: 96px; }
.avatar-dialog .avatar-upload-label { margin-right: 10px; }
.avatar-dialog .muted { max-width: 320px; line-height: 1.7; margin-top: 16px; }
.avatar-dialog .form-error { margin: 0 24px; }
.avatar-dialog .form-actions { padding: 20px 24px 24px; margin: 0; }
.avatar-dialog .primary-button { width: 100%; }
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.profile-avatar, .avatar, .mini-avatar { border-radius: 50% !important; overflow: hidden; }
.profile-avatar img, .avatar img, .mini-avatar img { border-radius: 50% !important; }
.profile-avatar-entry { position: relative; display: block; width: 76px; height: 76px; margin: 0 auto 18px; }
.profile-avatar-entry .profile-avatar { width: 76px; height: 76px; margin: 0; }
.profile-avatar-entry .avatar-edit-button { position: absolute; right: -5px; bottom: -3px; width: 28px; height: 28px; padding: 6px; border-radius: 50%; background: var(--navi-surface, #fff); border: 1px solid var(--navi-line, #d8dee8); box-shadow: 0 2px 5px #0001; }
.avatar-crop-panel { padding: 18px 24px 24px; }
.avatar-crop-panel p { font-size: 13px; color: var(--navi-muted); line-height: 1.7; margin: 0 0 16px; }
#avatar-crop-canvas { display: block; width: min(280px, 100%); height: auto; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; background: #eee; touch-action: none; cursor: grab; outline: 2px solid var(--navi-line, #ddd); }
#avatar-crop-canvas:active { cursor: grabbing; }
#avatar-crop-canvas:focus-visible { outline-color: var(--navi-accent); }
.avatar-crop-actions { display: flex; gap: 12px; justify-content: flex-end; }
.avatar-crop-actions .primary-button { width: auto; }
.avatar-dialog.is-cropping > .profile-avatar-editor, .avatar-dialog.is-cropping > .form-actions { display: none; }

.avatar-crop-actions { margin-top: 24px; }
/* Separate circular avatars from both light and dark surfaces. */
.profile-avatar, .avatar, .mini-avatar {
  box-shadow: 0 0 0 2px var(--navi-surface, #fff), 0 0 0 3px var(--navi-line, #d8dee8), 0 4px 10px rgb(20 32 50 / 10%);
}
html[data-theme=dark] :is(.profile-avatar, .avatar, .mini-avatar) {
  box-shadow: 0 0 0 2px var(--navi-surface), 0 0 0 3px #606060, 0 4px 12px rgb(0 0 0 / 25%);
}
#portal-view .account-menu-button { min-width: 138px; min-height: 40px; padding: 4px 7px; gap: 8px; }
#portal-view .account-menu-button .avatar { width: 28px; height: 28px; flex: 0 0 28px; font-size: 12px; box-shadow: none; border: 0; outline: none; }
#portal-view .account-copy b { font-size: 12px; line-height: 16px; }
#portal-view .account-copy span { font-size: 10px; line-height: 13px; }
#portal-view .account-chevron { width: 16px; height: 16px; }
@media (max-width: 760px) {
  #portal-view .account-menu-button { min-width: 40px; min-height: 40px; justify-content: center; padding: 5px; }
}
.information-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 1050px; align-items: start; }
.overview-information-card { padding: 26px; }
.overview-information-card h2 { font-size: 18px; margin: 0 0 20px; }
.overview-information-card .profile-avatar { width: 64px; height: 64px; margin: 0 0 22px; }
.overview-information-card dl { margin: 0; }
.overview-information-card dl > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--navi-line); }
.overview-information-card dt { color: var(--navi-muted); font-size: 13px; }
.overview-information-card dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; }
.email-binding-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0; margin: 22px 0; list-style: none; }
.email-binding-steps li { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 12px; color: var(--navi-muted); }
.email-binding-steps span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--navi-line); border-radius: 50%; }
.email-binding-steps [aria-current=step] { color: var(--navi-accent); font-weight: 700; }
.email-binding-steps [aria-current=step] span { border-color: var(--navi-accent); }
@media (max-width: 760px) { .information-overview { grid-template-columns: 1fr; } }
