#article {
    padding: 2rem 0;
}
#article #product .inr{
    display: block;
}
#article .inr {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
#article.archive h2,
#article.archive p{
    margin: 0;
    padding: 0;
}

#article .head {
    padding: 3rem 0;
}

#article .head h1 {
    font-size: 2.8rem;
    font-weight: 600;
}

#article .main {
    width: calc(100% - 29rem);
}

#article .sidebar {
    width: 27rem;
}

/* 記事カードスタイル */
.section_article {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.article_card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article_card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.article_link {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
}

.article_image {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    overflow: hidden;
    border-radius: 4px;
}

.article_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article_content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.article_tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    font-size: 1.2rem;
    border-radius: 4px;
    font-weight: 500;
}

.tag_new {
    background: #FFD700;
    color: #333;
}

.tag_category {
    background: #9370DB;
    color: #fff;
}

.tag_webmaking {
    background: #90EE90;
    color: #333;
}

.article_title {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
}

.article_description {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
    flex: 1;
}

.article_footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.btn_read {
    background: #333;
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn_read:hover {
    background: #555;
}

/* サイドバースタイル */
.sidebar_section {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar_title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #333;
}

.sidebar_content {
    min-height: 10rem;
}

.sidebar_banner {
    min-height: 15rem;
    background: #f0f0f0;
    border-radius: 4px;
}

/* ページネーション */
.pagination {
    margin-top: 4rem;
    text-align: center;
}

.pagination .page-numbers {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-numbers li {
    display: inline-block;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #333;
    color: #fff;
    border-color: #333;
}

.pagination .current {
    background: #333;
    color: #fff;
    border-color: #333;
}

.no_posts {
    padding: 4rem;
    text-align: center;
    font-size: 1.6rem;
    color: #666;
}

/* サイドバー - ランキングリスト */
.ranking_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking_item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ranking_item:last-child {
    border-bottom: none;
}

.rank_number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: #333;
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
    flex-shrink: 0;
}

.ranking_item a {
    text-decoration: none;
    color: #333;
    font-size: 1.4rem;
    line-height: 1.4;
}

.ranking_item a:hover {
    color: #666;
}

/* サイドバー - カテゴリーリスト */
.category_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category_item {
    border-bottom: 1px solid #eee;
}

.category_item:last-child {
    border-bottom: none;
}

.category_item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    text-decoration: none;
    color: #333;
    font-size: 1.4rem;
    transition: color 0.3s ease;
}

.category_item a:hover {
    color: #666;
}

.post_count {
    color: #999;
    font-size: 1.2rem;
}

/* サイドバー - バナー */
.sidebar_banner a {
    display: block;
}

.sidebar_banner img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #article .inr {
        flex-direction: column;
    }
    
    #article .main {
        width: 100%;
    }
    
    #article .sidebar {
        width: 100%;
    }
    
    .article_link {
        flex-direction: column;
    }
    
    .article_image {
        width: 100%;
        height: 200px;
    }
}



/* シングルページ - 基本レイアウト */
#article_single {
    padding: 2rem 0;
}

#article_single .inr {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

#article_single .main {
    width: calc(100% - 29rem);
}

#article_single .sidebar {
    width: 27rem;
    position: sticky;
    top: 2rem;
    align-self: flex-start;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

/* 記事ヘッダー */
#article_single .head {
    margin-bottom: 3rem;
}

#article_single .meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

#article_single .date {
    font-size: 1.4rem;
    color: #666;
    margin: 0;
}

#article_single .categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

#article_single .category_tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: #9370DB;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

#article_single .category_tag:hover {
    background: #7B68BB;
}

#article_single .article_title {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 2rem 0;
    color: #333;
}

#article_single .article_thumbnail {
    margin-bottom: 3rem;
    border-radius: 8px;
    overflow: hidden;
}

#article_single .article_thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* 記事コンテンツ */
.article_content {
    font-size: 1.6rem;
    line-height: 1.8;
    color: #333;
}

.article_content h2 {
    font-size: 2.4rem;
    font-weight: 600;
    margin: 3rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #333;
}

.article_content h3 {
    font-size: 2rem;
    font-weight: 600;
    margin: 2.5rem 0 1.5rem 0;
    padding-left: 1rem;
    border-left: 4px solid #333;
}

.article_content p {
    margin: 1.5rem 0;
    font-size: 1.7rem;
}

.article_content ul,
.article_content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article_content li {
    margin: 0.5rem 0;
}

.article_content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 2rem 0;
}

.article_content a {
    color: #0066cc;
    text-decoration: underline;
}

.article_content a:hover {
    color: #0052a3;
}

.article_content code {
    background: #f5f5f5;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
}

.article_content pre {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 2rem 0;
}

.article_content pre code {
    background: none;
    padding: 0;
}

/* 専門家引用スタイル */
.article_content .expert-quote {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #235da0;
    padding: 2rem 2.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    position: relative;
}

.article_content .expert-quote::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 4rem;
    color: #235da0;
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.article_content .expert-quote code {
    background: none;
    font-family: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
    font-size: 1.6rem;
    line-height: 1.8;
    color: #333;
    display: block;
    padding-left: 2rem;
}

/* 出典表記スタイル */
.article_content p em:only-child {
    display: block;
    font-size: 1.3rem;
    color: #666;
    text-align: right;
    margin-top: 0.5rem;
}

/* 古いblockquote引用スタイル（互換性のため） */
.article_content blockquote.denba-citation {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #235da0;
    padding: 2rem 2.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.article_content blockquote.denba-citation p {
    font-size: 1.6rem;
    line-height: 1.8;
    margin: 0 0 1rem 0;
}

.article_content blockquote.denba-citation cite {
    display: block;
    font-size: 1.3rem;
    color: #666;
    text-align: right;
    font-style: normal;
}

.article_content blockquote.denba-citation cite a {
    color: #235da0;
    text-decoration: none;
}

.article_content blockquote.denba-citation cite a:hover {
    text-decoration: underline;
}

/* 前後の記事ナビゲーション */
.post_navigation {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid #eee;
}

.post_navigation .nav_links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.nav_previous,
.nav_next {
    position: relative;
}

.nav_previous a,
.nav_next a {
    display: block;
    padding: 2rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    height: 100%;
    box-sizing: border-box;
}

.nav_previous a:hover,
.nav_next a:hover {
    border-color: #235da0;
    box-shadow: 0 4px 20px rgba(35, 93, 160, 0.15);
    transform: translateY(-3px);
}

.nav_previous a {
    padding-left: 3rem;
}

.nav_previous a::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-left: 2px solid #235da0;
    border-bottom: 2px solid #235da0;
    transform: translateY(-50%) rotate(45deg);
}

.nav_next a {
    text-align: right;
    padding-right: 3rem;
}

.nav_next a::after {
    content: '';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #235da0;
    border-top: 2px solid #235da0;
    transform: translateY(-50%) rotate(45deg);
}

.nav_label {
    display: block;
    font-size: 1.2rem;
    color: #235da0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.8rem;
}

.nav_title {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.5;
    color: #333;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* 関連記事 */
.related_posts {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid #ddd;
}

.section_title {
    font-size: 2.4rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.related_posts_list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.related_card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related_card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.related_card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related_image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.related_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related_card:hover .related_image img {
    transform: scale(1.05);
}

.related_title {
    padding: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.no_related {
    text-align: center;
    color: #999;
    padding: 2rem;
}

/* サイドバー - 目次 */
.toc_section {
    position: sticky;
    top: 2rem;
}

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

.toc_item {
    margin: 0;
}

.toc_item a {
    display: block;
    padding: 0.8rem 0;
    text-decoration: none;
    color: #333;
    font-size: 1.4rem;
    line-height: 1.4;
    border-bottom: 1px solid #eee;
    transition: color 0.3s ease;
}

.toc_item a:hover {
    color: #666;
}

.toc_h3 a {
    padding-left: 1.5rem;
    font-size: 1.3rem;
    color: #666;
}

.no_toc {
    font-size: 1.4rem;
    color: #999;
}

/* サイドバー - 共通スタイル（archive-article.phpと同じ） */
.sidebar_section {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar_title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #333;
}

.sidebar_content {
    min-height: auto;
}

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

.ranking_item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ranking_item:last-child {
    border-bottom: none;
}

.rank_number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: #333;
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
    flex-shrink: 0;
}

.ranking_item a {
    text-decoration: none;
    color: #333;
    font-size: 1.4rem;
    line-height: 1.4;
}

.ranking_item a:hover {
    color: #666;
}

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

.category_item {
    border-bottom: 1px solid #eee;
}

.category_item:last-child {
    border-bottom: none;
}

.category_item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    text-decoration: none;
    color: #333;
    font-size: 1.4rem;
    transition: color 0.3s ease;
}

.category_item a:hover {
    color: #666;
}

.post_count {
    color: #999;
    font-size: 1.2rem;
}

.sidebar_banner a {
    display: block;
}

.sidebar_banner img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* サイドバーなしレイアウト */
#article_single.no_sidebar .inr {
    display: block;
    max-width: 900px;
}

#article_single.no_sidebar .main.full_width {
    width: 100%;
}

/* 関連記事セクション（メインコンテンツ下） */
.related_articles_section {
    background: #f5f5f5;
    padding: 5rem 2rem;
    margin-top: 4rem;
}

.related_section_title {
    font-size: 2.4rem;
    font-weight: 600;
    text-align: left;
    margin: 0 auto 3rem;
    max-width: 1200px;
    position: relative;
    padding-left: 1.5rem;
    border-left: 4px solid #235da0;
}

.related_articles_grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.related_article_card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.related_article_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.related_article_card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related_article_image {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.related_article_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related_article_card:hover .related_article_image img {
    transform: scale(1.05);
}

.related_article_content {
    padding: 1.5rem;
}

.related_article_category {
    display: inline-block;
    background: #9370DB;
    color: #fff;
    padding: 0.3rem 0.8rem;
    font-size: 1.1rem;
    border-radius: 4px;
    margin-bottom: 0.8rem;
}

.related_article_title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 0.8rem 0;
    color: #333;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.related_article_date {
    font-size: 1.2rem;
    color: #999;
    margin: 0;
}

.no_related {
    text-align: center;
    color: #666;
    font-size: 1.6rem;
    grid-column: 1 / -1;
    padding: 3rem;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .related_articles_grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #article_single .inr {
        flex-direction: column;
    }

    #article_single .main {
        width: 100%;
    }

    #article_single .sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }

    #article_single .article_title {
        font-size: 2.4rem;
    }

    .related_posts_list {
        grid-template-columns: 1fr;
    }

    .post_navigation .nav_links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .nav_previous a,
    .nav_next a {
        text-align: left;
        padding-left: 3rem;
        padding-right: 2rem;
    }

    .nav_next a::after {
        right: auto;
        left: 1.5rem;
        border-right: none;
        border-top: none;
        border-left: 2px solid #235da0;
        border-bottom: 2px solid #235da0;
        transform: translateY(-50%) rotate(45deg);
    }

    .related_articles_section {
        padding: 3rem 0;
    }

    .related_articles_grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .related_section_title {
        font-size: 2rem;
    }
}
/* ==========================================================================
   記事本文の体裁を整える（2026-08-06 追加）
   対象は .article_content の中だけ。他ページには影響しません。
   ========================================================================== */

/* --- 箇条書き -------------------------------------------------------------
   reset.css の `ol, ul { list-style: none }` が効いていて、記事本文でも
   マーカーが出ていませんでした。記事本文だけ打ち消します。            */
.article_content ul,
.article_content ol {
    margin: 1.8rem 0;
    padding-left: 2.4rem;
}
.article_content ul { list-style: disc outside; }
.article_content ol { list-style: decimal outside; }
.article_content ul ul,
.article_content ol ul { list-style: circle outside; margin: 0.6rem 0; }
.article_content li {
    margin: 0.8rem 0;
    line-height: 1.9;
    padding-left: 0.3rem;
}
.article_content li::marker { color: #0066cc; }
.article_content li > strong { font-weight: 600; }

/* --- 図版・写真 -----------------------------------------------------------
   高さの上限で揃えます。横長の図も縦長の写真も同じ高さに収まるので、
   本文の途中で急に大きな塊が現れることがなくなります。               */
.article_content img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 52rem;
    margin: 2.6rem auto;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* --- 図版の注記 ---------------------------------------------------------- */
.article_content .fig_note {
    margin: -1.4rem auto 2.6rem;
    font-size: 1.3rem;
    line-height: 1.75;
    color: #767676;
    text-align: center;
}
.article_content .fig_note small { font-size: inherit; }

/* --- 表 -------------------------------------------------------------------
   これまで定義が無く、罫線なしで表示されていました。                 */
.article_content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.4rem 0;
    font-size: 1.5rem;
    line-height: 1.7;
}
.article_content table th,
.article_content table td {
    border: 1px solid #e2e5e8;
    padding: 1.1rem 1.3rem;
    text-align: left;
    vertical-align: top;
}
.article_content table th {
    background: #f6f7f8;
    font-weight: 600;
    color: #333;
}
.article_content table thead th { white-space: nowrap; }
.article_content table tbody tr:nth-child(even) td { background: #fbfbfc; }

/* --- 引用（クラス無しの blockquote）--------------------------------------
   `.denba-citation` 付きは既存の指定が優先されます。                 */
.article_content blockquote {
    margin: 2.4rem 0;
    padding: 1.8rem 2.2rem;
    background: #f7f9fb;
    border-left: 4px solid #235da0;
    border-radius: 0 6px 6px 0;
}
.article_content blockquote p {
    margin: 0 0 1rem;
    font-size: 1.6rem;
    line-height: 1.85;
}
.article_content blockquote p:last-child { margin-bottom: 0; }

/* --- スマホ --------------------------------------------------------------- */
@media (max-width: 768px) {
    .article_content ul,
    .article_content ol { padding-left: 2rem; }
    .article_content img { max-height: 40rem; margin: 2.2rem auto; }
    .article_content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .article_content table th { white-space: nowrap; }
}
