/* ============================================================
   Block: あらすじ（acf/synopsis-list）
   構成: 動画スライダー（上） + あらすじ本文カード（下）
   ============================================================ */

.cv-synopsis {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 1.5em 0;
}

.cv-synopsis__card {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.cv-synopsis__body {
    font-size: .9em;
    color: #374151;
    line-height: 1.7;
}

/* ----- 動画セクション ----- */
.cv-synopsis__videos {
    display: flex;
    gap: 12px;
}

/* 単数: 中央寄せでバランス良く */
.cv-synopsis__videos:not(.is-multi) {
    justify-content: center;
}

/* 動画カードのサイズは単数/複数共通: 最大 480px、画面が狭ければ追随 */
button.cv-synopsis__video {
    flex: 0 0 min(100%, 480px);
    position: relative;
    padding: 0;
    border: 0;
    background: #000;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    display: block;
}

/* 複数動画: 横スクロールスナップでスライダー化 */
.cv-synopsis__videos.is-multi {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.cv-synopsis__videos.is-multi .cv-synopsis__video {
    scroll-snap-align: start;
}

.cv-synopsis__thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cv-synopsis__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 9px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: .72em;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .08em;
    border-radius: 4px;
    pointer-events: none;
}

.cv-synopsis__playbtn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background .15s ease, transform .15s ease;
}

.cv-synopsis__playbtn svg {
    margin-left: 2px;
}

.cv-synopsis__video:hover .cv-synopsis__playbtn,
.cv-synopsis__video:focus-visible .cv-synopsis__playbtn {
    background: rgba(252, 35, 72, .9);
    transform: translate(-50%, -50%) scale(1.08);
}

/* ----- YouTube モーダル（episode-list と共通定義） ----- */
dialog.cv-yt-modal {
    inset: 0;
    margin: auto;
    border: 0;
    padding: 0;
    background: transparent;
    width: min(92vw, 1200px);
    max-height: 92vh;
    color: #fff;
    overflow: visible;
}

dialog.cv-yt-modal::backdrop {
    background: rgba(0, 0, 0, .85);
}

.cv-yt-modal__iframe-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    background: #000;
}

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

.cv-yt-modal__close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.cv-yt-modal__close:hover,
.cv-yt-modal__close:focus-visible {
    color: #fc2348;
}
