
/* V5.77 — BodyFit true mobile-safe layout stress test */
html{width:100%;max-width:100%;overflow-x:hidden!important;scroll-behavior:smooth}
body{width:100%;max-width:100%;overflow-x:hidden!important;min-width:0!important;padding-bottom:calc(118px + env(safe-area-inset-bottom))!important}
body,main,.wrap,.container,.page,.shell{min-width:0!important}
img,video,canvas,svg{max-width:100%;height:auto}
.bf-bottom-nav{position:fixed!important;left:50%!important;right:auto!important;bottom:max(10px,env(safe-area-inset-bottom))!important;transform:translate3d(-50%,0,0)!important;width:min(620px,calc(100vw - 18px))!important;z-index:2147483000!important;background:rgba(8,13,10,.94)!important;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,.12);border-radius:26px;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:7px;box-shadow:0 18px 60px rgba(0,0,0,.58);visibility:visible!important;opacity:1!important;pointer-events:auto!important;contain:layout paint!important}
.bf-bottom-nav a{min-width:0!important;border-radius:19px;min-height:50px;display:grid;place-items:center;gap:4px;color:#8d9b91!important;text-decoration:none!important;font:850 .66rem 'Plus Jakarta Sans',system-ui,sans-serif!important;line-height:1!important;white-space:nowrap}
.bf-bottom-nav i{font-size:1rem!important}.bf-bottom-nav a.active{color:#eaffef!important;background:rgba(57,233,120,.16)!important}.bf-bottom-nav a.active i{color:#39e978!important}
@media(max-width:560px){
  body{padding-bottom:calc(108px + env(safe-area-inset-bottom))!important;font-size:15px!important}
  .wrap,.container,.page,.shell,main{width:min(100% - 18px,1180px)!important;max-width:100%!important;margin-left:auto!important;margin-right:auto!important;padding-left:0!important;padding-right:0!important}
  .top,.topbar{position:sticky!important;top:0!important;z-index:1200!important;background:rgba(3,7,4,.92)!important;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
  .top-inner,.topbar-inner,.topbar{min-height:58px!important;padding-top:8px!important;padding-bottom:8px!important;gap:8px!important;align-items:center!important}
  .brand img{width:40px!important;height:40px!important;object-fit:contain!important}.brand strong{font-size:1.02rem!important}.brand span{font-size:.55rem!important;letter-spacing:.18em!important}.brand div{min-width:0!important}
  .nav,.nav-actions{display:flex!important;gap:8px!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;padding-bottom:4px!important;scrollbar-width:none}.nav::-webkit-scrollbar,.nav-actions::-webkit-scrollbar{display:none}
  .nav a,.nav-actions a,.top-btn,.ghost,.pill,.pill-btn{min-height:40px!important;padding:0 11px!important;font-size:.74rem!important;flex:0 0 auto!important}
  .hero,.workout-shell,.coach-grid,.setup-grid,.food-grid,.feature-grid,.split,.result-grid,.scan-grid,.profile-grid,.program-grid,.dashboard-grid,.metric-grid{grid-template-columns:1fr!important;gap:12px!important}
  .hero{padding-top:12px!important;margin-top:0!important}.hero-copy,.hero-visual,.card,.panel,.flow-card,.feature-card,.metric,.phone-card,.result-card,.scan-card{border-radius:24px!important;padding:16px!important;min-height:auto!important;max-width:100%!important}
  h1,.headline{font-size:clamp(2.15rem,11.8vw,3.15rem)!important;line-height:.96!important;letter-spacing:-.065em!important;max-width:100%!important}h2{font-size:clamp(1.25rem,7vw,1.9rem)!important;line-height:1.04!important}h3{line-height:1.12!important}.sub,p{max-width:100%!important}.badge,.kicker,.eyebrow{max-width:100%!important;white-space:normal!important}
  .actions,.hero-actions,.cta-row,.timer-actions,.music-pills,.playlist-controls,.gate-actions-v575{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}.actions .btn,.btn,.ghost,.primary,button{max-width:100%!important;min-height:44px!important}
  .hero-visual{min-height:460px!important;padding:16px 14px 158px!important;overflow:hidden!important}.hero-visual img{left:50%!important;right:auto!important;top:16px!important;bottom:145px!important;transform:translateX(-50%)!important;width:auto!important;height:calc(100% - 180px)!important;max-width:min(88%,290px)!important;object-fit:contain!important;object-position:center bottom!important}.metric-stack{left:12px!important;right:12px!important;bottom:12px!important;grid-template-columns:1fr 1fr!important;gap:8px!important}.metric{padding:11px!important}.metric strong{font-size:1.08rem!important}.metric small{font-size:.72rem!important}
  .exercise-item{grid-template-columns:52px minmax(0,1fr)!important;gap:10px!important;padding:10px!important;border-radius:18px!important}.exercise-item img{width:52px!important;height:52px!important;object-fit:cover!important;border-radius:14px!important}.exercise-item strong{font-size:.9rem!important}.exercise-item span{font-size:.74rem!important;line-height:1.35!important}.exercise-item em{font-size:.68rem!important}
  .viewer-head,.section-title{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;align-items:start!important}.viewer-head .btn,.section-title .btn{width:100%!important}.training-tabs-v574{grid-template-columns:1fr 1fr!important;gap:8px!important}.training-tabs-v574 button{font-size:.78rem!important;padding:0 8px!important}
  .step-gallery{grid-template-columns:1fr!important;gap:10px!important;max-height:none!important;overflow:visible!important}.step-card{min-height:auto!important;padding:10px!important}.step-card img,.step-gallery img,.poster-view img,.poster-card img{width:100%!important;height:auto!important;max-height:260px!important;object-fit:contain!important;object-position:center!important;border-radius:18px!important;background:#050905!important}.image-note-v574{font-size:.74rem!important;line-height:1.45!important}
  .timer-box,.coach-box,.music-box{padding:14px!important;border-radius:22px!important;max-width:100%!important}.timer-display{font-size:2.6rem!important}.music-library,.queue-list{max-height:150px!important;overflow:auto!important}.music-import-zone,.file-row,.dark-link-row{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}.music-upload-label,.file-row input,.file-row button{width:100%!important}
  .bf-bottom-nav{width:calc(100vw - 16px)!important;bottom:max(8px,env(safe-area-inset-bottom))!important;border-radius:24px!important;padding:7px!important}.bf-bottom-nav a{min-height:48px!important;font-size:.61rem!important}.bf-bottom-nav i{font-size:1rem!important}
}
@media(max-height:700px) and (max-width:560px){
  body{padding-bottom:100px!important}.card,.panel,.hero-copy,.hero-visual{padding:14px!important;border-radius:22px!important}.hero-visual{min-height:410px!important;padding-bottom:146px!important}.hero-visual img{height:calc(100% - 165px)!important;bottom:134px!important;max-width:min(86%,260px)!important}.metric-stack{bottom:10px!important}.bf-bottom-nav{padding:6px!important}.bf-bottom-nav a{min-height:44px!important}.top-inner,.topbar{min-height:54px!important}h1,.headline{font-size:clamp(2rem,10.5vw,2.8rem)!important}.music-library,.queue-list{max-height:120px!important}
}
@media(min-width:561px) and (max-width:900px){.wrap,.container,.page,.shell,main{width:min(100% - 24px,1180px)!important}.hero,.workout-shell,.coach-grid,.setup-grid,.food-grid,.feature-grid,.split,.result-grid,.scan-grid{grid-template-columns:1fr!important}.hero-visual{min-height:500px!important}.bf-bottom-nav{width:min(620px,calc(100vw - 24px))!important}}
