/* Keep fixed theater elements anchored to the viewport, not the scrolled page. */
body.archive-page-body.archive-theater-open .page-archive {
  will-change: auto !important;
  transform: none !important;
}
/* Loaded by archive.html only. The existing player stays in its original DOM node. */
body.archive-page-body.archive-theater-open .archive-main { z-index: 1000 !important; }
body.archive-page-body .archive-theater-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 5, 5, 0.86);
}
body.archive-page-body .archive-theater-placeholder { visibility: hidden; pointer-events: none; }
body.archive-page-body .archive-media.archive-theater-active:not(:fullscreen) {
  position: fixed !important;
  top: var(--theater-top) !important;
  left: var(--theater-left) !important;
  width: var(--theater-width) !important;
  height: var(--theater-height) !important;
  margin: 0 !important;
  z-index: 1001 !important;
}
body.archive-page-body .archive-media.archive-theater-active .archive-media-vimeo {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
}
body.archive-page-body .archive-theater-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font: 300 26px/1 sans-serif;
  cursor: pointer;
}
body.archive-page-body .archive-theater-close:focus-visible { outline: 2px solid white; outline-offset: 3px; }
body.archive-page-body .archive-media:fullscreen .archive-theater-close { display: none; }

body.archive-page-body .archive-theater-share {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 5;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  font: 500 10px/1 sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
body.archive-page-body .archive-theater-share:focus-visible { outline: 2px solid white; outline-offset: 3px; }
body.archive-page-body .archive-media:fullscreen .archive-theater-share { display: none; }

/* Shared links open paused, so keep the existing controls available immediately. */
body.archive-page-body .archive-theater-active .archive-media-controls {
  opacity: 1 !important;
  pointer-events: auto !important;
}
