/* --- 全体のリセットとベース設定 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kaisei Decol', serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #ffffff;
    text-align: center;
    padding: 30px 20px;
    border-bottom: 1px solid #e0e0e0;
}

header h1 {
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: 700;
}

.notice {
    font-style: italic;
    font-size: 12px;
    font-weight: 600;
    width: 100%;
    text-align: center;
    padding-bottom: 16px;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* --- メンバーごとのセクション枠 --- */
.member-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    padding: 30px;
    display: flex;
    gap: 30px;
}

#amelie {
    height: 110%;
}

/* --- 左側：プロフィールエリア --- */
.member-profile {
    flex: 0 0 220px;
    text-align: center;
    border-right: 1px solid #eee;
    padding-right: 30px;
}

.member-profile h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2d3748;
    font-weight: 700;
}

.member-profile p {
    font-size: 0.85rem;
    color: #718096;
}

/* --- 右側：おすすめ3つのグリッドエリア --- */
.recommend-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* おすすめアイテム（クリック可能にするためbuttonとしてスタイリング） */
.recommend-item {
    background: #f7fafc;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #edf2f7;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
    width: 100%;
}

.recommend-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.recommend-item h3 {
    font-size: 1rem;
    color: #1a202c;
    font-weight: 500;
}


/* ==========================================
   拡大モーダルのスタイル設定
=========================================== */
.modal {
    border: none;
    background: transparent;
    margin: auto;
    padding: 0;
    max-width: 850px;
    /* 大画像に合わせて少し広げました */
    width: 90%;
    overflow: visible;
}

/* 開いたときのふわっとした背景 */
.modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* 内側のカード白い部分 */
.modal-inner {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 30px 30px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.description {
    font-style: italic;
    display: block;
    margin: 16px
}

/* 閉じるボタン (右上) */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: background 0.2s;
}

.close-btn:hover {
    background: #e2e8f0;
    color: #000;
}

/* モーダル内のレイアウト（画像と文章を横並びに） */
.modal-content {
    display: flex;
    gap: 25px;
}

.modal-text {
    flex: 1;
}

.modal-text h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #1a202c;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 8px;
}

.modal-text p {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.7;
}

/* 背景をクリックして閉じるための仕掛け */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.modal-backdrop button {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    text-indent: -9999px;
    cursor: default;
}


/* ===================================================
   実画像（imgタグ）および仮枠用の共通基本スタイル（PC基準）
=================================================== */

/* 人物画像：PCでは最大120pxの丸型（400x400の画像を綺麗に縮小） */
.member-img,
.member-img-placeholder {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e2e8f0;
    color: #4a5568;
    font-size: 0.9rem;
}

/* おすすめ画像（通常時）：
   1ページに収まるよう、高さを240pxに抑えた綺麗な正方形比率にします */
.recommend-item .item-img,
.item-img-placeholder {
    width: 100%;
    height: 240px;
    /* 400pxから240pxに縮小し、すっきりさせました */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #cbd5e1;
    color: #334155;
    font-weight: bold;
    font-size: 0.9rem;
}




/* おすすめ画像（拡大時）：ここでご指定の 400px * 400px でドカンと見せます */
.modal .item-img,
.modal .modal-img-placeholder {
    flex: 0 0 400px;
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #cbd5e1;
    color: #334155;
    font-weight: bold;
    font-size: 1.1rem;
}


/* --- フッター --- */
footer {
    text-align: center;
    padding: 20px;
    color: #a0aec0;
    font-size: 0.8rem;
}

.sponsored {
    display: flex;
    flex-direction: column;
    /* 縦並びにして中央に寄せる */
    align-items: center;
    /* 横方向の中央寄せ */
    justify-content: center;
    font-style: italic;
    font-size: 14px;
    text-align: center;
    margin: 20px auto;
    /* 上下に余白を作り、横を中央寄せ */
    width: 100%;
}

/* ===================================================
   レスポンシブ対応（スマホなどの画面が狭い時用）
=================================================== */
@media (max-width: 768px) {
    .member-section {
        flex-direction: column;
        padding: 20px;
    }

    .member-profile {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-right: 0;
        padding-bottom: 20px;
    }

    .recommend-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 20px;
    }

    /* 通常時のおすすめ画像：スマホ画面でも程よいサイズ（260px）の正方形を維持 */
    .recommend-item .item-img,
    .item-img-placeholder {
        height: 260px;
    }

    /* モーダルの中身もスマホでは縦並びにする */
    .modal-content {
        flex-direction: column;
        gap: 15px;
    }

    /* 拡大時のおすすめ画像：スマホの横幅いっぱいに合わせて自動縮小（アスペクト比1:1維持） */
    .modal .item-img,
    .modal .modal-img-placeholder {
        flex: none;
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}