/* ==================================================
// Easy Table of Contents - Custom Style
// =================================================*/

/* --- 目次全体のコンテナ --- */
#ez-toc-container {
    background-color: #fcfcf9; /* 少し温かみのある白 */
    border: 1px solid #e8e5e0;
    border-left: 5px solid #c9a445; /* テーマのゴールド系アクセントカラー */
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
    padding: 25px 30px 30px;
    margin: 40px 0;
}

/* --- 目次タイトル --- */
#ez-toc-container .ez-toc-title {
    font-family: 'Noto Serif JP', serif; /* 上品なセリフ体フォント */
    font-size: 22px;
    font-weight: 700;
    color: #46413c; /* テーマのベースカラー */
    margin: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8e5e0;
    display: flex;
    align-items: center;
}

/* タイトルの前のアイコン */
#ez-toc-container .ez-toc-title::before {
    font-family: "Font Awesome 6 Free";
    content: '\f0ca'; /* リストのアイコン */
    font-weight: 900;
    margin-right: 12px;
    font-size: 1.1em;
    color: #c9a445;
}

/* 開閉ボタンの調整 */
#ez-toc-container .ez-toc-title-toggle {
    margin-left: auto;
}

/* --- 目次リスト --- */
#ez-toc-container .ez-toc-list {
    margin: 15px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: toc-counter; /* カウンターをリセット */
}

/* --- 第1階層 (h2) --- */
#ez-toc-container .ez-toc-list > li {
    margin-top: 15px;
    padding-left: 28px;
    position: relative;
    line-height: 1.6;
}

/* 第1階層の数字カウンター */
#ez-toc-container .ez-toc-list > li::before {
    counter-increment: toc-counter;
    content: counter(toc-counter);
    position: absolute;
    left: 0;
    top: 0;
    background-color: #c9a445;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* --- 第2階層以降 (h3~) --- */
#ez-toc-container .ez-toc-list ul {
    margin: 10px 0 0;
    padding-left: 15px;
    list-style-type: none;
}

#ez-toc-container .ez-toc-list ul li {
    margin-top: 10px;
    padding-left: 20px;
    position: relative;
}

/* 第2階層以降のマーカー */
#ez-toc-container .ez-toc-list ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    background-color: #d1b678;
    border-radius: 50%;
}


/* --- リンクテキスト --- */
#ez-toc-container .ez-toc-list a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

#ez-toc-container .ez-toc-list a:hover,
#ez-toc-container .ez-toc-list a:focus {
    color: #c9a445;
    text-decoration: underline;
}

/* --- アクティブな項目のスタイル --- */
#ez-toc-container .ez-toc-list .active > a {
    font-weight: 700;
    color: #46413c;
}