/* Coach OS 3.76 — phone-native containment for the areas expanded in 3.70–3.75. */
@media (max-width:760px){
  html,body{max-width:100%;overflow-x:hidden}

  /* Every affected surface owns the viewport width and allows its children to shrink. */
  #mygame-performance,
  #mygame-performance *,
  #learningTrackShotLab,
  #learningTrackShotLab *{box-sizing:border-box}
  #mygame-performance,
  #mygame-performance>.v313k-page-head,
  #mygame-performance .performance-week-shell,
  #mygame-performance .performance-section,
  #mygame-performance .performance-two-col,
  #mygame-performance .performance-two-col>*,
  #mygame-performance .performance-today,
  #mygame-performance .performance-log-panel,
  #mygame-performance .performance-review-panel,
  #mygame-performance .performance-activity-view,
  #learningTrackShotLab,
  #learningTrackShotLab #v364ShotLab,
  #learningTrackShotLab .v364-shot-list,
  #learningTrackShotLab .v364-shot,
  #learningTrackShotLab .v364-shot>summary,
  #learningTrackShotLab .v364-shot-body,
  #learningTrackShotLab .v367-study-grid,
  #learningTrackShotLab .v367-study-cell,
  #learningTrackShotLab .v367-watch-cell,
  #learningTrackShotLab .v373-video-stack,
  #learningTrackShotLab .v373-video-card{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  /* Shot Lab: one readable column. Videos keep a real 16:9 frame without forcing width. */
  #learningTrackShotLab .v364-shot{overflow:hidden!important}
  #learningTrackShotLab .v364-shot>summary{
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr) 32px!important;
    gap:9px!important;
    padding:11px!important;
    overflow:hidden!important;
  }
  #learningTrackShotLab .v364-shot-copy,
  #learningTrackShotLab .v364-shot-copy>*{min-width:0!important;max-width:100%!important}
  #learningTrackShotLab .v364-shot-copy b,
  #learningTrackShotLab .v364-shot-copy small{
    display:block!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  #learningTrackShotLab .v364-shot-state{grid-column:2!important;justify-self:start!important;max-width:100%!important}
  #learningTrackShotLab .v364-chevron{grid-column:3!important;grid-row:1!important}
  #learningTrackShotLab .v364-shot-body{
    display:block!important;
    grid-template-columns:none!important;
    padding:0!important;
    overflow:hidden!important;
  }
  #learningTrackShotLab .v367-study-grid{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    overflow:hidden!important;
  }
  #learningTrackShotLab .v367-study-cell{
    display:block!important;
    flex:0 0 auto!important;
    grid-column:auto!important;
    grid-row:auto!important;
    min-height:0!important;
    padding:14px!important;
    border-right:0!important;
    overflow:hidden!important;
  }
  #learningTrackShotLab .v367-watch-cell{order:1!important}
  #learningTrackShotLab .v367-study-cell.why{order:2!important}
  #learningTrackShotLab .v367-study-cell:nth-child(3){order:3!important}
  #learningTrackShotLab .v367-study-cell:nth-child(4){order:4!important}
  #learningTrackShotLab .v367-study-cell.player{order:5!important}
  #learningTrackShotLab .v367-study-cell.coach{order:6!important}
  #learningTrackShotLab .v373-video-stack{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
    margin-top:10px!important;
    overflow:hidden!important;
  }
  #learningTrackShotLab .v373-video-card{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-areas:"number" "watch" "title" "meta" "link"!important;
    gap:6px!important;
    padding:10px!important;
    overflow:hidden!important;
  }
  #learningTrackShotLab .v373-video-card>.v367-watch,
  #learningTrackShotLab .v373-video-card>.v367-frame{
    grid-area:watch!important;
    display:block!important;
    position:relative!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    aspect-ratio:16/9!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
  }
  #learningTrackShotLab .v367-watch img,
  #learningTrackShotLab .v367-frame iframe{
    position:absolute!important;
    inset:0!important;
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:100%!important;
    object-fit:cover!important;
  }
  #learningTrackShotLab .v368-watch-intro,
  #learningTrackShotLab .v367-study-cell p,
  #learningTrackShotLab .v367-study-cell b,
  #learningTrackShotLab .v373-video-card>a{
    width:auto!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }
  #learningTrackShotLab .v368-watch-intro{font-size:12px!important;line-height:1.45!important;margin:0 0 8px!important}
  #learningTrackShotLab .v367-study-cell h4{font-size:15px!important;line-height:1.25!important;margin-bottom:9px!important}
  #learningTrackShotLab .v367-study-cell>p{font-size:14px!important;line-height:1.55!important}
  #learningTrackShotLab .v367-study-cell>b{font-size:12px!important;line-height:1.4!important}
  #learningTrackShotLab .v367-study-cell strong{font-size:12px!important;white-space:normal!important}
  #learningTrackShotLab .v373-video-number{font-size:11px!important}
  #learningTrackShotLab .v373-video-card>b{font-size:14px!important;line-height:1.3!important}
  #learningTrackShotLab .v373-video-card>p,
  #learningTrackShotLab .v373-video-card>a{font-size:12px!important;line-height:1.4!important}
  #learningTrackShotLab .v368-poster-title{left:12px!important;right:56px!important;bottom:11px!important;font-size:14px!important}

  /* My Week: only the seven day cards scroll horizontally; every other surface stacks. */
  #mygame-performance{padding-inline:0!important;overflow-x:hidden!important}
  #mygame-performance .performance-week-shell{overflow:hidden!important}
  #mygame-performance .performance-today,
  #mygame-performance .performance-two-col,
  #mygame-performance .workout-library,
  #mygame-performance .performance-log-grid,
  #mygame-performance .performance-review-grid,
  #mygame-performance .performance-checks,
  #mygame-performance .technique-chooser,
  #mygame-performance .technique-reference,
  #mygame-performance .activity-view-hero,
  #mygame-performance .activity-view-shot,
  #mygame-performance .activity-view-cues,
  #mygame-performance .activity-view-review>div{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  #mygame-performance .performance-section,
  #mygame-performance .performance-rule,
  #mygame-performance .training-partner-card,
  #mygame-performance .workout-card,
  #mygame-performance .performance-technique-builder,
  #mygame-performance .technique-reference,
  #mygame-performance .court-plan,
  #mygame-performance .court-plan-step,
  #mygame-performance .activity-view-plan,
  #mygame-performance .activity-view-simple,
  #mygame-performance .activity-view-review{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
  }
  #mygame-performance .performance-week-grid{
    display:flex!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    gap:10px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x mandatory!important;
    scroll-padding-inline:0!important;
    padding:2px 0 10px!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-inline:contain!important;
  }
  #mygame-performance .performance-day{
    flex:0 0 min(82%,300px)!important;
    width:min(82%,300px)!important;
    min-width:min(82%,300px)!important;
    max-width:300px!important;
    scroll-snap-align:start!important;
  }
  #mygame-performance .training-partner-card{
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr)!important;
    gap:10px!important;
  }
  #mygame-performance .training-partner-card .performance-pill{grid-column:1/-1!important;justify-self:start!important}
  #mygame-performance .performance-section-head,
  #mygame-performance .performance-log-head,
  #mygame-performance .technique-builder-head,
  #mygame-performance .court-plan-head,
  #mygame-performance .activity-view-section-head{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    align-items:start!important;
    width:100%!important;
    min-width:0!important;
  }
  #mygame-performance :is(h2,h3,h4,p,b,small,span,label,a,button){overflow-wrap:anywhere}
  #mygame-performance :is(input,select,textarea){width:100%!important;max-width:100%!important;min-width:0!important}
  #mygame-performance .performance-today-actions,
  #mygame-performance .technique-reference-actions,
  #mygame-performance .activity-view-shot-actions,
  #mygame-performance .performance-log-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    min-width:0!important;
  }
  #mygame-performance :is(.performance-today-actions,.technique-reference-actions,.activity-view-shot-actions,.performance-log-actions) :is(.btn,button,a){width:100%!important;min-width:0!important}
  #mygame-performance .court-plan-step{display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;padding:10px!important}
  #mygame-performance .activity-view-plan article{display:grid!important;grid-template-columns:46px minmax(0,1fr)!important;min-width:0!important}
  #mygame-performance .activity-view-date{width:100%!important;grid-template-columns:auto auto auto!important;justify-content:start!important;min-height:0!important}
  #mygame-performance .performance-today h2,
  #mygame-performance .activity-view-hero h2{font-size:clamp(25px,7.3vw,30px)!important;line-height:1.08!important}
  #mygame-performance .performance-section-head h3{font-size:20px!important;line-height:1.2!important}
  #mygame-performance .performance-section-head p,
  #mygame-performance .performance-today p,
  #mygame-performance .activity-view-shot p,
  #mygame-performance .activity-view-simple p{font-size:14px!important;line-height:1.5!important}
}

@media (max-width:390px){
  #mygame-performance .performance-day{
    flex-basis:86%!important;
    width:86%!important;
    min-width:86%!important;
  }
  #learningTrackShotLab .v368-poster-title{font-size:13px!important}
}
