.timed-movie {
  --caption-source: #fde047;
  --caption-meaning: #fff;
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: .5rem;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding: .65rem;
  border: 1px solid #324b64;
  border-radius: .65rem;
  background: #0c1724;
  color: #edf4ff;
}
.timed-movie [hidden], .timed-movie[hidden], [data-timed-live][hidden] { display: none; }
.timed-movie-bar, .timed-movie-pages, .timed-movie-cue header {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .5rem;
  align-items: center;
  min-width: 0;
}
.timed-movie-bar { justify-content: space-between; }
.timed-movie-bar strong { overflow-wrap: anywhere; }
.timed-movie-header { position: sticky; top: 0; z-index: 2; background: #0c1724; }
.timed-movie details { min-width: 0; }
.timed-movie summary { cursor: pointer; padding: .35rem 0; }
.timed-movie details > label { display: block; margin: .35rem 0; }
.timed-movie input[type="number"] { width: 6rem; }
.timed-movie input[type="file"] { display: block; max-width: 100%; }
.timed-movie-bar input { flex: 1; min-width: 7rem; }
.timed-movie-stage { position: relative; background: #000; min-width: 0; }
.timed-movie-stage video { display: block; width: 100%; max-height: 55dvh; background: #000; }
.timed-movie-stage:fullscreen { display: grid; place-items: center; }
.timed-movie-stage:fullscreen video { max-height: 100dvh; height: 100%; }
.timed-movie-overlay {
  position: absolute;
  z-index: 1;
  bottom: 3.1rem;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 1rem);
  padding: .3rem .6rem;
  background: #000c;
  color: var(--caption-source);
  text-align: center;
  pointer-events: none;
  font-size: var(--movie-overlay-size, 24px);
  line-height: 1.18;
}
.timed-movie-overlay .timed-movie-meaning { font-size: inherit; }
.timed-movie-clock { color: #aec4d6; font-variant-numeric: tabular-nums; }
#timedMovieVolume { width: min(100%, 20rem); display: block; margin: .4rem 0; }
#timedMovieVolumeReset, #timedMovieSaveDelay { min-height: 36px; }
.timed-movie-transcript { position: relative; min-height: 7rem; max-height: min(42dvh, 25rem); overflow: auto; background: #080f18; }
#timedMovieOpen[hidden], #rtEditSession[hidden] { display: none; }
#timedMovieOpen { align-self: start; margin-bottom: .5rem; }
.rt-caption-source {
  margin-block: .5rem;
  padding: .45rem .6rem;
  border: 1px solid #334a5e;
  border-radius: .5rem;
  background: #101b28;
}
.rt-caption-source summary { cursor: pointer; }
.rt-caption-source .timed-movie-bar { justify-content: flex-start; margin-block: .4rem; }
.rt-caption-source select { flex: 1 1 10rem; min-width: 0; max-width: 100%; }
#rtCaptionMode, #rtSubtitleHint { color: #aec4d6; }
#realtime .session-bar, .session-bar[data-session-bar="realtime"] {
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
}
.timed-movie-cue { padding: .45rem .55rem; border-bottom: 1px solid #263b4f; }
.timed-movie-cue.is-active { background: #18333f; box-shadow: inset 3px 0 var(--caption-source); }
.timed-movie-cue header button { min-height: 30px; min-width: 32px; padding: .15rem .4rem; font-size: .78rem; }
.timed-movie-cue .timed-movie-time { color: #8edafa; font-variant-numeric: tabular-nums; }
.timed-movie-source, .timed-movie-meaning { margin: .18rem 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.timed-movie-source { color: var(--caption-source); }
.timed-movie-meaning { color: var(--caption-meaning); font-size: .9em; }
.timed-movie-pages { justify-content: space-between; }
