/* v95 tidy pass (loaded last). Small, global fixes found by the 360/390/768/1280 light+dark audit:
   1. email addresses never break mid-word (they move to the next line whole, and only break if a single line is too narrow)
   2. tap targets that were 20-38px tall are now at least 44px (footer links, FAQ questions, header search, Home links,
      Appearance theme buttons, chips, generator swap buttons, Friends text links, the logo link) */
.email,.lk-me,.mb-member,.ac2-addr{word-break:normal!important;overflow-wrap:anywhere}
.sf3-l{min-height:44px!important}
.faq summary{min-height:44px;align-items:center}
.run-set summary{min-height:44px;display:flex;align-items:center}
.hp-sbtn{width:44px;height:44px}
@media(min-width:1100px){.hp-sbtn{width:auto;height:44px}}
.icon-btn.mr-btn{min-width:44px;min-height:44px}
.hd-link{min-height:44px}
.hd-priv{min-height:44px!important}
.ap-seg button{min-height:44px}
.chip{min-height:44px}
.sh-fb .chip{min-height:36px} /* inside the small Help chat bubble, kept compact */
.gn-swap{min-height:44px}
.gn-rbtn .chip{min-height:44px!important}
.fr-link{min-height:44px;display:inline-flex;align-items:center}
.brand{min-height:44px}
.linkbtn{min-height:44px;display:inline-flex;align-items:center}
p .linkbtn,li .linkbtn,.small .linkbtn{min-height:0;display:inline}
/* 3. desktop top nav: items sized to their label with equal gaps (they were equal-width boxes, so the gaps between labels looked uneven) */
@media(min-width:900px){.tabbar{gap:4px}.tabbar button{flex:none;padding:10px 14px;gap:7px}.tabbar .tb-me{gap:8px;padding-left:10px}}
/* 4. footer link grid from 700px: 12 links in a full 4 x 3 grid with no empty cells. The footer "Sign in" link is dropped at these
   widths (the nav always shows Sign in / Profile now), and Live chat no longer spans a whole row (that rule is for the 2-column phone grid). */
@media(min-width:700px){.sf3-links>li:has(>[data-acct]){display:none!important}.sf3-links>li:has(>[data-live]){grid-column:auto!important}}
/* 5. phone footer (2 columns): Live chat takes a full row only when the Sign in link is showing (13 links); signed in there are 12
   links, so it sits in a normal cell (before, signed in, Trust & Safety was left alone on its row) */
@media(max-width:699px){
 .sf3-links:has([data-acct][hidden])>li:has(>[data-live]){grid-column:auto}
 .sf3-links:not(:has([data-acct][hidden]))>li:has(>[data-live]){grid-column:1/-1}
}
@media(min-width:900px) and (max-width:1099px){.tabbar button{padding:10px 10px}.tabbar .tb-me{padding-left:8px}}
/* 6. More > Premium: "Compare Free and Premium" sits on its own line (it was a tall inline button that pushed "Pass." onto an odd, gappy line) */
.more-head .small .linkbtn{display:flex;width:fit-content;min-height:44px;align-items:center}
/* 7. Account: Sync now / Sign out sit level (the second button had a stacked-button top margin), long buttons wrap evenly */
.ac-row{align-items:stretch}.ac-row>.btn+.btn{margin-top:0}
.ac2-welcome{text-wrap:balance}
/* 8. desktop: Plan, Challenge and Run Time content is a centred 980px column, so their title and back link now line up with it
   (they sat at the far left edge of a 1200px view) */
@media(min-width:900px){main>#view-plan,main>#view-challenge,main>#view-run{max-width:980px!important;margin-left:auto;margin-right:auto}}
@media(min-width:900px){main>#view-friends{max-width:960px!important;margin-left:auto;margin-right:auto}}
.sp-chips .chip{min-height:44px}
/* v99: centred footer. Root cause of the one-sided card on phones: a later ".site-foot3{width:100%}" rule kept the card at the
   width of main's content box while the mobile rule pulled it out with -16px margins on both sides, so it sat 16px too far left
   with a 32px gap on the right. width:auto lets the negative margins bleed evenly to both edges. */
@media(max-width:899px){main .site-foot3{width:auto;max-width:none}}
.sf3-links{grid-template-columns:repeat(2,minmax(0,1fr));justify-content:center;justify-items:stretch;max-width:560px;margin-left:auto;margin-right:auto}
.sf3-links>li{text-align:center;min-width:0}
.sf3-l{justify-content:center;text-align:center;text-wrap:balance;line-height:1.3;padding:4px 6px}
@media(min-width:700px){.sf3-links{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:none;grid-auto-flow:row;max-width:960px;column-gap:24px}
 .sf3-l{width:100%;white-space:normal}}
.sf3-copy{text-align:center;justify-content:center;margin-left:auto!important;margin-right:auto!important;max-width:none!important;width:100%}
/* v101: tablet footer. At 700-899px the card bled to within 4px of the screen edge (main is max 760px there, the card kept its
   phone -16px margins) and four link columns squeezed "Live chat with AP and JJ's Fitness" onto two lines, so rows were uneven.
   Inset the card like 900px+ and use three even columns (12 links = 4 tidy rows) until there is room for four. */
@media(min-width:700px) and (max-width:899px){main .site-foot3{margin-left:0;margin-right:0}}
@media(min-width:700px) and (max-width:1099px){.sf3-links{grid-template-columns:repeat(3,minmax(0,1fr));max-width:720px;column-gap:20px}}
@media(min-width:700px) and (max-width:1099px){.sf3-links>li:has(>[data-live]) .sf3-l{white-space:nowrap;text-wrap:nowrap}}

/* v123: Home social panel full-width for nav strip; feed/composer stay readable */
@media(min-width:800px){
  #homeSocial .hs-panel{max-width:none;width:100%}
  #homeSocial .hs-composer,
  #homeSocial .hs-feed-sec,
  #homeSocial .hs-intro,
  #view-discover .dc-feed,#view-discover .dc-list{max-width:720px;margin-left:auto;margin-right:auto;width:100%}
  #homeSocial{padding:0 0 24px}
}
@media(max-width:799px){
  html.hs-mobile-tab .tabbar{/* keep bottom tabbar (default on phone) */}
}


/* v242: Social compact 16:9 hero edge-to-edge; tiny extras (tidy loads after home-social) */
html.hs-open .hs-v242 > .hs-hero,
html.hs-open #homeSocial .hs-v242 .hs-hero,
.hs-v242 .hs-hero{
  width:100%!important;max-width:100%!important;margin:0!important;
  aspect-ratio:16/9!important;height:auto!important;min-height:0!important;
  max-height:min(42vw,320px)!important;border-radius:0!important;padding:0!important;
}
@media(min-width:700px){
  html.hs-open .hs-v242 > .hs-hero,.hs-v242 .hs-hero{max-height:min(36vw,380px)!important}
}
@media(min-width:1100px){
  html.hs-open .hs-v242 > .hs-hero,.hs-v242 .hs-hero{max-height:360px!important}
}
html.hs-open:has(.hs-v242) #app,html.hs-open:has(.hs-v242) main#app{
  max-width:100%!important;width:100%!important;margin:0!important;
  padding-left:max(0px,env(safe-area-inset-left,0px))!important;
  padding-right:max(0px,env(safe-area-inset-right,0px))!important;
}
@media(min-width:800px){
  #homeSocial:has(.hs-v242) .hs-panel{max-width:none!important;width:100%!important}
}

/* v243: Social — no Buddy/Messenger rows; keep compact 16:9 hero from v242 */
html.hs-open .hs-v243 > .hs-extras,
.hs-v243 > .hs-extras,
html.hs-open .hs-v243 .hs-buddy-wrap,
html.hs-open .hs-v243 .hs-pin{display:none!important;height:0!important;margin:0!important;padding:0!important;overflow:hidden!important}

/* v244/v246 — centered Social feed tabs + tight footer above logo (complements gaps.css)
   v246: center (not space-evenly) — tidy loads after home-social/gaps */
html.hs-open .hs-feed-tabs,
#homeSocial .hs-feed-tabs{
  display:flex!important;
  justify-content:center!important;
  gap:0!important;
  width:100%!important;
}
html.hs-open .hs-ftab,
#homeSocial .hs-ftab{
  flex:1 1 0!important;
  min-width:0!important;
  justify-content:center!important;
  text-align:center!important;
}
main .site-foot3{margin-top:6px!important;}
