body{

    margin:0;
    background:#000;
    color:white;
    font-family:"Yu Mincho",serif;

}

html{

    scroll-behavior:smooth;

}

/* ===========================
   背景
=========================== */

.background{

    position:fixed;

    top:0;
    left:0;

    width:100%;
    height:100svh;

    background:url("images/background.jpg") center center / cover no-repeat;

    filter:brightness(.33);

    z-index:-1;

}

/* ===========================
   全体
=========================== */

.container{

    width:92%;
    max-width:1200px;

    margin:auto;

    padding:70px 0 100px;

    text-align:center;

    position:relative;

}

/* ===========================
   TOPボタン
=========================== */

/* 左上TOPボタン */

.top-button{

    position:absolute;

    top:40px;
    left:40px;

    padding:10px 24px;

    border:1px solid rgba(255,255,255,.25);
    border-radius:30px;

    color:#fff;
    text-decoration:none;

    transition:.35s;

}

.top-button:hover{

    color:#ffd8ea;
    border-color:#ffd8ea;

    box-shadow:0 0 18px rgba(255,180,220,.25);

}

.top-button:hover{

    color:#ffd7e6;

}

/* ===========================
   タイトル
=========================== */

h1{

    margin:0;

    font-size:60px;

    font-weight:normal;

    letter-spacing:.35em;

}

.subtitle{

    margin:-15px 0 25px;

    font-size:18px;

    color:rgba(255,255,255,.65);

    letter-spacing:.2em;

}

/* 飾り
=========================== */

.title-decoration{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:20px;

    margin-bottom:70px;

}

.title-decoration::before,
.title-decoration::after{

    content:"";

    width:400px;

    height:1px;

    background:rgba(255,255,255,.25);

}

.title-decoration span{

    color:white;

    font-size:22px;

}

/* ===========================
   キャラクター一覧
=========================== */

.character-grid{

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:80px 110px;

    justify-items:center;

    max-width:850px;

    margin:0 auto;

}

/* サブキャラ */

.character-grid.sub{

    grid-template-columns:repeat(4,1fr);

    max-width:960px;

    gap:65px 40px;

}

/* ===========================
   カード
=========================== */

.card{

    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:flex-start;

    text-decoration:none;

    color:white;

    transition:.35s;

}

/* アイコン */

.card img{

    width:125px;

    height:125px;

    object-fit:cover;

    border-radius:50%;

    border:2px solid rgba(255,255,255,.18);

    transition:.35s;

}

/* 名前（常時表示） */

.name{

    margin-top:8px;

    width:220px;

    text-align:center;

    white-space:nowrap;

    font-size:18px;

    letter-spacing:.08em;

    opacity:1;

    transform:none;

    transition:.35s;

    text-shadow:
        0 0 8px currentColor,
        0 0 16px rgba(255,255,255,.15);

}

/* ===========================
   ホバー
=========================== */

.card:hover{

    transform:translateY(-8px);

}

.card:hover img{

    transform:scale(1.08);

    border-color:#ffd8ea;

    box-shadow:0 0 30px rgba(255,180,220,.45);

}

.card:hover .name{

    transform:translateY(-4px);

}
/* ===========================
   キャラクターカラー
=========================== */

/* 宮上めぐみ */
.megumi .name{
    color:#f5b1aa;
}
.megumi:hover img{
    border-color:#f5b1aa;
    box-shadow:0 0 35px rgba(245,177,170,.75);
}

/* 篠原旭 */
.asahi .name{
    color:#78adfb;
}
.asahi:hover img{
    border-color:#4A7FD1;
    box-shadow:0 0 35px rgba(74,127,209,.9);
}

/* 江良冬真 */
.toma .name{
    color:#68be8d;
}
.toma:hover img{
    border-color:#68be8d;
    box-shadow:0 0 35px rgba(104,190,141,.8);
}

/* 江良俊彦 */
.toshihiko .name{
    color:#85b9e6;
}
.toshihiko:hover img{
    border-color:#44617B;
    box-shadow:0 0 35px rgba(121,170,213,.85);
}

/* 黑芳 */
.feifan .name{
    color:#f1d0d0;
}
.feifan:hover img{
    border-color:#432f2f;
    box-shadow:0 0 35px rgba(212,156,156,.95);
}

/* ヴァル・ディラン */
.deirann .name{
    color:#d66a35;
}
.deirann:hover img{
    border-color:#d66a35;
    box-shadow:0 0 35px rgba(214,106,53,.85);
}

/* 関口新菜 */
.niina .name{
    color:#fcd575;
}
.niina:hover img{
    border-color:#fcd575;
    box-shadow:0 0 35px rgba(252,213,117,.9);
}

/* 狐炎 */
.huyen .name{
    color:#e8eaa8;
}
.huyen:hover img{
    border-color:#e8eaa8;
    box-shadow:0 0 35px rgba(232,234,168,.9);
}

/* 三森すみれ */
.sumire .name{
    color:#ba55ab;
}
.sumire:hover img{
    border-color:#843779;
    box-shadow:0 0 35px rgba(233,105,214,.85);
}

/* 麗紅 */
.rihonn .name{
    color:#df154b;
}
.rihonn:hover img{
    border-color:#AD002D;
    box-shadow:0 0 35px rgba(173,0,45,.9);
}

/* ===========================
   区切り線
=========================== */

.divider{

    width:80%;

    height:1px;

    margin:70px auto;

    background:linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.20),
        transparent
    );

}

/* ===========================
   相関図
=========================== */

#relationship{

    margin-top:60px;

}

#relationship h2{

    font-size:34px;

    font-weight:normal;

    letter-spacing:.15em;

}

.section-text{

    margin:20px auto 35px;

    line-height:2;

    color:rgba(255,255,255,.82);

}

.relationship-image{

    width:100%;

    max-width:900px;

    border:1px solid rgba(255,255,255,.2);

    cursor:pointer;

    transition:.35s;

}

.relationship-image:hover{

    transform:scale(1.01);

}

.relationship-note{

    margin-top:18px;

    color:rgba(255,255,255,.6);

}
/* ===========================
   モーダル
=========================== */

#imageModal{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.88);

    display:none;

    justify-content:center;

    align-items:center;

    z-index:9999;

    padding:30px;

}

#modalImage{

    max-width:95%;

    max-height:92vh;

    display:block;

}

#closeModal{

    position:fixed;

    top:90px;
    right:20px;

    width:52px;
    height:52px;

    display:flex;
    justify-content:center;
    align-items:center;

    font-size:32px;

    color:#fff;

    background:rgba(0,0,0,.45);

    border:1px solid rgba(255,255,255,.25);
    border-radius:50%;

    backdrop-filter:blur(8px);

    cursor:pointer;

    z-index:10001;

    transition:.35s;

}

#closeModal:hover{

    color:#ffd8ea;

    border-color:#ffd8ea;

    background:rgba(255,210,230,.12);

    box-shadow:0 0 18px rgba(255,180,220,.25);

    transform:scale(1.08);

}

#closeModal:hover{

    color:#ffd7e6;

}

/* ===========================
   下部TOPボタン
=========================== */

.back{

    display:inline-block;

    margin-top:50px;

    padding:12px 34px;

    border:1px solid rgba(255,255,255,.25);

    border-radius:30px;

    color:white;

    text-decoration:none;

    transition:.35s;

}

.back:hover{

    color:#ffd8ea;

    border-color:#ffd8ea;

    box-shadow:0 0 20px rgba(255,180,220,.3);

}

.back:hover{

    color:#ffd7e6;

}

/* ===========================
   スマホ
=========================== */

@media (max-width:768px){

    .container{

        width:94%;

        padding:40px 0 70px;

    }


    h1{

        font-size:42px;

        letter-spacing:.2em;

    }

    .subtitle{

        font-size:15px;

        margin:-10px 0 20px;

    }

    .title-decoration{

        margin-bottom:40px;

    }

    .title-decoration::before,
    .title-decoration::after{

        width:120px;

    }
    .top-button{
    display:none;
}

    /* メインキャラ */

    .character-grid{

        grid-template-columns:repeat(2,1fr);

        gap:28px 18px;

    }

    /* サブキャラ */

    .character-grid.sub{

        grid-template-columns:repeat(2,1fr);

        gap:28px 18px;

    }

    .card img{

        width:110px;

        height:110px;

    }

    .name{

        width:100%;

        margin-top:8px;

        font-size:15px;

        line-height:1.5;

        white-space:normal;

    }

    /* ←ここが今回の変更 */

    .divider{

        width:90%;

        margin:28px auto;

    }

    #relationship{

        margin-top:35px;

    }

    #relationship h2{

        font-size:26px;

    }

    .section-text{

        margin:18px auto 28px;

        line-height:1.9;

    }

    .relationship-image{

        width:100%;

        height:auto;

    }

    .relationship-note{

        font-size:13px;

    }

    #modalImage{

        max-width:98%;

        max-height:88vh;

    }

    .back{

        margin-top:55px;

    }

}