#bible-video-open,
#reader-video-open,
#bible-video button {
  min-height: 44px;
  border: 1px solid #213f3460;
  border-radius: 12px;
  padding: 6px 10px;
  background: #e7ecdf;
  color: #213f34;
  font: inherit;
  font-weight: 700;
  font-size: .875rem;
}

#reader-video-open {
  align-self: flex-start;
  margin-bottom: 4px;
}

#bible-video {
  position: fixed;
  z-index: 10;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(360px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px;
  background: #fffdf6;
  color: #213f34;
  border: 1px solid #dcdacb;
  border-radius: 18px;
  box-shadow: 0 12px 40px #213f3430;
}

#bible-video header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

#bible-video-title {
  font-size: 1.125rem;
  margin: 0;
}

#bible-video-close {
  min-width: 44px;
}

#bible-video label {
  font-size: .875rem;
}

#bible-video-book {
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid #213f3460;
  border-radius: 8px;
  background: #fffdf6;
  color: inherit;
  font-size: 1rem;
}

#bible-video-status {
  margin: 6px 0;
  font-size: .875rem;
}

#bible-video-status:empty {
  display: none;
}

#bible-video-media {
  margin-top: 6px;
}

#bible-video iframe,
#bible-video video {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #111;
  aspect-ratio: 16 / 9;
}

#bible-video iframe {
  min-height: 200px;
}

#bible-video-external {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: inherit;
  font-size: .875rem;
}

@media (max-width: 1279px) {
  #bible-video {
    top: max(8px, env(safe-area-inset-top));
    bottom: auto;
    width: min(360px, calc(100% - 24px));
  }

  body.bible-video-open main {
    padding-top: calc(var(--bible-video-height, 0px) + 20px);
  }

  .reader-open #bible-video { max-height: calc(100dvh - 24px); }
}

@media (max-width: 1049px) {
  .reader-open #bible-video {
    max-height: max(145px, calc(100dvh - 310px));
  }
}

@media (min-width: 1280px) {
  body.reader-open.bible-video-open main {
    transform: none;
  }
}
#game-video-open {
  min-height: 44px;
  margin-left: 8px;
  padding: 6px 10px;
  border: 1px solid #213f3460;
  border-radius: 12px;
  background: #e7ecdf;
  color: #213f34;
  font: inherit;
  font-size: .875rem;
}

#game-video-open[hidden] { display: none; }
