/* モーダル全体 */
.modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
}

/* 背景 */
.modal-overlay {
    background: rgba(0, 0, 0, 0.3);
    position: absolute;
    inset: 0;
    z-index: -1;
    
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px); /* Safari対策 */
}

/* 中央コンテンツ */
.modal-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;   /* 縦中央 */
    justify-content: center; /* 横中央 */
}

/* 動画ラッパー（3:2） */
.video-wrapper {
  width: min(95vw, 1100px);
  max-height: 90vh;        /* 高さが足りなければここで制限 */
  aspect-ratio: 3 / 2;    /* 常に 3:2 を維持 */
  background: #000;
  position: relative;
  overflow: hidden;
}



/* videoをフィット */
.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 閉じるボタン */
.modal-close {
    color: #fff;
    font-weight: 100;
    height: 40px;
    position: absolute;
    top: 0px;
    right: 0px;
    background: none;
    border: none;
    font-size: 90px;
    cursor: pointer;
    width: 40px;
}
.modal-close:hover {
    opacity: .6;
}
.modal-close:before {
    background: #fff;
    content: "";
    height: 1px;
    position: absolute ;
    transform: rotate(45deg);
    top: 20px;
    left: -5px;
    width: 50px;
}
.modal-close:after {
    background: #fff;
    content: "";
    height: 1px;
    position: absolute ;
    transform: rotate(135deg);
    top: 20px;
    left: -5px;
    width: 50px;
}