body {
    background: #efdec1;
    font-size: 14px;
    font-family: Verdana, sans-serif;
}

.container {
    width: 400px;
    margin: 8px auto;
    background: #fff;
    border-radius: 4px;
    padding: 16px;
    position: relative;
}


#question {
    margin-bottom: 16px;
    font-weight: bold;
}

#choices {
    list-style: none;
    padding: 0;
    margin-bottom: 16px;
}

#choices > li {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

#choices > li:hover {
    background: #f8f8f8;
}

#choices > li.correct {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
    font-weight: bold;
}

#choices > li.correct::after {
    content: ' ... correct!';
}

#choices > li.wrong {
    background: #f8d8da;
    border-color: #f5c6cb;
    color: #721c24;
    font-weight: bold;
}

#choices > li.wrong::after {
    content: ' ... wrong!';
}

#btn, #result > a {
    background: #3498db;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    color: #fff;
    box-shadow: 0 4px 0 #2880b9;
}

#btn.disabled {
    background: #ccc;
    box-shadow: 0 4px 0 #bbb;
    opacity: 0.7;
}

#result {
    position: absolute;
    width: 300px;
    background: #fff;
    padding: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    top: 50px;
    left: 0;
    right: 0;
    margin: 0 auto;
    border-radius: 4px;
    text-align: center;
    transition: 0.4s;
}

#result.hidden {
    transform: translateY(-500px);
}

/* X方向　Y方向　ぼかし　色 */

#resilt > p {
    font-size: 24px;
}

#result > a {
    display: block;
    /* 親要素いっぱいに広がるようにする */
    text-decoration: none;
}

.ad {
    text-align: center;
}

/* --- スライダーのコンテナ --- */
.affiliate-slider {
    width: 100%;
    background: #ffffff;
    border-radius: 4px;
    padding: 10px 0;
    overflow: hidden;
    position: relative;
}

/* スライダーの両端をぼかすエフェクト */
.affiliate-slider::before,
.affiliate-slider::after {
    content: '';
    position: absolute;
    top: 0;
    width: 60px;
    height: 100%;
    z-index: 2;
}
.affiliate-slider::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1) 20%, rgba(255,255,255,0) 100%);
}
.affiliate-slider::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1) 20%, rgba(255,255,255,0) 100%);
}

/* --- スライドを動かすためのトラック --- */
.slide-track {
    display: flex;
    /* 幅: (スライドの数 7個) * (スライドの幅 120px) * 2セット分 */
    width: calc(120px * 14);
    animation: scroll 40s linear infinite;
}

/* マウスを乗せたらアニメーションを一時停止 */
.affiliate-slider:hover .slide-track {
    animation-play-state: paused;
}

/* --- スクロールアニメーションの定義 --- */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        /* 移動距離: (スライドの数 7個) * (スライドの幅 120px) */
        transform: translateX(calc(-120px * 7));
    }
}

/* --- 個々のスライド --- */
.slide {
    width: 120px; /* スライド1個の幅を小さく設定 */
    padding: 8px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.slide a {
    display: block;
    text-decoration: none;
    color: #333;
    text-align: center;
    transition: transform 0.2s ease;
}

.slide a:hover {
    transform: scale(1.05);
}

.slide img {
    width: 100%;
    height: 80px; /* 画像の高さを小さく設定 */
    object-fit: contain;
    margin-bottom: 8px;
}

.product-name {
    font-size: 11px; /* フォントサイズを小さく設定 */
    line-height: 1.3;
    height: 2.6em; /* 2行分の高さを確保 */
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}