/* ============================================================
   投稿詳細ページ（single.php）共通スタイル
   本文中で使い回すパーツを置く。読み込みは is_single() のときだけ。
   色・フォントのトークン（--shu / --muted など）は _shared.css で定義済み。
   ============================================================ */

/* ============ 参考にした情報（出典リスト） ============ */
/* 本文の一部ではなく補足資料だと一目で分かるよう、カード状に囲んで背景色を変える */
.post-sources {
    margin: 3em 0 0;
    padding: 26px 30px;
    background: var(--kami2);
    border: 1px solid var(--line);
    border-radius: 14px;
}

/* 本文h2の明朝・大サイズ・左ボーダーを打ち消し、補足情報らしい控えめな見出しにする */
.post-body .post-sources__ttl {
    font-family: var(--ff-body);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1.6;
    color: var(--muted);
    margin: 0 0 14px;
    padding: 0;
    border-left: 0;
}

.post-sources__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 区切り線で件数を数えやすくするため、本文リストの下余白は使わない */
.post-body .post-sources__item {
    margin-bottom: 0;
    border-top: 1px dashed var(--line);
}

.post-body .post-sources__item:first-child {
    border-top: 0;
}

/* 行全体をタップ領域にしてスマホで押しやすくする */
.post-body .post-sources__link {
    display: block;
    padding: 13px 0;
    font-size: 14.5px;
    line-height: 1.7;
    font-weight: 700;
    color: var(--shu);
    text-decoration: none;
}

.post-body .post-sources__link:hover {
    text-decoration: underline;
}

/* 外部サイトへ移動することを示す */
.post-sources__name::after {
    content: '\2197';
    margin-left: .4em;
    font-size: .9em;
    color: var(--muted);
}

/* 出典元のサイト名。リンク文字列と混ざらないよう小さく淡く添える */
.post-sources__site {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--muted);
}

@media(max-width:680px) {
    .post-sources {
        padding: 22px 20px;
    }
}

/* 狭い画面では複数画像ギャラリーを横スライダー化して、画像を1枚ずつ見やすくする */
.post-gallery-dots {
    display: none;
}

@media (max-width: 900px) {
    .post-body .wp-block-gallery.has-nested-images {
        display: flex;
        flex-wrap: nowrap;
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 0 8px;
        margin: 0 0 1.8em;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .post-body .wp-block-gallery.has-nested-images .wp-block-image {
        flex: 0 0 min(82vw, 420px);
        margin: 0;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .post-body .wp-block-gallery.has-nested-images .wp-block-image img {
        width: 100%;
    }

    .post-gallery-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin: -0.9em 0 1.8em;
    }

    .post-gallery-dots__dot {
        width: 8px;
        height: 8px;
        border: none;
        border-radius: 50%;
        padding: 0;
        background: color-mix(in srgb, var(--muted) 44%, #ffffff);
        cursor: pointer;
        transition: transform .2s ease, background-color .2s ease;
    }

    .post-gallery-dots__dot.is-active {
        transform: scale(1.35);
        background: var(--shu);
    }
}


.wp-block-image {
    width: fit-content;
    margin-inline: auto;
}
