/* Public identity: photo and slug stay one card; Back reserves its own space. */
@media (max-width:760px) {
  body.public-profile-page .hero .hero-grid {
    position:relative !important;
    padding-top:12px !important;
  }
  body.public-profile-page .hero .portrait-stack > .scv-portrait-media {
    display:grid !important;
    align-self:start !important;
    margin:0 !important;
  }
  body.public-profile-page .hero .hero-identity-head.scv-owner-preview-card-head {
    display:block !important;
    position:static !important;
  }
  body.public-profile-page .hero .scv-owner-preview-card-head > .hero-identity-primary {
    display:flex !important;
  }
  body.public-profile-page .hero .scv-owner-preview-card-head > .scv-owner-preview-card-actions:not([hidden]) {
    position:absolute !important;
    grid-column:auto !important;
    grid-row:auto !important;
    top:12px !important;
    right:12px !important;
    display:flex !important;
    width:auto !important;
    max-width:none !important;
    margin:0 !important;
  }
  body.public-profile-page .hero .scv-owner-preview-card-actions > .scv-account-context-return {
    box-sizing:border-box !important;
    min-height:28px !important;
    height:28px !important;
    padding:0 9px !important;
    font-size:12px !important;
    line-height:1.2 !important;
  }
  body.public-profile-page .hero .scv-owner-return-label-full {display:none !important;}
  body.public-profile-page .hero .scv-owner-return-label-short {display:inline !important;}
  body.public-profile-page .hero .hero-grid.scv-public-back-beside .hero-name-row {
    width:100% !important;
    box-sizing:border-box !important;
    padding-right:var(--scv-public-back-reserve,0px) !important;
  }
  body.public-profile-page .hero .hero-grid.scv-public-back-above {
    padding-top:calc(12px + var(--scv-public-back-height,28px) + 8px) !important;
  }
}

/* Public phone presentation only. Native tab/empty/privacy guards remain in
   control: never reveal hidden cards or add owner editing/display controls. */
@media (max-width:700px), (orientation:landscape) and (max-height:500px) and (max-width:1100px) and (pointer:coarse) {
  body.public-profile-page .scv-profile-main-column:not([hidden]):not([aria-hidden="true"]) { display:block !important; }
  body.public-profile-page .scv-profile-section-nav-shell { margin:0 0 8px !important; }
  body.public-profile-page .scv-profile-section-nav button { height:auto !important; min-height:44px !important; max-height:none !important; }
  body.public-profile-page .scv-profile-main-column > .left-col { margin:0 !important; gap:12px !important; }
  body.public-profile-page [data-scv-profile-panel] { gap:12px !important; }
  body.public-profile-page .left-col :is(#aboutCard,#performanceStatsCard,#selfRatedSkillsCard,#sportDetailsCard,#developmentTimelineCard,#achievementsCard,#photoCard,#videoCard,#coachReferenceCard,#contactOpportunityCard,.scv-extended-profile-panel) > .card-body { padding-bottom:8px !important; }
  /* Preserve existing header bands, side insets, icons and font sizes. */
  body.public-profile-page .left-col :is(#aboutCard,#performanceStatsCard,#selfRatedSkillsCard,#sportDetailsCard,#developmentTimelineCard,#achievementsCard,#photoCard,#videoCard,#coachReferenceCard,#contactOpportunityCard) .card-title,
  body.public-profile-page .left-col .scv-extended-profile-panel .scv-extended-section-head { height:auto !important; min-height:44px !important; margin-bottom:8px !important; }
  body.public-profile-page .left-col :is(#aboutCard,#performanceStatsCard,#selfRatedSkillsCard,#sportDetailsCard,#developmentTimelineCard,#achievementsCard,#photoCard,#videoCard,#coachReferenceCard,#contactOpportunityCard,.scv-extended-profile-panel) .card-title { height:auto !important; white-space:normal !important; text-overflow:clip !important; overflow:visible !important; overflow-wrap:anywhere !important; line-height:1.2 !important; }
  body.public-profile-page .left-col .card-title > .scv-profile-section-title-text { white-space:normal !important; text-overflow:clip !important; overflow:visible !important; overflow-wrap:anywhere !important; }
}
