:root {
    --primary-color: #ffcc00;
    --secondary-color: #e60012;
    --bg-color: #f9f9f9;
    --card-bg: #ffffff;
    --text-color: #333333;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    /*color: var(--secondary-color);*/
    margin-bottom: 10px;
}

p.description {
    color: #666;
    font-size: 0.95rem;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

button {
    background-color: white;
    border: 2px solid var(--primary-color);
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

button:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

button.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #333;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 15px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 5px solid var(--primary-color);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
}

.card .name {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #111;
}

.card .details {
    font-size: 0.9rem;
    color: #666;
}

.card .age {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-top: 10px;
}

/* --------------------------------------------------
   アフィリエイトエリア：PC（基本スタイル：横並び）
   -------------------------------------------------- */
.affiliate-box {
    width: 100%;
    display: flex;
    flex-direction: row; /* PCは横並び */
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin-top: 30px;
}

.affiliate-box > div {
    text-align: left;
}


/* --------------------------------------------------
   スマホ・タブレット向けレスポンシブ設定 (768px 以下)
   -------------------------------------------------- */
@media screen and (max-width: 768px) {
    body {
        padding: 15px 10px;
    }

    header {
        margin-bottom: 20px;
    }

    h1 {
        font-size: 1.5rem;
    }

    p.description {
        font-size: 0.85rem;
    }

    .controls {
        gap: 8px;
        margin-bottom: 20px;
    }

    button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .card {
        padding: 15px 12px;
    }

    .card .name {
        font-size: 1.1rem;
    }

    .card .details {
        font-size: 0.85rem;
    }

    .card .age {
        font-size: 1rem;
    }

    /* スマホ時は縦並びに変更 */
    .affiliate-box {
        flex-direction: column !important; /* 縦並びを優先指定 */
        align-items: center !important;
        gap: 15px;
        margin-top: 20px;
    }

    .affiliate-box > div {
        width: 100% !important;
        text-align: center;
    }
}