/* 活動影音：YouTube 播放清單橫向滑動列（電腦版一列3個、行動版單張橫滑不無限拉長） */
.yt-pl-wrap {
    position: relative;
    width: 100%;
    padding: 0 54px;
    box-sizing: border-box;
}
.yt-pl-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 6px 2px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.65) rgba(0,0,0,0.18);
    cursor: grab;
}
.yt-pl-track.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
    user-select: none;
}
.yt-pl-track::-webkit-scrollbar {
    height: 8px;
}
.yt-pl-track::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.18);
    border-radius: 99px;
}
.yt-pl-track::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.75);
    border-radius: 99px;
}
.yt-pl-card {
    flex: 0 0 calc((100% - 40px) / 3);
    scroll-snap-align: start;
    background: rgba(255,255,255,0.94);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
}
.yt-pl-media {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #111;
    overflow: hidden;
    cursor: pointer;
}
.yt-pl-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.yt-pl-media:hover img {
    transform: scale(1.03);
}
.yt-pl-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(220, 20, 20, 0.92);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}
.yt-pl-play::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 53%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #fff;
}
.yt-pl-media:hover .yt-pl-play {
    background: #ff0000;
    transform: translate(-50%, -50%) scale(1.06);
}
.yt-pl-media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.yt-pl-title {
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.45;
    color: #222;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 58px;
    box-sizing: border-box;
}
.yt-pl-btn {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.9);
    background: rgba(0,0,0,0.58);
    color: #fff;
    font-size: 22px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
    padding: 0;
}
.yt-pl-btn:hover {
    background: rgba(0,0,0,0.85);
}
.yt-pl-btn:disabled {
    opacity: 0.3;
    cursor: default;
}
.yt-pl-prev { left: 6px; }
.yt-pl-next { right: 6px; }
.yt-pl-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
    color: #fff;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.45);
    flex-wrap: wrap;
}
.yt-pl-counter {
    background: rgba(0,0,0,0.45);
    padding: 4px 12px;
    border-radius: 99px;
    font-weight: 600;
}
.yt-pl-all-link {
    color: #fff !important;
    background: rgba(204, 0, 0, 0.88);
    padding: 4px 14px;
    border-radius: 99px;
    font-size: 13px;
    text-decoration: none !important;
    transition: background 0.2s ease;
}
.yt-pl-all-link:hover {
    background: #ff0000;
}
.yt-pl-mobile-hint {
    display: none;
    font-size: 12px;
    opacity: 0.92;
}
@media only screen and (max-width: 991px) {
    .yt-pl-wrap {
        padding: 0 44px;
    }
    .yt-pl-card {
        flex: 0 0 calc((100% - 20px) / 2);
    }
}
@media only screen and (max-width: 767px) {
    .yt-pl-wrap {
        padding: 0 6px;
    }
    .yt-pl-track {
        gap: 12px;
        padding: 4px 4px 12px;
    }
    .yt-pl-card {
        flex: 0 0 85%;
    }
    .yt-pl-btn {
        width: 34px;
        height: 34px;
        font-size: 18px;
        line-height: 28px;
        top: 38%;
    }
    .yt-pl-prev { left: 10px; }
    .yt-pl-next { right: 10px; }
    .yt-pl-mobile-hint {
        display: inline;
    }
}
