.js-youtube {
    cursor: pointer;
    max-width: calc(1120 / 16 * 1em);
    width: 90%;
    margin-inline: auto;
}
.js-youtube > h3 {
    text-align: center;
    font-size: 1.8em;
    font-weight: 700;
    letter-spacing: .06em;
    margin: 0 0 .35em;
    color: #1d1d1f;
}
.js-youtube .youtube_thumbnail {
    position: relative;
    aspect-ratio: 16 / 5;
    overflow: hidden;
    border-radius:calc(8 / var(--base) * 1em);
    background: #000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
}
.js-youtube .youtube_thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.js-youtube .play_button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}
.js-youtube .play_button::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.8);
    border-radius: 14px;
}
.js-youtube .play_button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-35%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #fff;
}
/* --- top bar --- */
.js-youtube .yt_top_bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 24px;
    background: linear-gradient(to bottom, rgba(0,0,0,.7) 0%, transparent 100%);
    z-index: 2;
}
.js-youtube .yt_top_title {
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    text-shadow: 0 0 2px rgba(0,0,0,.5);
}
.js-youtube .yt_top_actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 12px;
}
.js-youtube .yt_action_btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
    text-shadow: 0 0 2px rgba(0,0,0,.5);
}
.js-youtube .yt_action_btn:hover {
    opacity: .8;
}

/* --- watch on YouTube badge --- */
.js-youtube .yt_watch_on {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 2px;
    text-decoration: none;
    z-index: 2;
}
.js-youtube .yt_watch_on:hover {
    background: rgba(0,0,0,.9);
}
.js-youtube .yt_watch_on svg {
    display: block;
}

.js-youtube:hover .play_button::before {
    background: #f00;
}
.con_banner {
    margin-top: -35px;
}

/* ========= SP adjustment ========= */
@media (max-width: 767px) {
    .con_banner_yt {
        margin-top: -45px;
    }
    .con_banner_yt .js-youtube {
        width: 100%;
        max-width: 425px;
    }
    .con_banner_yt .js-youtube .youtube_thumbnail {
        border-radius: calc(8 / var(--base) * 1em);
    }
    .con_banner {
        margin-top: 0px;
    }
    .con_banner_yt .js-youtube .yt_top_bar {
        display: none;
    }
    .js-youtube > h3 {
        text-align: left;
        font-size: 1.1em;
        font-weight: 700;
        letter-spacing: 0em;
        margin: 0 0 .15em;
    }
}

/* ========= Modal ========= */
.yt_modal_overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.yt_modal_overlay.is-active {
    opacity: 1;
    visibility: visible;
}
.yt_modal_wrap {
    position: relative;
    width: 90%;
    max-width: 960px;
}
.yt_modal_wrap iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 12px;
    display: block;
}
.yt_modal_close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.yt_modal_close::before,
.yt_modal_close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}
.yt_modal_close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.yt_modal_close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
.yt_modal_close:hover::before,
.yt_modal_close:hover::after {
    background: #ccc;
}
