/*
 * Manabi Video Navi V286
 * Fail-safe hit layer for the public navigation drawer.
 */

/* V243 uses a more specific !important selector than V285.  Repeat only the
 * stable public-shell classes here so the open header itself becomes the
 * foreground stacking context; a child's z-index cannot escape its parent. */
html.mobile-nav-open
  body.app-shell.app-shell.public-app.public-app.mobile-nav-open
  .site-header.site-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 21400 !important;
  isolation: isolate !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
  filter: none !important;
}

html.mobile-nav-open
  body.app-shell.app-shell.public-app.public-app.mobile-nav-open
  .site-header.site-header
  .site-nav-area.open {
  z-index: 21420 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  touch-action: pan-y !important;
}

/* The scrim is visual only.  Its painted rectangle ends exactly where the
 * right-hand drawer begins, so it cannot dim or hit-test over drawer controls
 * even if an older Safari stacking context is retained.  V286 runtime owns
 * outside-click closing before any background control can activate. */
html.mobile-nav-open
  body.app-shell.app-shell.public-app.public-app.mobile-nav-open
  .nav-scrim.nav-scrim {
  top: 0 !important;
  right: min(92vw, 430px) !important;
  bottom: 0 !important;
  left: 0 !important;
  width: auto !important;
  z-index: 21380 !important;
  pointer-events: none !important;
  touch-action: auto !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

@media screen and (max-width: 380px) {
  html.mobile-nav-open
    body.app-shell.app-shell.public-app.public-app.mobile-nav-open
    .nav-scrim.nav-scrim {
    right: min(92vw, 430px) !important;
  }
}
