/* Size the visible carousel from its available viewport space. */
#cast {
  --cast-media-height: calc(var(--slide-width) * 1.25);
}

#cast .cast-carousel[hidden] {
  display: none !important;
}

#cast .cast-portrait,
#cast .creator-object {
  height: var(--cast-media-height);
  aspect-ratio: auto;
}

#cast .cast-portrait {
  object-fit: contain;
  object-position: center;
  box-shadow: none;
  filter: drop-shadow(0 12px 24px #100d0b65);
}

#cast .cast-creators .cast-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#cast .cast-creators .creator-object {
  position: relative;
  flex: none;
  width: 100%;
  margin: 0;
}

#cast .cast-creators .creator-object img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  translate: none;
  transform: none;
}

#cast .cast-creators figcaption {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0;
  text-align: center;
}

#cast .cast-creators figcaption .creator-role,
#cast .cast-creators figcaption h3,
#cast .cast-creators figcaption .actor-affiliation {
  width: 100%;
  text-align: center;
  padding-inline: 0;
}

#cast .cast-creators figcaption .creator-role {
  margin: 0 0 8px;
}

#cast .cast-creators figcaption h3 {
  display: block;
  align-content: center;
  min-height: 2.5em;
  margin: 0;
}

#cast .cast-creators figcaption .actor-affiliation {
  margin: 10px 0 0;
}

/* Reserve the card space while the live cast is being fetched. */
#cast #cast-film-window:has(#cast-film-track:empty) {
  min-height: calc(var(--cast-media-height) + 178 * var(--ui-unit) + 26px);
}

#cast .cast-live-status {
  position: relative;
  inset: auto;
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  max-width: min(90%, 420px);
}
