/**
 * 記事詳細ページ専用CSS
 * single-article.php テンプレートで使用
 */

/* 記事ヘッダー - 斜線パターン */
.single-header {
    background: linear-gradient(135deg, #FF8A65 0%, #FF7043 50%, #FF5722 100%);
    color: var(--color-white);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

/* 斜線パターンの動的背景 */
.single-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><line x1="0" y1="0" x2="100" y2="100" stroke="rgba(255,255,255,0.1)" stroke-width="1"/><line x1="20" y1="0" x2="120" y2="100" stroke="rgba(255,255,255,0.1)" stroke-width="1"/><line x1="40" y1="0" x2="140" y2="100" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></svg>') repeat;
    background-size: 60px 60px;
    animation: diagonalSlide 25s infinite linear;
}

/* 輝く星の装飾 */
.single-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="50,10 52,18 60,18 54,23 56,31 50,26 44,31 46,23 40,18 48,18" fill="rgba(255,255,255,0.2)"/></svg>') repeat;
    background-size: 150px 150px;
    animation: starTwinkle 12s infinite ease-in-out;
}

@keyframes diagonalSlide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-60px); }
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.single-header-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    text-align: center;
}

.single-title {
    font-size: 48px;
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-lg);
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.single-excerpt {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
    max-width: 800px;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    font-size: var(--font-size-sm);
    flex-wrap: wrap;
}

.single-meta-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: rgba(255, 255, 255, 0.2);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
}

.meta-icon {
    width: 14px;
    height: 14px;
    opacity: 0.9;
}

/* アイキャッチ画像 */
.single-featured-image {
    margin: var(--spacing-2xl) 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.single-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* 記事コンテンツ */
.single-content {
    padding: var(--spacing-2xl) 0;
}

.entry-content {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-primary);
    max-width: 800px;
}

.entry-content h2 {
    font-size: var(--heading-2);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin: var(--spacing-2xl) 0 var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 3px solid var(--color-primary);
    position: relative;
}

.entry-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 60px;
    height: 3px;
    background: var(--color-primary-dark);
}

.entry-content h3 {
    font-size: var(--heading-3);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin: var(--spacing-xl) 0 var(--spacing-md);
    padding-left: var(--spacing-sm);
    border-left: 4px solid var(--color-primary);
}

.entry-content h4 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin: var(--spacing-lg) 0 var(--spacing-sm);
}

.entry-content p {
    margin-bottom: var(--spacing-lg);
}

.entry-content ul,
.entry-content ol {
    margin: var(--spacing-lg) 0;
    padding-left: var(--spacing-xl);
}

.entry-content li {
    margin-bottom: var(--spacing-sm);
    line-height: var(--line-height-relaxed);
}

.entry-content blockquote {
    background: var(--color-bg-light);
    border-left: 4px solid var(--color-primary);
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-lg);
    border-radius: var(--radius-base);
    font-style: italic;
    color: var(--color-text-secondary);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-base);
    margin: var(--spacing-lg) 0;
    box-shadow: var(--shadow-sm);
}

.entry-content code {
    background: var(--color-bg-light);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-base);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: var(--color-primary);
}

.entry-content pre {
    background: #f8f9fa;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-base);
    padding: var(--spacing-lg);
    overflow-x: auto;
    margin: var(--spacing-lg) 0;
}

.entry-content pre code {
    background: none;
    padding: 0;
    color: #333;
}

/* WordPress自動装飾システム */

/* 太字要素 → 黄色マーカー */
.article__text strong,
.article__text b {
    background: linear-gradient(transparent 60%, #fff200 60%);
    font-weight: bold;
    padding: 0 2px;
}

/* 引用要素 → カスタムスタイル */
.article__text blockquote {
    background: #f8f9fa;
    border-left: 4px solid #3b82f6;
    padding: 1.25rem;
    margin: 2rem 0;
    border-radius: 4px;
    font-style: normal;
    color: #374151;
    position: relative;
}

.article__text blockquote::before {
    content: '"';
    font-size: 3rem;
    color: #3b82f6;
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    line-height: 1;
    font-family: Georgia, serif;
}

/* リスト要素 → カスタム矢印 */
.article__text ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.article__text ul li::before {
    content: "▶";
    color: #3b82f6;
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.8rem;
}

/* 番号付きリスト → カスタムスタイル */
.article__text ol {
    counter-reset: custom-counter;
    padding-left: 0;
}

.article__text ol li {
    counter-increment: custom-counter;
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 0.75rem;
}

.article__text ol li::before {
    content: counter(custom-counter);
    background: #3b82f6;
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    top: 0.125rem;
    font-size: 0.75rem;
    font-weight: bold;
}

/* テーブル要素 → きれいなテーブル */
.article__text table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.article__text table th,
.article__text table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.article__text table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article__text table tbody tr:hover {
    background: #f9fafb;
}

.article__text table tbody tr:last-child td {
    border-bottom: none;
}

/* 画像キャプション */
.article__text .wp-caption {
    max-width: 100%;
    margin: 2rem 0;
    text-align: center;
}

.article__text .wp-caption img {
    margin-bottom: 0.5rem;
}

.article__text .wp-caption-text {
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
    padding: 0 1rem;
}

/* 動画埋め込みレスポンシブ対応 */
.article__text .wp-embed,
.article__text iframe {
    max-width: 100%;
    height: auto;
}

.article__text .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin: 2rem 0;
}

.article__text .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== baigieスタイル レイアウト調整 ===== */

/* コンテナとメインレイアウト */
.article-layout {
    background: #ffffff;
    min-height: 100vh;
}

.article-layout__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: start;
}

/* メインコンテンツエリア */
.article-layout__main {
    max-width: 100%;
}

/* サイドバー */
.article-layout__sidebar {
    width: 100%;
}

/* 記事本文のタイポグラフィ調整 */
.article__body {
    margin: 2rem 0;
}

/* インライン目次 */
.inline-table-of-contents {
    background: var(--color-bg-light);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
    box-shadow: var(--shadow-sm);
}

.inline-toc__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin: 0 0 var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-orange-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.inline-toc__title::before {
    content: '📋';
    font-size: var(--font-size-base);
}

.inline-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.inline-toc__list li {
    margin-bottom: var(--spacing-xs);
    padding-left: 1rem; /* 記号と文字の間のスペースを詰める */
    position: relative;
    line-height: var(--line-height-relaxed);
}

.inline-toc__list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-orange-primary);
    font-weight: var(--font-weight-bold);
}

.inline-toc__list a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-base);
    display: block;
    padding: var(--spacing-xs) 0;
}

.inline-toc__list a:hover {
    color: var(--color-orange-primary);
    text-decoration: underline;
}

.inline-toc__list li.h2 {
    font-weight: var(--font-weight-bold);
    padding-left: 1rem; /* h2は基本のインデント */
}

.inline-toc__list li.h3 {
    padding-left: 0.75rem; /* 記号と文字の間のスペース最小 */
    margin-left: 1.25rem; /* h3全体を右にずらしてインデント */
    font-size: var(--font-size-xs);
}

.inline-toc__list li.h3::before {
    content: '▪';
}

.inline-toc__list li.h4 {
    padding-left: 0.75rem; /* 記号と文字の間のスペース最小 */
    margin-left: 2.5rem; /* h4全体をさらに右にずらしてインデント */
    font-size: var(--font-size-xs);
    opacity: 0.8;
}

.inline-toc__list li.h4::before {
    content: '•';
}

.article__text {
    font-size: 1.125rem; /* 大きめの文字サイズ */
    line-height: 1.8; /* ゆったりとした行間 */
    color: #1f2937; /* 黒色で明瞭 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
}

.article__text p {
    margin-bottom: 1.5rem;
}

/* 見出しスタイルをシンプルに調整 */
.article__text h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 3rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.article__text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 2.5rem 0 2rem 0;
    padding-left: 0.75rem;
    border-left: 3px solid #3b82f6;
}

.article__text h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 2rem 0 0.75rem 0;
}

/* サイドバーウィジェット統一スタイル */
.sidebar-widget {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-widget__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

/* ===== レスポンシブ対応 ===== */

/* デスクトップ (1200px+) */
@media (min-width: 1200px) {
    .article-layout__container {
        grid-template-columns: 1fr 320px;
        gap: 3rem;
        padding: 0 2rem;
    }
    
    .article__text {
        font-size: 1.125rem;
    }
    
    .sidebar-widget.table-of-contents {
        position: sticky;
        top: 2rem;
    }
}

/* タブレット (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .article-layout__container {
        grid-template-columns: 1.5fr 1fr;
        gap: 2rem;
        padding: 0 1.5rem;
    }
    
    .article__text {
        font-size: 1.1rem;
    }
    
    .sidebar-widget {
        padding: 1.25rem;
    }
    
    .sidebar-widget.table-of-contents {
        position: sticky;
        top: 1.5rem;
        max-height: calc(100vh - 3rem);
    }
}

/* スマートフォン (~767px) */
@media (max-width: 767px) {
    .article-layout__container {
        display: block;
        padding: 0 1rem;
    }
    
    .article-layout__main {
        margin-bottom: 3rem;
    }
    
    .article-layout__sidebar {
        width: 100%;
    }
    
    .article__text {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .article__text h2 {
        font-size: 1.5rem;
        margin: 2rem 0 1rem 0;
    }
    
    .article__text h3 {
        font-size: 1.25rem;
        margin: 1.5rem 0 0.75rem 0;
    }
    
    .sidebar-widget {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
    
    /* スマートフォンでは目次を折りたたみ対応 */
    .sidebar-widget.table-of-contents {
        position: relative;
    }
    
    .table-of-contents__list {
        max-height: 200px;
        overflow-y: auto;
    }
    
    /* サイドバーウィジェットをコンパクトに */
    .popular-articles__list,
    .category-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* 極小画面 (480px以下) */
@media (max-width: 480px) {
    .article-layout__container {
        padding: 0 0.75rem;
    }
    
    .article__text {
        font-size: 0.95rem;
    }
    
    .sidebar-widget {
        padding: 0.75rem;
    }
    
    .sidebar-widget__title {
        font-size: 1rem;
    }
}

/* ===== アイキャッチ画像 ===== */
.article__featured-image {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.article__featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== 記事ヘッダー新スタイル ===== */
.article__header {
    margin-bottom: 2rem;
}

.article__category-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.category-tag,
.meta-tag {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
}

.category-tag {
    background: #3b82f6;
    color: white;
}

.meta-tag {
    background: #e5e7eb;
    color: #6b7280;
}

.article__title {
    font-size: 2.25rem; /* より大きく */
    font-weight: 700;
    line-height: 1.2;
    color: #1f2937;
    margin: 2rem 0;
    position: relative;
    padding-left: 1rem; /* 棒線のスペース */
}

.article__title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #3b82f6; /* 太い青の棒線 */
    border-radius: 2px;
}

.article__meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    align-items: center;
}

.article__date,
.article__views {
    display: flex;
    align-items: center;
}

/* お役立ち資料CTA - シンプル化 */
.sidebar-widget.resource-cta {
    padding: 0;
    border: none;
    margin-bottom: 2rem;
}

.resource-banner {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* 目次 - サイドバー用（スティッキー解除） */
.sidebar-widget.table-of-contents {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    /* position: sticky; スティッキー解除 */
    /* top: 2rem; */
    /* max-height: calc(100vh - 4rem); */
    /* overflow-y: auto; */
}

/* ===== 執筆者情報の新スタイル ===== */
.author-info {
    margin: 3rem 0;
    padding: 2rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.author-info__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.75rem;
}

.author-info__content {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.author-info__avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-info__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info__no-image {
    width: 100%;
    height: 100%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #6b7280;
    font-size: 1.5rem;
}

.author-info__details {
    flex: 1;
}

.author-info__name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.author-info__position {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
    margin-left: 0.5rem;
}

.author-info__bio {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #4b5563;
    margin: 0;
}

/* ===== 人気記事ランキングの新スタイル ===== */
.popular-articles__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-article__link {
    display: flex;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 6px;
}

.popular-article__link:hover {
    background: #f9fafb;
}

.popular-article__image {
    width: 4rem;
    height: 3rem;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e5e7eb;
}

.popular-article__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-article__no-image {
    width: 100%;
    height: 100%;
    background: #f3f4f6;
}

.popular-article__content {
    flex: 1;
    min-width: 0;
}

.popular-article__author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.author-icon {
    width: 1rem;
    height: 1rem;
    background: #e5e7eb;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
}

.popular-article__title {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    color: #1f2937;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ===== 関連記事セクションの新スタイル ===== */
.related-articles {
    margin: 3rem 0;
}

.related-articles__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2rem;
}

.related-articles__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.related-article__link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.related-article__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-article__image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #f3f4f6;
}

.related-article__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-article__no-image {
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.related-article__content {
    padding: 0;
}

.related-article__meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.related-article__date,
.related-article__published {
    font-weight: 500;
}

.related-article__title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1f2937;
    margin: 0 0 1rem 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-article__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.related-article__tag {
    font-size: 0.75rem;
    color: #3b82f6;
    font-weight: 500;
}

/* レスポンシブ調整 */
@media (max-width: 767px) {
    .related-articles__list {
        grid-template-columns: 1fr;
    }
    
    .author-info__content {
        flex-direction: column;
        text-align: center;
    }
    
    .author-info__avatar {
        align-self: center;
    }
    
    .article__title {
        font-size: 1.875rem; /* スマートフォンでは少し小さく */
        padding-left: 0.875rem; /* 棒線のスペースも調整 */
    }
    
    .article__title::before {
        width: 3px; /* 棒線も少し細く */
    }
}

.toc-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.table-of-contents__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents__list li {
    margin-bottom: 0.5rem;
}

.table-of-contents__list a {
    color: #4b5563;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    display: block;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    line-height: 1.4;
}

.table-of-contents__list a:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* 目次の階層表示 */
.table-of-contents__list .toc-h2 {
    /* h2は階層の最上位（インデントなし） */
}

.table-of-contents__list .toc-h2 a {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1f2937;
    padding-left: 0.75rem;
}

.table-of-contents__list .toc-h3 {
    /* h3は1段階下の階層 */
}

.table-of-contents__list .toc-h3 a {
    font-size: 0.875rem;
    color: #4b5563;
    padding-left: 1.5rem; /* インデント */
    position: relative;
}

.table-of-contents__list .toc-h3 a::before {
    content: '└';
    position: absolute;
    left: 0.75rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

.table-of-contents__list .toc-h4 {
    /* h4はさらに下の階層 */
}

.table-of-contents__list .toc-h4 a {
    font-size: 0.8125rem;
    color: #6b7280;
    padding-left: 2.25rem; /* さらにインデント */
    position: relative;
}

.table-of-contents__list .toc-h4 a::before {
    content: '└';
    position: absolute;
    left: 1.5rem;
    color: #d1d5db;
    font-size: 0.75rem;
}

/* 記事タグ・カテゴリ */
.single-taxonomy {
    display: flex;
    gap: var(--spacing-lg);
    margin: var(--spacing-2xl) 0;
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--color-border-light);
    flex-wrap: wrap;
}

.taxonomy-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.taxonomy-label {
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
}

.taxonomy-terms {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.taxonomy-term {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--color-bg-light);
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-base);
}

.taxonomy-term:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* 著者情報 */
.author-bio {
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin: var(--spacing-2xl) 0;
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
}

.author-description {
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-md);
}

.author-links {
    display: flex;
    gap: var(--spacing-sm);
}

.author-link {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--color-white);
    color: var(--color-primary);
    text-decoration: none;
    border-radius: var(--radius-base);
    font-size: var(--font-size-xs);
    border: 1px solid var(--color-primary);
    transition: all var(--transition-base);
}

.author-link:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* 関連記事 */
.related-posts {
    margin: var(--spacing-3xl) 0;
    padding: var(--spacing-2xl) 0;
    border-top: 1px solid var(--color-border-light);
}

.related-posts-title {
    font-size: var(--heading-2);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.related-post {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--color-border-light);
}

.related-post:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.related-post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--color-bg-light);
}

.related-post-content {
    padding: var(--spacing-lg);
}

.related-post-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: var(--line-height-tight);
}

.related-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

.related-post-title a:hover {
    color: var(--color-primary);
}

.related-post-excerpt {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-meta {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* ソーシャルシェア */
.social-share {
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin: var(--spacing-2xl) 0;
    text-align: center;
}

.share-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.share-button {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-base);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-base);
}

.share-button.twitter {
    background: #1da1f2;
    color: var(--color-white);
}

.share-button.facebook {
    background: #4267b2;
    color: var(--color-white);
}

.share-button.line {
    background: #00b900;
    color: var(--color-white);
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .single-header {
        padding: var(--spacing-xl) 0;
    }
    
    .single-title {
        font-size: var(--heading-2);
    }
    
    .single-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .entry-content {
        font-size: var(--font-size-sm);
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        width: 60px;
        height: 60px;
        align-self: center;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-button {
        width: 200px;
        justify-content: center;
    }
    
    /* モバイルでのインライン目次調整 */
    .inline-table-of-contents {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    .inline-toc__title {
        font-size: var(--font-size-base);
    }
    
    .inline-toc__list a {
        font-size: var(--font-size-xs);
        padding: var(--spacing-xs) 0;
    }

    .inline-toc__list li.h2 {
        padding-left: 1rem;
    }

    .inline-toc__list li.h3 {
        padding-left: 0.75rem;
        margin-left: 1rem; /* モバイルではインデント少なめ */
    }

    .inline-toc__list li.h4 {
        padding-left: 0.75rem;
        margin-left: 2rem; /* モバイルではインデント少なめ */
    }
}

@media (max-width: 480px) {
    .single-content {
        padding: var(--spacing-lg) 0;
    }
    
    .entry-content h2 {
        font-size: var(--heading-3);
    }
    
    .entry-content h3 {
        font-size: var(--font-size-lg);
    }
    
    .table-of-contents {
        margin: var(--spacing-lg) 0;
        padding: var(--spacing-md);
    }
    
    .single-taxonomy {
        flex-direction: column;
        gap: var(--spacing-md);
    }
}