/* Scoped to Works; the shared film player supplies playback and mobile fullscreen. */
@media (min-width: 1024px) {
  .works-gallery-page .works-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: clamp(20px, 2.4vw, 36px);
  }
}

body.works-gallery-page.has-cinema-popup { overflow: hidden; }
.works-film-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  place-items: center;
  padding: 72px 24px;
  background: #000;
}
.works-film-popup.is-open { display: grid; }
.works-film-popup .cinema-popup-shade {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.works-film-popup .cinema-popup-stage { position: relative; width: min(88vw, 1180px); }
.works-film-popup .cinema-popup-media {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 144px);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}
.works-film-popup .cinema-popup-close {
  position: absolute;
  top: -56px;
  right: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffff66;
  border-radius: 50%;
  color: #fff;
  background: #0009;
  cursor: pointer;
}
.works-film-popup .cinema-popup-close span { grid-area: 1 / 1; width: 22px; height: 1px; background: currentColor; transform: rotate(45deg); }
.works-film-popup .cinema-popup-close span:last-child { transform: rotate(-45deg); }
.works-film-popup :focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.works-film-popup__status {
  position: absolute;
  z-index: 4;
  inset: auto 12px 72px;
  margin: 0;
  padding: 12px;
  color: #fff;
  background: #000b;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}
.works-film-popup__status[aria-hidden="true"] { display: none; }
