/* Avatar Atelier JSON bridge (portable editor remains a standalone file). */
.avatar-library{display:grid;gap:15px;max-width:1120px;margin-inline:auto}
.avatar-library h1,.avatar-library h2{color:var(--accent-heading)}
.avatar-library h2{font-size:clamp(18px,2.5vw,24px);margin:0 0 9px}
.avatar-import-card{display:grid;gap:8px}
.avatar-import-card>p{margin:0 0 5px}
.avatar-import-card input[type=file]{max-width:700px;border:1px dashed #74717d;background:#202127}
.avatar-feedback:empty{display:none}.avatar-error{border-color:#aa6270;color:#f2d9d9}
.avatar-collection{display:grid;gap:10px}
.avatar-library-item{display:flex;align-items:center;gap:12px;background:#2a2b32;
 border:1px solid #42434b;border-radius:15px;padding:14px}
.avatar-icon{flex-shrink:0;display:grid;place-items:center;width:56px;height:56px;border-radius:14px;
 color:var(--accent);font-family:Georgia,serif;font-size:29px;background:#202127;border:1px solid #42434b}
.avatar-library-info{display:grid;gap:3px;flex:1;min-width:0}
.avatar-library-info strong{overflow-wrap:anywhere;font-size:16px;color:#f2efec}
.avatar-library-info small{font-size:12px;color:#bdb8be}
.avatar-active-label{font-size:12px;color:var(--accent-heading);font-weight:700}
.avatar-library-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.avatar-library-actions button{font-size:12px!important;min-height:38px!important;padding:9px 11px!important}
.avatar-activate{background:var(--accent)!important;color:var(--accent-contrast)!important}
@media(max-width:690px){
 .avatar-library-item{flex-wrap:wrap}.avatar-library-actions{width:100%}
 .avatar-library-actions button{flex:1;min-width:110px}
 .avatar-icon{width:48px;height:48px}
}
/* The native pixel editor stays inside Mes avatars, never a full-screen modal. */
.avatar-library{max-width:1200px;width:100%;min-width:0}
.avatar-studio-inline{
 display:flex;flex-direction:column;min-width:0;
 border:1px solid #42434b;border-radius:16px;background:#191a1f;color:#f0efec;
}
.avatar-studio-bar{
 position:sticky;top:0;z-index:8;
 min-height:68px;display:flex;align-items:center;justify-content:space-between;
 gap:12px;background:#2a2b32;border-bottom:1px solid #42434b;
 border-radius:15px 15px 0 0;padding:10px clamp(12px,2.5vw,23px);
}
.avatar-studio-title{display:grid;gap:3px;min-width:0}
.avatar-studio-title strong{color:var(--accent-heading);font-weight:750;font-size:17px;letter-spacing:.025em}
.avatar-studio-title .muted{font-size:11px}
.avatar-studio-controls{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.avatar-studio-controls button{min-height:40px;padding:9px 12px;font-size:12px}
.avatar-studio-controls button:disabled{opacity:.48;cursor:not-allowed}
.avatar-studio-feedback{background:#25262d;padding:7px 16px;color:#c9c7cb;font-size:12px;min-height:29px}
.avatar-studio-feedback p{margin:0}
.avatar-studio-feedback .avatar-studio-error{color:#e4a8b0}
.avatar-studio-frame{width:100%;min-height:790px;background:#191a1f}
.avatar-studio-iframe{display:block;width:100%;height:1050px;border:0;background:#191a1f}
.avatar-standalone-link{justify-self:start;font-size:13px;color:#d9d6dc;text-underline-offset:4px}
.avatar-manual-import{display:grid;gap:9px;border-top:1px solid #42434b;padding-top:13px;margin-top:7px}
.avatar-manual-import h3{margin:0;color:#e6e0e3;font-size:15px}
.avatar-manual-import p{margin:0;font-size:12px}
@media(max-width:700px){
 .avatar-studio-bar{top:0;gap:8px;padding:10px 11px;align-items:flex-start;flex-wrap:wrap}
 .avatar-studio-title strong{font-size:15px}
 .avatar-studio-title .muted{font-size:10px}
 .avatar-studio-controls{width:100%;justify-content:stretch}
 .avatar-studio-controls button{flex:1;min-height:40px;font-size:11px;padding:8px 9px}
 .avatar-studio-feedback{font-size:11px;padding:6px 11px}
 .avatar-studio-iframe{height:1550px}
}
