.pj-youtubeModal[hidden] {
  display: none;
}

.is-youtubeModal-open {
  overflow: hidden;
}

.pj-youtubeModal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pj-youtubeModal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .72);
}

.pj-youtubeModal__content {
  position: relative;
  z-index: 1;
  aspect-ratio: 9 / 16;
  width: auto;
  height: 90vh;
  height: 90dvh;
  max-height:min(90dvh,820px);
  background-color:transparent;
  padding-bottom: 5em;
}

.pj-youtubeModal__frame {
  position: relative;
  aspect-ratio: 9 / 16;
  width: auto;
  height: 100%;
  margin-inline: auto;
  background: #000;
}

.pj-youtubeModal__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.pj-youtubeModal__close {
  position: absolute;
  left: 50%;
  bottom:.75em;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pj-youtubeModal__close:focus {
  outline: none;
}
.pj-youtubeModal__close:focus-visible {
  outline: 1px dotted #717171;
  outline-offset: 3px;
}
.pj-youtubeModal__close:hover {
  opacity: .6;
}
.pj-youtubeModal__close > span{
  position: relative;
  width: 24px;
  height: 18px;
}
.pj-youtubeModal__close > span:before,
.pj-youtubeModal__close > span:after {
  content: ""; display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: #FFF;
  top: 9px;
}
.pj-youtubeModal__close > span:before {
  transform: rotate(45deg);
}
.pj-youtubeModal__close > span:after {
  transform: rotate(-45deg);
}

.pj-youtubeModal__close > span > span{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0); /* 旧ブラウザ互換用 */
  clip-path: inset(50%); /* モダンブラウザ用 */
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  .pj-youtubeModal {
    padding: 16px;
  }
  .pj-youtubeModal__close {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}
