.d-avatar-modal-open{overflow:hidden}.avatar-control{border:0;padding:0;margin:16px 0;min-width:0}.avatar-control legend{font-size:14px;font-weight:650;margin-bottom:10px}.avatar-control .avatar-control-row{display:flex;gap:18px;align-items:center}.avatar-control [data-avatar-preview]{width:84px;height:84px;flex:0 0 84px}.avatar-control [data-avatar-preview]>svg{display:block;width:100%;height:100%}.avatar-control [data-avatar-edit]{font:inherit;border:1px solid var(--style-line);background:var(--style-soft);color:var(--style-primary);border-radius:12px;min-height:44px;padding:10px 18px;cursor:pointer}
dialog.d-avatar-editor{box-sizing:border-box;width:min(900px,calc(100vw - 32px));max-width:none;height:min(740px,calc(100dvh - 40px));max-height:none;padding:0;border:1px solid var(--style-line);border-radius:24px;background:var(--style-surface);color:var(--style-ink);box-shadow:0 20px 90px color-mix(in srgb,var(--style-shadow) 25%,transparent);font:14px/1.45 "Segoe UI",system-ui,sans-serif;overflow:hidden;z-index:1000}dialog.d-avatar-editor[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}dialog.d-avatar-editor::backdrop{background:color-mix(in srgb,var(--style-shadow) 48%,transparent)}.d-avatar-editor *{box-sizing:border-box}.d-avatar-editor button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}.d-avatar-editor button:focus-visible{outline:3px solid var(--style-amber);outline-offset:3px}.d-avatar-editor button:disabled{opacity:.4;cursor:default}.d-avatar-editor svg{display:block;pointer-events:none}.d-avatar-editor .d-av-header{padding:16px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--style-line)}.d-avatar-editor h2{font:700 26px/1.2 Georgia,serif;letter-spacing:-.5px;margin:0}.d-avatar-editor .d-av-header button{border:0;background:none;min-width:44px;min-height:44px;border-radius:10px;font-size:19px}.d-avatar-editor .d-av-layout{display:grid;grid-template-columns:270px minmax(0,1fr);min-height:0}.d-avatar-editor .d-av-preview{padding:24px 18px;background:var(--style-soft);display:flex;flex-direction:column;align-items:center;gap:18px;overflow:auto}.d-avatar-editor .d-av-portrait{width:230px;height:230px;max-width:100%;flex-shrink:0}.d-avatar-editor .d-av-portrait svg{width:100%;height:100%}.d-avatar-editor .d-av-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}.d-avatar-editor .d-av-tools button{min-height:44px;border:1px solid var(--style-line);border-radius:10px;background:var(--style-surface);padding:9px 6px;font-size:12px}.d-avatar-editor [data-av-command=random]{grid-column:1/-1;font-size:15px;background:var(--style-line);color:var(--style-primary);font-weight:650}.d-avatar-editor .d-av-catalog{display:grid;grid-template-rows:auto minmax(0,1fr);min-width:0;min-height:0}.d-avatar-editor .d-av-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:12px;gap:4px;border-bottom:1px solid var(--style-line)}.d-avatar-editor .d-av-tabs button{border:0;border-radius:10px;background:transparent;padding:11px 3px;min-height:44px;color:var(--style-muted)}.d-avatar-editor .d-av-tabs button[aria-selected=true]{background:var(--style-soft);color:var(--style-primary);font-weight:700}.d-avatar-editor .d-av-controls{overflow:auto;overscroll-behavior:contain;padding:22px 24px;min-width:0;min-height:0;scrollbar-gutter:stable}.d-avatar-editor .d-av-group{border:0;padding:0;margin:0 0 26px;min-width:0}.d-avatar-editor .d-av-group:last-child{margin-bottom:0}.d-avatar-editor .d-av-group legend{display:flex;justify-content:space-between;gap:8px;padding:0;margin-bottom:12px;width:100%;font-size:13px;font-weight:650}.d-avatar-editor .d-av-group legend span{font-weight:400;font-size:12px;color:var(--style-muted);text-align:right}.d-avatar-editor .d-av-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.d-avatar-editor .d-av-option{display:grid;place-items:center;min-height:86px;padding:6px;border:1px solid var(--style-line);border-radius:13px;background:var(--style-surface);min-width:0;position:relative}.d-avatar-editor .d-av-option svg{width:72px;height:72px;max-width:100%}.d-avatar-editor .d-av-option[aria-pressed=true]{border:2px solid var(--style-muted);padding:5px;background:var(--style-soft)}.d-avatar-editor .d-av-option[aria-pressed=true]::after{content:"✓";position:absolute;top:5px;right:6px;color:var(--style-primary);font-size:11px}.d-avatar-editor .d-av-swatches{display:flex;flex-wrap:wrap;gap:8px}.d-avatar-editor .d-av-swatch{width:44px;height:44px;flex:0 0 44px;display:grid;place-items:center;border:1px solid var(--style-line);border-radius:50%;padding:5px;background:transparent}.d-avatar-editor .d-av-swatch span{display:block;width:30px;height:30px;border-radius:50%;background:var(--av-swatch);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--style-shadow) 6%,transparent)}.d-avatar-editor .d-av-swatch[aria-pressed=true]{border:2px solid var(--style-muted);background:var(--style-soft)}.d-avatar-editor .d-av-none span{background:var(--style-surface)}.d-avatar-editor .d-av-none span::before{content:"";display:block;width:26px;height:1px;background:var(--style-muted);transform:translate(2px,14px) rotate(-45deg)}.d-avatar-editor .d-av-footer{display:flex;justify-content:flex-end;gap:10px;padding:14px 24px;border-top:1px solid var(--style-line);background:var(--style-surface)}.d-avatar-editor .d-av-footer button{min-height:44px;border:1px solid var(--style-line);border-radius:10px;background:transparent;padding:10px 18px;font-weight:600}.d-avatar-editor .d-av-footer .d-av-primary{background:var(--style-primary);border-color:var(--style-primary);color:var(--style-surface)}
@media(max-width:650px){dialog.d-avatar-editor{width:calc(100vw - 16px);height:calc(100dvh - 20px);border-radius:18px}.d-avatar-editor .d-av-header{padding:8px 14px}.d-avatar-editor h2{font-size:22px}.d-avatar-editor .d-av-layout{grid-template-columns:1fr;grid-template-rows:142px minmax(0,1fr)}.d-avatar-editor .d-av-preview{padding:8px 14px;display:grid;grid-template-columns:126px minmax(0,1fr);gap:14px;overflow:hidden;border-bottom:1px solid var(--style-line)}.d-avatar-editor .d-av-portrait{width:126px;height:126px}.d-avatar-editor .d-av-tools{gap:6px}.d-avatar-editor .d-av-tools button{font-size:11px;min-height:38px;padding:7px 3px}.d-avatar-editor [data-av-command=random]{min-height:44px;font-size:14px}.d-avatar-editor .d-av-tabs{padding:7px;gap:2px}.d-avatar-editor .d-av-tabs button{font-size:12px}.d-avatar-editor .d-av-controls{padding:18px 14px;scrollbar-gutter:auto}.d-avatar-editor .d-av-options{grid-template-columns:repeat(3,minmax(0,1fr))}.d-avatar-editor .d-av-option{min-height:80px}.d-avatar-editor .d-av-option svg{width:67px;height:67px}.d-avatar-editor .d-av-footer{padding:10px 14px}.d-avatar-editor .d-av-group legend{font-size:12px}.d-avatar-editor .d-av-group legend span{font-size:11px}}
@media(max-height:480px) and (min-width:651px){.d-avatar-editor .d-av-portrait{width:135px;height:135px}.d-avatar-editor .d-av-preview{padding:8px 14px;gap:8px}.d-avatar-editor .d-av-layout{grid-template-columns:200px minmax(0,1fr)}.d-avatar-editor .d-av-header,.d-avatar-editor .d-av-footer{padding:6px 18px}}
