/* Profile-only redesign. Existing dialogs, upload, commerce and playback CSS remain intact. */
body.profile-v2{--profile-pink:#f50057;--profile-soft:#fff0f6;--profile-muted:#77787f;background:#fff;color:#11111c;font-family:Arial,Helvetica,sans-serif;padding-bottom:calc(74px + env(safe-area-inset-bottom));overflow-x:clip}
.profile-v2 .profile-shell{max-width:620px;min-height:90dvh;margin:0 auto;padding:0;border:0}
.profile-v2 .profile-tools{display:grid;grid-template-columns:80px minmax(0,1fr) 80px;align-items:center;gap:0;padding:4px 12px 0;padding-top:max(4px,env(safe-area-inset-top));min-height:52px}
.profile-v2 .profile-tools>a{display:grid;place-items:center;width:40px;min-width:40px;height:44px;color:var(--profile-pink)}
.profile-v2 .profile-tools>a svg{width:25px;height:25px}
.profile-v2 .profile-wordmark{font-size:26px!important;font-weight:800!important;letter-spacing:-1px!important;text-align:center;color:var(--profile-pink)!important;line-height:1.2}
.profile-tools-right{display:flex;align-items:center;justify-content:flex-end;gap:0}
.profile-v2 .profile-tools-right button{display:grid;place-items:center;position:relative;width:38px;height:44px;min-width:38px;min-height:44px;border:0;background:transparent;padding:7px;color:#11111c}
.profile-v2 .profile-tools-right svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.profile-v2 .profile-tools-right #profile-bag{color:var(--profile-pink)}
.profile-v2 #cart-badge{position:absolute;right:0;top:1px;min-width:16px;padding:2px 4px;border-radius:12px;background:var(--profile-pink);color:#fff;font-size:9px;font-weight:700;line-height:12px}
.profile-v2 #profile-dashboard{display:flex;border-radius:12px}
.profile-v2 #profile-member{display:block;padding:0;margin:0}
.profile-v2 .profile-summary{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;align-items:center;padding:0 15px 8px}
.profile-v2 #profile-avatar{width:108px;height:108px;aspect-ratio:1;border:1px solid #ffadd0;outline:0;border-radius:50%;padding:3px;margin:0;overflow:visible;background:#fff;color:var(--profile-pink);font-size:28px}
.profile-v2 #profile-avatar img{width:100%;height:100%;border-radius:50%;aspect-ratio:1;object-fit:cover;display:block}
.profile-v2 #profile-avatar>span:not(.live-badge){display:grid;place-items:center;width:100%;height:100%;border-radius:50%;background:var(--profile-soft)}
.profile-v2 .profile-meta{min-width:0;text-align:left}
.profile-v2 .profile-identity{display:flex;align-items:center;gap:5px;min-width:0;margin:0}
.profile-v2 #profile-handle{color:#11111c;text-align:left;font-size:clamp(16px,4.9vw,22px);font-weight:800;line-height:1.16;letter-spacing:-.5px;overflow-wrap:anywhere;margin:0;min-width:0}
.profile-v2 #profile-verified{display:grid;place-items:center;width:17px;height:17px;min-width:17px;border-radius:50%;color:#fff;background:var(--profile-pink);font-size:11px}
.profile-v2 #profile-member-status{font-size:13px;font-weight:400;color:var(--profile-muted);margin:3px 0 10px;line-height:1.3}
.profile-v2 .profile-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));justify-content:initial;gap:0;width:100%;margin:0 0 9px}
.profile-v2 .profile-stats button,.profile-v2 .profile-stats>div{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:42px;padding:0 3px;background:transparent;border:0;color:#11111c;font:inherit;text-align:center}
.profile-v2 .profile-stats>*+*{border-left:1px solid #dedee5!important}
.profile-v2 .profile-stats strong{font-size:18px;line-height:1.25;font-weight:750}
.profile-v2 .profile-stats span{font-size:11px;line-height:1.5;color:var(--profile-muted)}
.profile-v2 #profile-details{display:block;min-height:36px;width:100%;border:0;border-radius:24px;background:var(--profile-soft);color:var(--profile-pink);font-size:14px;font-weight:700;padding:7px 8px;cursor:pointer}
.profile-v2 .profile-actions{display:flex;gap:6px;flex-wrap:wrap;margin:0;padding:0}
.profile-v2 .profile-actions:empty{display:none}
.profile-v2 .profile-actions button{flex:1;min-width:65px;min-height:36px;border-radius:22px;padding:7px 8px;font-size:13px}
.profile-v2 .profile-actions .creator-text-button{font-size:11px;background:none}
.profile-v2 #profile-bio{margin:4px 15px 10px;padding:0;text-align:left;font-size:13px;font-weight:400;line-height:1.45}
.profile-v2 #profile-name,.profile-v2 #profile-business,.profile-v2 #profile-shop-branding{display:none!important}
.profile-v2 .profile-content-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;margin:5px 0 5px;border-bottom:1px solid #ececf0;background:#fff;padding:0 6px}
.profile-v2 .profile-content-tabs button{position:relative;display:grid;place-items:center;min-width:0;min-height:50px;padding:8px 6px;background:none;border:0;border-radius:0;color:#7c7c82;cursor:pointer}
.profile-v2 .profile-content-tabs button svg{display:block;width:25px;height:25px;margin:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.profile-v2 #posts-tab svg{fill:currentColor;stroke:none;width:23px;height:23px}
.profile-v2 .profile-content-tabs button[aria-selected=true]{color:var(--profile-pink)}
.profile-v2 .profile-content-tabs button[aria-selected=true]:after{content:'';height:2px;position:absolute;bottom:-1px;left:5%;right:5%;background:var(--profile-pink)}
.profile-v2 .profile-content-tabs button:disabled{opacity:.35;cursor:default}
.profile-v2 #profile-content{padding:0;margin:0}
.profile-v2 .profile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:0 6px}
.profile-v2 .profile-gallery-thumb{position:relative;display:block;width:100%;height:auto;aspect-ratio:3/4;min-width:0;min-height:0;overflow:hidden;border:0;border-radius:5px;background:#f4f3f5;padding:0;color:#79737a}
.profile-v2 .profile-gallery-thumb>img,.profile-v2 .profile-gallery-thumb>video{display:block;width:100%;height:100%;object-fit:cover;position:absolute;inset:0}
.profile-v2 .profile-thumb-views{position:absolute;display:flex;align-items:center;gap:3px;left:6px;bottom:6px;z-index:2;color:#fff;text-shadow:0 1px 4px #0009;font-size:11px;font-weight:600;pointer-events:none}
.profile-v2 .profile-thumb-views svg{width:10px;height:12px;fill:#fff;stroke:#fff}
.profile-v2 .profile-thumb-fallback{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;font-size:10px;line-height:1.4;padding:16px 7px;background:#f4f3f5;color:#79737a}
.profile-v2 .profile-gallery-thumb:after{content:'';position:absolute;bottom:0;left:0;right:0;height:30px;background:linear-gradient(transparent,#0005);pointer-events:none}
.profile-v2 .profile-empty{padding:40px 20px;min-height:190px}
.profile-v2 .creator-shop-heading{padding:10px 12px!important;font-size:14px}
.profile-v2 .creator-shop-heading>strong{font-size:14px}
.profile-v2 .app-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;inset:auto 0 0;max-width:620px;margin:0 auto;height:auto;min-height:64px;background:#fff;border-top:1px solid #efeff2;padding:5px 6px calc(5px + env(safe-area-inset-bottom));z-index:80;color:#777}
.profile-v2 .app-tabs>a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:11px;line-height:1.3;text-decoration:none;color:#777;background:none;padding:3px;min-width:0;min-height:50px;font-weight:400}
.profile-v2 .app-tabs>a>span{display:grid;place-items:center;width:30px;height:28px}
.profile-v2 .app-tabs svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.profile-v2 .app-tabs .selected{color:var(--profile-pink)}
.profile-v2 .app-tabs>a.create-tab{color:#fff}
.profile-v2 .app-tabs>a.create-tab>span{width:45px;height:36px;background:var(--profile-pink);border-radius:13px}
.profile-v2 .app-tabs>a.create-tab svg{width:28px;height:28px;stroke-width:1.8}
.profile-v2 .app-tabs .create-tab{font-size:0}
.profile-v2 #profile-status:empty{display:none}
.profile-v2 .profile-connections{max-height:70dvh;overflow:auto}
.profile-v2 .profile-sort-options button{display:block;width:100%;text-align:left;min-height:46px;background:none;border:0;color:#11111c;font:inherit;padding:10px}
.profile-v2 .profile-sort-options button[aria-pressed=true]{color:var(--profile-pink);font-weight:700}
@media(min-width:700px){.profile-v2 .profile-summary{grid-template-columns:150px minmax(0,1fr);padding:0 24px 12px;gap:20px}.profile-v2 #profile-avatar{width:144px;height:144px}.profile-v2 #profile-handle{font-size:28px}.profile-v2 .profile-stats strong{font-size:22px}.profile-v2 .profile-stats span{font-size:13px}.profile-v2 .profile-tools{padding-top:8px}.profile-v2 .profile-grid{gap:5px;padding:0 8px}}
@media(max-width:380px){.profile-v2 .profile-summary{grid-template-columns:102px minmax(0,1fr);gap:10px;padding-left:12px;padding-right:12px}.profile-v2 #profile-avatar{width:100px;height:100px}.profile-v2 #profile-handle{font-size:18px}.profile-v2 .profile-stats span{font-size:10px}}

/* Keep the existing UAT notice above the real header. */
body.profile-v2:has(#uat-banner){padding-top:38px}

.profile-v2 .profile-meta{position:relative}
.profile-v2 .profile-identity{padding-right:22px}
.profile-v2 #switch-account{position:absolute;right:0;top:0;width:20px;min-width:20px;height:24px;min-height:24px;margin:0;padding:0;border:0;background:none;font-size:12px}

.profile-v2 .app-tabs{transform:none;width:min(100%,620px)}
.profile-v2 .app-tabs>a{width:auto}
.profile-v2 .profile-content-tabs button{width:100%}

/* Optical alignment of the heart icon within the final profile tab. */
.profile-v2 #liked-tab svg{transform:translateX(-5px)}

/* Display name precedes handle; existing authenticated account picker stays beside it. */
.profile-v2 #profile-avatar{align-self:start;margin-top:4px}
.profile-v2 .profile-account-name{display:flex;align-items:center;gap:5px;min-width:0;margin:0 0 3px}
.profile-v2 #profile-name{display:block!important;color:#11111c;font-size:18px;font-weight:800;line-height:1.2;overflow-wrap:anywhere;min-width:0}
.profile-v2 #switch-account{position:static;flex:0 0 26px;width:26px;min-width:26px;height:28px;min-height:28px;padding:0;margin:0;color:#11111c}
.profile-v2 .profile-identity{padding-right:0}
.profile-v2 #profile-handle{font-size:15px;font-weight:600;letter-spacing:0}
.profile-v2 #profile-member-status{margin-top:4px;margin-bottom:12px}
.profile-v2 .profile-stats{margin-bottom:11px}
@media(min-width:700px){.profile-v2 #profile-name{font-size:24px}.profile-v2 #profile-handle{font-size:18px}}

.profile-v2 .profile-account-name{justify-content:flex-start}
.profile-v2 #profile-name{margin:0;text-align:left}

/* Align name with the handle and balance the final statistics/tab column. */
.profile-v2 .profile-account-name{justify-content:flex-start!important}
.profile-v2 #profile-name{text-align:left!important}
.profile-v2 .profile-stats>div{width:100%!important;box-sizing:border-box}
.profile-v2 #liked-tab svg{transform:translateX(-2px)}

/* Center the Plus glyph without inherited create-tab padding. */
.profile-v2 .app-tabs>a.create-tab>span{padding:0;display:grid;place-items:center}
.profile-v2 .app-tabs>a.create-tab svg{margin:0;display:block}

/* Softer gallery corners and breathing room between uploaded photos/videos. */
.profile-v2 .profile-grid{gap:7px;padding:0 8px}
.profile-v2 .profile-gallery-thumb{border-radius:12px;overflow:hidden}
.profile-v2 .profile-gallery-thumb>img,.profile-v2 .profile-gallery-thumb>video{border-radius:inherit}
@media(min-width:700px){.profile-v2 .profile-grid{gap:9px;padding:0 10px}}

.profile-v2 .profile-grid.profile-gallery-grid{gap:7px!important}
.profile-v2 .profile-gallery-thumb{border-radius:12px!important}
@media(min-width:700px){.profile-v2 .profile-grid.profile-gallery-grid{gap:9px!important}}

/* Slightly tighter media grid at the owner’s request. */
.profile-v2 .profile-grid.profile-gallery-grid{gap:5px!important}
@media(min-width:700px){.profile-v2 .profile-grid.profile-gallery-grid{gap:6px!important}}

/* Further small reduction in profile gallery gaps. */
.profile-v2 .profile-grid.profile-gallery-grid{gap:3px!important}
@media(min-width:700px){.profile-v2 .profile-grid.profile-gallery-grid{gap:4px!important}}

/* Near-edge spacing, retaining separate rounded media tiles. */
.profile-v2 .profile-grid.profile-gallery-grid{gap:2px!important}

/* Fill profile thumbnails, including edited media with a fitted inner stage. */
.profile-v2 .profile-gallery-thumb .syoper-edit-stage{inset:0!important;width:100%!important;height:100%!important;border-radius:inherit}
.profile-v2 .profile-gallery-thumb .syoper-edit-stage>video,.profile-v2 .profile-gallery-thumb .syoper-edit-stage>img{object-fit:cover!important}

.profile-v2 .profile-tools>#profile-search{display:grid;place-items:center;width:40px;min-width:40px;height:44px;margin:0;padding:8px;border:0;background:transparent;color:#11111c;border-radius:12px}
.profile-v2 #profile-search svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.profile-v2 .profile-actions button:disabled{opacity:.45;cursor:not-allowed}

/* Private conversation shortcut beside Follow. */
.profile-v2 .profile-actions .profile-chat{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:90px}.profile-v2 .profile-chat svg{width:20px;height:20px;flex-shrink:0}
