/* Discovery paints behind the status bar. Only controls consume the top inset.
   Keep containment and the shared bottom navigation unchanged. */
html.discover-edge-to-edge{
  background:#070d16;
}
html.discover-edge-to-edge body.app-shell.app-shell--discover{
  margin:0;
  padding-top:0!important;
  background:#070d16;
}
html.discover-edge-to-edge .app-shell--discover>.app-shell__content{
  margin-top:0;
  padding-top:0!important;
  background:#070d16;
}
html.discover-edge-to-edge .app-shell--discover .discovery-v3-toolbar{
  top:0;
  padding-top:calc(14px + env(safe-area-inset-top,0px));
  padding-left:max(16px,env(safe-area-inset-left,0px));
  padding-right:max(16px,env(safe-area-inset-right,0px));
  padding-bottom:30px;
  /* Contrast layer only: never blur or dim the media element itself. */
  background:none;
  color:#fff;
  text-shadow:none;
  box-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
html.discover-edge-to-edge .app-shell--discover .discovery-v3-toolbar h1{
  color:#fff;
  font-weight:750;
}
html.discover-edge-to-edge .app-shell--discover .discovery-v3-toolbar button{
  color:#fff;
  background:rgba(0,0,0,.5);
  text-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
html.discover-edge-to-edge .app-shell--discover .discovery-v3-rail svg{
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.8));
}
/* A full-screen stage; JavaScript selects cover for 9:16, contain otherwise. */
html.discover-edge-to-edge .app-shell--discover .discovery-v3-slide--post>.discovery-v3-media-surface{
  margin-top:0;
  margin-bottom:0;
  align-items:center;
  width:100%;
  height:100%;
  max-height:none;
  aspect-ratio:auto;
  flex:0 0 100%;
}
html.discover-edge-to-edge .app-shell--discover .discovery-v3-slide--post .discovery-v3-media-item{
  align-items:center;
  justify-items:center;
}
html.discover-edge-to-edge .app-shell--discover .discovery-v3-slide--post .discovery-v3-media-item :is(img,video){
  align-self:center;
  object-fit:contain!important;
  object-position:center;
}
html.discover-edge-to-edge .app-shell--discover .discovery-v3-slide--post .discovery-v3-media-item [data-discover-fit="cover"]{
  object-fit:cover!important;
}
/* Author/caption stays over the image, not in an opaque separate card. */
html.discover-edge-to-edge .app-shell--discover .discovery-v3-slide--post .discovery-v3-copy{
  background:transparent;
  border-radius:0;
  text-shadow:0 1px 4px #000;
}
html.discover-edge-to-edge .app-shell--discover .discovery-v3-slide--post::before{
  content:"";
  position:absolute;
  inset:auto 0 0;
  height:28%;
  z-index:2;
  pointer-events:none;
  background:linear-gradient(transparent,rgba(0,0,0,.6));
}
