.avatar-editor{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(220px,.9fr);gap:48px;align-items:start;min-width:0}
.avatar-editor-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 22px}
.avatar-editor-fields label{display:grid;gap:8px;font-size:14px;font-weight:600;min-width:0}
.avatar-editor-fields label:last-child{grid-column:1/-1}
.avatar-editor-fields select{width:100%;max-width:none;min-width:0;min-height:46px;cursor:pointer}
.avatar-editor-preview{margin:0;min-height:378px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--surface);border-bottom:3px solid var(--mint);padding:18px;position:sticky;top:24px}
.avatar-editor-preview canvas{display:block;width:264px;max-width:100%;height:auto;image-rendering:pixelated}
.avatar-editor-preview figcaption{font:11px Silkscreen,monospace;line-height:1.6;color:var(--muted);text-align:center}
.avatar-editor .avatar-shuffle{padding:8px 0;margin-top:16px;text-underline-offset:5px;min-height:44px}
.avatar-editor select:disabled{opacity:.6;cursor:wait}
@media(max-width:700px){.avatar-editor{grid-template-columns:1fr;gap:24px}.avatar-editor-preview{order:-1;position:static;min-height:260px;padding:10px 18px}.avatar-editor-preview canvas{width:210px}.avatar-editor-fields{gap:18px 14px}}

.avatar-editor-preview [data-preview-status]{font-size:14px;line-height:1.5;text-align:center;color:var(--muted);margin:8px 0}
.avatar-editor-preview [data-preview-status][hidden]{display:none}

.avatar-category-tabs{display:flex;flex-wrap:wrap;gap:6px;border-bottom:1px solid var(--line,#46616a);padding-bottom:12px;margin-bottom:16px}
.avatar-category-tabs button{font:600 14px/1.3 system-ui;padding:10px 12px;background:transparent;color:var(--ink,#fff0c2);border:1px solid transparent;border-radius:3px}
.avatar-category-tabs button[aria-selected=true]{background:var(--mint);color:var(--bg);border-color:var(--mint)}
.avatar-choice-help{font:14px/1.5 system-ui;min-height:42px;margin:0 0 14px;color:var(--muted,#b9d3cd)}
.avatar-choice-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:10px}
.avatar-option{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:9px;min-height:174px;padding:10px 6px;color:var(--ink,#fff0c2);background:var(--bg);border:2px solid var(--line);border-radius:4px;font:600 12px/1.4 system-ui;text-align:center}
.avatar-option:hover{background:var(--surface);border-color:var(--mint)}
.avatar-option[aria-pressed=true]{border-color:#75efbd;background:var(--surface)}
.avatar-option canvas{display:block;width:132px;max-width:100%;height:auto;aspect-ratio:144/136;image-rendering:pixelated}
.avatar-option-check{display:none;position:absolute;top:4px;right:6px;color:#75efbd}
.avatar-option[aria-pressed=true] .avatar-option-check{display:block}
.avatar-color-chip{display:block;width:52px;height:42px;border:1px solid var(--muted)}
.avatar-option-name{max-width:100%;overflow-wrap:anywhere}
.avatar-option:focus-visible,.avatar-category-tabs button:focus-visible{outline:3px solid #ffcf68;outline-offset:3px}
.avatar-editor-controls-only{display:block;max-width:none}
.avatar-editor-controls-only .avatar-editor-controls{width:100%}
.avatar-shuffle{margin-top:18px}
@media(max-width:520px){.avatar-category-tabs{gap:4px}.avatar-category-tabs button{padding:9px;font-size:13px}.avatar-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.avatar-option{min-height:166px}}

.avatar-option:disabled{opacity:.6;cursor:wait}
