/* SVGs are generated from a shared set of shapes; no per-user image files. */
.atlas-avatar { display: grid; overflow: hidden; isolation: isolate; flex-shrink: 0; }
.atlas-avatar > svg { display: block; width: 100%; height: 100%; stroke: none; }
.mypage__identity > div { min-width: 0; overflow-wrap: anywhere; }
.profile-avatar { position: relative; display: block; width: 64px; height: 64px; flex: 0 0 64px; }
.profile-avatar .mypage__avatar { width: 64px; height: 64px; border-radius: 20px; }
.profile-avatar__edit { position: absolute; right: -5px; bottom: -4px; display: grid; width: 28px; height: 28px; padding: 5px; place-items: center; border: 2px solid var(--surface); border-radius: 50%; background: var(--portal-ink, #23446e); color: #fff; cursor: pointer; box-shadow: 0 2px 6px #0a193629; }
.profile-avatar__edit svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profile-avatar__edit:hover { background: #37618d; }
.profile-avatar__edit:focus-visible, .avatar-editor button:focus-visible { outline: 2px solid var(--apple-blue); outline-offset: 3px; }
.avatar-editor { box-sizing: border-box; width: min(510px, calc(100vw - 28px)); max-height: calc(100dvh - 32px); padding: 25px; overflow: auto; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); color: var(--text); box-shadow: 0 24px 90px #03133145; }
.avatar-editor::backdrop { background: #08182e80; backdrop-filter: blur(5px); }
.avatar-editor__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.avatar-editor__head h2 { margin: 0; font-size: 20px; letter-spacing: -.035em; }
.avatar-editor__close { display: grid; width: 32px; height: 32px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 25px; cursor: pointer; }
.avatar-editor__preview { display: flex; align-items: center; gap: 21px; margin-bottom: 23px; padding: 18px 22px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface-2); }
.avatar-editor__preview > .atlas-avatar { width: 100px; height: 100px; border: 4px solid var(--surface); border-radius: 32px; box-shadow: 0 6px 16px #11234412; }
.avatar-editor__preview > div { display: grid; min-width: 0; gap: 7px; }
.avatar-editor__preview > div > span { color: var(--muted); font-size: 11px; }
.avatar-editor__preview strong { overflow-wrap: anywhere; font-size: 15px; }
.avatar-editor__shuffle { justify-self: start; padding: 0; border: 0; background: none; color: var(--ui-label, #315f8a); font-size: 11px; cursor: pointer; }
.avatar-editor__field { min-width: 0; margin: 0 0 19px; padding: 0; border: 0; }
.avatar-editor__field legend { margin-bottom: 10px; font-size: 12px; font-weight: 700; }
.avatar-editor__characters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.avatar-choice, .avatar-color, .avatar-accessory { position: relative; cursor: pointer; }
.avatar-choice input, .avatar-color input, .avatar-accessory input, .avatar-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.avatar-choice { display: grid; min-width: 0; gap: 7px; padding: 7px 5px; border: 1px solid transparent; border-radius: 14px; text-align: center; }
.avatar-choice__art { display: block; overflow: hidden; width: 100%; aspect-ratio: 1; border-radius: 12px; }
.avatar-choice__art svg { display: block; width: 100%; height: 100%; }
.avatar-choice > span:last-child { font-size: 10px; color: var(--muted); }
.avatar-choice:has(input:checked) { border-color: var(--apple-blue); background: var(--surface-2); }
.avatar-choice:has(input:checked) > span:last-child { color: var(--text); font-weight: 700; }
.avatar-choice:has(input:focus-visible), .avatar-color:has(input:focus-visible), .avatar-accessory:has(input:focus-visible) { outline: 2px solid var(--apple-blue); outline-offset: 3px; }
.avatar-editor__colors { display: flex; justify-content: space-between; gap: 12px; }
.avatar-color { display: grid; width: 36px; height: 36px; padding: 3px; place-items: center; border: 1px solid transparent; border-radius: 50%; }
.avatar-color > span { display: block; width: 28px; height: 28px; border: 1px solid #64748b22; border-radius: 50%; }
.avatar-color:has(input:checked) { border-color: var(--apple-blue); }
.avatar-color:has(input:checked)::after { position: absolute; width: 6px; height: 6px; border: 2px solid var(--surface); border-radius: 50%; background: #315e87; content: ""; }
.avatar-editor__accessories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.avatar-accessory { border-radius: 10px; }
.avatar-accessory > span { display: block; padding: 10px; border: 1px solid var(--border); border-radius: inherit; color: var(--muted); font-size: 12px; text-align: center; }
.avatar-accessory:has(input:checked) > span { border-color: var(--apple-blue); background: var(--surface-2); color: var(--text); }
.avatar-editor__field:disabled { opacity: .45; }
.avatar-editor__field:disabled label { cursor: default; }
.avatar-editor__error { color: #b64040; font-size: 12px; line-height: 1.5; }
.avatar-editor__footer { display: flex; align-items: center; gap: 8px; margin-top: 23px; padding-top: 17px; border-top: 1px solid var(--border); }
.avatar-editor__footer > span { flex: 1; }
.avatar-editor__footer button { min-height: 39px; padding: 9px 17px; border: 1px solid var(--border); border-radius: 10px; font-size: 12px; font-weight: 650; cursor: pointer; }
.avatar-editor__footer .avatar-editor__reset { padding-left: 0; border: 0; background: none; color: var(--muted); }
.avatar-editor__cancel { background: var(--surface); color: var(--text); }
.avatar-editor__save { border-color: #284c77 !important; background: #284c77; color: #fff; }
.avatar-editor button:disabled { cursor: wait; opacity: .55; }
:root[data-theme="dark"] .avatar-editor__save, :root[data-theme="dark"] .profile-avatar__edit { background: #406c98; }
:root[data-theme="dark"] .avatar-editor__error { color: #f5a8a8; }
@media (max-width: 480px) {
  .avatar-editor { padding: 20px; border-radius: 20px; }
  .avatar-editor__preview { gap: 15px; padding: 15px; }
  .avatar-editor__preview > .atlas-avatar { width: 86px; height: 86px; border-radius: 27px; }
  .avatar-editor__characters { gap: 4px; }
  .avatar-choice { padding: 5px 3px; }
  .avatar-editor__colors { gap: 5px; }
  .avatar-editor__footer button { padding: 9px 13px; }
}
