/* r34.50.161 — DOG FIRST PROFILE & AVATAR EXPERIENCE
   Additive, component-scoped rules. No navigation/map/photo carousel changes.
   Avatar cropping honors the existing object-position + user-selected inline zoom.
*/

/* Shared dog identity: generous photo, readable owner name, no stretched assets. */
body.dog-home-page .dog-avatar-stage{flex:0 0 auto;min-width:0;}
body.dog-home-page .dog-avatar-wrap{
  display:block;box-sizing:border-box;
  width:124px;height:124px;flex:0 0 124px;
  border-radius:25px;overflow:hidden;
}
body.dog-home-page .dog-avatar{display:block;width:100%;height:100%;object-fit:cover;}
body.dog-home-page .dog-profile-identity{min-width:0;}
body.dog-home-page .dog-profile-copy{min-width:0;}
body.dog-home-page .dog-profile-line{font-size:15px;line-height:1.7;}
body.dog-home-page .dog-profile-title-row h1{
  margin:0 4px 0 0;line-height:1.18;overflow-wrap:anywhere;
}
body.dog-home-page .dog-profile-switcher-item{width:40px;height:40px;}
body.dog-home-page .dog-profile-switcher-item img{width:34px;height:34px;}
body.dog-home-page .dog-avatar-view:focus-visible{outline:3px solid #668b75;outline-offset:3px;}

/* Desktop wide: preserve the existing panorama/map workspace; enlarge portrait. */
@media(min-width:1381px){
  body.dog-home-page .dog-profile-main{gap:22px;align-items:center;}
  body.dog-home-page .dog-profile-identity{flex:1 1 auto;gap:20px;}
  body.dog-home-page .dog-profile-side{flex:0 1 auto;}
  body.dog-home-page .dog-profile-title-row h1{font-size:clamp(32px,2.7vw,40px);}
}
/* Desktop medium: prevent the statistics/actions from crushing name and photo. */
@media(min-width:1100px) and (max-width:1380px){
  body.dog-home-page .dog-profile-main{display:flex;flex-direction:column;align-items:stretch;gap:15px;}
  body.dog-home-page .dog-profile-identity{width:100%;gap:18px;align-items:center;}
  body.dog-home-page .dog-profile-title-row h1{font-size:35px;}
  body.dog-home-page .dog-profile-side{width:100%;display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:10px;}
  body.dog-home-page .dog-mini-stats{width:100%;justify-content:flex-start;}
  body.dog-home-page .dog-profile-primary-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:10px;}
  body.dog-home-page .dog-profile-primary-actions>a,
  body.dog-home-page .dog-profile-primary-actions>form,
  body.dog-home-page .dog-profile-primary-actions>form>button{width:100%;min-width:0;box-sizing:border-box;}
}

/* iPad portrait AND landscape, 701-1099px: let the identity breathe without
   changing the PASSed tablet MAP/MEMORIES composition or bottom navigation. */
@media(min-width:701px) and (max-width:1099px){
  body.dog-home-page .dog-profile-main{display:flex;flex-direction:column;align-items:stretch;gap:18px;}
  body.dog-home-page .dog-profile-identity{
    width:100%;display:grid;grid-template-columns:152px minmax(0,1fr);
    gap:12px 22px;align-items:start;
  }
  body.dog-home-page .dog-avatar-wrap{width:152px;height:152px;border-radius:30px;}
  body.dog-home-page .dog-profile-copy{display:contents;}
  body.dog-home-page .dog-profile-title-row{grid-column:2;align-self:center;}
  body.dog-home-page .dog-profile-title-row h1{font-size:clamp(32px,4.4vw,42px);}
  body.dog-home-page .dog-profile-switcher{grid-column:2;}
  body.dog-home-page .dog-profile-line,
  body.dog-home-page .dog-profile-tagline,
  body.dog-home-page .dog-profile-identity .profile-link-strip{grid-column:1/-1;min-width:0;}
  body.dog-home-page .dog-profile-line{font-size:16px;}
  body.dog-home-page .dog-profile-side{
    width:100%;display:flex;flex-direction:column;align-items:stretch;gap:13px;
  }
  body.dog-home-page .dog-mini-stats{width:100%;justify-content:flex-start;}
  body.dog-home-page .dog-profile-primary-actions{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;width:100%;
  }
  body.dog-home-page .dog-profile-primary-actions>a,
  body.dog-home-page .dog-profile-primary-actions>form,
  body.dog-home-page .dog-profile-primary-actions>form>button{
    width:100%;min-width:0;box-sizing:border-box;
  }
}

/* Phone: portrait is the hero, descriptive prose flows across the full card width.
   Do not leave an 80px left gutter continuing beside long biography text. */
@media(max-width:700px){
  body.dog-home-page .dog-profile-compact{padding:19px 17px;}
  body.dog-home-page .dog-profile-main{display:flex;flex-direction:column;align-items:stretch;gap:18px;}
  body.dog-home-page .dog-profile-identity{
    width:100%;display:grid;
    grid-template-columns:clamp(108px,31vw,136px) minmax(0,1fr);
    gap:13px 14px;align-items:start;
  }
  body.dog-home-page .dog-avatar-wrap{
    width:100%;height:auto;aspect-ratio:1/1;min-width:0;flex:none;border-radius:24px;
  }
  body.dog-home-page .dog-profile-copy{display:contents;}
  body.dog-home-page .dog-profile-title-row{
    grid-column:2;display:flex;align-items:flex-start;align-self:start;
    flex-wrap:wrap;gap:9px;min-width:0;
  }
  body.dog-home-page .dog-profile-title-row h1{
    flex:1 0 100%;font-size:clamp(24px,6.6vw,34px);
    line-height:1.2;margin:0;overflow-wrap:anywhere;
  }
  body.dog-home-page .dog-profile-title-row .section-edit{
    box-sizing:border-box;min-height:40px;font-size:13px;
    padding:7px 11px;white-space:normal;line-height:1.25;
  }
  body.dog-home-page .dog-profile-switcher{grid-column:2;}
  body.dog-home-page .dog-profile-line,
  body.dog-home-page .dog-profile-tagline,
  body.dog-home-page .dog-profile-identity .profile-link-strip{
    grid-column:1/-1;width:100%;min-width:0;margin-top:0;
  }
  body.dog-home-page .dog-profile-line{font-size:15px;line-height:1.8;gap:7px 8px;}
  body.dog-home-page .dog-profile-tagline{font-size:16px!important;line-height:1.8!important;}
  body.dog-home-page .dog-profile-side{width:100%;align-items:stretch;}
}

/* Small phones should not overflow even with a long name or a public share CTA. */
@media(max-width:360px){
  body.dog-home-page .dog-profile-compact{padding:16px 13px;}
  body.dog-home-page .dog-profile-identity{grid-template-columns:108px minmax(0,1fr);gap:12px;}
  body.dog-home-page .dog-profile-title-row h1{font-size:24px;}
  body.dog-home-page .dog-profile-title-row .section-edit{font-size:12px;}
}

/* Timeline dog is now a recognisable individual rather than a tiny decoration.
   Keep r143's portrait-aware media and cards entirely unchanged. */
.social-timeline-page .social-timeline-dog{
  gap:12px;font-size:16px;line-height:1.4;font-weight:750;min-width:0;
}
.social-timeline-page .social-timeline-dog img{
  width:58px;height:58px;min-width:58px;flex:0 0 58px;
  border-radius:50%;object-fit:cover;
}
.social-timeline-page .social-timeline-meta{gap:12px;flex-wrap:wrap;min-height:58px;}
/* Some compact footprint cards carry a legacy 27px override; retain size parity. */
.social-timeline-page .social-timeline-card.is-mini-footprint .social-timeline-dog img{
  width:58px;height:58px;min-width:58px;flex-basis:58px;
}
.social-timeline-page .social-timeline-date{font-size:13px;color:#55635b;}
.social-timeline-page .timeline-friend-state{margin-left:0;margin-right:0;}
.social-timeline-page .social-timeline-dog:focus-visible{outline:2px solid #668b75;outline-offset:4px;border-radius:8px;}
@media(min-width:701px) and (max-width:1099px){
  .social-timeline-page .social-timeline-dog img{width:64px;height:64px;min-width:64px;flex-basis:64px;}
  .social-timeline-page .social-timeline-meta{min-height:64px;gap:14px;}
  .social-timeline-page .social-timeline-dog{font-size:17px;}
  .social-timeline-page .social-timeline-card.is-mini-footprint .social-timeline-dog img{width:64px;height:64px;min-width:64px;flex-basis:64px;}
}
@media(max-width:700px){
  .social-timeline-page .social-timeline-dog img{width:58px;height:58px;min-width:58px;flex-basis:58px;}
  .social-timeline-page .social-timeline-meta{min-height:58px;gap:9px;}
  .social-timeline-page .social-timeline-dog{font-size:16px;}
  .social-timeline-page .social-timeline-date{font-size:12px;}
}

/* Standalone dog social profile uses a separate older hero template. */
.social-dog-page .social-dog-hero .friend-profile-avatar{
  width:136px;height:136px;min-width:136px;object-fit:cover;border-radius:28px;
}
@media(min-width:701px) and (max-width:1099px){
  .social-dog-page .social-dog-hero .friend-profile-avatar{width:148px;height:148px;min-width:148px;}
  .social-dog-page .social-dog-hero{align-items:flex-start;flex-wrap:wrap;}
  .social-dog-page .social-dog-hero .public-dog-tagline,
  .social-dog-page .social-dog-hero .profile-link-strip{flex:1 0 100%;min-width:0;}
}
@media(max-width:700px){
  .social-dog-page .social-dog-hero{display:grid;grid-template-columns:120px minmax(0,1fr);gap:12px 15px;align-items:start;}
  .social-dog-page .social-dog-hero .friend-profile-avatar{width:120px;height:120px;min-width:0;max-width:100%;}
  .social-dog-page .social-dog-hero .public-dog-tagline,
  .social-dog-page .social-dog-hero .profile-link-strip{grid-column:1/-1;min-width:0;}
  .social-dog-page .social-dog-hero h1{overflow-wrap:anywhere;}
}
@media(max-width:360px){
  .social-dog-page .social-dog-hero{grid-template-columns:104px minmax(0,1fr);gap:12px;}
  .social-dog-page .social-dog-hero .friend-profile-avatar{width:104px;height:104px;}
}
