.sp-profile-cover{height:125px;margin:-24px -24px -45px;border-radius:23px 23px 0 0;background:linear-gradient(135deg,#d9eaff,#fff0f5)}
.sp-profile-modern{display:block!important;padding:24px!important;overflow:hidden}.sp-profile-modern__top{position:relative;display:flex;align-items:flex-end;gap:16px}.sp-profile-modern__avatar{display:grid;place-items:center;width:96px;height:96px;border:5px solid #fff;border-radius:50%;background:linear-gradient(135deg,#1479e8,#ec407a);color:#fff;font-size:38px;font-weight:900;box-shadow:0 7px 24px rgba(11,31,58,.18)}.sp-profile-modern__identity{padding-bottom:6px}.sp-profile-modern__identity h2{margin:0!important;text-align:left!important;font-size:25px!important}.sp-profile-modern__identity h2:before{display:none!important}.sp-profile-modern__identity>span{color:var(--sp-muted)}.sp-profile-modern__bio{margin:17px 0 12px!important;text-align:left!important;color:var(--sp-text)!important}.sp-profile-stats{display:grid;grid-template-columns:repeat(3,1fr);margin:16px 0;border-block:1px solid var(--sp-border)}.sp-profile-stats a,.sp-profile-stats span{display:grid;gap:2px;padding:14px 5px;color:var(--sp-text);text-align:center;text-decoration:none}.sp-profile-stats strong{font-size:18px}.sp-profile-stats small{color:var(--sp-muted);font-size:11px}.sp-profile-actions{display:flex;gap:9px}.sp-profile-actions form{flex:1}.sp-profile-actions .sp-button{width:100%}.sp-profile-badges{display:flex;gap:7px;overflow:auto;margin-top:14px}.sp-profile-tabs{display:grid;grid-template-columns:repeat(3,1fr);margin-top:15px;border-bottom:1px solid var(--sp-border)}.sp-profile-tabs span{padding:12px;text-align:center;color:var(--sp-muted);font-size:12px;font-weight:800}.sp-profile-tabs .is-active{color:var(--sp-blue);border-bottom:3px solid var(--sp-blue)}.sp-profile-posts{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;margin-top:3px}.sp-profile-post{position:relative;aspect-ratio:1;display:grid;place-items:center;overflow:hidden;background:linear-gradient(135deg,#e5effb,#f8f3f7);color:var(--sp-navy);text-decoration:none;padding:9px;text-align:center;font-size:11px}.sp-profile-post img{position:absolute;width:100%;height:100%;object-fit:cover}.sp-private-profile{padding:42px 20px!important;text-align:center}.sp-private-profile__lock{display:grid;place-items:center;width:65px;height:65px;margin:auto;border-radius:50%;background:#edf4ff;font-size:28px}@media(max-width:520px){.sp-profile-modern{margin-inline:-2px;padding:17px!important}.sp-profile-cover{margin:-17px -17px -39px}.sp-profile-modern__avatar{width:82px;height:82px}.sp-profile-modern__identity h2{font-size:21px!important}}
/* Mobile profile refinement. The approved bottom navigation is intentionally untouched. */
.sp-main:has(.sp-profile-modern) .sp-page-title:after{display:none}.sp-profile-modern__identity{min-width:0;max-width:calc(100% - 112px)}.sp-profile-modern__identity h2,.sp-profile-modern__identity>span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sp-profile-modern__bio{overflow-wrap:anywhere;word-break:break-word}.sp-profile-post>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden;line-height:1.35}@media(max-width:600px){.sp-body{padding-top:env(safe-area-inset-top);padding-bottom:calc(88px + env(safe-area-inset-bottom))}.sp-main:has(.sp-profile-modern){padding-bottom:calc(82px + env(safe-area-inset-bottom))}.sp-main:has(.sp-profile-modern) .sp-page-title h1{margin:2px 0 10px;font-size:20px}.sp-profile-modern{margin-inline:0!important;padding:12px!important;border-radius:16px!important}.sp-profile-cover{height:150px;margin:-12px -12px -43px;border-radius:15px 15px 0 0}.sp-profile-modern__top{gap:11px;align-items:flex-end}.sp-profile-modern__avatar{width:86px;height:86px;min-width:86px;border-width:4px;font-size:31px}.sp-profile-modern__identity{max-width:calc(100% - 97px);padding-bottom:5px}.sp-profile-modern__identity h2{font-size:20px!important;line-height:1.15}.sp-profile-modern__identity>span{margin-top:3px;font-size:13px}.sp-profile-modern__bio{margin:10px 0 8px!important;font-size:13px;line-height:1.4}.sp-profile-stats{margin:8px 0 10px}.sp-profile-stats a,.sp-profile-stats span{padding:8px 3px}.sp-profile-stats strong{font-size:16px;line-height:1.1}.sp-profile-stats small{font-size:10px;white-space:nowrap}.sp-profile-actions{gap:7px}.sp-profile-actions .sp-button{min-height:42px;height:42px;padding:7px 13px;border-radius:10px;font-size:13px}.sp-profile-badges{margin-top:9px}.sp-profile-tabs{width:100%;margin-top:10px;overflow:hidden}.sp-profile-tabs span{min-width:0;padding:9px 2px;font-size:11px;white-space:nowrap}.sp-profile-posts{width:100%;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}.sp-profile-post{min-width:0;width:100%;padding:7px;font-size:10px;border-radius:2px}}@media(min-width:601px){.sp-profile-cover{height:190px}}
/* Reference-driven mobile profile layout, 2026-08-23. */
@media(max-width:600px){
  .sp-body:has(.sp-profile-modern){background:#fff}
  .sp-body:has(.sp-profile-modern) .sp-header{height:76px;justify-content:center;padding-top:max(6px,env(safe-area-inset-top));background:#fff}
  .sp-body:has(.sp-profile-modern) .sp-brand{font-size:19px;text-align:left}
  .sp-body:has(.sp-profile-modern) .sp-back-button{display:none}
  .sp-body:has(.sp-profile-modern) .sp-identity-link{position:absolute;right:20px;display:grid;place-items:center;width:38px;height:38px;color:var(--sp-navy);font-size:0;text-decoration:none}
  .sp-body:has(.sp-profile-modern) .sp-identity-link:before{content:"⚙";font-size:28px;line-height:1}
  .sp-main:has(.sp-profile-modern){padding:0 0 calc(94px + env(safe-area-inset-bottom))}
  .sp-main:has(.sp-profile-modern) .sp-page-title{display:none}
  .sp-profile-modern{padding:28px 20px 18px!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;overflow:visible}
  .sp-profile-cover{display:none!important}
  .sp-profile-modern__top{align-items:center;gap:18px}
  .sp-profile-modern__avatar{position:relative;width:92px;height:92px;min-width:92px;border:4px solid #fff;outline:3px solid var(--sp-blue);background:linear-gradient(145deg,var(--sp-blue),var(--sp-pink));box-shadow:0 0 0 1px var(--sp-pink),0 5px 14px #0b1f3a18;font-size:32px}
  .sp-profile-modern__avatar:after{content:"";position:absolute;right:-3px;bottom:7px;width:17px;height:17px;border:3px solid #fff;border-radius:50%;background:#4bd276}
  .sp-profile-modern__identity{max-width:calc(100% - 110px);padding:0}
  .sp-profile-modern__identity h2{font-size:25px!important;line-height:1.08;color:var(--sp-navy)}
  .sp-profile-modern__identity>span{margin-top:7px;font-size:16px;color:#657187}
  .sp-profile-modern__bio{margin:22px 0 17px!important;font-size:16px;line-height:1.45;color:var(--sp-navy)!important}
  .sp-profile-stats{margin:0 0 18px;border:0}
  .sp-profile-stats a,.sp-profile-stats span{position:relative;padding:7px 3px 9px}
  .sp-profile-stats a+*,.sp-profile-stats span+*{border-left:1px solid #e3e8ef}
  .sp-profile-stats strong{font-size:21px;line-height:1.1;color:var(--sp-navy)}
  .sp-profile-stats small{margin-top:5px;font-size:12px;color:#718096}
  .sp-profile-actions .sp-button{height:44px;min-height:44px;border:1.5px solid var(--sp-blue);border-radius:7px;background:#fff!important;color:var(--sp-blue)!important;font-size:14px;font-weight:800;box-shadow:none}
  .sp-profile-actions .sp-button:before{content:"✎";margin-right:9px;font-size:17px}
  .sp-profile-badges:empty{display:none}
  .sp-profile-tabs{margin-top:10px;border-top:1px solid #e5e9ef;border-bottom:1px solid #e5e9ef;background:#fff}
  .sp-profile-tabs span{padding:17px 2px 15px;font-size:13px;color:#6b7588}
  .sp-profile-tabs .is-active{color:var(--sp-blue);border-bottom-width:3px}
  .sp-profile-posts{padding:10px;gap:4px;background:#fff}
  .sp-profile-post{border-radius:4px;background:#f7f5f4;color:var(--sp-navy);font-size:11px;line-height:1.4}
  .sp-profile-post>span{-webkit-line-clamp:4;padding:4px}
}
/* Reference polish: compact spacing, vector icons and fixed-nav clearance. */
@media(max-width:600px){
  .sp-body:has(.sp-profile-modern) .sp-identity-link:before{content:"";width:28px;height:28px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .34 1.88l.06.06-2.83 2.83-.06-.06A1.7 1.7 0 0 0 15 19.4a1.7 1.7 0 0 0-1 .6 1.7 1.7 0 0 0-.4 1.1V21h-4v-.09A1.7 1.7 0 0 0 8.6 19.4a1.7 1.7 0 0 0-1.88.34l-.06.06-2.83-2.83.06-.06A1.7 1.7 0 0 0 4.6 15a1.7 1.7 0 0 0-.6-1 1.7 1.7 0 0 0-1.1-.4H3v-4h.09A1.7 1.7 0 0 0 4.6 8.6a1.7 1.7 0 0 0-.34-1.88l-.06-.06 2.83-2.83.06.06A1.7 1.7 0 0 0 9 4.6a1.7 1.7 0 0 0 1-.6 1.7 1.7 0 0 0 .4-1.1V3h4v.09A1.7 1.7 0 0 0 15.4 4.6a1.7 1.7 0 0 0 1.88-.34l.06-.06 2.83 2.83-.06.06A1.7 1.7 0 0 0 19.4 9c.14.38.36.72.66 1 .3.28.68.43 1.1.4H21v4h-.09A1.7 1.7 0 0 0 19.4 15Z'/%3E%3C/svg%3E") center/contain no-repeat;mask:var(--profile-gear-mask,none)}
  .sp-profile-modern{padding:22px 20px 10px!important}
  .sp-profile-modern__top{gap:16px}
  .sp-profile-modern__avatar{width:84px;height:84px;min-width:84px;font-size:29px}
  .sp-profile-modern__identity{max-width:calc(100% - 100px)}
  .sp-profile-modern__identity h2{font-size:23px!important}
  .sp-profile-modern__identity>span{margin-top:5px;font-size:15px}
  .sp-profile-modern__bio{margin:18px 0 12px!important;font-size:15px}
  .sp-profile-stats{margin-bottom:13px}
  .sp-profile-stats a,.sp-profile-stats span{padding:6px 3px 8px}
  .sp-profile-actions .sp-button{text-decoration:none!important}
  .sp-profile-actions .sp-button:before{content:"";display:inline-block;width:17px;height:17px;margin-right:9px;vertical-align:-3px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z'/%3E%3C/svg%3E") center/contain no-repeat}
  .sp-profile-badges{margin-top:5px}
  .sp-profile-tabs{margin-top:0}
  .sp-profile-posts{padding-bottom:calc(112px + env(safe-area-inset-bottom))}
}
/* Final visual alignment against the supplied reference. */
@media(max-width:600px){
  .sp-body:has(.sp-profile-modern) .sp-header{height:64px;box-sizing:border-box;padding-top:env(safe-area-inset-top)}
  .sp-body:has(.sp-profile-modern) .sp-identity-link:before{display:none!important}
  .sp-body:has(.sp-profile-modern) .sp-identity-link{font-size:0;background:transparent!important}
  .sp-body:has(.sp-profile-modern) .sp-identity-link svg{display:block;width:30px;height:30px;fill:none;stroke:var(--sp-navy);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .sp-profile-modern{margin-bottom:0!important;padding-bottom:8px!important}
  .sp-profile-modern__bio{margin-top:16px!important;margin-bottom:10px!important}
  .sp-profile-stats{margin-bottom:11px}
  .sp-profile-tabs{margin-top:0!important}
}

/* Reference: keep the profile edit icon and label centered as one unit. */
@media(max-width:600px){
  .sp-profile-actions .sp-button{
    display:flex!important;
    align-items:center;
    justify-content:center;
    gap:9px;
    width:100%;
    text-align:center;
  }
  .sp-profile-actions .sp-button:before{
    flex:0 0 auto;
    margin-right:0!important;
  }
}

/* Desktop profile follows the same clean hierarchy as the supplied reference. */
@media(min-width:601px){
  .sp-main:has(.sp-profile-modern){width:min(100%,720px);padding-top:0}
  .sp-main:has(.sp-profile-modern) .sp-page-title{display:none}
  .sp-profile-modern{
    padding:34px 38px 26px!important;
    border:1px solid #e2e8f0!important;
    border-radius:18px!important;
    background:#fff!important;
    box-shadow:0 12px 34px rgba(11,31,58,.07)!important;
  }
  .sp-profile-cover{display:none!important}
  .sp-profile-modern__top{align-items:center;gap:24px}
  .sp-profile-modern__avatar{
    position:relative;
    width:116px;
    height:116px;
    min-width:116px;
    border:5px solid #fff;
    outline:3px solid var(--sp-blue);
    background:linear-gradient(145deg,var(--sp-blue),var(--sp-pink));
    box-shadow:0 0 0 1px var(--sp-pink),0 8px 22px rgba(11,31,58,.14);
    font-size:40px;
  }
  .sp-profile-modern__avatar:after{content:"";position:absolute;right:-2px;bottom:10px;width:19px;height:19px;border:4px solid #fff;border-radius:50%;background:#4bd276}
  .sp-profile-modern__identity{max-width:calc(100% - 142px);padding:0}
  .sp-profile-modern__identity h2{font-size:32px!important;line-height:1.12;color:var(--sp-navy)}
  .sp-profile-modern__identity>span{margin-top:7px;font-size:18px;color:#657187}
  .sp-profile-modern__bio{margin:26px 0 20px!important;font-size:18px;line-height:1.5}
  .sp-profile-stats{margin:0 0 22px;border:0}
  .sp-profile-stats a,.sp-profile-stats span{position:relative;padding:10px 4px 12px}
  .sp-profile-stats a+*,.sp-profile-stats span+*{border-left:1px solid #e3e8ef}
  .sp-profile-stats strong{font-size:24px;color:var(--sp-navy)}
  .sp-profile-stats small{margin-top:5px;font-size:13px}
  .sp-profile-actions .sp-button{display:flex!important;align-items:center;justify-content:center;gap:10px;height:46px;min-height:46px;border:1.5px solid var(--sp-blue);border-radius:8px;background:#fff!important;color:var(--sp-blue)!important;font-size:15px;box-shadow:none;text-align:center}
  .sp-profile-actions .sp-button:before{flex:0 0 auto;margin-right:0!important}
  .sp-profile-badges:empty{display:none}
  .sp-profile-tabs{margin-top:18px;border-top:1px solid #e5e9ef;background:#fff}
  .sp-profile-tabs span{padding:17px 4px 15px;font-size:14px}
  .sp-profile-posts{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:12px 0;background:#fff}
  .sp-profile-post{border-radius:6px;font-size:13px;line-height:1.45}
}

@media(min-width:960px){
  .sp-desktop-grid:has(.sp-profile-modern){grid-template-columns:200px minmax(0,720px) 200px;justify-content:center}
}

/* Final reference match: compact profile header, split actions and icon tabs. */
.sp-profile-actions{align-items:stretch}
.sp-profile-actions:after{
  content:"";
  display:grid;
  place-items:center;
  flex:0 0 44px;
  width:44px;
  height:44px;
  box-sizing:border-box;
  border:1px solid #d7dee8;
  border-radius:8px;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1f3a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 8 5-5 5 5'/%3E%3Cpath d='M5 13v7h14v-7'/%3E%3C/svg%3E") center/19px 19px no-repeat;
  color:var(--sp-navy);
  font-size:21px;
  font-weight:700;
}
.sp-profile-actions .sp-button{text-decoration:none!important}
.sp-profile-tabs span:before{display:inline-block;margin-right:7px;color:currentColor;font-size:15px;vertical-align:-1px}
.sp-profile-tabs span:nth-child(1):before{content:"▣"}
.sp-profile-tabs span:nth-child(2):before{content:"♧";transform:rotate(180deg)}
.sp-profile-tabs span:nth-child(3):before{content:"⌗"}

@media(max-width:600px){
  .sp-profile-modern{padding:20px 18px 14px!important}
  .sp-profile-modern__top{gap:16px}
  .sp-profile-modern__avatar{width:82px;height:82px;min-width:82px;font-size:28px}
  .sp-profile-modern__identity{max-width:calc(100% - 98px)}
  .sp-profile-modern__identity h2{font-size:20px!important}
  .sp-profile-modern__identity>span{margin-top:4px;font-size:13px}
  .sp-profile-modern__bio{margin:15px 0 12px!important;font-size:13px;line-height:1.4}
  .sp-profile-stats{margin:0 0 13px}
  .sp-profile-stats a,.sp-profile-stats span{padding:6px 2px 8px}
  .sp-profile-stats strong{font-size:17px}
  .sp-profile-stats small{margin-top:3px;font-size:10px}
  .sp-profile-actions{gap:7px}
  .sp-profile-actions .sp-button{height:40px;min-height:40px;font-size:12px}
  .sp-profile-actions:after{flex-basis:40px;width:40px;height:40px;font-size:18px}
  .sp-profile-tabs span{padding:13px 1px 12px;font-size:10px}
  .sp-profile-tabs span:before{margin-right:4px;font-size:12px}
  .sp-profile-posts{gap:4px;padding:8px 7px 12px}
}

@media(min-width:601px){
  .sp-profile-actions .sp-button{height:44px;min-height:44px}
}
