.homei {
    border-top: 2px solid blue;
    background-color: rgb(255, 255, 255);
    padding: 1%;
}

.homei h2 {
    font-weight: 300;
    text-align: center;
    color: #444444;
}

.homei img {
    width: 33%;
    box-shadow: rgb(0, 131, 197) 3px 5px 5px;
}

@media screen and (max-width: 980px) {
    .homei {
        background-color: white;
        padding: 1%;
    }

    .homei h2 {
        font-weight: 300;
        text-align: center;
        color: #444444;
    }

    .homei img {
        width: 90%;
        box-shadow: rgb(0, 131, 197) 6px 15px 15px;
        margin: 3% 5%;
    }
}

.scroll-container {
    width: 100vw;
    /* height: 100vh; */
    padding: 5% 0%;
    overflow: hidden;
    position: relative;
}

.scroll-wrapper {
    display: flex;
    height: 100%;
    align-items: center;
}

.scroll-inner {
    display: flex;
    gap: 20px;
    padding: 0 20px;
    flex-shrink: 0;
    /* 重要 */
    animation: scroll 40s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.thumbnail {
    width: 380px;
    flex-shrink: 0;
    cursor: pointer;
    /* border-radius: 16px; */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s;
}

.thumbnail:hover {
    transform: scale(1.06);
}

.thumbnail img {
    width: 100%;
    display: block;
}

.thumbnail .title {
    padding: 14px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    font-size: 15px;
    text-align: center;
}

/* 動画オーバーレイ（変更なし） */
.player-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.474);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s;
}

.player-overlay.active {
    opacity: 1;
    visibility: visible;
}

.player-wrapper {
    position: relative;
    width: 92%;
    max-width: 1000px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.player-wrapper video {
    width: 100%;
    display: block;
}

.player-title {
    padding: 20px;
    font-size: 19px;
    background-color: #6a6a6a;
    color: white;
    text-align: center;
}

.close-btn1 {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

@media (max-width:768px) {
    .thumbnail {
        width: 240px;
    }

    .scroll-inner {
        gap: 16px;
    }
}