.social-page{
  display:grid;
  gap:22px;
}

.social-hero{
  min-height:260px;
  padding:26px;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(180px,320px);
  align-items:center;
  gap:18px;
}

.social-hero h1{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(2.8rem,7vw,5.8rem);
  line-height:1;
  text-transform:uppercase;
  background:linear-gradient(90deg,#fff,#ff70de 48%,#9cff00);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  -webkit-text-stroke:.8px #240033;
  text-shadow:0 0 18px rgba(255,63,215,.58);
}

.social-hero p{
  max-width:720px;
  color:#e8d9ff;
  line-height:1.55;
}

.social-hero img{
  width:min(100%,280px);
  justify-self:center;
  filter:drop-shadow(0 0 22px rgba(255,63,215,.62));
}

.social-toolbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.social-directory{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.profile-card-social{
  min-width:0;
  padding:0;
  overflow:hidden;
}

.profile-card-cover{
  min-height:118px;
  background:var(--cover),linear-gradient(135deg,rgba(255,63,215,.28),rgba(0,240,255,.13));
  background-size:cover;
  background-position:center;
  border-bottom:1px solid rgba(255,63,215,.32);
}

.profile-card-body{
  display:grid;
  gap:10px;
  padding:16px;
}

.profile-row{
  display:flex;
  gap:12px;
  align-items:center;
}

.profile-avatar{
  width:74px;
  height:74px;
  border-radius:22px;
  border:2px solid rgba(255,63,215,.72);
  background:#120020;
  object-fit:contain;
  box-shadow:0 0 20px rgba(255,63,215,.35);
}

.profile-handle{
  color:#cdb8ec;
  font-size:.92rem;
}

.social-counts{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.social-counts span,.social-pill{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:5px 9px;
  border:1px solid rgba(255,63,215,.3);
  border-radius:999px;
  background:rgba(255,255,255,.04);
  color:#eadfff;
  font-weight:800;
  font-size:.82rem;
}

.social-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.social-button{
  min-height:38px;
  border:1px solid rgba(255,63,215,.62);
  border-radius:12px;
  padding:9px 12px;
  background:linear-gradient(135deg,rgba(255,63,215,.24),rgba(139,92,255,.18));
  color:#fff;
  font-weight:1000;
  text-transform:lowercase;
  cursor:pointer;
  box-shadow:0 0 16px rgba(255,63,215,.2);
}

.social-button:hover,.social-button:focus-visible{
  outline:0;
  border-color:rgba(156,255,0,.82);
  box-shadow:0 0 18px rgba(156,255,0,.38),0 0 30px rgba(255,63,215,.26);
}

.social-button.is-following{
  border-color:rgba(0,240,255,.7);
  background:linear-gradient(135deg,rgba(0,240,255,.18),rgba(255,63,215,.12));
}

.profile-shell{
  display:grid;
  gap:18px;
}

.profile-cover{
  position:relative;
  min-height:330px;
  padding:24px;
  display:grid;
  align-items:end;
  overflow:hidden;
  background:var(--cover),radial-gradient(circle at 75% 32%,rgba(255,63,215,.24),transparent 24rem),linear-gradient(135deg,#1f0638,#05000c);
  background-size:cover;
  background-position:center;
}

.profile-cover::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,transparent 18%,rgba(5,0,12,.82));
  pointer-events:none;
}

.profile-cover-content{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:120px minmax(0,1fr);
  gap:16px;
  align-items:end;
}

.profile-cover .profile-avatar{
  width:120px;
  height:120px;
  border-radius:28px;
}

.profile-cover h1{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(2.4rem,6vw,5rem);
  line-height:1;
}

.profile-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.profile-layout{
  display:grid;
  grid-template-columns:300px minmax(0,1fr);
  gap:18px;
  align-items:start;
}

.profile-sidebar,.profile-main{
  display:grid;
  gap:14px;
}

.profile-section{
  padding:18px;
}

.profile-section h2,.profile-section h3{
  margin-top:0;
}

.profile-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:10px;
}

.profile-tabs button{
  border:1px solid rgba(255,63,215,.34);
  border-radius:999px;
  padding:8px 12px;
  background:rgba(255,255,255,.04);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}

.profile-tabs button[aria-selected="true"]{
  border-color:rgba(156,255,0,.78);
  color:#fff;
  box-shadow:0 0 18px rgba(156,255,0,.3);
}

.wall-list,.review-list,.resource-list,.activity-list{
  display:grid;
  gap:10px;
}

.wall-post,.review-card,.resource-card,.gallery-card,.activity-item{
  padding:13px;
  border:1px solid rgba(255,63,215,.22);
  border-radius:14px;
  background:rgba(255,255,255,.04);
}

.wall-post header,.review-card header{
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:#cdb8ec;
  font-size:.84rem;
}

.social-form{
  display:grid;
  gap:10px;
}

.social-form input,.social-form textarea,.social-form select{
  width:100%;
  border:1px solid rgba(255,63,215,.38);
  border-radius:12px;
  padding:11px;
  background:rgba(8,1,18,.72);
  color:#fff;
}

.social-form textarea{
  min-height:94px;
  resize:vertical;
}

.gallery-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.gallery-card img{
  width:100%;
  aspect-ratio:1.35;
  object-fit:contain;
  border-radius:12px;
  background:rgba(0,0,0,.22);
  margin-bottom:9px;
}

.empty-state,.setup-pending,.safety-note{
  border:1px dashed rgba(255,63,215,.45);
  border-radius:14px;
  padding:14px;
  color:#dbc8f7;
  background:rgba(255,255,255,.035);
}

.safety-note{
  border-color:rgba(156,255,0,.45);
}

.edit-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.social-nav-link{
  color:var(--muted);
}

.account-menu{position:relative;display:grid;place-items:center}
.account-popover{position:absolute;right:0;top:calc(100% + 12px);z-index:80;width:min(310px,calc(100vw - 28px));padding:14px;border:1px solid rgba(255,63,215,.58);border-radius:18px;background:linear-gradient(180deg,rgba(19,1,36,.98),rgba(8,0,18,.96));box-shadow:0 18px 42px rgba(0,0,0,.42),0 0 28px rgba(255,63,215,.36),inset 0 0 24px rgba(255,63,215,.08);opacity:0;transform:translateY(-6px) scale(.98);pointer-events:none;transition:.16s opacity,.16s transform}
.account-popover::before{content:"";position:absolute;right:20px;top:-7px;width:14px;height:14px;transform:rotate(45deg);background:rgba(19,1,36,.98);border-left:1px solid rgba(255,63,215,.58);border-top:1px solid rgba(255,63,215,.58)}
.account-menu:hover .account-popover,.account-menu:focus-within .account-popover,.account-menu.is-open .account-popover{opacity:1;transform:none;pointer-events:auto}
.account-card-head{display:grid;gap:4px;padding:4px 4px 12px;border-bottom:1px solid rgba(255,63,215,.18)}
.account-kicker{text-transform:uppercase;letter-spacing:.12em;font-size:.7rem;font-weight:1000;color:var(--cyan)}
.account-card-head strong{font-size:1rem;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-card-head small{color:var(--muted);line-height:1.35}
.account-menu-actions{display:grid;gap:8px;padding-top:10px}
.account-menu-actions a,.account-menu-actions button{width:100%;display:flex;align-items:center;justify-content:space-between;min-height:38px;padding:9px 11px;border:1px solid rgba(255,63,215,.24);border-radius:12px;background:rgba(255,255,255,.04);color:#fff;font-weight:900;text-transform:lowercase;cursor:pointer}
.account-menu-actions a::after,.account-menu-actions button::after{content:">";color:var(--pink);font-size:1.1rem}

@media (max-width:980px){
  .social-directory,.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .profile-layout{grid-template-columns:1fr}
  .social-hero{grid-template-columns:1fr}
}

@media (max-width:640px){
  .social-directory,.gallery-grid,.edit-grid{grid-template-columns:1fr}
  .profile-cover-content{grid-template-columns:1fr}
  .profile-cover .profile-avatar{width:96px;height:96px}
  .social-hero{padding:18px}
}


/* Keep the expanded social nav from crowding the header. */
.topbar .main-nav a{
  min-width:clamp(46px,5.1vw,58px) !important;
  padding-left:5px !important;
  padding-right:5px !important;
  font-size:clamp(.62rem,.72vw,.76rem) !important;
}
.topbar .brand-title{
  font-size:clamp(1.35rem,2.2vw,2.45rem) !important;
}
.topbar .site-search{
  min-width:150px;
}

/* XP art stays contained so it adds dopamine without turning into a second hero. */
.xp-badge-art{
  display:block;
  width:min(100%,190px);
  max-height:118px;
  object-fit:contain;
  margin:10px auto 12px;
  padding:6px;
  border-radius:0;
  background:transparent;
  filter:drop-shadow(0 0 14px rgba(255,63,215,.52)) drop-shadow(0 0 12px rgba(0,240,255,.34));
}
.xp-badge-art.wide{
  width:min(100%,260px);
  max-height:132px;
}
.level-summary-grid{
  align-items:center;
}

@media (max-width:640px){
  .xp-badge-art{
    width:min(100%,160px);
    max-height:100px;
  }
}
