.installation-film {
  grid-column: 1 / -1;
  width: 100%;
  margin: clamp(1.75rem, 4vw, 3.5rem) 0;
}

.installation-film__frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid color-mix(in srgb, var(--accent, #ffffff) 42%, var(--rule, #ffffff30));
  border-radius: clamp(12px, 1.8vw, 24px);
  background: #07090d;
  box-shadow:
    0 28px 80px color-mix(in srgb, var(--bg, #000000) 72%, transparent),
    inset 0 1px 0 #ffffff12;
}

.installation-film__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px #ffffff08;
}

.installation-film__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #07090d;
}

.installation-film figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1rem;
  color: var(--muted, #a4a6ad);
  font-size: clamp(.76rem, 1.2vw, .9rem);
  line-height: 1.5;
}

.installation-film figcaption strong {
  flex: none;
  color: var(--ink, #ffffff);
  font: inherit;
  font-weight: 650;
}

.installation-film[data-playing='true'] .installation-film__frame {
  border-color: color-mix(in srgb, var(--accent, #ffffff) 72%, var(--rule, #ffffff30));
}

/* Some editorial worlds place the guide in a narrow second column. The film
   becomes the shared full-width step while the original copy remains intact. */
.timestamp-margin:has(> #setup-guide),
.revision-sidebar:has(> #setup-guide),
.allowance-study:has(> #setup-guide),
.meridian-study:has(> #setup-guide) {
  grid-template-columns: minmax(0, 1fr) !important;
}

.timestamp-margin:has(> #setup-guide) > *,
.revision-sidebar:has(> #setup-guide) > *,
.allowance-study:has(> #setup-guide) > *,
.meridian-study:has(> #setup-guide) > * {
  grid-column: 1 !important;
  grid-row: auto !important;
}

@media (max-width: 640px) {
  .installation-film {
    margin-block: 1.5rem 2.25rem;
  }

  .installation-film figcaption {
    display: grid;
    gap: .25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .installation-film__frame {
    transition: none;
  }
}
