@font-face {
  font-family: BeforewordCaptionInk;
  src: url("/assets/music-pen-20261105/BeforewordBallpoint-Regular.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

/* Use the native track so the browser can also show it in fullscreen and PiP. */
@media (forced-colors: none) {
  .love-film video#film {
    --film-caption-size: max(1.125rem, var(--font, 18px), clamp(18px, 1.9vw, 26px));
  }
  .love-film video#film:fullscreen {
    --film-caption-size: max(1.25rem, var(--font, 18px), clamp(20px, 3.4vmin, 48px));
  }
  .love-film video#film::cue {
    color: white;
    background-color: rgba(12, 11, 15, .88);
    font-family: BeforewordCaptionInk, system-ui, sans-serif;
    font-weight: 400;
    font-size: var(--film-caption-size);
    text-shadow: 0 0 .02em rgb(255 255 255 / 85%);
  }
  .love-film video#film::-webkit-media-text-track-display {
    font-family: BeforewordCaptionInk, system-ui, sans-serif;
    font-size: var(--film-caption-size);
  }
  html[data-film-caption-font="print"] .love-film video#film::cue {
    font-family: system-ui, sans-serif;
    text-shadow: none;
  }
  html[data-film-caption-font="print"] .love-film video#film::-webkit-media-text-track-display {
    font-family: system-ui, sans-serif;
  }
}
.love-film .film-controls .caption-control {max-width: 100%; flex-wrap: wrap; row-gap: 0;}
@media (forced-colors: active) {
  .love-film .film-controls [data-caption-style-control] {display: none;}
}

/* Keep native WebVTT line positions and explicit breaks, and wrap long phrases. */
.love-film video#film::cue {
  white-space: pre-line;
  line-height: 1.2;
}
.love-film video#film::-webkit-media-text-track-display {
  white-space: pre-line !important;
}

/* macOS can require a translucent caption background. Edge the white ink so
   letterforms also read against light footage with that native preference. */
@media (forced-colors: none) {
  .love-film video#film::cue,
  html[data-film-caption-font="print"] .love-film video#film::cue {
    text-shadow: -.35px 0 .25px #fff, .35px 0 .25px #fff, 0 .35px .25px #fff,
                 0 1px 1.6px rgb(0 0 0 / 75%);
  }
}
/* Keep the native figure and controls stable as captions change. On a narrow
   screen with larger type, the picture retains its complete original frame. */
@media (max-width: 374px) {
  html[data-film-caption-room] .love-film video#film:not(:fullscreen) {
    min-height: calc(var(--font, 18px) * 11.4);
    object-fit: contain;
    object-position: center bottom;
    background-color: #151419;
  }
  html[data-film-caption-room] video#film[data-long-film-cue]::cue,
  html[data-film-caption-room] video#film[data-long-film-cue]::-webkit-media-text-track-display {
    white-space: normal !important;
  }
  html[data-film-caption-room] .love-film video#film[data-long-film-cue]::cue {line-height: 1.16;}
}

/* This film sometimes translates the card at the top while dialogue and music
   continue below. Keep both native cues in their original screen positions. */
@media (max-width: 540px) {
  html[data-film-caption-room] .love-film video#film[data-paired-film-cues]:not(:fullscreen) {
    min-height: calc(var(--font, 18px) * 12.4);
    object-fit: contain;
    object-position: center bottom;
    background-color: #151419;
  }
}
