/* ========================================
   ベース・リセット
   ======================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
    background: #e8e8e8;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a { color: #c00; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========================================
   ヘッダー
   ======================================== */
.site-header {
    background: #c00;
    color: #fff;
    border-bottom: 3px solid #900;
}
.header-inner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.site-logo-link {
    display: block;
    line-height: 0;
}
.site-logo-link:hover { opacity: 0.9; }
.site-logo {
    height: 48px;
    width: 91px;
}
.site-subtitle {
    font-size: 11px;
    opacity: 0.85;
}

/* ========================================
   ナビゲーション
   ======================================== */
.site-nav {
    background: #333;
    border-bottom: 1px solid #555;
}
.nav-inner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    gap: 0;
}
.nav-inner a {
    color: #ddd;
    text-decoration: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: bold;
    transition: background 0.2s;
}
.nav-inner a:hover {
    background: #555;
    color: #fff;
    text-decoration: none;
}
.nav-inner a.active {
    background: #c00;
    color: #fff;
}

/* ========================================
   メインコンテナ
   ======================================== */
.site-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    gap: 16px;
}
.main-content {
    flex: 1;
    min-width: 0;
}
.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* ========================================
   サイドバー
   ======================================== */
.sidebar-box {
    background: #fff;
    margin-bottom: 16px;
    border: 1px solid #ddd;
}
.sidebar-box-title {
    background: #c00;
    color: #fff;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: bold;
}
.sidebar-box-body {
    padding: 0 12px;
}
.sidebar-box-body p {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    padding: 12px 0;
}
.sidebar-article-list {
    list-style: none;
}
.sidebar-article-list li {
    border-bottom: 1px dotted #ddd;
    padding: 8px 0;
}
.sidebar-article-list li:last-child { border-bottom: none; }
.sidebar-article-list li a {
    font-size: 12px;
    color: #333;
    line-height: 1.5;
    display: block;
}
.sidebar-article-list li a:hover { color: #c00; }
.sidebar-article-list .article-date {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* ========================================
   フッター
   ======================================== */
.site-footer {
    background: #333;
    color: #aaa;
    margin-top: auto;
    border-top: 3px solid #c00;
}
.footer-inner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px;
}
.footer-links {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.footer-links a { color: #ccc; font-size: 13px; }
.footer-links a:hover { color: #fff; }
.footer-copy {
    font-size: 12px;
    color: #777;
    border-top: 1px solid #555;
    padding-top: 16px;
}

/* ========================================
   ページネーション
   ======================================== */
.pagination-wrap {
    text-align: center;
    padding: 16px 0;
}
.pagination-wrap .page-link-item {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    font-size: 13px;
    text-decoration: none;
}
.pagination-wrap .page-link-item:hover { background: #f0f0f0; text-decoration: none; }
.pagination-wrap .page-link-item.active {
    background: #c00;
    color: #fff;
    border-color: #c00;
}

/* ========================================
   ページボックス（共通ページ用）
   ======================================== */
.page-box { background: #fff; border: 1px solid #ddd; }
.page-box-header { background: #c00; color: #fff; padding: 8px 12px; font-size: 14px; font-weight: bold; }
.page-box-body { padding: 24px; }
.page-box-body h2 { font-size: 16px; margin: 24px 0 12px; padding-bottom: 8px; border-bottom: 1px solid #ddd; color: #333; }
.page-box-body h2:first-child { margin-top: 0; }
.page-box-body p { font-size: 14px; line-height: 1.8; margin-bottom: 12px; color: #555; }
.page-box-body ul { margin: 8px 0 12px 24px; font-size: 14px; line-height: 1.8; color: #555; }
.caution { background: #fff5f5; border: 1px solid #fcc; padding: 16px; margin-top: 16px; font-size: 13px; color: #900; line-height: 1.8; }

/* ========================================
   記事カード（一覧ページ）
   ======================================== */
.article-card {
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 12px;
}
.article-card:hover { border-color: #ccc; }
.article-card-body { padding: 16px; }
.article-card-title {
    font-size: 16px; font-weight: bold; line-height: 1.5;
    margin-bottom: 8px;
}
.article-card-title a { color: #333; }
.article-card-title a:hover { color: #c00; text-decoration: none; }
.article-card-meta {
    font-size: 11px; color: #999;
    display: flex; gap: 12px; align-items: center;
    padding-bottom: 10px; margin-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.article-card-meta .res-count {
    background: #f0f0f0; padding: 1px 8px;
    font-size: 11px; color: #666;
}
.article-card-preview .news-thumbnail {
    margin: 8px 0;
}
.article-card-preview .news-thumbnail img {
    max-width: 100%; height: auto; border: 1px solid #ddd;
}
.article-card-preview {
    background: none; border: none;
}
.article-card-preview .res {
    background: #fff; padding: 0;
    font-size: 14px; line-height: 1.6;
}
.article-card-preview .res-header {
    font-size: 12px; color: #888; margin-bottom: 4px;
}
.article-card-preview .res-header .res-number { color: #333; font-weight: bold; }
.article-card-preview .res-header .res-name { color: #080; font-weight: bold; }
.article-card-preview .res-body { word-break: break-word; }
.article-card-preview .res-body .news-box {
    background: #f5f5f5; border: 1px solid #e0e0e0;
    padding: 12px 16px; border-radius: 4px;
}
.article-card-preview .res-body .news-source {
    text-align: right; font-size: 12px; color: #888; margin-top: 4px;
}
.article-card-more {
    margin-top: 12px;
    text-align: right;
}
.article-card-more a {
    display: inline-block;
    padding: 6px 20px;
    background: #c00;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
}
.article-card-more a:hover {
    background: #a00;
    text-decoration: none;
}
.empty-state {
    text-align: center; padding: 60px 20px; color: #999;
    background: #fff; border: 1px solid #ddd;
}
.empty-state p { font-size: 15px; margin-bottom: 8px; }
.empty-state small { font-size: 12px; }

.article-card-meta-sp {
    display: none;
    font-size: 11px; color: #999;
    margin-top: 6px;
}
.article-card-meta-sp .res-count {
    margin-left: 8px;
    background: #f0f0f0; padding: 1px 6px;
    color: #666;
}

/* ========================================
   記事詳細ヘッダー（カード風）
   ======================================== */
.article-detail-header {
    display: none;
}

/* ========================================
   記事詳細ページ（まとめ表示）
   ======================================== */
.matome { background: #efefef; border: 1px solid #ddd; margin-bottom: 16px; }
.matome-title {
    background: #c00; color: #fff; padding: 10px 16px;
    font-size: 15px; font-weight: bold;
}
.matome-thread-info {
    background: #f5f5f5; border-bottom: 1px solid #ddd;
    padding: 4px 12px; font-size: 11px; color: #666;
}
.matome-body { padding: 4px; }
.res {
    background: #fff; border-bottom: 1px solid #ddd;
    padding: 8px 12px 32px; font-size: 14px; line-height: 1.6;
}
.res:last-child { border-bottom: none; }
.res-header { font-size: 12px; color: #888; margin-bottom: 4px; }
.res-header .res-number { color: #333; font-weight: bold; }
.res-header .res-name { color: #080; font-weight: bold; }
.res-body { word-break: break-word; }
.res-body .anchor { color: #00c; }
.res-highlight .res-body { color: #c00; font-weight: bold; font-size: 15px; }

.news-box {
    background: #f5f5f5; border: 1px solid #e0e0e0;
    padding: 12px 16px; border-radius: 4px;
}
.news-source {
    text-align: right; font-size: 12px; color: #888; margin-top: 4px;
}

/* 記事ナビゲーション */
.article-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; font-size: 13px;
}
.article-nav a { color: #c00; }
.article-nav a:hover { text-decoration: underline; }
/* シェアボタン */
.share-buttons {
    background: #fff; border: 1px solid #ddd;
    padding: 16px; margin-bottom: 8px;
    text-align: center;
}
.share-label {
    font-size: 14px; font-weight: bold; color: #333;
    display: block; margin-bottom: 10px;
}
.share-buttons-list {
    display: flex; justify-content: center; gap: 8px;
    flex-wrap: wrap;
}
.share-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    color: #fff !important;
    font-size: 13px; font-weight: bold;
    text-decoration: none !important;
    transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.8; text-decoration: none !important; }
.share-btn-x { background: #000; }
.share-btn-facebook { background: #1877f2; }
.share-btn-line { background: #06c755; }
.share-btn-hatena { background: #00a4de; }

.article-nav-bottom {
    background: #fff; border: 1px solid #ddd;
    padding: 16px;
}
.article-nav-prev-next {
    display: flex; justify-content: space-between; align-items: center;
}
.article-nav-prev-next a {
    color: #c00; font-size: 14px; font-weight: bold;
    max-width: 45%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.article-nav-prev-next a:hover { text-decoration: underline; }
.article-nav-index {
    text-align: center; margin-top: 12px;
    border-top: 1px solid #eee; padding-top: 12px;
}
.article-nav-index a {
    color: #c00; font-size: 14px; font-weight: bold;
}
.article-nav-index a:hover { text-decoration: underline; }

/* ========================================
   スマホ広告
   ======================================== */
.sp-ad-top {
    display: none;
}

/* ========================================
   話題のニュース（スマホ専用）
   ======================================== */
.trending-news {
    display: none;
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 768px) {
    .site-container {
        flex-direction: column;
        padding: 8px 4px;
        gap: 8px;
    }
    .sidebar {
        width: 100%;
    }
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 8px;
    }
    .site-logo {
        height: 36px;
        width: 68px;
    }
    .nav-inner {
        flex-wrap: wrap;
        padding: 0 4px;
    }
    .nav-inner a {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* スマホ広告 */
    .sp-ad-top {
        display: block;
        text-align: center;
        margin-bottom: 8px;
    }

    /* 話題のニュース スマホ表示 */
    .trending-news {
        display: block;
        background: #fff;
        border: 1px solid #ddd;
        margin-bottom: 8px;
    }
    .trending-news-title {
        background: #c00;
        color: #fff;
        padding: 6px 10px;
        font-size: 13px;
        font-weight: bold;
    }
    .trending-news-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .trending-news-list li {
        border-bottom: 1px solid #f0f0f0;
    }
    .trending-news-list li:last-child {
        border-bottom: none;
    }
    .trending-news-list li a {
        display: block;
        padding: 8px 10px;
        font-size: 12px;
        color: #333;
        line-height: 1.4;
        text-decoration: none;
    }
    .trending-news-list li a:hover {
        background: #f8f8f8;
        color: #c00;
    }

    /* 記事カード スマホ対応 */
    .article-card-preview,
    .article-card .article-card-meta,
    .article-card-more { display: none; }
    .article-card .article-card-meta-sp { display: block; }
    .article-card-body { padding: 10px 8px; }
    .article-card { margin-bottom: 0; border-bottom: none; }
    .article-card:last-child { border-bottom: 1px solid #ddd; }

    /* 記事詳細ヘッダー スマホ対応 */
    .article-detail-header {
        display: block;
        background: #fff;
        border: 1px solid #ddd;
        padding: 10px 8px;
        margin-bottom: 8px;
    }
    .article-detail-header .article-card-meta-sp { display: block; }
    .matome .matome-title { display: none; }
    .sidebar-trending-news { display: none; }

    /* ページ系・まとめ系のパディング縮小 */
    .page-box-body { padding: 12px 8px; }
    .matome-body { padding: 2px; }
    .res { padding: 8px 8px 24px; }
    .footer-inner { padding: 16px 8px; }
    .article-nav-bottom { padding: 12px 8px; }
}
