/* RoutineX mobile fine tune — 2026-08-19
   Keep the cinematic one-screen rhythm, but let the denser RoutineX chapter
   breathe. The final product-payoff artwork keeps its own natural-height frame. */

@media (max-width:780px) and (min-height:681px){
  .xp-routinex-story .xp-title,
  .xp-routinex-story .xp-title.sm{
    max-width:100%!important;
    font-size:clamp(37px,9.6vw,48px)!important;
    line-height:1.03!important;
    letter-spacing:-.034em!important;
  }

  .xp-routinex-story .xp-routine-term{
    gap:8px!important;
    margin-bottom:7px!important;
  }
  .xp-routinex-story .xp-routine-term b{
    font-size:29px!important;
    line-height:1!important;
  }
  .xp-routinex-story .xp-routine-term span{
    font-size:14px!important;
    line-height:1.2!important;
  }

  .xp-routinex-story .xp-lede{
    margin-top:10px!important;
    font-size:16px!important;
    line-height:1.46!important;
  }
  .xp-routinex-story .xp-routine-support{
    margin-top:10px!important;
    padding:9px 11px!important;
    font-size:12.75px!important;
    line-height:1.44!important;
  }
  .xp-routinex-story .xp-routine-sequence b{
    width:29px!important;
    height:29px!important;
    font-size:14px!important;
  }
  .xp-routinex-story .xp-btn{
    min-height:50px!important;
    padding:10px 16px!important;
    font-size:15px!important;
  }
}

@media (max-width:780px){
  /* The last scene uses the actual artwork ratio, set by routinex-fit.js.
     No inherited diagram-height letterboxing. */
  .xp-routinex-story .xp-routine-persistent[data-routine-active="SUMMARY"]{
    place-items:stretch!important;
    border-radius:24px!important;
    background:transparent!important;
    overflow:hidden!important;
  }
  .xp-routinex-story .xp-routine-persistent[data-routine-active="SUMMARY"] .xp-routine-summary-image{
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:none!important;
    max-height:none!important;
    object-fit:contain!important;
    object-position:center!important;
    margin:0!important;
    border-radius:24px!important;
    background:transparent!important;
  }
}
