.av-builder { min-height:100%; display:flex; flex-direction:column; color:var(--ink,#24343a); background:var(--bg,#fffdf9); }
.av-top { position:sticky; top:0; z-index:4; background:var(--bg,#fffdf9); border-bottom:1px solid var(--line,#e6e7df); padding-top:12px; }
.av-heading { padding:0 20px; }
.av-heading h1 { font-size:25px; line-height:1.2; margin:0; }
.av-heading p { font-size:12px; color:var(--muted,#626f70); margin:5px 0 0; }
.av-preview { display:grid; place-items:center; padding:5px 18px 6px; }
.av-preview>svg { display:block; width:min(36vw,156px,20vh); height:auto; filter:drop-shadow(0 5px 9px #344b4510); }
.av-tools { display:flex; justify-content:center; gap:8px; padding:0 16px 6px; }
.av-tools .av-tool { min-height:44px; padding:7px 13px; font-size:12px; border-radius:12px; }
.av-tabs { display:flex; gap:7px; overflow:auto; padding:8px 16px 12px; scrollbar-width:thin; }
.av-tab { min-height:44px; padding:9px 15px; flex:0 0 auto; font:inherit; font-size:13px; font-weight:600; border:1px solid var(--line,#e6e7df); border-radius:12px; color:var(--muted,#626f70); background:var(--bg,#fffdf9); }
.av-tab[aria-selected=true],.av-image-alternative .av-upload { background:var(--brand-soft,#fff0e8); border-color:var(--brand,#bd462f); color:var(--brand,#bd462f); }
.av-options { padding:18px 18px 10px; min-width:0; }
.av-option-section+.av-option-section { margin-top:22px; }
.av-option-section h2 { margin:0 0 10px; font-size:15px; line-height:1.4; }
.av-note { margin:-3px 0 12px; font-size:12px; color:var(--muted,#626f70); }
.av-colors { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.av-swatch { display:flex; flex-direction:column; align-items:center; gap:5px; min-width:0; min-height:72px; padding:9px 4px 7px; border:2px solid transparent; border-radius:13px; color:var(--ink,#24343a); background:var(--soft,#f3f2ed); }
.av-swatch-dot { width:30px; height:30px; border-radius:50%; box-shadow:inset 0 0 0 1px #00000018; }
.av-swatch-name { font-size:10px; line-height:1.2; }
.av-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.av-style { display:flex; flex-direction:column; align-items:center; min-width:0; min-height:115px; gap:5px; padding:7px 5px 9px; border:2px solid transparent; border-radius:16px; color:var(--ink,#24343a); background:var(--soft,#f3f2ed); }
.av-style-image { display:block; width:74px; max-width:100%; height:80px; contain:layout paint; }
.av-style-image>svg { display:block; width:100%; height:100%; }
.av-style-name { font-size:11px; line-height:1.3; }
.av-style[aria-pressed=true] .av-style-name { font-weight:650; }
.av-swatch[aria-pressed=true],.av-style[aria-pressed=true] { border-color:var(--brand,#bd462f); background:var(--brand-soft,#fff0e8); }
.av-builder button { cursor:pointer; touch-action:manipulation; }
.av-builder button:focus-visible { outline:3px solid var(--blue,#305d75); outline-offset:3px; }
.av-builder button:disabled { cursor:default; opacity:.5; }
.av-status { min-height:22px; padding:0 20px; margin:0 0 8px; font-size:12px; color:var(--muted,#626f70); }
.av-status.av-error { color:var(--danger,#ad273b); }
.av-actions { display:flex; gap:10px; position:sticky; bottom:0; padding:12px 18px calc(12px + env(safe-area-inset-bottom)); background:var(--bg,#fffdf9); border-top:1px solid var(--line,#e6e7df); margin-top:auto; z-index:5; }
.av-actions .button { flex:1; min-height:46px; }
.av-image-alternative { padding:0 18px 8px; display:flex; align-items:center; gap:12px; }
.av-image-alternative .av-upload { flex:0 0 auto; }
.av-image-alternative .av-note { margin:0; font-size:12px; }
.avatar.image-avatar { position:relative; overflow:hidden; }
.avatar .avatar-image,.shared-avatar-pin .avatar-image { display:block; position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; }
.avatar.image-ready .avatar-image,.shared-avatar-pin.image-ready .avatar-image { opacity:1; }
.avatar.image-ready .avatar-initials,.shared-avatar-pin.image-ready .avatar-initials { visibility:hidden; }
.av-current-image { display:flex; align-items:center; gap:12px; margin:0 18px 12px; font-size:12px; color:var(--muted); }
.av-image-preview { display:block; width:min(100%,256px); height:auto; aspect-ratio:1; border-radius:24px; margin:10px auto 18px; background:var(--soft); }
.av-crop-control { margin:0 0 16px; }
.av-crop-control input { width:100%; min-height:44px; accent-color:var(--brand); }
.av-image-dialog-note { margin:0 0 14px; font-size:12px; color:var(--muted); }
@media(min-width:520px) { .av-colors { grid-template-columns:repeat(6,minmax(0,1fr)); } .av-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:350px) { .av-image-alternative { padding-right:12px; padding-left:12px; gap:8px; } .av-image-alternative .av-note { font-size:11px; } .av-colors { gap:6px; } .av-options { padding-right:12px; padding-left:12px; } }
@media(max-height:620px) { .av-preview>svg { width:84px; } .av-heading h1 { font-size:21px; } .av-heading p { display:none; } .av-tabs { padding-top:3px; } .av-tools { padding-bottom:2px; } }
