body {
    background-color: #f1f5f9 !important; /* の背景色（淡いブルーグレー） */
    color: #242424;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 広告用 */
td > div { width:auto!important; }

/* ナビゲーションタブ */
.pb-nav-link {
    color: #737981;
    font-weight: 700;
    text-decoration: none;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid transparent;
    transition: color 0.2s;
    font-size: 0.95rem;
}
.pb-nav-link:hover {
    color: #242424;
}
.pb-nav-link.active {
    color: #242424;
    border-bottom: 2px solid #242424;
}

/* 風カード（リスト型） */
.pb-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px; /* 風の少し大きめの角丸 */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    padding: 1rem;
    color: inherit;
    text-decoration: none;
}
.pb-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    color: inherit;
}
.pb-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: #242424;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 2行を超えたら「...」で省略 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* 左側の小さなサムネイル画像 */
.pb-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* -------------------------------------
 * 記事詳細ページ（風）
 * ------------------------------------- */

/* 左側の記事カード */
.pb-article-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2.5rem 3rem;
}
@media (max-width: 768px) {
    .pb-article-card { padding: 1.5rem; }
}

/* 記事タイトルとタグ */
.pb-article-title {
    color: #242424;
    font-size: 1.8rem;
    line-height: 1.4;
    font-weight: 800;
}
.pb-tag {
    background-color: #f1f5f9;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    transition: background-color 0.2s;
}
.pb-tag:hover {
    background-color: #e2e8f0;
    color: #242424;
}

/* 記事本文のデザイン */
.pb-article-content {
    color: #242424;
    font-size: 1.05rem;
    line-height: 1.8;
}
.pb-article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}
.pb-article-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.pb-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}
/* functions.phpの自動整形停止対応（Pタグがない状態での余白調整） */
.pb-article-content > * {
    margin-bottom: 1rem;
}

/* -------------------------------------
 * 目次（TOC）の基本スタイルとドット装飾（Zenn風）
 * ------------------------------------- */
.pb-toc-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.pb-toc-container {
    position: relative;
    padding-left: 0;
    list-style: none;
    margin: 0;
}
/* 縦のガイドライン */
.pb-toc-container::before {
    content: "";
    position: absolute;
    top: 8px; 
    bottom: 12px; 
    left: 5px; /* ドットの中心を通る位置 */
    width: 2px;
    background-color: #e2e8f0;
}
.pb-toc-item {
    position: relative;
    margin-bottom: 0.5rem;
}
.pb-toc-item a {
    display: block;
    color: #737981;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    padding-left: 1.5rem;
    padding-top: 2px;
    padding-bottom: 2px;
    transition: color 0.2s;
}
.pb-toc-item a:hover {
    color: #242424;
    text-decoration: underline;
}
/* アクティブ時のテキスト */
.pb-toc-item.active > a {
    color: #242424;
    font-weight: 700;
}

/* --- H2のドット（太い・大きい） --- */
.pb-toc-item.level-2::before {
    content: "";
    position: absolute;
    left: -2px; /* 縦ラインに合わせる */
    top: 6px;
    width: 16px; 
    height: 16px;
    border-radius: 50%;
    background-color: #bfdbfe; /* 薄いブルー（非アクティブ） */
    border: 3px solid #ffffff; /* 白フチで縦ラインを隠す */
    z-index: 1;
    transition: all 0.2s;
}
/* H2アクティブ時のドット（Zenn風の後光エフェクト） */
.pb-toc-item.level-2.active::before {
    background-color: #3ea8ff;
    box-shadow: 0 0 0 3px #e0f2fe; 
    border-color: #ffffff;
}

/* --- H3のドット（小さい） --- */
.pb-toc-item.level-3 > a {
    padding-left: 2rem;
    font-size: 0.85rem;
}
.pb-toc-item.level-3::before {
    content: "";
    position: absolute;
    left: 3px; /* 縦ラインの中央に合わせる */
    top: 10px;
    width: 6px; 
    height: 6px;
    border-radius: 50%;
    background-color: #cbd5e1; /* グレー（非アクティブ） */
    z-index: 1;
    transition: background-color 0.2s;
}
/* H3アクティブ時のドット */
.pb-toc-item.level-3.active::before {
    background-color: #3ea8ff;
}

/* --- モバイル目次ドロップダウン用の微調整 --- */
.pb-mobile-toc-menu {
    width: 280px; 
    border-radius: 16px; 
    margin-top: 10px !important;
    max-height: 70vh; /* 画面に収まらない場合はスクロールさせる */
    overflow-y: auto;
}
.pb-mobile-toc-menu .pb-toc-item a {
    white-space: normal; /* モバイルでは長い見出しの折り返しを許可 */
}

/* 長いURLや英単語の画面はみ出しを防止するCSS */
.pb-article-content {
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

/* リンク（aタグ）に対してさらに強力な折り返しを指定 */
.pb-article-content a {
    word-break: break-all;
}

/* ページ内アンカーリンクで飛んだ際の、上部の余白（ズレ防止） */
:target {
    scroll-margin-top: 120px;
}