.video-trigger {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(13, 20, 34, 0.82);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.video-modal__dialog {
  position: relative;
  width: min(100%, 1040px);
  padding: 14px;
  border: 1px solid rgba(190, 143, 69, 0.58);
  border-radius: 12px;
  background: #17253d;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
}

.video-modal.is-open .video-modal__dialog {
  transform: translateY(0) scale(1);
}

.video-modal__title {
  margin: 2px 48px 12px 4px;
  color: #f6d79d;
  font-family: "Source Han Serif CN-Regular", serif;
  font-size: 18px;
  font-weight: 400;
}

.video-modal__player {
  display: block;
  width: 100%;
  max-height: min(76vh, 680px);
  border-radius: 6px;
  background: #0d1422;
}

.video-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.video-modal__close:hover,
.video-modal__close:focus-visible {
  border-color: #be8f45;
  background: rgba(190, 143, 69, 0.28);
}

body.video-modal-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  .video-modal {
    padding: 12px;
  }

  .video-modal__dialog {
    padding: 10px;
  }

  .video-modal__title {
    margin: 2px 42px 10px 2px;
    font-size: 16px;
  }

  .video-modal__player {
    max-height: 72vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-modal,
  .video-modal__dialog {
    transition: none;
  }
}
