/* =========================
   共通カスタムプロパティ（ヘッダー高さを一元管理）
   ========================= */
:root {
    /* 必要に応じて数値だけ変えれば全ページの開始位置が揃います */
    --header-height: 100px;
}

/* =========================
   パンくずリスト
   ========================= */
.breadcrumb {
    margin-bottom: 25px;  /* メタ情報との間隔 */
    padding: 12px 0;  /* 左右paddingを削除してmain-contentのpaddingに合わせる */
    border-bottom: 1px solid #e5e5e5;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: #666;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: #999;
    font-weight: 400;
}

.breadcrumb-item a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 12px;
}

.breadcrumb-item a:hover {
    color: #4a90e2;
}

.breadcrumb-item.current {
    color: #333;
    font-weight: 500;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================
   画像の汎用調整（重複は1か所に集約）
   ========================= */
.article-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 24px 0;
    display: block;
}

.section-image img,
.section-image-only img {
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* =========================
   基本設定
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================
   ヘッダー
   ========================= */
header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    /* 高さを固定運用したい場合は以下を有効化
       height: var(--header-height);
    */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
}

.tagline {
    font-size: 11px;
    color: #999;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    font-weight: 400;
}

.logo {
    font-size: 36px;
    font-weight: 900;
    color: #333;
    text-decoration: none;
    letter-spacing: 2px;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    color: #333;
}

/* =========================
   メインレイアウト
   ========================= */
.main-wrapper {
    /* ★ ヘッダーの高さぶんだけ全ページを下げる（一元管理） */
    margin-top: var(--header-height);
    background: white;
    min-height: calc(100vh - var(--header-height));
}

.content-area {
    display: flex;
    max-width: 1140px;
    margin: 0 auto;
    gap: 20px;
    align-items: flex-start;
}

.main-content {
    width: 800px;
    flex-shrink: 0;
    padding: 40px 20px;
}

/* ★ main直下の最初の要素は上マージンを打ち消して"余白の二重化"を防止 */
.main-content > *:first-child {
    margin-top: 0 !important;
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
    background: #f8f8f8;
    padding: 40px 30px;
}

/* =========================
   ヒーロー（一覧）
   ========================= */
.hero-article {
    margin-bottom: 50px;
    margin-top: 0;
}

/* 固定高さ→比率固定 */
.hero-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    display: block;
}

.hero-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(transparent, rgba(0,0,0,0.3));
}

.hero-meta {
    color: #999;
    font-size: 12px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.4;
    margin-top: 0;
}

.hero-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hero-title a:hover {
    color: #4a90e2;
}

.hero-excerpt {
    color: #666;
    font-size: 15px;
    line-height: 1.7;
    margin-top: 0;
}

.hero-article a {
    text-decoration: none;
    color: inherit;
}

.hero-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* =========================
   記事一覧
   ========================= */
.article-list {
    margin-bottom: 40px;
}

.article-item {
    display: flex;
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid #e5e5e5;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.article-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article-item:hover {
    transform: translateY(-2px);
}

.article-item:hover .article-title a {
    color: #4a90e2;
}

.article-thumbnail {
    width: 280px;
    height: 180px;
    margin-right: 30px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.article-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.article-thumbnail a:hover .article-image {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.article-image {
    width: 100%;
    height: 100%;
    background: #ddd;
    background-size: cover;
    background-position: center;
    display: block;
    aspect-ratio: 16 / 9;
}

.category-label {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    font-size: 10px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
    display: inline-block;
    border-radius: 3px;
}

.cat-tech { background: #4a90e2; }
.cat-design { background: #9013fe; }
.cat-business { background: #4caf50; }
.cat-review { background: #ff9800; }
.cat-lifestyle { background: #e91e63; }
.cat-default { background: #667eea; }

.article-content {
    flex: 1;
}

.article-meta {
    color: #999;
    font-size: 11px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.4;
    margin-top: 0;
}

.article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.article-title a:hover {
    color: #4a90e2;
}

.article-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 0;
}

/* =========================
   記事詳細ページ（本丸）
   ========================= */
.article-detail {
    padding-top: 0;  /* 上部パディングを0に設定 */
}

/* PC: cover（迫力） / 共通: 比率固定 */
.article-detail-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #ff7b7b 0%, #ff9d00 100%);
    background-size: cover;      /* PCはカバー */
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 25px;  /* パンくずリストとの間隔を調整 */
    margin-top: 0;  /* 上マージンを明示的に0に設定 */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* グラデーション用のdivが直接配置される場合 */
.article-detail-image > div {
    width: 100%;
    height: 100%;
}

/* ★★★ 記事ヘッダー全体のまとまり感を向上 ★★★ */
.article-header-wrapper {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e9ecef;
}

/* ★★★ 記事詳細のメタ情報（改善版） ★★★ */
.article-detail-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 24px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: none;
    font-size: 13px;
}

/* ★★★ カテゴリラベルの改善 ★★★ */
.article-detail-category {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 6px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

/* ★★★ 日付の改善 ★★★ */
.article-detail-date {
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ★★★ 記事タイトル（改善版） ★★★ */
.article-detail-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #2c3e50;
    line-height: 1.5;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

/* ★★★ メイン記事本文（改善版） ★★★ */
.article-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: #2c3e50;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
}

/* ★★★ 最初の段落（リード文）を強調 ★★★ */
.article-detail-content > p:first-child {
    font-size: 18px;
    font-weight: 500;
    color: #34495e;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #3498db;
    border-radius: 0 8px 8px 0;
    line-height: 1.7;
}

/* 見出し階層の明確化 */
.article-detail-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 40px 0 20px 0;
    color: #2c3e50;
    border-left: 4px solid #3498db;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 4px;
}

.article-detail-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 30px 0 15px 0;
    color: #34495e;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 8px;
}

.article-detail-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 25px 0 12px 0;
    color: #34495e;
}

/* 段落とテキスト */
.article-detail-content p {
    margin-bottom: 24px;
    line-height: 1.8;
    color: #2c3e50;
    text-align: justify;
}

.article-detail-content p:last-child {
    margin-bottom: 0;
}

/* リスト */
.article-detail-content ul,
.article-detail-content ol {
    margin: 24px 0;
    padding-left: 28px;
}

.article-detail-content li {
    margin-bottom: 12px;
    line-height: 1.7;
    color: #2c3e50;
}

.article-detail-content ul li {
    position: relative;
}

.article-detail-content ul li::marker {
    color: #3498db;
}

/* 引用 */
.article-detail-content blockquote {
    margin: 30px 0;
    padding: 20px 24px;
    border-left: 4px solid #3498db;
    background: #f8f9fa;
    font-style: italic;
    color: #555;
    border-radius: 0 4px 4px 0;
}

.article-detail-content blockquote p {
    margin-bottom: 12px;
    font-size: 16px;
}

.article-detail-content blockquote p:last-child {
    margin-bottom: 0;
}

/* コードブロック */
.article-detail-content code {
    background: #f8f9fa;
    padding: 3px 6px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    font-size: 14px;
    border-radius: 3px;
    border: 1px solid #e9ecef;
    color: #e74c3c;
}

.article-detail-content pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 24px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 30px 0;
    border: 1px solid #34495e;
    font-size: 14px;
    line-height: 1.6;
}

.article-detail-content pre code {
    background: none;
    padding: 0;
    border: none;
    color: inherit;
    font-size: inherit;
}

/* テーブル */
.article-detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-detail-content th,
.article-detail-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.article-detail-content th {
    background: #3498db;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.article-detail-content tr:hover {
    background: #f8f9fa;
}

/* リンク */
.article-detail-content a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
}

.article-detail-content a:hover {
    color: #2980b9;
    border-bottom-color: #2980b9;
    background: rgba(52, 152, 219, 0.05);
}

/* 強調 */
.article-detail-content strong,
.article-detail-content b {
    font-weight: 700;
    color: #2c3e50;
}

.article-detail-content em,
.article-detail-content i {
    font-style: italic;
    color: #34495e;
}

/* =========================
   セクション機能
   ========================= */
.content-section {
    margin: 50px 0;
    padding: 40px;
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.content-section:first-child {
    margin-top: 30px;
}

.section-title {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 24px;
    line-height: 1.4;
    border-bottom: 3px solid #3498db;
    padding-bottom: 12px;
}

.section-content {
    display: block;
}

.section-text {
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 24px;
}

.section-text p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.section-text p:last-child {
    margin-bottom: 0;
}

.section-text h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px 0;
    color: #34495e;
}

.section-text ul,
.section-text ol {
    margin: 20px 0;
    padding-left: 24px;
}

.section-text li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.section-image {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 24px;
}

.section-image img {
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.section-image-only {
    width: 100%;
    max-width: 800px;
    overflow: hidden;
    border-radius: 8px;
    margin: 24px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.section-image-only img {
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* =========================
   タグ・ナビゲーション
   ========================= */
.entry-tags {
    margin: 35px 0;
    padding: 25px;
    background: #f3e5f5;
    border: 1px solid #ddd;
}

.entry-tags h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.tag {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 5px 12px;
    font-size: 11px;
    margin-right: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    transition: background 0.3s;
}

.tag:hover {
    background: #4a90e2;
    color: white;
}

.entry-nav {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    padding: 25px;
    background: #e1f5fe;
    border: 1px solid #ddd;
    gap: 15px;
    align-items: center;
    min-height: 60px;
}

.entry-nav-prev,
.entry-nav-next {
    flex: 1;
}

.entry-nav-next {
    text-align: right;
}

.entry-nav a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 14px;
}

.entry-nav a:hover {
    color: #333;
}

/* =========================
   関連記事
   ========================= */
.related-posts {
    margin: 50px 0 0 0;
    padding: 25px;
    background: #f1f8e9;
    border: 1px solid #ddd;
    min-height: 200px;
}

.related-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.related-item {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s;
}

.related-item:hover {
    transform: translateY(-3px);
}

.related-thumbnail {
    width: 100%;
    height: 120px;
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ddd;
    position: relative;
}

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

/* 関連記事のグラデーション用divのスタイル */
.related-thumbnail > div {
    width: 100%;
    height: 100%;
}

.related-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.related-item-date {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================
   サイドバー
   ========================= */
.sidebar-section {
    margin-bottom: 40px;
}

.sidebar-title {
    background: #333;
    color: white;
    padding: 12px 18px;
    margin: 0 -25px 20px -25px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* プロフィール */
.profile-info {
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ddd;
    margin: 0 auto 15px;
}

.profile-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.profile-description {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.social-link {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: transform 0.3s;
}

.social-link:hover {
    transform: translateY(-2px);
}

.social-twitter { background: #1da1f2; }
.social-facebook { background: #3b5998; }
.social-instagram { background: #e4405f; }
.social-youtube { background: #ff0000; }

/* カテゴリ・アーカイブ */
.category-list {
    list-style: none;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
}

.category-item:last-child {
    border-bottom: none;
}

.category-link {
    color: #666;
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.category-link:hover {
    color: #333;
}

.category-count {
    background: #f0f0f0;
    color: #999;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
}

/* 人気記事 */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-item {
    display: flex;
    gap: 12px;
}

.popular-thumbnail {
    width: 60px;
    height: 60px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ddd;
    border-radius: 4px;
}

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

.popular-content h4 {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 6px;
}

.popular-content a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.popular-content a:hover {
    color: #4a90e2;
}

.popular-date {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================
   アーカイブページ
   ========================= */
.archive-header {
    margin-bottom: 35px;
    padding-bottom: 18px;
    border-bottom: 2px solid #e5e5e5;
}

.archive-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.archive-description {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
}

.archive-meta {
    color: #999;
    font-size: 13px;
    margin-top: 8px;
}

/* =========================
   ページネーション
   ========================= */
.pagination {
    text-align: center;
    padding: 40px 0;
    margin-top: 1.5em;
}

.pagination-list {
    display: inline-flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-item {
    margin: 0 0.2em;
}

.pagination-item a,
.pagination-item span {
    display: block;
    padding: 10px 14px;
    color: #666;
    text-decoration: none;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    transition: all 0.3s;
    font-size: 13px;
}

.pagination-item a:hover {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.pagination-item.current span {
    background: #333;
    color: white;
    border-color: #333;
}

/* =========================
   フッター
   ========================= */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 25px 0;
    margin-top: 60px;
}

.footer-text {
    font-size: 11px;
    color: #999;
    margin-bottom: 0;
}

/* =========================
   レスポンシブデザイン
   ========================= */
@media (max-width: 768px) {
    /* パンくずリストのレスポンシブ対応 */
    .breadcrumb-item.current {
        max-width: 200px;
    }

    .breadcrumb-list {
        font-size: 11px;
    }

    .breadcrumb-item a {
        font-size: 11px;
    }

    .nav-links {
        display: none;
    }

    .content-area {
        flex-direction: column;
        gap: 0;
    }

    .main-content {
        width: 100%;
        padding: 20px;
        max-width: none;
    }

    .article-detail {
        /* padding: 20px; 削除 - main-contentと重複 */
    }

    .archive .main-content {
        padding: 20px;
    }

    .sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid #e5e5e5;
        padding: 25px 20px;
    }

    .sidebar-title {
        margin: 0 -20px 20px -20px;
    }

    .article-item {
        flex-direction: column;
    }

    .article-thumbnail {
        width: 100%;
        height: auto;
        min-height: 150px;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .article-thumbnail .article-image {
        width: 100%;
        height: auto;
        min-height: 150px;
        object-fit: contain;
    }

    .hero-title {
        font-size: 20px;
    }

    /* 一覧ヒーロー：上寄せで切れ防止 */
    .hero-image {
        background-position: top center;
    }

    /* ★★★ 記事ヘッダー部分のレスポンシブ対応 ★★★ */
    .article-header-wrapper {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .article-detail-meta {
        padding: 12px 16px;
        margin-bottom: 16px;
        flex-wrap: wrap;
        gap: 10px;
        font-size: 12px;
    }

    .article-detail-category {
        padding: 4px 10px;
        font-size: 10px;
    }

    .article-detail-date {
        font-size: 11px;
    }

    .article-detail-title {
        font-size: 22px;
        margin-bottom: 20px;
        line-height: 1.4;
    }

    .article-detail-content {
        padding: 20px;
        font-size: 15px;
    }

    .article-detail-content > p:first-child {
        font-size: 16px;
        padding: 16px;
        margin-bottom: 24px;
    }

    .article-detail-content h2 {
        font-size: 20px;
        margin: 30px 0 16px 0;
        padding: 10px 12px;
    }

    .article-detail-content h3 {
        font-size: 18px;
        margin: 24px 0 12px 0;
    }

    .article-detail-content h4 {
        font-size: 16px;
        margin: 20px 0 10px 0;
    }

    .article-detail-content ul,
    .article-detail-content ol {
        padding-left: 20px;
    }

    .article-detail-content pre {
        padding: 16px;
        font-size: 13px;
        margin: 20px 0;
    }

    .article-detail-content table {
        font-size: 14px;
    }

    .article-detail-content th,
    .article-detail-content td {
        padding: 8px 12px;
    }

    .content-section {
        margin: 30px 0;
        padding: 24px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .section-text {
        font-size: 15px;
    }

    .section-image,
    .section-image-only {
        margin: 16px 0;
    }

    .related-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .entry-nav {
        flex-direction: column;
        gap: 12px;
    }

    .entry-nav-next {
        text-align: left;
    }

    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    /* ★ 記事ページのヒーロー画像：スマホは必ず全体表示 */
    .article-detail-image {
        background-size: contain;        /* ←有効化 */
        background-position: top center; /* 重要要素が上でも切れにくい */
        background-repeat: no-repeat;
        background-color: #eee;          /* 余白色（お好みで変更可） */
    }
}

@media (max-width: 480px) {
    .article-header-wrapper {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .article-detail-meta {
        padding: 10px 12px;
        font-size: 11px;
    }

    .article-detail-title {
        font-size: 19px;
        margin-bottom: 16px;
    }

    .article-detail-content {
        padding: 16px;
        font-size: 14px;
    }

    .article-detail-content > p:first-child {
        font-size: 15px;
        padding: 12px;
        margin-bottom: 20px;
    }

    .article-detail-content h2 {
        font-size: 18px;
        padding: 8px 10px;
    }

    .content-section {
        padding: 16px;
    }

    .section-title {
        font-size: 18px;
    }

    .article-detail-category {
        padding: 3px 8px;
        font-size: 9px;
    }

    .article-detail-date {
        font-size: 10px;
    }
}
/* =========================
   汎用テーブルスタイル（クラスなし）
   ========================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
}

th {
    background: #3498db;
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #f8f9fa;
    transition: background-color 0.3s ease;
}

/* モバイル対応 */
@media (max-width: 768px) {
    table {
        font-size: 13px;
        margin: 20px 0;
    }
    
    th,
    td {
        padding: 10px 12px;
    }
}
/* アフィリエイトコード CSS干渉防止用の追加CSS */

/* 方法1: 最小限のリセット（推奨） */
.css-isolate {
    all: initial;
    display: block;
    font-family: initial;
    margin: 20px auto;
    max-width: 600px;
}

.css-isolate * {
    all: unset;
    display: revert;
    font-family: revert;
    color: revert;
    background: revert;
    border: revert;
    border-radius: revert;
    padding: revert;
    margin: revert;
    width: revert;
    height: revert;
    text-align: revert;
    font-size: revert;
    font-weight: revert;
    line-height: revert;
    vertical-align: revert;
    box-sizing: border-box;
}

/* 方法2: 特定要素のみ修正（軽量版） */
.affiliate-fix {
    margin: 20px auto !important;
    padding: 0 !important;
    max-width: 600px !important;
    font-family: initial !important;
}

.affiliate-fix table {
    width: auto !important;
    border-collapse: separate !important;
    margin: 0 !important;
    background: transparent !important;
    border-spacing: 0 !important;
}

.affiliate-fix td {
    padding: 0 !important;
    border: none !important;
    text-align: initial !important;
    vertical-align: top !important;
}

.affiliate-fix img {
    border-radius: 0 !important;
    max-width: none !important;
    height: auto !important;
}

.affiliate-fix div {
    margin: 0 !important;
    padding: 0 !important;
}

.affiliate-fix a {
    text-decoration: none !important;
    color: initial !important;
}

/* 方法3: より確実なリセット */
.affiliate-reset {
    all: initial;
    display: block;
    margin: 20px auto;
    max-width: 600px;
}

.affiliate-reset *,
.affiliate-reset *::before,
.affiliate-reset *::after {
    all: unset;
    display: revert;
    box-sizing: border-box;
}