/* =============================================
   鹿児島ニュースまとめ — SmartNews風スタイル
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

body {
    font-family: -apple-system, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans',
                 'Noto Sans JP', 'Yu Gothic', sans-serif;
    background: #f0f2f5;
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1.6;
}

/* ==============================
   ヘッダー
============================== */
header {
    background: #c62828;
    color: #fff;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.header-inner {
    max-width: 680px;
    margin: 0 auto;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
header h1 { font-size: 1.2rem; font-weight: 900; line-height: 1; }
header h1 a { color: #fff; }
.site-logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}
.site-logo {
    height: 36px;
    width: auto;
    display: block;
    border-radius: 6px;
}
.site-logo-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1;
}
.site-logo-text .logo-name {
    font-size: 1.05rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: .03em;
}
.site-logo-text .logo-tagline {
    font-size: .65rem;
    color: rgba(255,255,255,.75);
    font-weight: 400;
    letter-spacing: .02em;
    white-space: nowrap;
}
.btn-post {
    background: rgba(255,255,255,.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,.4);
    padding: 5px 12px;
    border-radius: 14px;
    font-size: .78rem;
    font-weight: 700;
}
.btn-post:hover { background: rgba(255,255,255,.35); }

/* ==============================
   カテゴリータブ
============================== */
.category-nav {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 50px;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.category-scroll {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    overflow-x: auto;
    gap: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }
.cat-tab {
    flex-shrink: 0;
    padding: 12px 16px;
    font-size: .82rem;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.cat-tab:hover { color: #c62828; }
.cat-tab.active {
    color: #c62828;
    border-bottom-color: #c62828;
    font-weight: 800;
}

/* ==============================
   メイン
============================== */
main {
    max-width: 680px;
    margin: 0 auto;
    padding: 12px 0 60px;
}

/* ==============================
   ヒーローカード（トップ記事）
============================== */
.hero-card {
    display: block;
    background: #fff;
    margin: 0 12px 8px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.1);
    transition: opacity .2s;
}
.hero-card:hover { opacity: .92; }
.hero-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #ddd;
}
.hero-image img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    top: 10px; left: 10px;
    display: flex; gap: 6px;
}
.hero-source, .hero-cat {
    font-size: .68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
}
.hero-source {
    background: rgba(0,0,0,.6);
    color: #fff;
    backdrop-filter: blur(2px);
}
.hero-cat {
    background: #c62828;
    color: #fff;
}
.hero-body {
    padding: 14px 16px 16px;
}
.hero-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.5;
    margin-bottom: 6px;
    color: #1a1a1a;
}
.hero-date {
    font-size: .72rem;
    color: #aaa;
    margin-bottom: 8px;
}
.hero-excerpt {
    font-size: .82rem;
    color: #555;
    line-height: 1.6;
}

/* ==============================
   ニュースリスト（SmartNews風）
============================== */
.news-list {
    background: #fff;
    margin: 0 12px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
}

.news-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background .15s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: #fafafa; }

/* サムネイル */
.news-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 68px;
    border-radius: 6px;
    overflow: hidden;
    background: #eee;
}
.news-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* テキスト */
.news-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
}
.news-title {
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.45;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.news-source {
    font-size: .68rem;
    color: #c62828;
    font-weight: 700;
    background: #fff0f0;
    padding: 2px 7px;
    border-radius: 9px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.news-date {
    font-size: .68rem;
    color: #aaa;
}

/* ==============================
   画像なしカード（no-image）
============================== */

/* ヒーローカード：画像なし */
.hero-card.no-image {
    display: block;
}
.hero-card.no-image .hero-body {
    padding: 20px 18px 20px;
}
.hero-meta-inline {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.hero-card.no-image .hero-title {
    font-size: 1.1rem;
}

/* ニュースアイテム：画像なし → テキスト幅いっぱい */
.news-item.no-image {
    display: block;
    padding: 14px 16px;
}
.news-item.no-image .news-body {
    width: 100%;
}
.news-item.no-image .news-title {
    -webkit-line-clamp: 2;
    font-size: .9rem;
}

/* ==============================
   ページネーション
============================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 20px 12px 0;
}
.page-btn {
    background: #fff;
    color: #c62828;
    border: 1.5px solid #c62828;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 700;
    transition: background .2s;
    white-space: nowrap;
}
.page-btn:hover { background: #fff0f0; }
.page-info { font-size: .78rem; color: #999; white-space: nowrap; }
.page-current {
    background: #c62828;
    color: #fff;
    border: 1.5px solid #c62828;
    padding: 7px 12px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 900;
}
.page-ellipsis { color: #bbb; font-size: .82rem; padding: 0 2px; }

/* ==============================
   記事詳細
============================== */
.single-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 12px 12px 60px;
}
.single-article {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,.08);
    margin-bottom: 16px;
}
.single-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    background: #ddd;
}
.single-image img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.single-inner { padding: 20px 20px 24px; }
.single-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.single-cat {
    font-size: .7rem;
    font-weight: 700;
    background: #c62828;
    color: #fff;
    padding: 2px 8px;
    border-radius: 9px;
}
.single-source-tag {
    font-size: .7rem;
    font-weight: 700;
    color: #c62828;
    background: #fff0f0;
    padding: 2px 8px;
    border-radius: 9px;
}
.single-meta time { font-size: .75rem; color: #bbb; }
.single-views { font-size: .72rem; color: #aaa; }
.single-title {
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1.55;
    margin-bottom: 16px;
    color: #111;
}
.single-content {
    font-size: .92rem;
    line-height: 1.85;
    color: #444;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    min-height: 40px;
}
/* 概要表示（本文が短い場合） */
.single-content-summary {
    background: #fafafa;
    border-left: 4px solid #c62828;
    border-radius: 0 8px 8px 0;
    padding: 14px 16px 14px 16px;
    margin-bottom: 4px;
}
.summary-label {
    font-size: .72rem;
    font-weight: 700;
    color: #c62828;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 8px;
}
.summary-note {
    font-size: .75rem;
    color: #999;
    margin-top: 10px;
}
.full-text-badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    color: #2e7d32;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.source-link-box {
    padding: 18px 0 4px;
    text-align: center;
}
/* 概要のみの場合は元記事ボタンをより目立たせる */
.source-link-box-prominent {
    padding: 24px 0 8px;
    background: linear-gradient(to bottom, transparent, #fff8f8);
    border-radius: 0 0 8px 8px;
    margin-top: 8px;
}
.source-link-box-prominent .btn-source {
    font-size: 1rem;
    padding: 14px 36px;
    box-shadow: 0 3px 12px rgba(198,40,40,.3);
}
.btn-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #c62828;
    color: #fff;
    font-weight: 700;
    padding: 10px 28px;
    border-radius: 24px;
    font-size: .88rem;
    transition: background .2s, box-shadow .2s;
}
.btn-source:hover { background: #8b0000; box-shadow: 0 4px 14px rgba(139,0,0,.3); }

/* 前後ナビ */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}
.post-nav-item a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #fff;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 1px 5px rgba(0,0,0,.07);
}
.post-nav-item a:hover { background: #fafafa; }
.nav-label { font-size: .68rem; color: #c62828; font-weight: 700; }
.nav-title  { font-size: .78rem; color: #555; line-height: 1.4; }
.post-nav-item.next a { text-align: right; }
.back-link a { font-size: .82rem; color: #c62828; font-weight: 700; }
.back-link a:hover { text-decoration: underline; }

/* ==============================
   投稿フォーム
============================== */
.form-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 12px 12px 60px;
}
.form-container {
    background: #fff;
    border-radius: 10px;
    padding: 28px 24px;
    box-shadow: 0 1px 8px rgba(0,0,0,.08);
}
.form-container h2 {
    font-size: 1.1rem;
    font-weight: 900;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid #c62828;
}
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 6px;
}
.required { color: #c62828; }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #ddd;
    border-radius: 7px;
    font-size: .92rem;
    font-family: inherit;
    background: #fafafa;
    transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #c62828;
    background: #fff;
}
.form-group textarea { resize: vertical; min-height: 140px; }
.btn-submit {
    display: block;
    width: 100%;
    background: #c62828;
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    padding: 12px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: background .2s;
}
.btn-submit:hover { background: #8b0000; }

/* ==============================
   フッター
============================== */
footer {
    text-align: center;
    padding: 20px 16px;
    font-size: .75rem;
    color: #bbb;
    background: #fff;
    border-top: 1px solid #eee;
}

/* ==============================
   注目ニュース
============================== */
.hot-section {
    max-width: 680px;
    margin: 0 auto 8px;
    padding: 12px 12px 6px;
    background: #fff;
    border-bottom: 2px solid #f0f0f0;
}
.hot-heading {
    font-size: .82rem;
    font-weight: 900;
    color: #c62828;
    letter-spacing: .04em;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #c62828;
    display: inline-block;
}
.hot-list { display: flex; flex-direction: column; gap: 0; }
.hot-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f4f4f4;
    transition: background .15s;
}
.hot-item:last-child { border-bottom: none; }
.hot-item:hover { background: #fef6f6; border-radius: 6px; padding-left: 4px; }
.hot-rank {
    min-width: 22px;
    height: 22px;
    background: #c62828;
    color: #fff;
    font-size: .72rem;
    font-weight: 900;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hot-item:nth-child(1) .hot-rank { background: #c62828; }
.hot-item:nth-child(2) .hot-rank { background: #e64a19; }
.hot-item:nth-child(3) .hot-rank { background: #f57c00; }
.hot-thumb {
    width: 60px;
    height: 46px;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
}
.hot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hot-body { flex: 1; min-width: 0; }
.hot-title {
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #1a1a1a;
}
.hot-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
.hot-cat {
    font-size: .68rem;
    color: #c62828;
    font-weight: 700;
    background: #ffeaea;
    padding: 1px 6px;
    border-radius: 3px;
}
.hot-views {
    font-size: .68rem;
    color: #aaa;
}

/* ==============================
   その他
============================== */
.no-posts {
    text-align: center;
    color: #bbb;
    padding: 60px 20px;
}

/* ==============================
   PC：2カラムレイアウト（960px以上）
============================== */

/* PC用サイドバーはモバイルでは非表示 */
.pc-sidebar { display: none; }

@media (min-width: 960px) {

    /* ヘッダー・ナビ幅を広げる */
    .header-inner,
    .category-scroll { max-width: 1240px; }

    /* 2カラムグリッド */
    .page-layout {
        max-width: 1240px;
        margin: 0 auto;
        padding: 20px 24px 60px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 288px;
        gap: 24px;
        align-items: start;
    }

    /* single.phpは記事本文を少し広めに */
    .single-layout {
        grid-template-columns: minmax(0, 1fr) 272px;
    }

    /* main / single-wrap の既存余白をリセット */
    main {
        max-width: none;
        padding: 0;
        margin: 0;
    }
    .single-wrap {
        max-width: none;
        padding: 0;
    }

    /* カードの外マージンをなくす（page-layoutがpadding持つため） */
    .hero-card  { margin: 0 0 10px; }
    .news-list  { margin: 0; }
    .hot-section { max-width: none; margin: 0 0 10px; }
    .pagination { margin: 16px 0 0; }

    /* ヒーロー画像を少し大きく */
    .hero-image { height: 300px; }

    /* モバイル専用の注目セクションをPC上で非表示 */
    .sp-only { display: none; }

    /* ===== サイドバー ===== */
    .pc-sidebar {
        display: block;
        position: sticky;
        top: 110px; /* ヘッダー50px + ナビ約44px + 余白 */
        max-height: calc(100vh - 130px);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #ddd transparent;
    }
    .pc-sidebar::-webkit-scrollbar { width: 4px; }
    .pc-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

    .sidebar-widget {
        background: #fff;
        border-radius: 10px;
        padding: 16px;
        margin-bottom: 14px;
        box-shadow: 0 1px 6px rgba(0,0,0,.08);
    }
    .sidebar-widget-title {
        font-size: .78rem;
        font-weight: 900;
        color: #c62828;
        letter-spacing: .04em;
        border-bottom: 2px solid #c62828;
        padding-bottom: 7px;
        margin-bottom: 12px;
        display: block;
    }

    /* 注目ニュース */
    .sidebar-hot-list { display: flex; flex-direction: column; gap: 0; }
    .sidebar-hot-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 0;
        border-bottom: 1px solid #f4f4f4;
        transition: background .15s;
    }
    .sidebar-hot-item:last-child { border-bottom: none; }
    .sidebar-hot-item:hover { background: #fef6f6; border-radius: 6px; padding-left: 4px; }
    .sidebar-rank {
        min-width: 20px; height: 20px;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        font-size: .68rem; font-weight: 900; color: #fff; flex-shrink: 0;
    }
    .sidebar-rank.rank-1 { background: #c62828; }
    .sidebar-rank.rank-2 { background: #e64a19; }
    .sidebar-rank.rank-3 { background: #f57c00; }
    .sidebar-rank.rank-4, .sidebar-rank.rank-5 { background: #9e9e9e; }
    .sidebar-thumb {
        width: 52px; height: 40px; border-radius: 5px; overflow: hidden; flex-shrink: 0;
    }
    .sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; }
    .sidebar-hot-body { flex: 1; min-width: 0; }
    .sidebar-hot-title {
        font-size: .78rem; font-weight: 700; line-height: 1.35; color: #1a1a1a;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .sidebar-hot-meta { font-size: .66rem; color: #aaa; }

    /* カテゴリ */
    .sidebar-cat-list { display: flex; flex-direction: column; gap: 1px; }
    .sidebar-cat-item {
        display: flex; justify-content: space-between; align-items: center;
        padding: 7px 8px; border-radius: 6px; font-size: .8rem;
        color: #555; transition: background .15s;
    }
    .sidebar-cat-item:hover { background: #fff0f0; color: #c62828; }
    .sidebar-cat-item.active { background: #c62828; color: #fff; font-weight: 700; }
    .sidebar-cat-cnt {
        font-size: .7rem; color: #bbb; font-weight: 600;
        background: #f4f4f4; padding: 1px 6px; border-radius: 8px;
    }
    .sidebar-cat-item.active .sidebar-cat-cnt { background: rgba(255,255,255,.25); color: #fff; }

    /* メディア */
    .sidebar-media-list { display: flex; flex-direction: column; gap: 1px; }
    .sidebar-media-item {
        display: flex; justify-content: space-between; align-items: center;
        padding: 5px 4px; font-size: .76rem; color: #555;
        border-bottom: 1px solid #f8f8f8;
    }
    .sidebar-media-item:last-child { border-bottom: none; }
    .sidebar-media-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .sidebar-media-cnt { font-size: .7rem; color: #bbb; margin-left: 6px; flex-shrink: 0; }

    /* 関連記事・最新記事 */
    .sidebar-rel-list { display: flex; flex-direction: column; gap: 0; }
    .sidebar-rel-item {
        display: flex; gap: 8px; align-items: flex-start;
        padding: 9px 0; border-bottom: 1px solid #f4f4f4; transition: background .15s;
    }
    .sidebar-rel-item:last-child { border-bottom: none; }
    .sidebar-rel-item:hover { background: #fafafa; border-radius: 6px; padding-left: 4px; }
    .sidebar-rel-item.no-thumb { align-items: center; }
    .sidebar-rel-thumb { width: 52px; height: 40px; border-radius: 5px; overflow: hidden; flex-shrink: 0; }
    .sidebar-rel-thumb img { width: 100%; height: 100%; object-fit: cover; }
    .sidebar-rel-body { flex: 1; min-width: 0; }
    .sidebar-rel-title {
        font-size: .78rem; font-weight: 700; line-height: 1.35; color: #1a1a1a;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        margin-bottom: 3px;
    }
    .sidebar-rel-meta { font-size: .66rem; color: #aaa; display: flex; gap: 5px; align-items: center; }
    .sidebar-rel-cat {
        background: #fff0f0; color: #c62828; font-weight: 700;
        padding: 1px 5px; border-radius: 4px;
    }

    /* サイト情報 */
    .sidebar-info { font-size: .75rem; color: #999; line-height: 1.7; }

    /* single.phpの本文は少し余裕を */
    .single-inner { padding: 24px 28px 28px; }
    .single-title { font-size: 1.3rem; }
    .single-content { font-size: .95rem; }

    /* btn-back をヘッダーに馴染ませる */
    .btn-back {
        color: rgba(255,255,255,.85);
        font-size: .8rem;
        padding: 4px 10px;
        border: 1px solid rgba(255,255,255,.35);
        border-radius: 12px;
    }
    .btn-back:hover { background: rgba(255,255,255,.15); }
}

/* ==============================
   ヘッダー検索バー
============================== */
.header-search {
    display: flex;
    align-items: stretch;
}
.search-input {
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.35);
    border-right: none;
    border-radius: 16px 0 0 16px;
    color: #fff;
    padding: 0 12px;
    font-size: .8rem;
    height: 32px;
    width: 140px;
    outline: none;
    transition: background .2s, width .2s;
    box-sizing: border-box;
}
.search-input::placeholder { color: rgba(255,255,255,.65); }
.search-input:focus { background: rgba(255,255,255,.28); width: 180px; }
.search-btn {
    background: rgba(255,255,255,.28);
    border: 1px solid rgba(255,255,255,.35);
    border-left: none;
    border-radius: 0 16px 16px 0;
    color: #fff;
    height: 32px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s;
    box-sizing: border-box;
    flex-shrink: 0;
}
.search-btn svg { display: block; }
.search-btn:hover { background: rgba(255,255,255,.4); }

/* ==============================
   検索結果ヘッダー
============================== */
.search-result-header {
    background: #fff8f0;
    border: 1px solid #f5c78a;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: .85rem;
    color: #7c4a00;
    margin: 12px 12px 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.search-clear {
    margin-left: auto;
    background: #f5c78a;
    color: #7c4a00;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: .76rem;
    font-weight: 700;
}
.search-clear:hover { background: #e8a84a; }

/* ==============================
   スマホ向け調整
============================== */
@media (max-width: 480px) {
    .hero-image { height: 180px; }
    .news-thumb { width: 80px; height: 60px; }
    .news-title { font-size: .85rem; -webkit-line-clamp: 2; }
    .hero-title { font-size: .95rem; }
    .single-title { font-size: 1.05rem; }
    .single-inner { padding: 16px; }
    .search-input { width: 100px; }
    .search-input:focus { width: 130px; }
}

/* ==============================
   AIまとめカード
============================== */
/* AIまとめカード */
.ai-summary-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.07);
    margin-bottom: 20px;
    overflow: hidden;
    border-top: 3px solid;
    border-image: linear-gradient(90deg, #c62828 0%, #ef6c00 100%) 1;
}

/* トグルボタン（常に表示） */
.ai-summary-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    gap: 10px;
    text-align: left;
}
.ai-summary-toggle:hover { background: #fafafa; }

.ai-summary-toggle-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.ai-summary-toggle-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ai-badge {
    display: inline-block;
    background: linear-gradient(90deg, #c62828, #ef6c00);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .04em;
    flex-shrink: 0;
}

.ai-summary-title-inline {
    font-size: .9rem;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-date { font-size: .74rem; color: #aaa; }

.ai-chevron {
    font-size: .7rem;
    color: #aaa;
    transition: transform .25s ease;
    display: inline-block;
}

/* 折りたたみ部分 */
.ai-summary-body-wrap {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .35s ease, opacity .25s ease;
}

.ai-summary-body {
    font-size: .92rem;
    color: #2d2d2d;
    line-height: 1.9;
    padding: 4px 18px 14px;
}

.ai-summary-sources {
    border-top: 1px solid #f0f0f0;
    padding: 10px 18px 12px;
    background: #fafafa;
}

.ai-sources-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 6px;
}

.ai-sources-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.ai-sources-list li {
    font-size: .76rem;
    color: #555;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.ai-source-media {
    display: inline-block;
    background: #ffe0e0;
    color: #c62828;
    font-size: .68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ai-source-title {
    color: #666;
    font-size: .75rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 220px;
}

.ai-summary-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 6px 18px 10px;
    font-size: .72rem;
    color: #aaa;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

@media (min-width: 960px) {
    .ai-summary-card {
        margin-bottom: 24px;
    }
    .ai-summary-title {
        font-size: 1.1rem;
    }
    .ai-summary-body {
        font-size: .94rem;
    }
    .ai-source-title {
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .ai-summary-card {
        border-radius: 8px;
        margin-bottom: 14px;
    }
    .ai-summary-header { padding: 10px 14px 6px; }
    .ai-summary-title  { padding: 0 14px 8px; font-size: .96rem; }
    .ai-summary-body   { padding: 0 14px 12px; font-size: .88rem; }
    .ai-summary-sources { padding: 8px 14px 10px; }
    .ai-summary-footer  { padding: 5px 14px 8px; }
    .ai-source-title { max-width: 160px; }
}
