/* 基本リセット */
.container {
    line-height: 1.7;
    color: #333;
    margin: 0;
    padding: 0;
    margin: 0 auto;
    padding: 20px 15px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.container a {
    color: #007bff; /* リンクの標準色 */
    text-decoration: none;
    transition: color 0.3s;
}

.container a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* ヘッダー・導入文 */
.page-header h1 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 10px;
    color: #4a4a4a;
}

.title-image {
    margin: 20px 0;
    text-align: center;
}

.title-image img {
    max-width: 100%;
    height: auto;
}

.intro-text {
    text-align: center;
    font-size: 1.1rem;
    margin: 20px 0 30px;
    padding: 15px;
    border: 1px solid #ddd;
    background-color: #fcfcfc;
    border-radius: 5px;
}

.intro-text strong {
    color: #a00; /* 強調色の調整 */
}

/* 目次 */
.toc {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #e6f3ff; /* 背景色を目立たせる */
    border-left: 5px solid #007bff;
    border-radius: 5px;
}

.toc h2 {
    font-size: 1.5rem;
    color: #007bff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
    margin-top: 0;
    margin-bottom: 15px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    column-count: 1; /* スマホでは1列 */
}

.toc-list li {
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.toc-list li a {
    color: #333;
    display: block;
    font-size: 1rem;
}

.toc-list li::before {
    content: "▶"; /* アイコンの代わり */
    color: #007bff;
    position: absolute;
    left: 0;
    font-size: 0.8rem;
    line-height: 1.7;
}

/* QAセクション */
.qa-content hr {
    border: 0;
    border-top: 1px dashed #ccc;
    margin: 40px 0;
}

.qa-section {
    margin-bottom: 40px;
}

.qa-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    border-left: 5px solid #a00;
}

.question {
    font-size: 1.4rem;
    font-weight: bold;
    color: #a00;
    margin: 0;
    flex-grow: 1;
}

.qa-image {
    width: 60px; /* 画像サイズを調整 */
    height: auto;
    flex-shrink: 0;
    margin-left: 15px;
    opacity: 0.7; /* 画像を少し薄くして背景のように扱う */
}

.qa-image img {
    display: block;
}

.answer p {
    margin-bottom: 15px;
}

.answer b {
    color: #a00;
    font-weight: bold;
}

.sub-heading {
    font-size: 1.2rem;
    border-left: 5px solid #ddd;
    padding-left: 10px;
    margin-top: 25px;
    margin-bottom: 15px;
    color: #4a4a4a;
}

.note {
    font-size: 0.95rem;
    padding: 10px 15px;
    background-color: #f0f8ff;
    border-left: 3px solid #6cb5f6;
    margin-top: 15px;
}

/* コンテンツ内のボックス */
.content-box {
    border: 2px dashed #ffb3b3;
    padding: 20px;
    background-color: #fffafa;
    margin: 20px 0;
    border-radius: 5px;
}

.content-box p {
    margin-top: 0;
    margin-bottom: 10px;
}

.content-box p:last-child {
    margin-bottom: 0;
}

.content-box strong {
    color: #4a4a4a;
}

.content-box .sub-note {
    font-size: 0.9rem;
    padding: 5px 0 0 10px;
    border-left: 2px solid #ccc;
}

/* Q10の位牌の種類リスト */
.content-box.type-list dt {
    font-weight: bold;
    margin-top: 10px;
    color: #4a4a4a;
}

.content-box.type-list dd {
    margin: 5px 0 10px 15px;
}

.type-images {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    text-align: center;
}

.type-images li {
    width: 30%; /* 3列表示 */
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.type-images img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 5px;
    border: 1px solid #eee;
    padding: 5px;
}

/* 画像とキャプション */
figure {
    text-align: center;
    margin: 30px 0;
}

figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid #eee;
}

figure figcaption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
}

.content-img.small {
    max-width: 50%; /* 小さめの画像 */
}
.content-img.medium {
    max-width: 70%; /* 中くらいの画像 */
}

/* フッター */
.page-footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.page-footer .top-link {
    display: inline-block;
    color: #4a4a4a;
    font-size: 1rem;
    margin-top: 10px;
}

.page-footer .top-link img {
    max-width: 100%;
    height: auto;
    margin-bottom: 5px;
    border: none;
}


/* レスポンシブデザイン（タブレット以上） */
@media (min-width: 600px) {
    .toc-list {
        column-count: 2; /* 画面が広い場合は2列 */
    }

    .qa-image {
        width: 80px;
    }

    .type-images li {
        width: 18%; /* 5列表示に近くなるよう調整 */
    }

    .content-img.small {
        max-width: 30%;
    }
    .content-img.medium {
        max-width: 50%;
    }
}