.video-modal {
  position: fixed;
  inset: 0;
  display: none;
  width: min(640px, calc((100dvh - 150px) * 0.833333), calc(100vw - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #b69a565c;
  border-radius: 24px;
  background: #000;
  color: #ffdc69;
  box-shadow: 0 24px 100px #0009;
}

.video-modal[open] {
  display: flex;
  flex-direction: column;
}

.video-modal::backdrop {
  background: #050400eb;
}

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

.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-shrink: 0;
  min-height: 65px;
  padding: 11px 14px 11px 21px;
}

.video-modal-header h2 {
  color: #fce4a0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.04em;
}

.video-modal-close {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #a9905659;
  border-radius: 50%;
  background: transparent;
  color: #ead5a1;
  font-size: 27px;
  font-weight: 300;
  line-height: 1;
}

.video-modal-close:hover {
  background: #ffcc2814;
}

.video-modal-stage {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  aspect-ratio: 5 / 6;
  overflow: hidden;
  background: #070604;
}

.video-modal-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.video-modal-feedback {
  flex-shrink: 0;
  padding: 10px 16px;
  color: #d0c19c;
  font-size: 11px;
  line-height: 1.5;
}

.video-modal-navigation {
  flex-shrink: 0;
  padding: 13px 14px 15px;
  border-top: 1px solid #aa8d3d40;
  background: #000;
}

.video-modal-navigation > p {
  margin-bottom: 10px;
  color: #c4b487;
  font-size: 11px;
}

#video-modal-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.video-modal-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 7px;
  border: 1px solid #74602e;
  border-radius: 12px;
  background: #070707;
  color: #e3d39f;
  text-align: left;
  font-family: Poppins, Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.video-modal-option:hover {
  border-color: #e4b937;
  background: #121212;
}

.video-modal-thumbnail {
  position: relative;
  flex: none;
}

.video-modal-thumbnail::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  margin: auto;
  border: 1px solid #ffffffb3;
  border-radius: 50%;
  background: #0009;
  color: #fff;
  font-size: 9px;
  content: '▶';
}

.video-modal-option img {
  display: block;
  width: 57px;
  height: 43px;
  border-radius: 7px;
  object-fit: cover;
  object-position: center 25%;
}

.video-modal-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  .video-modal {
    border-radius: 21px;
  }

  .video-modal-header {
    min-height: 61px;
    padding-left: 16px;
  }

  .video-modal-header h2 {
    font-size: 15px;
  }

  .video-modal-option {
    gap: 8px;
    font-size: 10px;
  }

  .video-modal-option img {
    width: 46px;
    height: 39px;
  }
}

@media (max-height: 500px) and (min-width: 600px) {
  .video-modal {
    width: min(900px, calc(100vw - 32px));
  }

  .video-modal-stage {
    height: calc(100dvh - 105px);
    aspect-ratio: auto;
  }
}
