.profile-action-dialog {
    box-sizing: border-box;
    width: min(440px, calc(100% - 24px));
    max-height: 85dvh;
    margin: auto;
    padding: 24px;
    border: 1px solid var(--border, #e4e0d4);
    border-radius: 24px;
    background: var(--bg-surface, #fff);
    color: var(--text-primary);
    box-shadow: 0 16px 60px #0003;
    font-family: inherit;
    overflow-y: auto;
}
.profile-action-dialog::backdrop { background: #0007; backdrop-filter: blur(4px); }
.profile-action-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.profile-action-dialog h2 { font-size: 20px; margin: 0; }
.profile-action-dialog p, .profile-action-dialog li { font-size: 14px; line-height: 1.65; }
.profile-action-dialog p { color: var(--text-secondary); }
.profile-action-dialog ul { padding-left: 20px; }
.profile-action-dialog li + li { margin-top: 12px; }
.profile-dialog-close { border: 0; border-radius: 50%; background: var(--bg-surface-light, #faf8f5); color: var(--text-primary); font-size: 24px; cursor: pointer; min-width: 44px; min-height: 44px; }
.profile-action-dialog .btn { min-height: 44px; }
.profile-action-dialog #profile-name-form { margin-bottom: 20px !important; }
.profile-action-dialog #profile-display-name { font-size: 16px; }
.profile-action-dialog :focus-visible { outline: 2px solid var(--primary, #33513f); outline-offset: 3px; }
@media (max-width: 600px) {
    .profile-action-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; padding: 24px 20px max(24px, env(safe-area-inset-bottom)); }
}

/* Native actions retain the existing card appearance. */
button.profile-row-action { width: 100%; font: inherit; text-align: left; color: var(--text-primary); background: var(--bg-surface); border: 0; box-sizing: border-box; }
button.profile-row-action span { display: block; }
button.profile-avatar-wrapper { padding: 0; border: 0; background: none; font: inherit; }
button.profile-avatar-wrapper > span { display: flex; }
.profile-menu-group { border: 1px solid var(--border); border-radius: 18px; overflow: hidden; margin-top: 18px; }
.profile-menu-group .profile-row-action { margin: 0 !important; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--border); }
.profile-menu-group .profile-row-action:last-child { border-bottom: 0; }
.profile-info-btn { min-width: 44px; min-height: 44px; }
.profile-edit-pencil-btn { width: 44px; height: 44px; }
.profile-user-subtitle { color: var(--text-secondary); }
.profile-user-name { overflow-wrap: anywhere; }
#screen-profile button:focus-visible, #account-sync-drawer button:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; }
#close-account-drawer-btn { min-width: 44px; min-height: 44px; }
#user-auth-status { overflow-wrap: anywhere; }

#user-auth-card { display: grid !important; grid-template-columns: 38px minmax(0, 1fr); }
#user-auth-card #open-auth-modal-btn { grid-column: 1 / -1; width: 100%; min-height: 44px; margin: 0; }

/* Shared icon geometry and typography for every profile menu destination. */
.profile-menu-group .profile-row-action { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 68px; cursor: pointer; }
.profile-menu-group .profile-menu-icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: #E8EFE9; color: #33513F; }
.profile-menu-icon svg { display: block; width: 20px; height: 20px; flex: none; }
.profile-menu-copy { flex: 1; min-width: 0; }
.profile-menu-title { font-size: 14.5px; font-weight: 700; line-height: 1.35; color: var(--text-primary); }
.profile-menu-description { margin-top: 2px; font-size: 12px; line-height: 1.4; color: var(--text-secondary); }
.profile-menu-chevron { flex: 0 0 18px; color: var(--text-secondary); }
.profile-menu-pending { background: var(--error, #BA1A1A); color: #fff; font-size: 10px; font-weight: 700; border-radius: 10px; padding: 1px 6px; }

#avatar-crop-dialog { width: min(440px, calc(100% - 24px)); }
.avatar-crop-stage { position: relative; width: min(100%, 320px); aspect-ratio: 1; margin: 16px auto; overflow: hidden; background: #222; border-radius: 12px; }
#avatar-crop-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#avatar-crop-canvas:active { cursor: grabbing; }
.avatar-crop-mask { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 100px #0009; border: 2px solid #fff; pointer-events: none; }
.avatar-crop-label { display: flex; justify-content: space-between; font-size: 14px; }
#avatar-crop-zoom { width: 100%; min-height: 44px; accent-color: var(--primary); }
.avatar-crop-actions { display: flex; gap: 12px; }
.avatar-crop-actions button { flex: 1; }
#avatar-crop-status:empty { display: none; }
