/* デザイン設定を保持 */
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f7f9;
    color: #333;
    scroll-behavior: smooth; /* スムーズスクロール追加 */
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 1rem;
}

header {
background-color: #fafafa;
    color: #212529;
    border-bottom: 1px solid #eaeaea;
    padding: 1.2rem 1rem 1rem 1rem; 
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.0rem;
    opacity: 0.9;
}

section {
    padding: 2rem 0;
}

/* セクションタイトル */
h2 {
    font-size: 1.75rem;
    border-bottom: 3px solid #007bff;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    color: #007bff;
    /* 修正ポイント：h2はセクションの起点なので少し上に余白を足すと読みやすいです */
    margin-top: 3rem; 
}

h3 {
    font-size: 1.4rem;
    margin-top: 2.5rem; /* h2との間隔を調整 */
    margin-bottom: 1.2rem;
    border-left: 5px solid #007bff;
    padding-left: 15px; /* 少し広げて視認性アップ */
    color: #333; /* 文字色は少し落とすとh2が際立ちます */
}

h4 {
    font-size: 1.15rem; /* 少しだけサイズを抑え、h3との差を明確に */
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    font-weight: bold;
    color: #444;
    /* 修正案：下線を追加して「見出し感」を強化 */
    border-bottom: 1px solid #aaa;
    padding-bottom: 0.3rem;
    display: inline-block; /* 下線を文字の長さに合わせる場合（お好みで） */
    min-width: 50%; /* 短すぎるときに見栄えを良くする */
}

.card {
    background-color: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-top: 3px solid #007bff;
}

ul {
    list-style: none;
    padding: 0;
    /* リスト全体の左側に余白を作る */
    padding-left: 0.5rem; 
}

ul li {
    position: relative;
    /* ドットから文字までの距離 */
    padding-left: 1.2rem; 
    margin-bottom: 8px;
    line-height: 1.6;
}

ul li::before {
    content: "";
    position: absolute;
    left: 0; 
    top: 0.6em;
    width: 6px;
    height: 6px;
    background-color: #ccc;
    border-radius: 50%;
}

dl dt {
    font-weight: bold;
    color: #333;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #e9ecef;
    border-radius: 4px 4px 0 0;
    border-left: 5px solid #28a745;
}

dl dd {
    padding: 1rem;
    background-color: white;
    margin-left: 0;
    border-radius: 0 0 4px 4px;
    border: 1px solid #dee2e6;
    border-top: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.back-to-top {
    display: block;
    text-align: right;
    margin-top: 1rem;
    font-weight: bold;
}

/* 目次スタイル */
#table-of-contents {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #ccc;
    margin-bottom: 1rem; 
    background-color: white;
    border-top: 1px solid #eee;
}

#table-of-contents h2 {
    border-bottom: none;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.2rem;
    padding-left: 0; 
}

#table-of-contents ul {
    display: flex;
    flex-wrap: wrap;
}

#table-of-contents li {
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    background: none;
    padding: 0;
    border-left: none;
}

/* プライバシーポリシーのテーブル */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
th, td {
    border: 1px solid #dee2e6;
    padding: 12px 8px;
    text-align: left;
    font-size: 0.9rem;
}
thead th {
    background-color: #007bff;
    color: white;
    text-align: center;
}
tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #333;
    color: #adb5bd;
    font-size: 0.9rem;
}

/* 目次内のページ外リンクエリア */
.toc-external-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #ccc;
}

.toc-external-label {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    color: #666;
    font-weight: bold;
}

/* ページ外リンク専用のリストスタイル */
.toc-external-list {
    display: block;
    padding-left: 0;
    list-style: none;
}

.toc-external-list li {
    display: inline-block;
    background: none; /* 既存の li スタイルを打ち消す場合 */
    padding: 0;
    border-left: none;
}

.toc-external-list li a {
    font-weight: bold;
}

summary {
    display: block;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    margin-top: 10px;
}

summary:hover {
    background-color: #e2e6ea;
}

/* 開いた後はボタンを消す、または文言を変える場合はJSが必要ですが、
   CSSだけでも「開いた後に少し余白を作る」などの調整が可能です */
details[open] summary {
    margin-bottom: 10px;
    border-bottom: 1px dashed #ccc;
}