/* Film-specific additive controls; no overrides of the existing space-card carousel. */
/* The legacy #updates margin shorthand overrode the full-width home's gutters. */
body.cinema.cinema-v3 > main > #updates { margin-inline: auto; }
body.cinema .movie-poster h3 { overflow-wrap: anywhere; }
/* Keep the search field in place while typing; submitting moves to the results. */
body.cinema.cinema-v3.is-searching .header { position: absolute; }
body.cinema.cinema-v3.is-searching .scene-hero { display: block; }
.cinema-v3.is-searching .cinema-reel.scene-gallery { display: block; }

.mm-scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 40;
  pointer-events: none;
  background: #8cecff12;
}
.mm-scroll-progress[hidden] { display: none; }
.mm-scroll-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: #a2eafa;
}
.mm-menu-toggle { display: none; }
html.mm-menu-open { overflow: hidden; }
body.cinema dialog.mm-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  box-sizing: border-box;
  width: min(88vw, 380px);
  max-width: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: max(26px, env(safe-area-inset-top)) 26px max(30px, env(safe-area-inset-bottom));
  border: 0;
  border-left: 1px solid #617787;
  border-radius: 0;
  color: #f7fafc;
  background: #0d1721;
  box-shadow: -24px 0 80px #0006;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
body.cinema dialog.mm-drawer::backdrop { background: #02070cbf; }
.mm-drawer-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.cinema .mm-drawer h2 { margin: 0; font-family: inherit; font-size: 24px; font-weight: 650; line-height: 1.4; letter-spacing: -.02em; }
body.cinema .mm-drawer-close {
  min-width: 52px;
  min-height: 44px;
  padding: 8px;
  color: #cbeaf6;
  background: transparent;
  border: 1px solid #728896;
  border-radius: 3px;
}
.mm-drawer-intro { margin: 18px 0 25px; color: #a8bac8; font-size: 13px; line-height: 1.7; }
body.cinema .mm-drawer > nav { display: grid; gap: 0; width: 100%; margin: 0; padding: 0; }
body.cinema .mm-drawer > nav a {
  display: block;
  min-height: 56px;
  box-sizing: border-box;
  margin: 0;
  padding: 15px 0;
  color: #d8e7f0;
  border-bottom: 1px solid #a8b6c632;
  font-size: 21px;
  line-height: 1.5;
  text-decoration: none;
}
body.cinema .mm-drawer > nav a.active { color: #a2ecff; }
body.cinema .mm-drawer > nav a::after { display: none; }
body.cinema .mm-drawer > .header-actions { display: grid; width: 100%; margin: 28px 0 0; gap: 12px; }
body.cinema .mm-drawer > .header-actions button { min-height: 46px; width: 100%; font-size: 14px; }
body.cinema .mm-drawer :focus-visible, body.cinema .mm-menu-toggle:focus-visible {
  outline: 2px solid #8cecff;
  outline-offset: 4px;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body.cinema .movie-poster .poster-frame {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: transform 180ms ease-out;
  }
  body.cinema .movie-poster .poster-frame.mm-poster-active {
    transform: perspective(750px) rotateX(var(--mm-rotate-x, 0deg)) rotateY(var(--mm-rotate-y, 0deg));
    will-change: transform;
  }
  body.cinema .movie-poster .poster-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    background: radial-gradient(circle at var(--mm-light-x, 50%) var(--mm-light-y, 50%), #dcfaff42, transparent 65%);
  }
  body.cinema .movie-poster .poster-frame.mm-poster-active::before { opacity: .65; }
}
@media (max-width: 760px) {
  body.cinema.mm-navigation .header,
  body.cinema.cinema-v3.mm-navigation .header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    height: 84px;
    min-height: 0;
    align-items: center;
    padding-block: 14px;
    gap: 12px;
  }
  body.cinema.mm-navigation .header > nav,
  body.cinema.mm-navigation .header > .header-actions { display: none; }
  body.cinema .mm-menu-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d0e9f477;
    border-radius: 3px;
    color: #effbff;
    background: #0b172977;
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mm-scroll-progress-fill, body.cinema .mm-drawer, body.cinema .mm-menu-toggle { animation: none; transition: none; }
  body.cinema .movie-poster .poster-frame.mm-poster-active { transform: none; }
  body.cinema .movie-poster .poster-frame::before { display: none; }
}
