.avatar-editor{display:grid;grid-template-columns:320px 1fr;gap:40px;color:#e9f1f6}.avatar-preview{padding:22px;border-radius:18px;background:#0e2739;align-self:start;position:sticky;top:20px;text-align:center}.avatar-preview [data-portrait]{max-width:270px;margin:0 auto 25px}.avatar-preview svg{display:block;width:100%;height:auto}.avatar-kicker{font-size:10px;letter-spacing:3px;color:#d7ee3f;font-weight:800}.avatar-preview h2{font-size:22px;margin:12px 0}.avatar-preview p{font-size:12px;line-height:1.6;color:#9bb0be}.avatar-mini-row{display:flex;align-items:center;gap:12px;text-align:left;margin:24px 0}.avatar-mini-row [data-mini]{display:block;flex:0 0 48px}.avatar-mini-row b{font-size:12px}.avatar-mini-row small{display:block;color:#849ba9;font-size:11px;margin-top:4px}.avatar-options fieldset{border:0;border-bottom:1px solid #203747;padding:0 0 22px;margin:0 0 20px;min-width:0}.avatar-options legend{font-size:12px;font-weight:700;margin-bottom:12px}.avatar-choices{display:flex;gap:8px;flex-wrap:wrap}.avatar-editor button,.avatar-profile-card button,.avatar-dialog-head button{border:1px solid #294655;border-radius:8px;background:#122d3f;padding:10px 15px;color:#c9d9e3;cursor:pointer;font:inherit;font-size:12px;transition:background .15s,border-color .15s}.avatar-editor button:hover{border-color:#9aad54}.avatar-editor button.selected{border-color:#d7ee3f;background:#2a3e2c;color:#e3f383;box-shadow:0 0 0 1px #d7ee3f}.avatar-editor button.avatar-swatch{width:36px;height:36px;padding:0;border:3px solid #1b3547;border-radius:50%;background:var(--swatch);position:relative}.avatar-editor button.avatar-swatch.selected{border-color:#d7ee3f;box-shadow:0 0 0 2px #0a1d2b}.avatar-swatch.selected:after{content:'✓';position:absolute;inset:0;display:grid;place-items:center;color:white;text-shadow:0 1px 4px #000;font-size:15px}.avatar-editor button:focus-visible{outline:2px solid #fff;outline-offset:3px}.avatar-editor button:disabled{opacity:.4;cursor:default}.avatar-save{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:25px}.avatar-save span{font-size:11px;color:#9db19a}.avatar-save>div{display:flex;gap:9px}.avatar-editor .avatar-primary{background:#d7ee3f;color:#102231;border-color:#d7ee3f;font-weight:800}.avatar-profile-card{display:flex;align-items:center;gap:22px;margin:0 0 22px;padding:20px;background:#0c2435;border:1px solid #264252;border-radius:16px}.avatar-profile-portrait{width:110px}.avatar-profile-portrait svg{width:100%;display:block}.avatar-profile-card p{color:#9db0bd}.avatar-dialog{width:min(1000px,95vw);max-height:92vh;overflow:auto;border:1px solid #294655;border-radius:18px;padding:30px;background:#091c2b;color:#ecf3f7}.avatar-dialog::backdrop{background:#000b}.avatar-dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:25px}@media(max-width:760px){.avatar-editor{grid-template-columns:1fr}.avatar-preview{position:static}.avatar-save{flex-wrap:wrap}}
.avatar-small{display:inline-block;width:30px;height:30px;flex:0 0 30px;vertical-align:middle;margin-right:8px}.avatar-small svg{display:block;width:100%;height:100%;border-radius:7px}#matchPreviewModal .avatar-small{width:70px;height:70px}#liveP1 .avatar-small,#liveP2 .avatar-small{width:34px;height:34px}
.avatar-preview [data-portrait]{background:repeating-conic-gradient(#20323d 0% 25%,#192b36 0% 50%) 50%/18px 18px;border-radius:12px}.avatar-profile-portrait{width:150px;flex-shrink:0}.avatar-profile-portrait img{width:100%;height:auto;display:block;object-fit:contain}.avatar-small img{width:100%;height:100%;object-fit:contain;display:block}.avatar-profile-card a[data-avatar-download]{display:block;margin-top:12px;color:#d7ee3f;font-size:12px}.avatar-dialog .avatar-preview{top:0}.avatar-options [hidden]{display:none!important}.avatar-profile-card{background:transparent}.match-preview-player-head .avatar-small{height:90px;width:90px}
.avatar-profile-card a[data-avatar-download][hidden]{display:none}
/* Portraits occupy their own fixed column, outside name highlighting. */
.avatar-name-group{display:inline-flex!important;align-items:center!important;vertical-align:middle;gap:9px;min-height:44px;max-width:100%;text-align:left}.avatar-name-group>.avatar-small{display:flex;align-items:flex-end;justify-content:center;width:44px!important;height:44px!important;flex:0 0 44px!important;margin:0!important;align-self:center}.avatar-name-group>.avatar-small img{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom}.avatar-name-group>.player-name-link{margin:0;align-self:center}.avatar-name-group>.player-name-with-belt{min-width:0}#rankingList td:nth-child(2),#rankingLiveList td:nth-child(3){text-align:left}#liveP1 .avatar-name-group,#liveP2 .avatar-name-group{min-height:44px}#matchPreviewModal .avatar-name-group>.avatar-small{width:90px!important;height:90px!important;flex-basis:90px!important}#matchPreviewModal .avatar-name-group{min-height:90px}
.profile-hero>.avatar-profile-layout{display:flex;align-items:flex-start;gap:24px;min-width:0;flex:1}.avatar-profile-copy{min-width:0;flex:1}.avatar-profile-layout>.avatar-profile-card{width:150px;flex:0 0 150px;border:0;background:none;padding:0;margin:0;display:flex;align-items:center;flex-direction:column;gap:9px}.avatar-profile-layout .avatar-profile-portrait{width:150px;height:150px}.avatar-profile-layout .avatar-profile-portrait img{height:100%;object-fit:contain;object-position:center bottom}.avatar-profile-card button{white-space:nowrap}.avatar-profile-card a[data-avatar-download]{margin-top:0;font-size:11px}
@media(max-width:760px){.profile-hero>.avatar-profile-layout{gap:14px}.avatar-profile-layout>.avatar-profile-card{width:105px;flex-basis:105px}.avatar-profile-layout .avatar-profile-portrait{width:105px;height:120px}.avatar-profile-card button{padding:7px;font-size:11px}.avatar-name-group>.avatar-small{width:34px!important;height:40px!important;flex-basis:34px!important}}
/* Profile portrait fills the identity column down to the last profile detail. */
.profile-hero>.avatar-profile-layout{align-items:stretch}
.avatar-profile-layout>.avatar-profile-card{width:190px;flex:0 0 190px;align-self:stretch;justify-content:flex-end}
.avatar-profile-layout .avatar-profile-portrait{flex:1;min-height:270px;width:100%;height:auto;position:relative;overflow:hidden}
.avatar-profile-layout .avatar-profile-portrait img{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center bottom}
@media(max-width:760px){.avatar-profile-layout>.avatar-profile-card{width:110px;flex-basis:110px}.avatar-profile-layout .avatar-profile-portrait{min-height:190px}}


/* Keep the complete portrait; detail is a transparent PNG on the same frame. */
.avatar-name-group>.avatar-small{position:relative;overflow:hidden;isolation:isolate}
.avatar-name-group>.avatar-small img{position:static;width:100%;height:100%;max-width:100%;object-fit:contain;object-position:center bottom;image-rendering:auto}
.avatar-name-group>.avatar-small img.avatar-detail-layer{position:absolute;inset:0;width:100%;height:100%;max-width:100%;object-fit:contain;object-position:center bottom;pointer-events:none}
/* Mobile profile: a bounded portrait must not grow with forms or profile actions. */
@media(max-width:760px){
  .profile-hero>.avatar-profile-layout{align-items:flex-start;gap:12px}
  .avatar-profile-layout>.avatar-profile-card{width:100px;flex:0 0 100px;align-self:flex-start;justify-content:flex-start}
  .avatar-profile-layout .avatar-profile-portrait{flex:none;width:100%;height:260px;min-height:0;max-height:260px}
  .avatar-profile-layout .avatar-profile-portrait img{object-fit:cover;object-position:center bottom}
}

.avatar-option-section{border:1px solid #294655;border-radius:10px;margin-bottom:12px;padding:0 14px}.avatar-option-section>summary{cursor:pointer;padding:14px 0;font-weight:700;color:#d7ee3f;font-size:13px}.avatar-option-section[open]>summary{margin-bottom:12px;border-bottom:1px solid #294655}.avatar-option-section fieldset:last-child{border-bottom:0;margin-bottom:0}.avatar-options .avatar-save{position:sticky;bottom:0;z-index:2;background:#0e2739;border:1px solid #294655;border-radius:10px;padding:12px}.avatar-option-section .avatar-choices button{max-width:100%;overflow-wrap:anywhere}@media(max-width:760px){.avatar-option-section{padding:0 10px}.avatar-option-section .avatar-choices{gap:6px}.avatar-option-section .avatar-choices button{padding:8px 10px;font-size:11px}.avatar-option-section .avatar-choices .avatar-swatch{padding:0}}

.avatar-preview .avatar-editor-image243{display:block;width:100%;height:auto;object-fit:contain;color-scheme:only light;forced-color-adjust:none}
.avatar-editor .avatar-swatch,.avatar-editor [data-color-preview221],.avatar-editor .avatar-sv221{color-scheme:only light;forced-color-adjust:none}
