/* Mobile identity sits between the real cover and the same ordered page content. */
body.profile-page:not(.template-preview-page) .space-mobile-identity{display:none;}
.space-social-links{display:flex;flex-wrap:nowrap;align-items:center;justify-content:safe center;gap:10px;padding:8px;max-width:100%;width:max-content;margin-inline:auto;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-inline:8px;scrollbar-width:none;}
.space-social-icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;border:1px solid var(--theme-line,var(--ui-line));border-radius:50%;background:var(--theme-card,var(--ui-panel));color:var(--theme-text,var(--ui-text));text-decoration:none;scroll-snap-align:start;}
.space-social-icon svg{width:21px;height:21px;fill:currentColor;}
.space-social-icon:focus-visible{outline:3px solid var(--ui-focus);outline-offset:4px;}
.space-desktop-socials{padding:0 24px 16px;}
.studio-social-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.studio-social-fields label{min-width:0;}.studio-social-fields label>span{display:flex;align-items:center;gap:8px;}
.studio-social-fields input{width:100%;min-height:44px;}.studio-social-fields svg{flex:none;}
.studio-social-more{margin-top:16px;}.studio-social-more summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:650;}
.studio-preview-socials{padding:8px 20px;}.studio-preview-socials:empty{display:none;}
 .space-mobile-identity{display:flex;flex-direction:column;align-items:center;position:relative;z-index:2;margin:0 auto;padding:0 24px 20px;text-align:center;color:var(--theme-text,var(--ui-text));max-width:600px;}
 .space-mobile-avatar{display:grid;place-items:center;flex:none;width:var(--space-avatar-size);height:var(--space-avatar-size);margin-top:calc(var(--space-avatar-size) * -.4375);margin-bottom:clamp(14px,1.4vw,22px);border:5px solid var(--theme-bg,var(--ui-page));border-radius:50%;background:var(--theme-card,var(--ui-panel));box-shadow:0 8px 24px #00000016;overflow:hidden;font:700 calc(var(--space-avatar-size) * .375)/1 system-ui;}
 .space-mobile-avatar img{width:100%;height:100%;object-fit:cover;display:block;}
 .space-mobile-name{font-size:clamp(24px,7vw,32px);line-height:1.14;letter-spacing:-.035em;font-weight:750;overflow-wrap:anywhere;}
 .space-mobile-caption{font-size:14px;line-height:1.5;margin:8px 0 6px;max-width:32ch;color:var(--theme-muted,var(--ui-muted));}
 .space-mobile-example{font-size:11px;line-height:1.5;color:var(--theme-muted,var(--ui-muted));margin:4px 0;}

@media(max-width:600px){
 .studio-social-fields{grid-template-columns:1fr;}
 .space-desktop-socials{display:none;}
 body#space-page.profile-page .space-header>.space-identity-bar{display:flex;justify-content:center;padding:0 20px 16px;margin:0;}
 body#space-page.profile-page .space-identity-bar>.space-identity{display:none;}
 body#space-page.profile-page .space-identity-actions{justify-content:center;flex-wrap:wrap;gap:8px;}
 body#space-page.profile-page .space-header .space-cover,body#space-page.template-preview-page .tpl-preview-cover{height:220px;min-height:220px;max-height:220px;margin:0;border-radius:0;aspect-ratio:auto;}
 body#space-page.template-preview-page .tpl-cover-signature{display:none;}
 body#space-page.template-preview-page .tpl-preview-cover>span{bottom:auto;top:12px;font-size:9px;}
 .demo-space-page .demo-cover-stage{height:220px;min-height:220px;padding:0;}
 .demo-space-page .demo-cover-title{display:none;}
 .demo-space-page .demo-hero-image figcaption{top:12px;bottom:auto;font-size:10px;}
 .demo-space-page .demo-breadcrumb{margin-top:0;padding-top:0;}
 body#space-page.profile-page .space-intro{padding-top:20px;}
 body#space-page.profile-page .space-intro h1{font-size:32px;line-height:1.12;}
 .demo-space-page .demo-hero-copy{padding-top:20px;}
 .demo-space-page .demo-hero-copy h2{font-size:30px;line-height:1.15;}
}

@media(max-width:600px){body.profile-page:not(.template-preview-page) .space-mobile-identity{display:flex;}}
@media(min-width:601px){
 .template-preview-page .space-mobile-identity,.demo-space-page .space-mobile-identity{padding-bottom:24px;max-width:720px;}
 .space-mobile-name{font-size:28px;}
 .template-preview-page .tpl-cover-signature,.demo-space-page .demo-cover-title{display:none;}
}
.space-social-links:focus-visible{outline:3px solid var(--ui-focus);outline-offset:2px;}
@media(prefers-reduced-motion:reduce){.space-social-links{scroll-behavior:auto;}}

.space-mobile-identity,.space-identity{--space-avatar-size:clamp(108px,28vw,120px);}
body.profile-page .space-identity .space-logo{width:var(--space-avatar-size);height:var(--space-avatar-size);font-size:calc(var(--space-avatar-size) * .375);}
@media(min-width:601px){.space-mobile-identity,.space-identity{--space-avatar-size:clamp(128px,16vw,144px);}}
@media(min-width:1024px){.space-mobile-identity,.space-identity{--space-avatar-size:clamp(144px,12vw,176px);}}

.space-social-links::-webkit-scrollbar{display:none;width:0;height:0;}

/* A compact identity masthead on larger screens, a centred profile on phones. */
body.profile-page .space-header-profile .space-mobile-identity{display:flex;}
body.profile-page .space-header-profile .space-identity-bar>.space-identity,
body.profile-page .space-header-profile>.space-desktop-socials{display:none;}
body.profile-page .space-header-profile>.space-identity-bar{min-height:0;margin-top:0;border:0;border-radius:0;box-shadow:none;background:transparent;}
@media(min-width:601px){
 body.profile-page .space-header-profile .space-cover{height:280px;min-height:0;}
 body.profile-page .space-header-profile>.space-identity-bar{justify-content:flex-end;padding-block:12px 24px;}
 body.profile-page .space-header-profile .space-mobile-identity{display:grid;}
 :is(.template-preview-page,.space-header-profile) .space-mobile-identity{
  display:grid;grid-template-columns:var(--space-avatar-size) minmax(0,1fr);gap:0 24px;
  width:calc(100% - 64px);max-width:1344px;padding:24px 0 8px;text-align:left;
 }
 :is(.template-preview-page,.space-header-profile) .space-mobile-avatar{grid-column:1;grid-row:1 / span 2;width:var(--space-avatar-size);height:var(--space-avatar-size);font-size:calc(var(--space-avatar-size) * .375);margin:-44px 0 0;align-self:start;}
 :is(.template-preview-page,.space-header-profile) .space-mobile-name{grid-column:2;font-size:clamp(24px,2.4vw,36px);}
 :is(.template-preview-page,.space-header-profile) .space-mobile-caption{grid-column:2;margin:8px 0 0;max-width:none;}
 :is(.template-preview-page,.space-header-profile) .space-social-links{grid-column:1/-1;margin:16px 0 0;padding-inline:4px;justify-content:flex-start;}
 :is(.template-preview-page,.space-header-profile) .space-mobile-example{grid-column:1/-1;margin-top:4px;}
}
@media(min-width:1101px){
 body.profile-page .space-header-profile .space-cover{height:340px;}
 :is(.template-preview-page,.space-header-profile) .space-mobile-identity{grid-template-columns:var(--space-avatar-size) minmax(0,1fr) auto;gap:0 24px;width:calc(100% - 96px);}
 :is(.template-preview-page,.space-header-profile) .space-social-links{grid-column:3;grid-row:1 / span 2;margin:0;max-width:440px;}
 :is(.template-preview-page,.space-header-profile) .space-mobile-example{grid-column:3;text-align:right;}
}
