[data-story-films] {
  --dock-edge: calc(var(--shop-height) + var(--shop-safe));
  background: #292824;
}
[data-story-films] .cinema-feed {
  inset: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y pinch-zoom;
}
[data-story-films] .cinema-scene {
  flex: 0 0 100%;
  min-width: 0;
  background: #393832;
}
[data-story-films] .cinema-scene :is(video, .film-poster) {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  pointer-events: none;
}
.film-poster { z-index: 0; }
[data-story-films] .cinema-scene video { z-index: 1; opacity: 0; }
[data-story-films] .cinema-scene video.has-frame { opacity: 1; }
.film-surface {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
[data-story-films] .film-surface:focus-visible {
  outline: 2px solid white;
  outline-offset: -5px;
}
[data-story-films]::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: calc(clamp(100px, 23svh, 230px) + var(--dock-edge));
  pointer-events: none;
  background: linear-gradient(to top, rgb(17 16 15 / 75%) var(--dock-edge), rgb(17 16 15 / 29%) 64%, transparent);
}
[data-story-films] .cinema-bottom {
  z-index: 2;
  bottom: calc(var(--shop-clear) + 6px);
}
[data-story-films] .cinema-cases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2.1vw, 28px);
  width: 100%;
  max-width: 510px;
}
[data-story-films] .cinema-cases button {
  display: flex;
  flex-direction: column;
  justify-content: end;
  min-height: 44px;
  color: rgb(255 255 255 / 84%);
  text-shadow: 0 1px 5px #0007;
}
[data-story-films] .cinema-cases button[aria-current="true"] { color: white; }
[data-story-films] .cinema-cases button > span:first-child { font-size: 13px; }
[data-story-films] .cinema-cases small { color: inherit; }
[data-story-films] .cinema-track {
  width: 100%;
  margin-top: 9px;
  background: rgb(255 255 255 / 47%);
}
[data-story-films] .cinema-track i {
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
}
[data-story-films] [aria-current="true"] .cinema-track i { transition: transform .22s linear; }

@media (orientation: portrait) {
  [data-story="sea"] { --subject-x: 47%; }
  [data-story="picnic"] { --subject-x: 29%; }
  [data-story-films] .cinema-scene :is(video, .film-poster) { object-position: var(--subject-x, 50%) 50%; }
  /* The baby lies sideways in this overhead shot. Turn the frame for a full portrait. */
  [data-story-films] [data-story="baby"] :is(video, .film-poster) {
    inset: 50% auto auto 50%;
    width: 100vh;
    width: 100svh;
    height: 100vw;
    max-width: none;
    transform: translate(-50%, -50%) rotate(90deg);
  }
}
@media (max-width: 650px) {
  [data-story-films] .cinema-bottom { display: block; padding-inline: 18px; bottom: var(--shop-clear); }
  [data-story-films] .cinema-cases { max-width: none; gap: 10px; }
  [data-story-films] .cinema-cases button > span:first-child { min-height: 0; font-size: 11px; }
  [data-story-films] .cinema-cases small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  [data-story-films] [aria-current="true"] .cinema-track i { transition: none; }
}
