/* Public profile: photo backgrounds fill the opening; interactive scenes keep their own space. */
.talent-opening-full__media{position:absolute;inset:0}
:root:has(.talent-template-profile){scrollbar-gutter:stable}
.talent-opening-full__body{pointer-events:none}
.talent-opening-full__body :is(a,button){pointer-events:auto}
.talent-template-profile .talent-opening-full__media .talent-introduction-controls{top:calc(var(--chrome-gap) + 2 * var(--chrome-cell) + var(--s8));right:var(--gutter)}

@media(max-width:560px),(max-width:900px) and (max-height:500px){
  .talent-template-profile .talent-opening-full{min-height:0;background:var(--plate-bottom)}
  .talent-opening-full__media{position:relative;aspect-ratio:4/5;width:100%;flex:none}
  .talent-opening-full__media .opening__plate{inset:0}
  .talent-opening-full__media .talent-introduction-controls{top:auto;bottom:var(--s4);right:var(--gutter)}
  .talent-opening-full>.opening__shade{display:none}
  .talent-template-profile .talent-opening-full__body{padding:var(--s6) var(--gutter);text-align:left}
  .talent-opening-full__back{margin:0 0 var(--s6)}
  .talent-opening-full__mark{margin:0 0 var(--s3)}
  .talent-template-profile .talent-opening-full .display{font-size:var(--t-2xl);line-height:1.1;margin:0;letter-spacing:var(--tr-tight);text-wrap:balance}
  .talent-opening-full__data{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s6);margin-top:var(--s6)}
  .talent-opening-full__data .datarow__cell{min-width:0;overflow-wrap:anywhere}
  .talent-template-profile .talent-opening-full .talent-opening__actions{justify-content:flex-start;margin-top:var(--s6)}
  .talent-opening-full .contact-strip{flex-wrap:wrap}
  .talent-opening-full .contact-strip__item{min-width:0;padding:var(--s3) var(--gutter);flex:1 1 auto}
  .talent-opening-full .contact-strip__item:first-child{display:none}
  .talent-template-profile section[id]{scroll-margin-top:calc(var(--chrome-h,48px) + var(--chrome-gap) * 2 + var(--s4))}
  .talent-template-profile .band{padding-block:var(--s10)}
  .talent-template-profile .talent-identity-layout{gap:var(--s6)}
  .talent-template-profile .talent-identity-cells>div{min-width:0;overflow-wrap:anywhere}
  .talent-template-profile .talent-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .talent-template-profile .talent-photo-tile:active{outline:2px solid var(--brand);outline-offset:-2px}
  .talent-template-profile .talent-diary-text{font-size:var(--t-base);line-height:1.6}
  .talent-template-profile .invite{min-width:0}
  .talent-template-profile .talent-photo-dialog[open]{display:flex;flex-direction:column;padding:var(--s4);max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - var(--s4) * 2)}
  .talent-template-profile .talent-photo-toolbar{height:auto;flex-wrap:wrap;flex:none;gap:var(--s3);margin-bottom:var(--s4)}
  .talent-template-profile .talent-photo-toolbar>span{flex-basis:100%;font-size:var(--t-xs)}
  .talent-template-profile .talent-photo-toolbar .control{padding:var(--s3) var(--s8);font-size:var(--t-sm)}
  .talent-template-profile .talent-photo-view{flex:1;min-height:0;height:auto;overscroll-behavior:contain}
  body:has(.talent-template-profile .talent-photo-dialog[open]){overflow:hidden}
}

/* Match the homepage opening while retaining the compact mobile typography. */
@media(max-width:560px),(max-width:900px) and (max-height:500px){
  .talent-template-profile .talent-opening-full:not(:has(.talent3d-media[data-talent-3d=active])){display:flex;min-height:100svh;padding-top:0}
  .talent-opening-full:not(:has(.talent3d-media[data-talent-3d=active]))>.talent-opening-full__media{position:absolute;inset:0;aspect-ratio:auto}
  .talent-opening-full:not(:has(.talent3d-media[data-talent-3d=active]))>.opening__shade{display:block}
  .talent-template-profile .talent-opening-full:not(:has(.talent3d-media[data-talent-3d=active]))>.talent-opening-full__body{padding:calc(var(--chrome-h,128px) + var(--s12)) var(--gutter) clamp(96px,12vw,150px)}
  .talent-opening-full:not(:has(.talent3d-media[data-talent-3d=active])) .talent3d-tabs{top:calc(var(--chrome-gap) + var(--chrome-cell) + var(--s4))}
}

.talent-mobile-controls:empty{display:none}
@media(max-width:560px),(max-width:900px) and (max-height:500px){
  /* Media choices stay below the chrome; profile actions follow the identity. */
  .talent-template-profile{position:relative}
  body:has(.talent-template-profile){padding-top:0}
  body:has(.talent-template-profile) .masthead{top:max(var(--chrome-gap),env(safe-area-inset-top));bottom:auto}
  .talent-template-profile .talent-opening-full{padding-top:0}
  .talent-template-profile .talent-opening-full__back,
  .talent-template-profile .talent-opening-full__body>.talent-opening__actions{display:none}
  .talent-template-profile .talent-opening-full:not(:has(.talent3d-media[data-talent-3d=active]))>.talent-opening-full__body{padding-bottom:var(--s8)}
  .talent-mobile-controls:not(:empty){display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--s4);padding:var(--s4) var(--gutter);background:var(--plate-bottom)}
  .talent-mobile-controls>.talent3d-tabs{position:absolute;top:calc(var(--chrome-h,56px) + var(--chrome-gap) * 2 + var(--s4));left:var(--gutter);right:var(--gutter);flex-wrap:wrap;justify-content:flex-start;z-index:5}
  .talent-mobile-controls>.talent-introduction-controls{position:absolute;top:calc(var(--chrome-h,56px) + var(--chrome-gap) * 2 + var(--s4) + 44px + var(--s3));bottom:auto;right:var(--gutter);z-index:5}
  .talent-mobile-controls>.talent-opening__actions{order:2;display:flex;justify-content:center;margin:0;width:100%}
  .talent-mobile-controls .control{min-height:44px}
  .talent-template-profile .talent-opening-full__media .talent3d-media[data-talent-3d=inactive]>.talent3d-tabs,
  .talent-template-profile .talent-opening-full__media .talent-introduction-controls{visibility:hidden}
}

@media(min-width:561px) and (max-width:900px) and (max-height:500px){
  body:has(.talent-template-profile) .masthead{top:max(var(--chrome-gap),env(safe-area-inset-top));bottom:auto}
  body:has(.talent-template-profile) .sheet__body{top:calc(var(--chrome-h,56px) + var(--chrome-gap) * 2 + env(safe-area-inset-top));bottom:max(var(--chrome-gap),env(safe-area-inset-bottom))}
  .talent-template-profile .talent-opening-full{display:grid;grid-template-columns:1fr 1fr;align-items:start;padding-top:calc(var(--chrome-h,56px) + var(--chrome-gap) * 2 + env(safe-area-inset-top))}
  .talent-opening-full .contact-strip{grid-column:1/-1}
}

@media(max-width:560px),(max-width:900px) and (max-height:500px){
 .talent-template-profile .talent-opening-full{padding-top:0}
 .talent-template-profile .talent-opening-full:not(:has(.talent3d-media[data-talent-3d=active]))>.talent-opening-full__body{min-height:100svh;display:flex;flex-direction:column;justify-content:flex-end}
 .talent-template-profile:has(.talent-mobile-controls>.talent-introduction-controls) .talent-opening-full:not(:has(.talent3d-media[data-talent-3d=active]))>.talent-opening-full__body{padding-top:calc(var(--chrome-h,56px) + var(--chrome-gap) * 2 + var(--s4) + 44px + var(--s3) + 48px + var(--s6))}
 .talent-template-profile .talent3d-media[data-talent-3d=active]>.talent3d-tabs{top:calc(var(--chrome-h,56px) + var(--chrome-gap) * 2 + var(--s4))}
 .talent-template-profile .talent3d-media[data-talent-3d=active]:not([data-talent-world=active]) .talent3d-scene{top:calc(var(--chrome-h,56px) + var(--chrome-gap) * 2 + 44px + var(--s8))}
}

@media(min-width:561px) and (max-width:900px) and (max-height:500px){
 .talent-template-profile .talent-opening-full{display:flex;flex-direction:column}
 .talent3d-world-panel .talent3d-world-dock{grid-template-columns:minmax(0,1fr)}
 .talent3d-world-panel .talent3d-world-dock>div{grid-column:1}
 .talent3d-world-panel :is(.talent3d-world-identity,.talent3d-world-camera,.talent3d-world-utilities,.talent3d-world-destinations){justify-content:center}
}
