/* 漫画でわかる!?ヴィンテージウォッチ
   モバイル閲覧が中心のためモバイルファーストで記述し、PCは min-width で上書き */

    html {
        scroll-behavior: smooth;
    }

    .manga {
        display: block;
        width: 100%;
        margin: 0 auto;
        color: #3c3c3c;
        background: #fff;
        font-feature-settings: "palt";
    }

    .manga img {
        display: block;
        width: 100%;
        height: auto;
    }

    /* ヒーロー */
    .manga_hero_title {
        padding: 30px 20px 0;
        text-align: center;
    }

    .manga_hero_title span {
        display: block;
        font-family: "emily-austin", sans-serif;
        font-weight: 400;
        font-size: 18px;
        color: #311403;
    }

    .manga_hero_title h2 {
        margin: 10px auto 20px;
        font-family: "ten-mincho-text", serif;
        font-weight: 400;
        font-size: 26px;
        line-height: 140%;
        color: #311403;
    }

    .manga_hero_title p {
        font-weight: 300;
        font-size: 15px;
        line-height: 180%;
        text-align: left;
    }

    /* 目次カード */
    .manga_mokuzi {
        margin: 40px 20px 0;
    }

    .manga_mokuzi h3,
    .manga_related h3 {
        margin-bottom: 15px;
        font-family: "ten-mincho-text", serif;
        font-weight: 400;
        font-size: 20px;
        text-align: center;
        color: #311403;
    }

    .manga_mokuzi ul {
        display: grid;
        gap: 12px;
    }

    .manga_mokuzi a {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 10px;
        background: #e9e8e6;
        border-left: 4px solid #311403;
        border-radius: 6px;
        color: #311403;
        text-decoration: none;
    }

    .manga_mokuzi_img {
        flex: 0 0 80px;
        height: 80px;
        overflow: hidden;
        border-radius: 4px;
        background: #fff;
    }

    .manga_mokuzi_img img {
        height: 100%;
        object-fit: cover;
        object-position: top;
    }

    .manga_mokuzi_text {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .manga_mokuzi_number {
        font-weight: 600;
        font-size: 12px;
        letter-spacing: .1em;
    }

    .manga_mokuzi_title {
        font-family: "ten-mincho-text", serif;
        font-size: 17px;
        line-height: 140%;
    }

    .manga_mokuzi_page {
        font-weight: 300;
        font-size: 12px;
        color: #6d5a4e;
    }

    /* 話切り替えタブ（スクロール中も上部に固定） */
    .manga_tab {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 50;
        display: flex;
        margin-top: 40px;
        /* 右上固定のメニューボタン（50px）と重ならないよう空ける */
        padding-right: 50px;
        background: #311403;
    }

    .manga_tab a {
        flex: 1;
        padding: 14px 0 13px;
        font-weight: 600;
        font-size: 14px;
        text-align: center;
        color: rgba(255, 255, 255, .6);
        text-decoration: none;
        border-bottom: 3px solid transparent;
        transition: color .2s, border-color .2s;
    }

    .manga_tab a.is-active {
        color: #fff;
        border-bottom-color: #fff;
    }

    /* 各話 */
    .manga_episode {
        padding-top: 30px;
        /* 固定タブの高さ分、アンカー位置をずらす */
        scroll-margin-top: 50px;
    }

    .manga_episode_head {
        padding: 0 20px;
        text-align: center;
        color: #311403;
    }

    .manga_episode_head span {
        display: inline-block;
        padding: 2px 14px;
        font-weight: 600;
        font-size: 13px;
        letter-spacing: .1em;
        color: #fff;
        background: #311403;
        border-radius: 20px;
    }

    .manga_episode_head h3 {
        margin: 10px auto 0;
        font-family: "ten-mincho-text", serif;
        font-weight: 400;
        font-size: 22px;
        line-height: 140%;
    }

    .manga_episode_lead {
        margin: 20px;
        padding: 18px;
        background: #e9e8e6;
        border-radius: 6px;
    }

    .manga_episode_lead p {
        font-weight: 300;
        font-size: 15px;
        line-height: 180%;
    }

    /* 漫画ページ：スマホでは画面幅いっぱいに表示 */
    .manga_episode_pages figure {
        position: relative;
        margin: 0 0 6px;
        background: #f4f4f4;
    }

    .manga_episode_pages figcaption {
        position: absolute;
        right: 8px;
        bottom: 8px;
        padding: 2px 8px;
        font-size: 11px;
        color: #fff;
        background: rgba(49, 20, 3, .6);
        border-radius: 10px;
    }

    .manga_episode_next {
        padding: 25px 20px 40px;
        text-align: center;
    }

    .manga_episode_next_end {
        margin-bottom: 15px;
        font-family: "ten-mincho-text", serif;
        font-size: 18px;
        color: #311403;
    }

    /* ボタン */
    .manga_btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        min-height: 52px;
        padding: 10px 15px;
        font-weight: 600;
        font-size: 15px;
        line-height: 140%;
        color: #fff;
        text-decoration: none;
        background: #311403;
        border: 2px solid #311403;
        border-radius: 30px;
    }

    .manga_btn--sub {
        color: #311403;
        background: #fff;
    }

    /* CTA */
    .manga_cta {
        margin: 0 20px;
        padding: 25px 20px;
        text-align: center;
        background: #e9e8e6;
        border-top: 3px solid #311403;
        border-bottom: 3px solid #311403;
    }

    .manga_cta h3 {
        font-family: "ten-mincho-text", serif;
        font-weight: 400;
        font-size: 18px;
        line-height: 150%;
        color: #311403;
    }

    .manga_cta p {
        margin: 12px 0 20px;
        font-weight: 300;
        font-size: 14px;
        line-height: 170%;
        text-align: left;
    }

    .manga_cta .manga_btn + .manga_btn {
        margin-top: 12px;
    }

    /* 関連コンテンツ */
    .manga_related {
        margin: 50px 20px 80px;
    }

    .manga_related ul {
        border-top: 1px solid #ccc;
    }

    .manga_related a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-height: 52px;
        padding: 12px 5px;
        font-weight: 300;
        font-size: 15px;
        line-height: 150%;
        color: #3c3c3c;
        text-decoration: none;
        border-bottom: 1px solid #ccc;
    }

    .manga_related a i {
        color: #311403;
    }

    @media screen and (min-width:781px) {
        .manga {
            max-width: 900px;
            margin-top: 50px;
        }

        .manga_hero_title {
            padding: 50px 0 0;
        }

        .manga_hero_title span {
            font-size: 24px;
        }

        .manga_hero_title h2 {
            font-size: 38px;
        }

        .manga_hero_title p {
            font-size: 16px;
            text-align: center;
        }

        .manga_mokuzi,
        .manga_episode_lead,
        .manga_cta,
        .manga_related {
            max-width: 720px;
            margin-left: auto;
            margin-right: auto;
        }

        .manga_mokuzi {
            margin-top: 60px;
        }

        .manga_mokuzi ul {
            grid-template-columns: 1fr 1fr;
        }

        .manga_mokuzi a {
            transition: opacity .2s;
        }

        .manga_mokuzi a:hover,
        .manga_btn:hover {
            opacity: .8;
        }

        .manga_tab {
            max-width: 720px;
            margin: 60px auto 0;
        }

        .manga_tab a {
            font-size: 15px;
        }

        .manga_episode {
            padding-top: 50px;
        }

        .manga_episode_head h3 {
            font-size: 30px;
        }

        .manga_episode_lead {
            margin-top: 30px;
            margin-bottom: 30px;
            padding: 25px 30px;
        }

        .manga_episode_lead p {
            font-size: 16px;
        }

        .manga_episode_pages {
            max-width: 720px;
            margin: 0 auto;
        }

        .manga_episode_pages figure {
            margin-bottom: 15px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
        }

        .manga_btn {
            max-width: 420px;
            margin: 0 auto;
            transition: opacity .2s;
        }

        .manga_cta .manga_btn + .manga_btn {
            margin-top: 12px;
        }

        .manga_cta {
            padding: 40px;
        }

        .manga_cta h3 {
            font-size: 22px;
        }

        .manga_cta p {
            text-align: center;
        }

        .manga_related {
            margin-top: 80px;
            margin-bottom: 120px;
        }
    }
