/* Technical recovery and navigation corrections. Load after the visual styles.
   Keep the approved hero composition and the transparent header unchanged. */

/* Films already has its own generous top padding. Cancel the root anchor
   padding here so the departing hero cannot remain under the fixed header. */
html { --film-anchor-offset:90px; }
#film-feature { scroll-margin-top:calc(-1 * var(--film-anchor-offset)); }
@media (max-width:700px) {
  html { --film-anchor-offset:78px; }
}

/* Failure changes the artwork and recovery controls, never the document's
   geometry. Retain the normal track/sticky stage so a reader in Projects or
   Drops stays in place through load/seek failure and Retry. Deliberate motion
   preferences still use their separate reduced-motion layout. */
html.hero-static body.main-video :is(.hero-copy,.film-cue,.hero-bottom) { opacity:1; }
html.hero-static body.main-video .hero-shade { opacity:0; }
html.hero-static body.main-video .hero-scroll-video { opacity:0!important; }
html.hero-static body.main-video .hero-video-poster { opacity:1!important; }
html.hero-static body.main-video[data-hero-poster="error"] .hero-video { display:none; }
html.hero-static body.main-video[data-hero-poster="error"] :is(.hero-scene>.backdrop,.character-position) {
  visibility:visible;
}

/* Keep progress and its recovery action together. No full-width overlay or
   header backdrop is introduced. The wrapper itself never intercepts input. */
body.main-video .hero-media-feedback {
  position:absolute;
  z-index:8;
  top:112px;
  left:var(--gutter);
  max-width:min(480px,calc(100% - 2 * var(--gutter)));
  display:flex;
  align-items:center;
  gap:8px 16px;
  pointer-events:none;
  text-shadow:0 1px 10px #000;
}
body.main-video .hero-media-feedback .hero-media-status {
  position:static;
  flex:1 1 auto;
  min-width:0;
  max-width:none;
  margin:0;
  font:12px/1.5 var(--font-ui);
  color:#eeeae4;
}
body.main-video .hero-retry,
.film-dialog #film-retry {
  min-height:44px;
  padding:8px 12px;
  border:1px solid #d9d5cd80;
  border-radius:0;
  color:#eeeae4;
  font:600 12px/1.5 var(--font-ui);
  text-align:center;
  background:#0c0c0cd9;
  cursor:pointer;
}
body.main-video .hero-retry {
  flex:0 0 auto;
  pointer-events:auto;
}
body.main-video .hero-retry:focus-visible,
.film-dialog #film-retry:focus-visible {
  outline:2px solid #fff;
  outline-offset:4px;
}
body.main-video .hero-retry:disabled,
.film-dialog #film-retry:disabled { cursor:wait;opacity:.65; }
.film-dialog #film-status {
  margin:14px 0 0;
  color:#eeeae4;
  font:12px/1.6 var(--font-ui);
}
.film-dialog #film-retry { margin-top:10px; }

@media (min-width:701px) and (max-width:1000px) {
  body.main-video .hero-media-feedback { top:78px; }
}
@media (max-width:700px), (max-width:1000px) and (max-height:500px) and (orientation:landscape) {
  body.main-video .hero-media-feedback {
    top:calc(var(--mobile-header) + var(--mobile-safe-top) + 12px);
    left:var(--mobile-gutter-left);
    right:var(--mobile-gutter-right);
    max-width:none;
  }
}
@media (max-width:1000px) and (max-height:500px) and (orientation:landscape) {
  body.main-video .hero-media-feedback {
    left:auto;
    max-width:calc(50% - var(--mobile-gutter-right) - 12px);
  }
}
