/* A fixed anchor avoids WebKit re-centering a tall dialog over the keyboard. */
html[data-design="2026"] body #modal:has(>#modalBody>.profileEditor){--profile-bottom-inset:var(--app-safe-bottom,0px);position:fixed!important;inset:auto 0 auto!important;top:calc(var(--visual-offset-top,0px) + var(--app-safe-top,0px) + 8px)!important;width:min(570px,calc(100% - 24px))!important;max-width:none!important;height:min(660px,calc(var(--app-height,100dvh) - var(--app-safe-top,0px) - var(--profile-bottom-inset) - 16px))!important;max-height:none!important;min-height:0;margin:0 auto!important;padding:0!important;overflow:hidden!important;border-radius:24px;transition:height .26s cubic-bezier(.2,.7,.3,1),top .26s cubic-bezier(.2,.7,.3,1)}
html[data-design="2026"][data-keyboard-open="true"] body #modal:has(>#modalBody>.profileEditor){--profile-bottom-inset:0px}
html[data-design="2026"] #modal:has(>#modalBody>.profileEditor)>#modalBody{height:100%;min-height:0;padding:0!important;overflow:hidden}
html[data-design="2026"] #modal #modalBody>.profileEditor{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;max-height:100%!important;margin:0;padding:18px!important;overflow:hidden;box-sizing:border-box}
html[data-design="2026"] #modal .profileEditor>.sheetHeader{position:relative;inset:auto;flex:none;margin:0;padding:0;background:transparent;gap:12px}
html[data-design="2026"] #modal .profileEditorBody{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:18px 0;scroll-padding:16px}
html[data-design="2026"] #modal .profileEditorBody>.profileNameLabel{display:block;font-size:14px;line-height:1.5;margin:0 0 10px}
html[data-design="2026"] #modal .profileEditor #profileName{font-size:16px!important;line-height:1.4;height:48px;min-height:48px;padding:12px;margin:0;width:100%;box-sizing:border-box}
html[data-design="2026"] #modal .profileEditor .portraitField{margin:20px 0 0;min-width:0}
html[data-design="2026"] #modal .profileEditor .portraitField legend{font-size:13px;line-height:1.5;margin-bottom:12px}
html[data-design="2026"] #modal .profileEditor .portraitPicker{gap:10px}
html[data-design="2026"] #modal .profileEditor .portraitPicker button{min-height:104px;padding:10px 4px;gap:7px}
html[data-design="2026"] #modal .profileEditor .portraitPicker .characterAvatar{width:56px;height:56px}
html[data-design="2026"] #modal .profileEditor .portraitPicker strong{font-size:13px;line-height:1.4}
html[data-design="2026"] #modal .profileEditor>#saveProfile{flex:none;min-height:48px;margin:0;gap:8px}
@media(prefers-reduced-motion:reduce){html[data-design="2026"] body #modal:has(>#modalBody>.profileEditor){transition:none}}
html[data-design="2026"] #modal .profileEditor #profileName:focus{outline:none!important;border-color:var(--green);box-shadow:inset 0 0 0 1px var(--green)}
html[data-design="2026"] #modal .profileEditor>#saveProfile{margin-top:12px}
