/* NEXT v85-clean extracted from v84.2. Keep CSS link order in preview_v85_clean.html. */
/* v84.1: iPhone pass focus — video + active pass card first, no dashboard clutter */
    .fallback-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:16px}
    .fallback-open{text-decoration:none;display:inline-flex;align-items:center;justify-content:center;min-height:48px}
    .video-fallback-card h2{font-size:clamp(24px,5vw,38px)!important}

    @media(max-width:760px){
      body.exercise-active{
        overflow-x:hidden;
        background:#030711!important;
      }
      body.exercise-active .wrap{
        width:100vw!important;
        margin:0!important;
        padding:0 0 calc(84px + env(safe-area-inset-bottom))!important;
        max-width:none!important;
      }
      body.exercise-active .v84-rail,
      body.exercise-active .playlist-card{
        display:none!important;
      }
      body.exercise-active .sticky-nav{
        position:sticky!important;
        top:0!important;
        z-index:120!important;
        margin:0!important;
        padding:7px 9px 8px!important;
        border-radius:0!important;
        background:rgba(3,7,17,.94)!important;
        border-bottom:1px solid rgba(170,205,255,.14)!important;
        backdrop-filter:blur(18px)!important;
      }
      body.exercise-active .nav-row{gap:6px!important}
      body.exercise-active .nav-actions{
        display:grid!important;
        grid-template-columns:1fr!important;
        gap:6px!important;
      }
      body.exercise-active .nav-left{
        display:grid!important;
        grid-template-columns:1fr!important;
        gap:6px!important;
      }
      body.exercise-active .nav-left .ghost-btn{
        display:none!important;
      }
      body.exercise-active .menu-wrap{position:static!important}
      body.exercise-active .menu-toggle{
        width:100%!important;
        min-height:42px!important;
        padding:9px 10px!important;
        border-radius:14px!important;
        font-size:14px!important;
      }
      body.exercise-active .top-tools{
        position:fixed!important;
        left:8px!important;
        right:8px!important;
        top:56px!important;
        width:auto!important;
        z-index:180!important;
        grid-template-columns:1fr 1fr!important;
      }
      body.exercise-active .nav-right{
        position:fixed!important;
        left:8px!important;
        right:8px!important;
        bottom:calc(8px + env(safe-area-inset-bottom))!important;
        z-index:170!important;
        display:grid!important;
        grid-template-columns:.95fr 1.15fr!important;
        gap:8px!important;
        padding:0!important;
      }
      body.exercise-active .nav-right .ghost-btn,
      body.exercise-active .nav-right .main-btn{
        width:100%!important;
        min-height:58px!important;
        justify-content:center!important;
        border-radius:18px!important;
        font-size:16px!important;
        box-shadow:0 18px 44px rgba(0,0,0,.42)!important;
      }
      body.exercise-active .progress-meta{gap:4px!important}
      body.exercise-active #exerciseMeta{
        font-size:11px!important;
        line-height:1.15!important;
        white-space:nowrap!important;
        overflow:hidden!important;
        text-overflow:ellipsis!important;
        color:#8edcff!important;
      }
      body.exercise-active .progress-shell{
        height:5px!important;
        margin-top:3px!important;
        background:rgba(255,255,255,.10)!important;
      }
      body.exercise-active .stage-layout{
        display:flex!important;
        flex-direction:column!important;
        gap:8px!important;
        min-height:auto!important;
        padding-bottom:0!important;
      }
      body.exercise-active .video-card{
        order:1!important;
        width:100vw!important;
        border-left:0!important;
        border-right:0!important;
        border-radius:0!important;
        box-shadow:none!important;
        background:#030711!important;
      }
      body.exercise-active .video-wrap{
        width:100vw!important;
        height:56vh!important;
        height:56dvh!important;
        min-height:292px!important;
        max-height:calc(100dvh - 285px)!important;
        aspect-ratio:auto!important;
        border-radius:0!important;
        background:#000!important;
      }
      body.exercise-active .video-wrap iframe{
        width:100%!important;
        height:100%!important;
        min-height:100%!important;
        display:block!important;
      }
      body.exercise-active .video-wrap .no-video{
        min-height:100%!important;
        padding:20px!important;
      }
      body.exercise-active .info-card{
        order:2!important;
        margin:0 8px 10px!important;
        padding:10px!important;
        border-radius:20px!important;
        gap:8px!important;
        display:grid!important;
        align-content:start!important;
        max-height:none!important;
        overflow:visible!important;
      }
      body.exercise-active .exercise-kicker{
        justify-content:flex-start!important;
        gap:6px!important;
        overflow-x:auto!important;
        flex-wrap:nowrap!important;
        -webkit-overflow-scrolling:touch;
      }
      body.exercise-active .tag{
        flex:0 0 auto!important;
        padding:6px 9px!important;
        font-size:11px!important;
        border-radius:999px!important;
      }
      body.exercise-active .exercise-name{
        text-align:left!important;
        white-space:normal!important;
        overflow:visible!important;
        text-overflow:clip!important;
        font-size:clamp(28px,9.4vw,44px)!important;
        line-height:.96!important;
        letter-spacing:-.06em!important;
        padding:0!important;
      }
      body.exercise-active .exercise-reps{
        min-height:76px!important;
        padding:10px!important;
        border-radius:16px!important;
      }
      body.exercise-active .rx-line{
        font-size:clamp(34px,13.5vw,62px)!important;
        line-height:.94!important;
      }
      body.exercise-active .set-note,
      body.exercise-active .coach-cues,
      body.exercise-active .superset-status,
      body.exercise-active .next-preview{
        padding:9px 10px!important;
        border-radius:14px!important;
        font-size:13px!important;
        line-height:1.28!important;
      }
      body.exercise-active .coach-cues ul{line-height:1.24!important}
      body.exercise-active .timer-card.show{
        padding:10px!important;
        border-radius:16px!important;
      }
      body.exercise-active .timer-display{
        font-size:clamp(46px,15vw,78px)!important;
      }
      body.exercise-active .ios-play-btn{
        right:50%!important;
        bottom:50%!important;
        transform:translate(50%,50%)!important;
        padding:15px 22px!important;
        font-size:16px!important;
        border-color:rgba(34,230,255,.55)!important;
        color:#fff!important;
        background:rgba(5,10,18,.78)!important;
        box-shadow:0 18px 54px rgba(0,0,0,.48),0 0 0 1px rgba(34,230,255,.20) inset!important;
      }
      body.exercise-active .ios-play-btn.hide{
        transform:translate(50%,calc(50% + 5px))!important;
      }
      body.exercise-active .rest-stage,
      body.exercise-active .rest-card{
        min-height:100%!important;
        height:100%!important;
      }
      body.exercise-active .rest-compact .rest-display{
        font-size:clamp(82px,24vw,156px)!important;
      }
    }

    @media(max-width:900px) and (orientation:landscape){
      body.exercise-active .wrap{
        padding:0!important;
      }
      body.exercise-active .sticky-nav{
        padding:6px 8px!important;
      }
      body.exercise-active .stage-layout{
        display:grid!important;
        grid-template-columns:minmax(0,1fr) minmax(280px,34vw)!important;
        gap:8px!important;
        height:calc(100dvh - 54px)!important;
        padding:0 8px 8px!important;
        align-items:stretch!important;
      }
      body.exercise-active .video-card{
        width:auto!important;
        border:1px solid rgba(170,205,255,.14)!important;
        border-radius:18px!important;
        overflow:hidden!important;
      }
      body.exercise-active .video-wrap{
        width:100%!important;
        height:100%!important;
        min-height:0!important;
        max-height:none!important;
        border-radius:18px!important;
      }
      body.exercise-active .info-card{
        margin:0!important;
        height:100%!important;
        overflow:auto!important;
      }
      body.exercise-active .nav-right{
        position:static!important;
        display:grid!important;
        grid-template-columns:1fr 1fr!important;
      }
      body.exercise-active .nav-right .ghost-btn,
      body.exercise-active .nav-right .main-btn{
        min-height:42px!important;
        font-size:13px!important;
        border-radius:14px!important;
      }
      body.exercise-active .nav-actions{
        grid-template-columns:1fr auto!important;
        align-items:center!important;
      }
      body.exercise-active .nav-left{grid-template-columns:1fr!important;max-width:120px!important;}
      body.exercise-active .exercise-name{font-size:clamp(24px,5vw,44px)!important;}
      body.exercise-active .rx-line{font-size:clamp(30px,7vw,56px)!important;}
    }


    /* v84.2: iPhone pass focus cleanup — true 16:9 video, no center overlay, clean menu */
    @media(max-width:760px) and (orientation:portrait){
      body.exercise-active .wrap{
        padding:0 0 calc(78px + env(safe-area-inset-bottom))!important;
      }
      body.exercise-active .sticky-nav{
        position:sticky!important;
        top:0!important;
        z-index:140!important;
        padding:6px 8px 7px!important;
        background:rgba(3,7,17,.96)!important;
        border-bottom:1px solid rgba(214,255,0,.14)!important;
        box-shadow:0 10px 28px rgba(0,0,0,.28)!important;
      }
      body.exercise-active .nav-row{
        gap:5px!important;
      }
      body.exercise-active .nav-actions{
        display:grid!important;
        grid-template-columns:auto 1fr!important;
        align-items:center!important;
        gap:8px!important;
      }
      body.exercise-active .nav-left{
        display:flex!important;
        align-items:center!important;
        gap:6px!important;
        min-width:0!important;
      }
      body.exercise-active .menu-wrap{
        position:relative!important;
        display:block!important;
      }
      body.exercise-active .menu-toggle{
        width:auto!important;
        min-width:88px!important;
        min-height:36px!important;
        padding:8px 11px!important;
        border-radius:999px!important;
        font-size:13px!important;
        white-space:nowrap!important;
      }
      body.exercise-active .top-tools{
        position:static!important;
        width:100%!important;
        margin-top:7px!important;
        grid-column:1 / -1!important;
        max-height:40dvh!important;
        overflow:auto!important;
        padding:8px!important;
        border-radius:16px!important;
        box-shadow:0 18px 46px rgba(0,0,0,.42)!important;
      }
      body.exercise-active .top-tools.open{
        display:grid!important;
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
      }
      body.exercise-active .top-tools .tool-btn{
        min-height:38px!important;
        padding:8px 9px!important;
        border-radius:12px!important;
        font-size:11px!important;
        line-height:1.08!important;
      }
      body.exercise-active .progress-meta{
        min-width:0!important;
        gap:4px!important;
      }
      body.exercise-active #exerciseMeta{
        font-size:10.5px!important;
        white-space:nowrap!important;
        overflow:hidden!important;
        text-overflow:ellipsis!important;
      }
      body.exercise-active .progress-shell{
        height:4px!important;
        margin-top:1px!important;
      }

      /* Video must be the real player shape, not a tall portrait box with black bars */
      body.exercise-active .stage-layout{
        display:block!important;
        padding:0!important;
        margin:0!important;
      }
      body.exercise-active .video-card{
        width:100vw!important;
        margin:0!important;
        border:0!important;
        border-radius:0!important;
        background:#000!important;
        box-shadow:none!important;
      }
      body.exercise-active .video-wrap{
        width:100vw!important;
        height:auto!important;
        min-height:0!important;
        max-height:none!important;
        aspect-ratio:16/9!important;
        display:block!important;
        position:relative!important;
        overflow:hidden!important;
        background:#000!important;
      }
      body.exercise-active .video-wrap iframe{
        position:absolute!important;
        inset:0!important;
        width:100%!important;
        height:100%!important;
        min-height:0!important;
        display:block!important;
        border:0!important;
      }
      body.exercise-active .video-wrap .no-video,
      body.exercise-active .video-wrap .rest-stage{
        position:absolute!important;
        inset:0!important;
        width:100%!important;
        height:100%!important;
        min-height:0!important;
      }
      body.exercise-active .video-wrap .rest-card{
        min-height:0!important;
        height:100%!important;
        padding:14px 10px!important;
      }

      /* Keep the iOS start button out of the athlete/video focal point */
      body.exercise-active .ios-play-btn{
        right:9px!important;
        bottom:9px!important;
        left:auto!important;
        top:auto!important;
        transform:none!important;
        padding:8px 11px!important;
        min-height:34px!important;
        border-radius:999px!important;
        font-size:12px!important;
        line-height:1!important;
        background:rgba(5,10,18,.72)!important;
        border-color:rgba(214,255,0,.42)!important;
        color:#efffd2!important;
        box-shadow:0 10px 28px rgba(0,0,0,.36)!important;
        backdrop-filter:blur(10px)!important;
      }
      body.exercise-active .ios-play-btn.hide{
        opacity:0!important;
        pointer-events:none!important;
        transform:translateY(4px)!important;
      }

      /* Active pass card directly under the film */
      body.exercise-active .info-card{
        margin:8px 8px 10px!important;
        padding:10px!important;
        border-radius:18px!important;
        max-height:none!important;
        overflow:visible!important;
        box-shadow:0 16px 44px rgba(0,0,0,.26)!important;
      }
      body.exercise-active .exercise-name{
        font-size:clamp(28px,8.8vw,42px)!important;
        line-height:.98!important;
      }
      body.exercise-active .exercise-reps{
        min-height:64px!important;
      }
      body.exercise-active .rx-line{
        font-size:clamp(30px,11vw,54px)!important;
      }
      body.exercise-active .set-note,
      body.exercise-active .coach-cues,
      body.exercise-active .superset-status,
      body.exercise-active .next-preview{
        font-size:12.5px!important;
      }

      /* Bottom controls stay separated from top menu */
      body.exercise-active .nav-right{
        position:fixed!important;
        left:8px!important;
        right:8px!important;
        bottom:calc(7px + env(safe-area-inset-bottom))!important;
        z-index:170!important;
        display:grid!important;
        grid-template-columns:1fr 1.1fr!important;
        gap:8px!important;
      }
      body.exercise-active .nav-right .ghost-btn,
      body.exercise-active .nav-right .main-btn{
        min-height:54px!important;
        border-radius:17px!important;
        font-size:15px!important;
      }
    }

    @media(max-width:760px) and (orientation:landscape){
      body.exercise-active .top-tools.open{
        position:absolute!important;
        left:0!important;
        right:auto!important;
        top:calc(100% + 6px)!important;
        width:min(360px,calc(100vw - 18px))!important;
        grid-template-columns:1fr 1fr!important;
        max-height:calc(100dvh - 70px)!important;
        overflow:auto!important;
      }
      body.exercise-active .ios-play-btn{
        right:10px!important;
        bottom:10px!important;
        transform:none!important;
        padding:8px 11px!important;
        font-size:12px!important;
      }
    }
