/* SeafoodMeNow V331 — mobile entry/cinematic handoff repair.
   Fixes V329/V330 regression where the mobile cinematic film became a normal
   grid row while the opening hero was still active, producing a duplicate
   cinematic frame above the actual hero.

   Mobile only. Desktop/tablet remain unchanged.
   During the opening hero, film + hero occupy the SAME viewport and the hero
   stays above it. Only after entry-done does the professional V329 split grid
   (film above / blue copy panel below) become active. */
@media (max-width:720px) and (orientation:portrait){
  /* BEFORE handoff completes: keep the old overlay model. */
  html body .pk-cinema:not(.entry-done) .pk-cinema-stage{
    position:sticky!important;
    top:var(--pc-header-h)!important;
    display:block!important;
    height:calc(100svh - var(--pc-header-h))!important;
    min-height:0!important;
    overflow:hidden!important;
    background:#02182a!important;
  }
  @supports(height:100dvh){
    html body .pk-cinema:not(.entry-done) .pk-cinema-stage{
      height:calc(100dvh - var(--pc-header-h))!important;
    }
  }

  html body .pk-cinema:not(.entry-done) .pk-cinema-film{
    position:absolute!important;
    inset:0!important;
    grid-row:auto!important;
    width:100%!important;
    height:100%!important;
    aspect-ratio:auto!important;
    margin:0!important;
    transform:none!important;
    z-index:1!important;
    overflow:hidden!important;
  }

  html body .pk-cinema:not(.entry-done) #pkEntryHero{
    display:block!important;
    visibility:visible!important;
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    z-index:50!important;
    overflow:hidden!important;
    pointer-events:auto!important;
  }

  /* The mobile cinematic title must never appear above/through the entry hero. */
  html body .pk-cinema:not(.entry-done) .pk-cinema-mobile-frame-heading{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
  }

  /* Copy is still part of the DOM but must not create layout before handoff. */
  html body .pk-cinema:not(.entry-done) .pk-cinema-copy,
  html body .pk-cinema:not(.entry-done) .pk-cinema-benefits,
  html body .pk-cinema:not(.entry-done) .pk-cinema-bottom{
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  /* AFTER handoff: activate the V329 professional split layout. */
  html body .pk-cinema.entry-done .pk-cinema-stage{
    display:grid!important;
    grid-template-rows:56.25vw minmax(0,1fr)!important;
    align-content:stretch!important;
    height:calc(100svh - var(--pc-header-h))!important;
    overflow:hidden!important;
    background:#02182a!important;
  }
  @supports(height:100dvh){
    html body .pk-cinema.entry-done .pk-cinema-stage{
      height:calc(100dvh - var(--pc-header-h))!important;
    }
  }

  html body .pk-cinema.entry-done .pk-cinema-film{
    position:relative!important;
    inset:auto!important;
    grid-row:1!important;
    width:100%!important;
    height:auto!important;
    aspect-ratio:16/9!important;
    margin:0!important;
    z-index:1!important;
    overflow:hidden!important;
  }

  html body .pk-cinema.entry-done #pkEntryHero{
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  html body .pk-cinema.entry-done .pk-cinema-mobile-frame-heading{
    visibility:visible!important;
    opacity:1!important;
  }

  html body .pk-cinema.entry-done .pk-cinema-copy{
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
  }
}
