/*
 * 投稿レイアウト専用CSS v1.1.4
 * 対象: 「最新配信情報」カテゴリーの通常投稿のみ。
 * Cocoonのentry-content/article構造は変更せず、ランキングプラグインが出力する
 * .konya-movie-global-layout の内部だけをレイアウトする。
 */


/* 記事全体の横幅を、作品ページと同じ広めのレイアウトに合わせる */
body.single-post:has(.konya-movie-global-layout) .content-in {
    width: min(1400px, calc(100% - 40px)) !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

body.single-post:has(.konya-movie-global-layout) .content,
body.single-post:has(.konya-movie-global-layout) .main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

body.single-post:has(.konya-movie-global-layout) .main .article {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 投稿の外枠はCocoon標準の構造を維持 */
body.single-post .main .article,
body.single-post .main .article > .entry-content {
    display: block;
    min-width: 0;
    box-sizing: border-box;
}

body.single-post .main .article > .entry-content {
    width: 100%;
    max-width: 100%;
}

/* ランキングプラグインが本文とランキングを包む外枠 */
body.single-post .main .article .konya-movie-global-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: start;
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    box-sizing: border-box;
}

body.single-post .main .article .konya-movie-global-main {
    display: block;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

body.single-post .main .article .konya-movie-global-sidebar {
    display: block;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: static;
}

/* タイトル・日付・タグはCocoon標準の流れを維持 */
body.single-post .main .article .entry-title {
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    line-height: 1.4;
}

body.single-post .main .article .date-tags {
    width: 100%;
    max-width: 100%;
    text-align: left;
    box-sizing: border-box;
}

body.single-post .main .article .date-tags .post-date,
body.single-post .main .article .date-tags .post-update,
body.single-post .main .article .date-tags .post-author,
body.single-post .main .article .date-tags .tag-link {
    display: inline-block;
    margin: 0 8px 6px 0;
    vertical-align: middle;
}

/* Cocoonのシェアボタンは折り返し可能にし、重なりを防ぐ */
body.single-post .sns-share,
body.single-post .sns-follow {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

body.single-post .sns-share-buttons,
body.single-post .sns-follow-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

body.single-post .sns-share-buttons a,
body.single-post .sns-follow-buttons a {
    box-sizing: border-box;
    max-width: 100%;
}

/* Cocoonの関連記事エリアは本文・ランキングの下で全幅表示 */
body.single-post .related-entry,
body.single-post .related-entries,
body.single-post .under-entry-content,
body.single-post .pager-post-navi {
    clear: both;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    body.single-post:has(.konya-movie-global-layout) .content-in {
        width: calc(100% - 28px) !important;
    }
    body.single-post .main .article .konya-movie-global-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    body.single-post .main .article .konya-movie-global-sidebar {
        margin-top: 0;
        position: static;
    }
}

@media (max-width: 600px) {
    body.single-post .content-in {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    body.single-post .main .article .entry-title {
        font-size: clamp(24px, 5vw, 30px);
    }

    body.single-post .sns-share-buttons,
    body.single-post .sns-follow-buttons {
        gap: 6px;
    }
}
