#avatar-editor{box-sizing:border-box;width:min(1380px,97vw);max-width:97vw;height:min(850px,95dvh);max-height:95dvh;padding:26px;color:#fff0d9!important;border:2px solid #dba462!important;border-radius:24px!important;background:linear-gradient(100deg,#29221ee8,#392b24d9),url('assets/avatars/editor-room.png') center/cover!important;box-shadow:0 24px 100px #000a;font:15px/1.4 'Segoe UI',Arial,sans-serif!important}
#avatar-editor[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:20px;overflow:hidden}
#avatar-editor::backdrop{background:#121519b8;backdrop-filter:blur(7px)}
#avatar-editor::before,#avatar-editor::after{display:none!important}
#avatar-editor *{box-sizing:border-box}
#avatar-editor .avatar-header{position:relative;inset:auto;display:flex;align-items:center;gap:24px;padding:0;background:none;border:0;box-shadow:none;height:auto}
#avatar-editor .avatar-brand{flex:0 0 160px;letter-spacing:3px;color:#fff1db}
#avatar-editor .avatar-brand small{display:block;color:#ffac51;font-size:11px;margin-top:4px}
#avatar-editor .avatar-intro{flex:1}
#avatar-editor h1{margin:0 0 4px;font-size:clamp(22px,2.5vw,34px);line-height:1.2;letter-spacing:-.5px;color:#fff4df}
#avatar-editor p{margin:0;color:#d9c8b6}
#avatar-editor .avatar-steps{display:flex;align-items:center;gap:8px;font-size:11px;max-width:260px;color:#e9d7c0}
#avatar-editor .avatar-steps b{display:grid;place-items:center;min-width:28px;height:28px;border:2px solid #ffc47a;border-radius:50%;background:#f38e26;font-size:17px;color:white}
#avatar-editor .avatar-steps b.later{background:#51443b;border-color:#807062;color:#bdab97}
#avatar-editor .avatar-layout{display:grid;grid-template-columns:160px minmax(260px,1fr) 420px;min-height:0;gap:18px}
#avatar-editor .avatar-nav{display:flex;flex-direction:column;gap:6px;min-height:0;overflow:auto;justify-content:flex-start;padding:0}
#avatar-editor button{appearance:none;font:600 14px/1.3 'Segoe UI',Arial,sans-serif!important;color:#f7ead9!important;cursor:pointer;border:1px solid #8f78615e!important;border-radius:11px!important;background:linear-gradient(160deg,#52483eea,#302c29ee)!important;box-shadow:0 2px 0 #17171655;clip-path:none!important;transform:none;translate:none;filter:none;min-width:0;min-height:0;height:auto;padding:11px 14px}
#avatar-editor button:hover,#avatar-editor button:focus-visible{border-color:#ffbf70!important;outline:2px solid #ffbb6e44;outline-offset:1px}
#avatar-editor button[aria-pressed=true]{border-color:#ffb351!important;background:linear-gradient(140deg,#76522d,#513921)!important;box-shadow:inset 0 0 0 1px #f3ae50}
#avatar-editor button:disabled{opacity:.5;cursor:wait}
#avatar-editor .avatar-nav button{flex:0 0 auto;text-align:left;min-height:49px;padding:13px 15px}
#avatar-editor .avatar-nav button[aria-pressed=true]{color:#442b16!important;background:linear-gradient(120deg,#ffc96c,#ffa641)!important}
#avatar-editor .avatar-close{flex:0 0 34px;padding:3px;font-size:27px!important;height:34px}
#avatar-editor .avatar-stage{position:relative;min-width:0;border-radius:17px;overflow:hidden;background:linear-gradient(#5743340a,#38291d26),url('assets/avatars/editor-room.png') center/cover;box-shadow:inset 0 0 70px #20150c55}
#avatar-editor .avatar-stage canvas{display:block;width:100%;height:100%;touch-action:none}
#avatar-editor .avatar-stage>span{position:absolute;bottom:12px;left:8px;right:8px;text-align:center;font-size:11px;color:#ffdfb7;text-shadow:0 1px 3px #000;pointer-events:none}
#avatar-editor .avatar-layout aside{display:flex;flex-direction:column;min-height:0;background:#272422dd;border:1px solid #9d826459;border-radius:16px;padding:14px;box-shadow:0 8px 30px #0002}
#avatar-editor .avatar-body{display:flex;gap:8px;margin-bottom:14px}
#avatar-editor .avatar-body button{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;padding:5px 10px}
#avatar-editor .avatar-body img{width:32px;height:40px;object-fit:cover;object-position:top}
#avatar-editor .avatar-options{overflow:auto;min-height:0;padding-right:5px;scrollbar-width:thin;scrollbar-color:#a27c50 #302923}
#avatar-editor .avatar-options fieldset{border:0;padding:0;margin:0 0 17px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
#avatar-editor .avatar-options legend{font-size:14px;font-weight:650;color:#f1d3ad;margin:0 0 8px;width:100%}
#avatar-editor .avatar-options button{padding:4px 2px;min-height:74px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:10px!important;overflow:hidden}
#avatar-editor .avatar-options img{display:block;width:100%;height:55px;object-fit:contain}
#avatar-editor .avatar-options span{overflow-wrap:anywhere}
#avatar-editor .avatar-options i{display:block;width:29px;height:29px;border-radius:50%;border:2px solid #fce4bf77;margin:7px}
#avatar-editor .avatar-footer{position:relative;inset:auto;transform:none;display:flex;align-items:center;gap:18px;width:100%;height:auto;padding:0;filter:none}
#avatar-editor #avatar-status{flex:1;font-size:13px}
#avatar-editor #avatar-save{background:linear-gradient(#ff9d32,#ee7018)!important;border:2px solid #ffc06b!important;color:white!important;padding:13px 28px;border-radius:25px!important;box-shadow:0 3px 0 #9e4d21;font-weight:750!important}
#avatar-editor #avatar-random{background:linear-gradient(#fff0d4,#edc995)!important;color:#53351e!important;border:2px solid #ffc783!important;border-radius:25px!important;padding:13px 20px}
#avatar-editor [hidden]{display:none!important}
@media(max-width:1100px){#avatar-editor{padding:18px}.avatar-brand{display:none}#avatar-editor .avatar-layout{grid-template-columns:125px minmax(220px,1fr) 340px;gap:10px}#avatar-editor .avatar-options fieldset{grid-template-columns:repeat(4,minmax(0,1fr))}#avatar-editor .avatar-nav button{font-size:12px!important}#avatar-editor .avatar-steps{display:none}}
@media(max-width:760px){#avatar-editor[open]{gap:10px}#avatar-editor .avatar-layout{grid-template-columns:minmax(120px,1fr) minmax(180px,1fr);grid-template-rows:auto minmax(0,1fr)}#avatar-editor .avatar-nav{grid-column:1/-1;flex-direction:row;overflow:auto}#avatar-editor .avatar-nav button{min-height:34px;padding:7px 10px}#avatar-editor .avatar-layout aside{padding:8px}#avatar-editor .avatar-options fieldset{grid-template-columns:repeat(3,minmax(0,1fr))}#avatar-editor .avatar-options img{height:42px}#avatar-editor .avatar-footer button{font-size:11px!important;padding:10px!important}#avatar-editor .avatar-intro p{font-size:12px}#avatar-editor .avatar-body img{display:none}}
