.profile-avatar-image{width:100%;height:100%;object-fit:cover;aspect-ratio:1;border-radius:inherit;display:block}
.account-switch .profile-avatar-image,.managed-account h2 .profile-avatar-image{width:28px;height:28px;display:inline-block;vertical-align:middle;border-radius:9px;flex-shrink:0}
.account-choice-actions{display:grid;gap:10px;width:min(100%,280px);margin:20px auto 0}
.account-choice .account-choice-actions>.btn{width:100%;min-height:48px;margin:0;box-sizing:border-box;white-space:normal;font-size:15px}
.account-choice .account-choice-actions>.profile-edit{min-height:42px;background:var(--ui-wash,#fafbfe);color:var(--text-secondary,#52647c);border:1px solid var(--stroke,#e1e6ef);box-shadow:none;font-weight:500;font-size:14px}
.account-choice h2{overflow-wrap:anywhere}
.account-avatar:has(.profile-avatar-image){overflow:hidden;padding:0;aspect-ratio:1}
dialog:has(.profile-editor){width:min(430px,calc(100% - 32px));box-sizing:border-box;max-height:88vh;max-height:88dvh;padding:26px;border-radius:24px;overflow:auto;background:#fff;box-shadow:0 24px 80px #25334d25}
.profile-editor{display:grid;gap:22px;width:100%;margin:0;min-width:0;color:var(--text-primary,#263445)}
.profile-editor *{box-sizing:border-box}
.profile-editor .profile-heading h2{font-size:22px;line-height:1.4;margin:0;font-weight:700}
.profile-heading p{font-size:13px;line-height:1.6;color:var(--text-secondary,#718096);margin:6px 0 0}
.profile-identity{display:grid;justify-items:center;gap:12px;padding:18px 12px;background:var(--ui-wash,#fafbfe);border:1px solid var(--stroke,#e6ebf2);border-radius:18px}
.profile-preview{width:88px;height:88px;aspect-ratio:1;margin:0;border-radius:24px;background:var(--ui-soft,#fff0c0);display:grid;place-items:center;font-size:48px;overflow:hidden;border:3px solid #fff;box-shadow:0 3px 12px #263a5010}
.profile-upload{display:grid;justify-items:center;gap:6px}
.profile-photo-button{min-height:40px;padding:8px 18px;border:1px solid var(--ui-border,#e4d6b2);border-radius:20px;background:#fff;color:var(--ui-strong,#6b5324);font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.profile-upload span{font-size:12px;line-height:1.5;color:var(--text-secondary,#718096)}
.profile-editor label{display:grid;gap:9px;font-size:14px;font-weight:600;line-height:1.5}
.profile-editor input[name=nickname]{appearance:none;display:block;width:100%;min-width:0;height:50px;padding:12px 14px;border:1px solid var(--stroke,#dce3ed);border-radius:12px;background:#fafbfd;box-shadow:none;font:inherit;font-size:16px;font-weight:400;line-height:1.5;color:var(--text-primary,#263445);transition:border-color .15s,box-shadow .15s}
.profile-editor input[name=nickname]:focus{outline:none;border-color:var(--ui-primary,#ffc928);background:#fff;box-shadow:0 0 0 3px var(--ui-soft,#fff2cc)}
.profile-editor [hidden]{display:none!important}
.profile-crop{display:grid;gap:12px;padding:12px;background:#f7f9fc;border:1px solid #e3e9f1;border-radius:16px}
.profile-crop canvas{display:block;width:min(100%,320px);height:auto;aspect-ratio:1;margin:auto;background:#eef2f7;border-radius:12px;touch-action:none;cursor:grab;outline:1px solid #d6dce8}
.profile-crop canvas:active{cursor:grabbing}
.profile-crop input{width:100%;accent-color:var(--ui-primary,#ffc928)}
.profile-move{display:flex;justify-content:center;gap:10px}
.profile-move button{min-width:44px;min-height:44px;border:1px solid #d6dce8;border-radius:10px;background:#fff}
.profile-error{color:#b42318;margin:0;overflow-wrap:anywhere;font-size:13px;line-height:1.6}
.profile-error:empty{display:none}
.profile-editor .actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0;padding:18px 0 0;border-top:1px solid #edf0f5;position:sticky;bottom:-1px;background:#fff}
.profile-editor .actions .btn{width:100%;min-width:0;min-height:48px;font-size:16px;border-radius:12px;margin:0}
.profile-editor .actions [data-cancel]{background:#f7f9fc;border:1px solid #dfe6ef;color:#607087;box-shadow:none}
@media(max-width:600px){dialog:has(.profile-editor){padding:22px 20px;width:calc(100% - 28px);border-radius:22px}.profile-editor{gap:18px}.profile-editor .profile-heading h2{font-size:20px}.profile-identity{padding:16px 12px}.profile-editor .actions{padding-top:16px}}
