.shared-profile{width:min(440px,calc(100% - 28px));max-height:calc(100dvh - 24px);overflow:hidden;padding:0;color:var(--text)}
.shared-profile[open]{display:flex;flex-direction:column}
.shared-profile>h2{flex:0 0 auto;margin:0;padding:20px 20px 12px}
.shared-profile-content{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 20px 18px;scroll-padding:16px;flex:1 1 auto}
.shared-profile-content>*+*{margin-top:16px}.shared-profile [hidden]{display:none!important}
.shared-profile-footer{flex:0 0 auto;padding:14px 20px max(16px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--card)}
.shared-profile-preview{width:144px;height:144px;margin-left:auto;margin-right:auto;background:var(--soft);border:2px solid var(--line);border-radius:50%;overflow:hidden}
.shared-profile-preview img,.shared-profile-preview canvas{display:block;width:100%;height:100%;object-fit:cover}.shared-profile-preview canvas{touch-action:none;cursor:move}
.shared-profile-avatars{display:grid;grid-template-columns:repeat(4,minmax(44px,1fr));gap:12px}
.shared-profile-avatars button{padding:3px;min-width:0;aspect-ratio:1;background:var(--card);border:2px solid var(--line);border-radius:50%;box-shadow:none;position:relative}
.shared-profile-avatars img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}
.shared-profile-avatars [aria-pressed=true]{outline:3px solid var(--accent);outline-offset:2px}.shared-profile-avatars [aria-pressed=true]:after{content:'✓';position:absolute;right:-3px;bottom:-3px;border:1px solid var(--line);border-radius:50%;background:var(--soft);color:var(--text);width:22px;height:22px;font-size:15px}
.shared-profile label{font-size:14px}.shared-profile input:not([type=range]){font-size:16px}.shared-profile-zoom input{padding:0;accent-color:var(--accent)}
.shared-profile-error{font-size:14px;color:#a32d24;margin:0 0 10px}.shared-profile-error:empty{display:none}.shared-profile .dialog-actions{display:flex;gap:10px;margin:0}.shared-profile .dialog-actions button{flex:1;padding:10px 12px;white-space:nowrap}
@media(max-width:359px){.shared-profile>h2{padding:16px 16px 10px}.shared-profile-content{padding:0 16px 14px}.shared-profile-footer{padding:12px 16px max(14px,env(safe-area-inset-bottom))}.shared-profile-preview{width:112px;height:112px}.shared-profile-avatars{gap:10px}.shared-profile .dialog-actions{gap:6px}.shared-profile .dialog-actions button{padding:10px 7px;font-size:14px}}
.shared-profile-preview img[src*="/assets/avatars/"][src*="-v1.png"],.shared-profile-avatars img[src*="/assets/avatars/"][src*="-v1.png"]{clip-path:circle(42.1875%);transform:scale(1.185185);transform-origin:center}
