/* NOKOR REUNG v442 — mobile Safari web Home edge-to-edge hero.
   OWNER: remove the rounded/outlined Hero frame and black empty margins.
   Only Mobile Web Home is scoped; all Desktop/MiniApp/Player and payment
   functionality stay unchanged. Header and bottom dock keep their old glass UI. */
@media(max-width:850px){
  html:not([data-mini="1"]) main#home{
    padding-top:calc(var(--nr-web-floating-top,10px) + 52px)!important;
    padding-inline:14px!important;
  }
  html:not([data-mini="1"]) main#home > #hero{
    width:calc(100% + 28px)!important;
    max-width:none!important;
    margin:0 -14px!important;
    border:0!important;
    border-radius:0!important;
    outline:0!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }
  html:not([data-mini="1"]) main#home > #hero .hero-bg{
    width:100%!important;
    background-size:cover!important;
  }
  html:not([data-mini="1"]) main#home > #hero .hero-overlay{
    border:0!important;
    border-radius:0!important;
  }
  /* Close the big black band between Hero and the first visible movie row. */
  html:not([data-mini="1"]) main#home #newReleases,
  html:not([data-mini="1"]) main#home #continueWatching:not([hidden]){
    padding-top:12px!important;
    margin-top:0!important;
  }
  html:not([data-mini="1"]) main#home #continueWatching:not([hidden]) + #newReleases{
    padding-top:20px!important;
  }
  /* Continue Watching: same genuine desktop 2:3 movie posters + yellow episode
     and green resume tags, now lining up with Home movie posters on phones. */
  html:not([data-mini="1"]) #continueWatchRow{
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:flex-start!important;
    gap:10px!important;
    margin:0 -14px 0 0!important;
    padding:5px 14px 10px 2px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    scroll-snap-type:x proximity!important;
    background:transparent!important;
    border:0!important;
  }
  html:not([data-mini="1"]) #continueWatchRow>.nr-continue-card{
    flex:0 0 138px!important;
    width:138px!important;
    aspect-ratio:2/3!important;
    border-radius:12px!important;
    border:0!important;
    padding:0!important;
    box-shadow:none!important;
    scroll-snap-align:start!important;
  }
  html:not([data-mini="1"]) #continueWatchRow .nr-continue-poster{
    display:block!important;
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
  }
  html:not([data-mini="1"]) #continueWatchRow .nr-continue-top{
    top:8px!important;
    left:8px!important;
    right:8px!important;
    z-index:3!important;
  }
  html:not([data-mini="1"]) #continueWatchRow :is(.nr-continue-badge,.nr-continue-status){
    min-height:21px!important;
    padding:3px 5px!important;
    font-size:8.8px!important;
    line-height:1.25!important;
    border-radius:7px!important;
  }
  html:not([data-mini="1"]) #continueWatchRow .nr-continue-bottom{
    left:9px!important;
    right:9px!important;
    bottom:9px!important;
    gap:5px!important;
  }
  html:not([data-mini="1"]) #continueWatchRow .nr-continue-progress{
    height:4px!important;
  }
}
@media(max-width:430px){
  html:not([data-mini="1"]) #continueWatchRow>.nr-continue-card{
    flex-basis:132px!important;
    width:132px!important;
  }
}
/* Browsers requiring reduced motion must still respect user preference. */
@media(prefers-reduced-motion:reduce){
  html:not([data-mini="1"]) #continueWatchRow>.nr-continue-card{
    transition:none!important;
  }
}

/* v452 — Mobile Web Hero must never be rendered as a rounded Card.
   Safeguard after v442: preserve the edge-to-edge banner layout on iOS Safari
   after cache refresh, theme re-render or navigation. Do not modify MiniApp. */
@media(max-width:850px){
  html:not([data-mini="1"]) body main#home > section.hero#hero{
    box-sizing:border-box!important;
    width:calc(100% + 28px)!important;
    max-width:none!important;
    margin:0 -14px!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    -webkit-border-radius:0!important;
    outline:0!important;
    box-shadow:none!important;
    background-clip:border-box!important;
    overflow:hidden!important;
  }
  html:not([data-mini="1"]) body main#home > section.hero#hero .hero-overlay,
  html:not([data-mini="1"]) body main#home > section.hero#hero .hero-bg{
    border:0!important;
    border-radius:0!important;
    -webkit-border-radius:0!important;
    box-shadow:none!important;
  }
}

/* v454 — Mini App Hero has the exact same frameless, edge-to-edge design as
   mobile Web. Preserve Telegram safe-area padding for content and floating
   Header/dock, but let the image span full available app width. */
@media(max-width:850px){
  html[data-mini="1"] body main#home > section.hero#hero{
    box-sizing:border-box!important;
    width:calc(100% + max(12px,var(--cg-tg-safe-left,0px)) + max(12px,var(--cg-tg-safe-right,0px)))!important;
    max-width:none!important;
    margin-left:calc(-1 * max(12px,var(--cg-tg-safe-left,0px)))!important;
    margin-right:calc(-1 * max(12px,var(--cg-tg-safe-right,0px)))!important;
    margin-top:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    -webkit-border-radius:0!important;
    outline:0!important;
    box-shadow:none!important;
    background-clip:border-box!important;
    overflow:hidden!important;
  }
  html[data-mini="1"] body main#home > section.hero#hero :is(.hero-bg,.hero-overlay){
    border:0!important;
    border-radius:0!important;
    -webkit-border-radius:0!important;
    box-shadow:none!important;
  }
}

/* Larger Mini App viewports keep the 14px side padding of the shared shell. */
@media(min-width:601px) and (max-width:850px){
  html[data-mini="1"] body main#home > section.hero#hero{
    width:calc(100% + max(14px,var(--cg-tg-safe-left,0px)) + max(14px,var(--cg-tg-safe-right,0px)))!important;
    margin-left:calc(-1 * max(14px,var(--cg-tg-safe-left,0px)))!important;
    margin-right:calc(-1 * max(14px,var(--cg-tg-safe-right,0px)))!important;
  }
}
