/* OneScene UX10: isolated layout repair on top of accepted UX9.
   DO NOT touch scenario state/React runtime/finance/mobile styling. */
@media (min-width:980px) {
  /* Training/story continuation uses a portrait, NOT a landscape hero.
     A portrait must never be object-fit:cover across a 4:1 banner. */
  html body .pv3-root[data-r18-viewport-dashboard="today"]
  .ss-today-page[data-today-ui="canonical-v2418"][data-today-freeze="v2422"]
  .ss-today-hero > .ss-today-hero-media.ss-today-scene-media
  > img.ss-today-hero-art.ux10-portrait {
    position:absolute!important;
    inset:auto 3.5% 0 auto!important;
    width:44%!important;
    max-width:44%!important;
    height:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
    object-position:center bottom!important;
    transform:none!important;
    transform-origin:center bottom!important;
    filter:brightness(.95) saturate(.96) drop-shadow(-13px 8px 19px #0008)!important;
    opacity:1!important;
    -webkit-mask-image:linear-gradient(90deg, transparent 0%, #000 16%, #000 100%);
    mask-image:linear-gradient(90deg, transparent 0%, #000 16%, #000 100%);
    z-index:1!important;
  }
  html body .pv3-root[data-r18-viewport-dashboard="today"]
  .ss-today-page[data-today-freeze="v2422"]
  .ss-today-hero:hover .ss-today-hero-media.ss-today-scene-media
  > img.ss-today-hero-art.ux10-portrait {
    transform:none!important;
  }
}

/* Catalog fit at actual desktop browser viewport heights (rather than screen
   resolution). Preserve the four cards, pager and top recommendations. */
@media (min-width:1300px) and (min-height:740px) {
  html body .pv3-root[data-r18-standard-shell="today-authority-v1"]
  [data-build177="programs-catalog-category-freeze"].pv3-programs-journey-page {
    gap:10px!important;
    grid-template-rows:auto auto auto auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin-bottom:0!important;
    padding-bottom:0!important;
    align-content:start!important;
    overflow:visible!important;
  }
  html body .pv3-root[data-r18-standard-shell="today-authority-v1"]
  [data-build177="programs-catalog-category-freeze"].pv3-programs-journey-page
  .pv3-program-journey-layout-final {
    height:clamp(245px,32vh,300px)!important;
    min-height:0!important;
    max-height:none!important;
    align-items:stretch!important;
  }
  html body .pv3-root[data-r18-standard-shell="today-authority-v1"]
  [data-build177="programs-catalog-category-freeze"].pv3-programs-journey-page
  .pv3-program-journey-hero-final,
  html body .pv3-root[data-r18-standard-shell="today-authority-v1"]
  [data-build177="programs-catalog-category-freeze"].pv3-programs-journey-page
  .pv3-program-next-programs-two {
    box-sizing:border-box!important;
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
  }
  html body .pv3-root[data-r18-standard-shell="today-authority-v1"]
  [data-build177="programs-catalog-category-freeze"].pv3-programs-journey-page
  .pv3-program-vertical-head-final {
    min-height:38px!important;
  }
  html body .pv3-root[data-r18-standard-shell="today-authority-v1"]
  [data-build177="programs-catalog-category-freeze"].pv3-programs-journey-page
  .pv3-program-catalog-simple {
    align-items:stretch!important;
    min-height:0!important;
    gap:11px!important;
  }
  html body .pv3-root[data-r18-standard-shell="today-authority-v1"]
  [data-build177="programs-catalog-category-freeze"].pv3-programs-journey-page
  .pv3-program-catalog-simple .pv3-program-vertical-card {
    box-sizing:border-box!important;
    grid-template-rows:minmax(110px,49%) minmax(0,1fr)!important;
    height:clamp(242px,31vh,295px)!important;
    min-height:0!important;
    max-height:295px!important;
  }
  html body .pv3-root[data-r18-standard-shell="today-authority-v1"]
  [data-build177="programs-catalog-category-freeze"].pv3-programs-journey-page
  .pv3-w2-program-pager {
    min-height:34px!important;
    padding-top:0!important;
    padding-bottom:0!important;
  }
  html body .pv3-root[data-r18-standard-shell="today-authority-v1"][data-r18-page-scroll="enabled"]
  > .r18-page-scroll-owner > .r18-page-scroll-content:has(> .pv3-programs-journey-page) {
    padding-bottom:8px!important;
    min-height:0!important;
    margin-bottom:0!important;
  }
  /* Applied only after JS checks that the visible page fits the owner;
     so no section or pager is cut off on unusual account content. */
  html body .pv3-root[data-r18-standard-shell="today-authority-v1"][data-r18-page-scroll="enabled"]
  > .r18-page-scroll-owner.ux10-fit-viewport:has(> .r18-page-scroll-content > .pv3-programs-journey-page) {
    overflow-y:hidden!important;
    overflow-x:hidden!important;
  }
}
