/*
Theme Name: Kurobikari Minimal
Author: Satoru Kawamura
Version: 1.2.1
*/

* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; color: #333; background: #f4f5f7; margin: 0; line-height: 1.8; }

a { color: #333; text-decoration: none; }
a:hover { color: #000; opacity: 0.7; }
ul, ol { list-style: none; padding: 0; margin: 0; }

/* グローバルナビゲーション（全幅・余白なし） */
.global-nav { background: #1a1a1a; color: #fff; padding: 0 20px; font-size: 13px; font-weight: bold; width: 100%; margin: 0; }
.global-nav-container { display: flex; align-items: center; height: 50px; }

/* ★ 追加いただいたCSSを統合：メニューの中央揃え ★ */
.global-nav-menu, .header-nav, .nav-menu, ul.menu, .site-header nav ul { display: flex !important; justify-content: center !important; margin: 0 auto !important; width: 100%; padding: 0; list-style: none; }
.global-nav-menu li a { color: #ccc; padding: 0 20px; display: block; line-height: 50px; transition: 0.3s; letter-spacing: 0.05em; }
.global-nav-menu li a:hover { color: #fff; }

/* 全体レイアウト枠 */
.container { display: flex; align-items: flex-start; max-width: 1200px; margin: 40px auto 60px; padding: 0 20px; gap: 40px; }

/* メインコンテンツ */
.main-content { flex: 1; background: #fff; padding: 50px 60px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.sidebar { width: 320px; flex-shrink: 0; }

/* ★ 追加いただいたCSSを統合：サイトタイトル枠の調整 ★ */
.site-header { text-align: center; }
.site-title { margin-top: 60px !important; margin-bottom: 40px !important; }
.site-title a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #999 !important;
    padding: 20px 35px;
    text-decoration: none !important;
    border-bottom: 2px solid #222 !important;
    line-height: 1;
    letter-spacing: 0.15em;
    color: #333333;
    font-size: 26px;
    font-weight: bold;
}

/* 記事詳細 */
.post-title { font-size: 34px; margin: 0 0 40px 0; border-bottom: 2px solid #000; padding-bottom: 15px; line-height: 1.4; }
.entry-content { line-height: 1.9; font-size: 16px; }
.entry-content img { max-width: 100%; height: auto; display: block; margin: 30px 0; border-radius: 6px; }
.entry-content h2 { font-size: 22px; margin-top: 60px; border-left: 4px solid #000; padding-left: 15px; line-height: 1.4; }

/* 目次 */
.toc { background: #f4f4f4; padding: 25px; margin: 40px 0; border: 1px solid #ddd; border-radius: 4px; }
.toc-title { font-weight: bold; margin-bottom: 15px; font-size: 14px; letter-spacing: 0.1em; border-bottom: 1px solid #ccc; padding-bottom: 10px; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 10px; font-size: 0.95em; }
.toc li::before { content: "─ "; color: #999; }

/* 吹き出し互換 */
.say-wrap, .speech-wrap { display: flex !important; align-items: flex-start !important; margin: 40px 0 !important; gap: 20px !important; background: transparent !important; border: none !important; padding: 0 !important; }
.say-wrap.right { flex-direction: row-reverse !important; }
.say-icon, .speech-person { text-align: center !important; width: 70px !important; flex-shrink: 0 !important; float: none !important; margin: 0 !important; }
.say-icon img, .speech-icon-image { width: 70px !important; height: 70px !important; border-radius: 50% !important; object-fit: cover !important; margin-bottom: 5px !important; border: 1px solid #eee !important; display: block !important; }
.say-name, .speech-name { font-size: 11px !important; color: #666 !important; line-height: 1.2 !important; font-weight: bold !important; text-align: center !important; }
.say-text, .speech-balloon { position: relative !important; background: #f9f9f9 !important; padding: 20px !important; border-radius: 8px !important; border: 1px solid #eee !important; flex: 1 !important; font-size: 0.95em !important; line-height: 1.8 !important; margin: 0 !important; float: none !important; width: auto !important; }
.say-text::before, .speech-balloon::before { content: "" !important; position: absolute !important; top: 32px !important; left: -10px !important; border-width: 6px 10px 6px 0 !important; border-style: solid !important; border-color: transparent #eee transparent transparent !important; }
.say-text::after, .speech-balloon::after { content: "" !important; position: absolute !important; top: 32px !important; left: -8px !important; border-width: 6px 10px 6px 0 !important; border-style: solid !important; border-color: transparent #f9f9f9 transparent transparent !important; }
.say-wrap.right .say-text::before { left: auto !important; right: -10px !important; border-width: 6px 0 6px 10px !important; border-color: transparent transparent transparent #eee !important; }
.say-wrap.right .say-text::after { left: auto !important; right: -8px !important; border-width: 6px 0 6px 10px !important; border-color: transparent transparent transparent #f9f9f9 !important; }

/* ブログカード */
.blog-card { display: flex; border: 1px solid #ddd; margin: 40px 0; border-radius: 6px; overflow: hidden; transition: 0.3s; background: #fff; }
.blog-card:hover { background: #fafafa; border-color: #999; }
.blog-card-thumb { width: 200px; flex-shrink: 0; background: #f4f4f4; border-right: 1px solid #ddd; }
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-content { padding: 20px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.blog-card-title { font-weight: bold; font-size: 16px; margin-bottom: 10px; line-height: 1.4; color: #000; }
.blog-card-excerpt { font-size: 0.8em; color: #666; line-height: 1.5; margin-bottom: 10px; }
.blog-card-domain { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 0.05em; }

/* 記事一覧・関連記事の構造 */
.post-list .archive-article { margin-bottom: 50px; padding-bottom: 50px; border-bottom: 1px solid #eee; }
.post-list .archive-article:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.archive-link-wrap, .related-item { display: flex; align-items: stretch; gap: 30px; width: 100%; transition: opacity 0.3s; }
.archive-link-wrap:hover { opacity: 0.8; }
.archive-thumb-wrap, .related-thumb { position: relative; flex-shrink: 0; width: 220px; height: 125px; }
.archive-thumb-wrap img, .related-thumb img { width: 100%; height: 100%; object-fit: cover; background: #f4f4f4; border-radius: 6px; display: block; }
.archive-cat-badge { position: absolute; top: 0; left: 0; background: rgba(0,0,0,0.7); color: #fff; font-size: 11px; padding: 4px 10px; border-top-left-radius: 6px; border-bottom-right-radius: 6px; letter-spacing: 0.05em; font-weight: bold; }
.archive-text, .related-text { display: flex; flex-direction: column; justify-content: space-between; flex: 1; padding: 2px 0; }
.archive-title, .related-title { font-weight: bold; font-size: 20px; margin: 0; line-height: 1.4; }
.archive-excerpt, .related-excerpt { font-size: 0.9em; color: #666; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }

/* 関連記事エリア */
.related-posts { margin-top: 60px; padding-top: 40px; border-top: 2px solid #000; }
.related-posts h3 { margin: 0 0 40px 0; font-size: 20px; }
.related-item { padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid #eee; }
.related-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

/* ページネーション */
.pagination-wrap { margin-top: 40px; padding-top: 20px; }
.pagination-next-btn { display: block; text-align: center; background: #fff; border: 1px solid #eee; border-radius: 30px; padding: 15px; margin: 0 0 30px 0; font-size: 15px; color: #888; font-weight: bold; transition: 0.3s; }
.pagination-next-btn:hover { background: #f9f9f9; border-color: #ccc; color: #333; }
.pagination-numbers { display: flex; justify-content: center; gap: 8px; font-size: 14px; }
.pagination-numbers .page-numbers { display: inline-block; width: 36px; height: 36px; line-height: 36px; text-align: center; border-radius: 50%; background: #fff; border: 1px solid #eee; color: #666; }
.pagination-numbers .current { background: #a6a6a6; border-color: #a6a6a6; color: #fff; font-weight: bold; }
.pagination-numbers a.page-numbers:hover { background: #f4f5f7; border-color: #ccc; }

/* シェアボタン */
.share-area { margin: 60px 0; padding: 25px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; text-align: center; }
.share-area span { display: block; font-size: 11px; margin-bottom: 15px; color: #999; letter-spacing: 0.2em; font-weight: bold; }
.share-buttons a { margin: 0 20px; font-weight: bold; text-decoration: underline; font-size: 15px; letter-spacing: 0.05em; }

/* 著者紹介 */
.author-banner { margin-top: 60px; padding: 40px; background: #f9f9f9; text-align: center; border: 1px solid #eee; border-radius: 8px; }
.author-label { font-size: 12px; letter-spacing: 0.1em; color: #999; margin-bottom: 20px; font-weight: bold; }
.author-avatar img { border-radius: 50%; margin-bottom: 15px; width: 80px !important; height: 80px !important; display: block; margin-left: auto; margin-right: auto; }
.author-name { font-weight: bold; font-size: 18px; margin-bottom: 10px; }
.author-desc { font-size: 0.85em; color: #555; max-width: 400px; margin: 0 auto 20px; line-height: 1.6; white-space: pre-line; }
.author-link { display: inline-block; padding: 8px 25px; border: 1px solid #333; font-size: 13px; border-radius: 4px; }

/* サイドバー */
.sidebar-section { background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); margin-bottom: 30px; }
.sidebar-section:last-child { margin-bottom: 0; }
.sidebar-section h3 { font-size: 15px; font-weight: bold; border-bottom: 1px solid #eee; padding-bottom: 15px; margin: 0 0 20px 0; letter-spacing: 0.05em; }
.sidebar-section.search-section h3 { border-bottom: none; padding-bottom: 0; margin-bottom: 15px; }
.sidebar-list li { position: relative; padding: 12px 0; border-bottom: 1px dashed #eee; font-size: 0.95em; }
.sidebar-list li:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-list li a { color: #333; display: inline-block; }
.sidebar-list li a::before { content: ""; display: inline-block; width: 14px; height: 12px; margin-right: 8px; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%23a0a0a0" d="M64 480H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H288c-10.1 0-19.6-4.7-25.6-12.8L243.2 57.6C231.1 41.5 212.1 32 192 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64z"/></svg>') no-repeat center center; }
.sidebar-list .cat-count { float: right; color: #999; font-size: 0.85em; font-weight: bold; }
.sidebar-list ul.children { margin-top: 12px; padding-left: 20px; border-top: 1px dashed #eee; }
.search-box-wrap { position: relative; width: 100%; }
.search-box-input { width: 100%; padding: 12px 40px 12px 15px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; color: #333; outline: none; transition: 0.3s; }
.search-box-input:focus { border-color: #666; }
.search-box-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; width: 16px; height: 16px; padding: 0; cursor: pointer; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%23ccc" d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg>') no-repeat center center; }

/* モバイル・タブレット画面 */
@media (max-width: 992px) {
    .global-nav { margin: 0; border-radius: 0; height: 12px; padding: 0; }
    .global-nav-container { display: none; }
    
    .container { flex-direction: column; padding: 0 15px; margin-top: 30px; }
    .main-content { padding: 30px 20px; }
    .sidebar { width: 100%; }
    
    .archive-link-wrap, .related-item { flex-direction: column; gap: 16px; align-items: flex-start; }
    .archive-thumb-wrap, .related-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
    .archive-text, .related-text { justify-content: flex-start; gap: 10px; }
    .archive-article { margin-bottom: 40px; padding-bottom: 40px; }
}
/* ==========================================
   追加カスタマイズ（目次・リスト・吹き出し）
   ========================================== */
/* 1. 目次（TOC）の完全独立デザイン */
.entry-content .toc {
    background: #f9f9f9;
    padding: 25px;
    margin: 2em 0;
    border-radius: 4px;
}
.entry-content .toc-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 15px;
}

/* リスト設定の強制リセット（テーマの干渉を防ぐ） */
.entry-content .toc ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    counter-reset: toc-h2-counter; /* H2用の数字カウンター */
}
.entry-content .toc li {
    list-style: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* テーマ独自の「ー」などの装飾を強制排除 */
.entry-content .toc li::before,
.entry-content .toc li::after,
.entry-content .toc a::before,
.entry-content .toc a::after {
    display: none !important;
    content: none !important;
}

/* H2（親）の設定 */
.entry-content .toc li.toc-h2 {
    counter-increment: toc-h2-counter;
    margin-top: 15px !important;
    margin-bottom: 5px !important;
    padding-left: 0 !important;
}
.entry-content .toc li.toc-h2 > a {
    font-weight: normal !important; /* ★H2の太字を解除 */
    display: inline-block;
}
/* H2の先頭に数字をつける */
.entry-content .toc li.toc-h2 > a::before {
    content: counter(toc-h2-counter) ". " !important;
    display: inline-block !important;
    font-weight: normal !important; /* ★数字の太字も解除 */
    margin-right: 5px;
}

/* H3（子）の設定 */
.entry-content .toc li.toc-h3 {
    margin-bottom: 5px !important;
    padding-left: 20px !important; /* H3はインデントを下げる */
}
.entry-content .toc li.toc-h3 > a {
    font-weight: normal !important; /* H3は太字にしない */
    display: inline-block;
}

/* ==========================================
   2. 通常リスト（箇条書き）の装飾
   ========================================== */
/* 記事内のul, olを枠で囲む */
.entry-content > ul,
.entry-content > ol {
    background-color: #f9f9f9 !important;
    padding: 20px 20px 20px 40px !important;
    margin: 2em 0 !important;
    border-radius: 4px !important;
}
.entry-content > ul { list-style: disc outside !important; }
.entry-content > ol { list-style: decimal outside !important; }
.entry-content > ul li,
.entry-content > ol li {
    margin-bottom: 0.5em !important;
    line-height: 1.7 !important;
}

/* ==========================================
   3. 吹き出し（[say]）のズレ修正
   ========================================== */
.say-wrap { align-items: center !important; }
.say-text::after { top: 50% !important; transform: translateY(-50%) !important; }