/* Scoped adaptation of the six original profile avatars; private photo URLs stay in memory. */
.profile-avatar-current { display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.profile-avatar-art { display:block; width:88px; height:88px; flex:none; border-radius:50%; background:#edf4fb url('assets/profile-avatar-sprite.png') var(--avatar-position,0%) center / 600% 100% no-repeat; }
.profile-avatar-current > img { display:block; width:88px; height:88px; flex:none; border-radius:50%; object-fit:cover; }
.profile-avatar-editor [hidden] { display:none !important; }
.profile-avatar-editor .flow-button { min-height:48px; font-size:15px; line-height:1.35; padding:10px 14px; }
.profile-avatar-feedback { margin:8px 0 0; color:#53697d; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.profile-avatar-feedback:empty { display:none; }
.profile-avatar-dialog .account-ui-dialog-body { display:grid; align-content:start; gap:20px; }
.profile-avatar-dialog .account-ui-dialog-body > p { margin:0; }
.profile-avatar-options { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; }
.profile-avatar-choice { display:grid; place-items:center; min-width:0; min-height:64px; padding:4px; border:2px solid transparent; border-radius:50%; background:transparent; cursor:pointer; }
.profile-avatar-choice .profile-avatar-art { width:min(100%,76px); height:auto; aspect-ratio:1; }
.profile-avatar-choice[aria-pressed=true] { border-color:#fe5902; box-shadow:0 0 0 1px #062a54; }
.profile-avatar-sources { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.profile-avatar-help { color:#53697d; font-size:14px; line-height:1.5; }
.profile-avatar-selection { display:flex; align-items:center; gap:16px; font-weight:650; }
.profile-avatar-preview { display:block; flex:none; width:72px; height:72px; border-radius:50%; overflow:hidden; }
.profile-avatar-preview .profile-avatar-art,.profile-avatar-preview img { width:72px; height:72px; object-fit:cover; }
.profile-avatar-camera { display:grid; gap:12px; }
.profile-avatar-camera h3,.profile-avatar-camera p { margin:0; }
.profile-avatar-framing { display:flex; gap:12px; flex-wrap:wrap; }
.profile-avatar-framing [aria-pressed=true] { background:#edf4fb; border-color:#0651b6; box-shadow:0 0 0 1px #0651b6; }
.profile-avatar-camera-stage { width:min(320px,100%); aspect-ratio:1; border-radius:16px; overflow:hidden; margin-inline:auto; background:#062a54; }
.profile-avatar-camera-stage[data-framing=circle] { border-radius:50%; }
.profile-avatar-camera-stage video { display:block; width:100%; height:100%; object-fit:cover; }
.profile-avatar-editor :is(button,input):focus-visible { outline:3px solid #0651b6; outline-offset:3px; }
.profile-avatar-editor button:disabled { opacity:.55; cursor:default; }
@media(max-width:599px) {
  .profile-avatar-current { gap:16px; }
  .profile-avatar-options { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
  .profile-avatar-choice { min-height:76px; }
  .profile-avatar-sources .flow-button { flex:1 1 140px; }
}
@media(prefers-reduced-motion:reduce) { .profile-avatar-editor * { scroll-behavior:auto; } }
.profile-avatar-summary { display:block; width:58px; height:58px; flex:none; border-radius:50%; overflow:hidden; }
.profile-avatar-summary > :is(.profile-avatar-art,img) { width:58px; height:58px; object-fit:cover; }
.profile-avatar-summary [hidden] { display:none !important; }
/* Camera owns a separate top-layer surface on every screen size. */
dialog.profile-avatar-camera-dialog { position:fixed; inset:0; box-sizing:border-box; width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; margin:0; padding:0; border:0; border-radius:0; background:#f3f7fc; color:#062a54; overflow:hidden; }
dialog.profile-avatar-camera-dialog:not([open]) { display:none; }
dialog.profile-avatar-camera-dialog[open] { display:grid; grid-template-rows:auto minmax(0,1fr) auto; }
dialog.profile-avatar-camera-dialog::backdrop { background:#062a54b3; }
.profile-avatar-camera-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:calc(16px + env(safe-area-inset-top,0px)) max(20px,env(safe-area-inset-right,0px)) 16px max(20px,env(safe-area-inset-left,0px)); border-bottom:1px solid #dce5ef; background:#fff; }
.profile-avatar-camera-header h2 { margin:0; font-size:24px; line-height:1.25; }
.profile-avatar-camera-header p { margin:6px 0 0; font-size:14px; line-height:1.4; }
.profile-avatar-camera-header .account-ui-dialog-close { flex:none; }
.profile-avatar-camera-body { display:grid; grid-template-rows:auto minmax(0,1fr) auto; justify-items:center; gap:16px; min-height:0; min-width:0; padding:16px max(20px,env(safe-area-inset-right,0px)) 16px max(20px,env(safe-area-inset-left,0px)); overflow:hidden; }
.profile-avatar-camera-dialog .profile-avatar-camera-stage { width:auto; height:100%; max-width:100%; max-height:100%; min-height:0; aspect-ratio:1; margin:0; align-self:center; justify-self:center; }
.profile-avatar-camera-feedback { margin:0; font-size:14px; line-height:1.4; text-align:center; }
.profile-avatar-camera-footer { display:flex; align-items:center; justify-content:center; gap:16px; padding:16px max(20px,env(safe-area-inset-right,0px)) calc(16px + env(safe-area-inset-bottom,0px)) max(20px,env(safe-area-inset-left,0px)); border-top:1px solid #dce5ef; background:#fff; }
.profile-avatar-camera-footer .flow-button { min-width:150px; }
@media(max-width:599px) {
  .profile-avatar-camera-header { gap:12px; }
  .profile-avatar-camera-header h2 { font-size:22px; }
  .profile-avatar-camera-body { gap:12px; }
  .profile-avatar-camera-footer .flow-button { flex:1 1 0; min-width:0; }
}
@media(max-height:500px) {
  .profile-avatar-camera-header { padding-top:8px; padding-bottom:8px; }
  .profile-avatar-camera-header p { display:none; }
  .profile-avatar-camera-body { gap:8px; padding-top:8px; padding-bottom:8px; grid-template-rows:auto minmax(0,1fr); }
  .profile-avatar-camera-feedback { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
  .profile-avatar-camera-footer { padding-top:8px; padding-bottom:calc(8px + env(safe-area-inset-bottom,0px)); }
}
.profile-avatar-camera-viewport { display:grid; place-items:center; container-type:size; width:100%; height:100%; min-width:0; min-height:0; }
.profile-avatar-camera-dialog .profile-avatar-camera-stage { width:min(100%,calc(100dvh - 340px)); height:auto; }
@supports(width:1cqw) {
  .profile-avatar-camera-dialog .profile-avatar-camera-stage { width:min(100cqw,100cqh); height:auto; }
}
@media(max-height:500px) {
  .profile-avatar-camera-dialog .profile-avatar-camera-stage { width:min(100%,calc(100dvh - 210px)); }
  @supports(width:1cqw) { .profile-avatar-camera-dialog .profile-avatar-camera-stage { width:min(100cqw,100cqh); } }
}
.profile-avatar-camera-header .account-ui-dialog-close { display:grid; place-items:center; width:48px; min-width:48px; height:48px; padding:0; border:1px solid #dce5ef; border-radius:12px; background:#edf4fb; color:#062a54; font-size:28px; line-height:1; }
