/* Shared desktop viewing sizes. Mobile and tablet keep their existing layout. */
@media (min-width: 981px) {
  :root {
    --film-landscape-width: min(100%, 960px, calc(70vh * 16 / 9));
    --film-portrait-width: min(100%, 320px, calc(70vh * 9 / 16));
    --film-short-width: min(100%, 360px, calc(70vh * 3 / 4));
  }

  /* The second class wins over individual case-study widths. */
  .desktop-player.desktop-player {
    width: var(--film-portrait-width);
    margin-left: auto;
    margin-right: auto;
  }
  .desktop-player.desktop-player--landscape {
    width: var(--film-landscape-width);
  }
  .desktop-player.desktop-player--short {
    width: var(--film-short-width);
  }
  .desktop-player video {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* Keep film headings aligned with their player, including the sound cue. */
  .coronet-film-caption,
  .petal-film-heading,
  .kyo-film-heading,
  .cala-film-heading,
  .nano-film-title {
    width: var(--film-landscape-width);
    margin-left: auto;
    margin-right: auto;
  }

  /* Native fullscreen is deliberately independent of the inline frame. */
  .desktop-player video:fullscreen {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
  }
  .desktop-player video:-webkit-full-screen {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
  }
}
