/* =========================
   共通リセット
========================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #928178;
    color: #fff;
}

    body.no-scroll {
        overflow: hidden;
    }

.wrapper {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    text-align: center;
    font-family: "Kaisei Decol", "Meiryo", sans-serif;
}

/* =========================
   ヘッダー
========================= */

.hero-image {
    width: 100%;
    max-width: 360px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

.site-title {
    font-size: 2rem;
    margin: 0;
    font-weight: 400;
}

    /* タイトル＋アイコン（イラストページ用） */
    .site-title.with-icon {
        display: inline-flex;
        align-items: center;
        gap: 10px;
    }

        .site-title.with-icon img {
            width: 80px;
            height: auto;
        }

.title-line {
    display: block;
    margin: 2px auto 10px;
    max-width: 350px;
    width: 100%;
    height: auto;
}

.site-sub {
    font-size: 1rem;
    margin: 10px 0 40px;
    font-weight: 400;
}

/* =========================
   トップページ：メニュー
========================= */

.menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.menu-item {
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease;
}

    .menu-item img {
        width: 140px;
        height: auto;
        object-fit: contain;
    }

    .menu-item span {
        margin-top: 5px;
        font-size: 1.2rem;
        background: #5a463c;
        padding: 6px 14px;
        border-radius: 10px;
        display: inline-block;
        white-space: nowrap;
        position: relative;
    }

        /* 内側の破線 */
        .menu-item span::after {
            content: "";
            position: absolute;
            inset: 4px;
            border: 1px dashed #fff;
            border-radius: 6px;
            pointer-events: none;
        }

/* PCだけホバー */
@media (hover: hover) and (pointer: fine) {
    .menu-item:hover {
        transform: scale(1.1);
    }
}

/* スマホ時メニュー */
@media (max-width: 480px) {
    .menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px 20px;
    }

    .menu-item img {
        width: 100px;
    }
}

/* =========================
   イラストページ：ギャラリー
========================= */

/* ギャラリーのカテゴリまとまり */
.gallery-section {
    margin-bottom: 40px; /* 次のカテゴリとの間隔 */
}

/* カテゴリ見出し */
.gallery-title {
    font-size: 1.1rem;
    font-weight: 400;
    margin: 30px 0 15px;
    color: #fff;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 16px;
}

    .gallery img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

@media (hover: hover) and (pointer: fine) {
    .gallery img:hover {
        transform: scale(1.08);
        box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    }
}

    /* =========================
   ライトボックス
========================= */

    .lightbox {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 1000;
    }

        .lightbox.active {
            opacity: 1;
            pointer-events: auto;
        }

        .lightbox img {
            max-width: 85%;
            max-height: 85%;
            transform: scale(0.95);
            transition: transform 0.3s ease;
        }

        .lightbox.active img {
            transform: scale(1);
        }

    .close-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 24px;
        background: none;
        border: none;
        color: #fff;
        cursor: pointer;
    }

    /* 矢印 */
    .arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        font-size: 2rem;
        color: #fff;
        background: none;
        border: none;
        cursor: pointer;
        user-select: none;
    }

        .arrow.prev {
            left: 20px;
        }

        .arrow.next {
            right: 20px;
        }


    /* =========================
   更新履歴
========================= */

    .update {
        position: relative;
        margin-bottom: 10px;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .update-bg {
        width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    .update-text {
        position: absolute;
        inset: 0;
        padding: 15px 18px 0px;
        color: #3f312b;
        font-size: 0.9rem;
    }

        .update-text h2 {
            font-size: 1.2rem;
            font-weight: 400;
        }

        .update-text p {
            margin: 4px 0;
            line-height: 1.4;
        }

    .update-list {
    margin-top: 6px;
    overflow-y: auto;
    max-height: 120px;
    }


    /* =========================
   画面上に遷移するボタン
========================= */

    .to-top {
        position: fixed;
        right: 20px;
        bottom: 20px;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: none;
        background: #5a463c;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
        z-index: 1000;
    }

        .to-top.show {
            opacity: 1;
            pointer-events: auto;
            transform: translateY(0);
        }

    /* =========================
   フッター
========================= */

    .footer {
        margin-top: 50px;
        font-size: 0.8rem;
        line-height: 1.2;
    }

/* =========================
   罫線
========================= */

.section-line {
    width: 100%;
    max-width: 400px; /* 好きな長さ */
    height: 1px;
    margin: 30px auto;
    background: rgba(255, 255, 255, 0.6);
}

/* ===== 小説ページ ===== */

.novel-section {
    margin: 40px 0;
    text-align: center;
}

.novel-title {
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-weight: 400;
}

/* 画像＋説明文 */
.novel-header {
    max-width: 420px;
    margin: 0 auto 30px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

    .novel-header img {
        width: 120px;
        height: auto;
        flex-shrink: 0;
    }

.novel-header-text {
    text-align: left;
}

.novel-name {
    font-size: 1rem;
    margin: 0 0 8px;
    font-weight: 400;
}

.novel-header-text p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* 白い下地 */
.novel-card {
    max-width: 420px;
    margin: 0 auto;
    background-image: url("../images/novel/card-bg.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 50px;
    color: #3f312b;
    text-align: left;
    font-family: "Yu Gothic", "游ゴシック", YuGothic, "游ゴシック体";
}

/* リスト */
.novel-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .novel-list li {
        margin-bottom: 8px;
        font-size: 0.95rem;
    }

    .novel-list .chapter {
        margin-top: 15px;
        font-weight: 700;
        font-size: 1.05rem;
    }

    .novel-list .episode {
        padding-left: 10px;
    }

/* ===== スマホ対応 ===== */
@media (max-width: 480px) {
    .novel-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .novel-header-text {
        text-align: left;
    }

    .novel-header img {
        width: 150px;
    }
}
