.cos-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.cos-modal.is-open {
  display: flex;
}

.cos-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cos-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 1100px;
  background: var(--cos-bg-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--cos-radius-md);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: cos-modal-pop .25s ease both;
}

@keyframes cos-modal-pop {
  from { transform: scale(.96); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.cos-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  z-index: 2;
  transition: background-color .2s ease;
}

.cos-modal__close:hover,
.cos-modal__close:focus-visible {
  background: var(--cos-red);
}

.cos-modal__body {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.cos-modal__iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 768px) {
  .cos-modal {
    padding: 0;
  }

  .cos-modal__dialog {
    border-radius: 0;
    height: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
  }

  .cos-modal__body {
    flex: 1;
    aspect-ratio: auto;
    height: 100%;
  }
}
