/**
 * Elementor内のリスト表示を復活させる
 * テーマ既存のグローバルreset（ul, ol { list-style: none; }）の影響を
 * Elementorウィジェット内に限定して打ち消す
 */
.elementor-widget-text-editor ul {
    list-style: disc;
    padding-left: 1.5em;
    margin: 1em 0;
}

.elementor-widget-text-editor ol {
    list-style: decimal;
    padding-left: 1.5em;
    margin: 1em 0;
}

.elementor-widget-text-editor li {
    margin: 0.25em 0;
}

/**
 * 固定ヘッダー（高さ5rem）分の上部オフセット
 * page.php（汎用/Elementorページ）の #main 専用。先頭セクションが
 * 固定ヘッダーの裏に隠れるのを防ぐ。既存テンプレートは #main を使わないため無影響。
 */
#main {
    padding-top: 5rem;
}

/**
 * 症状ページパーツ: コンテンツ箱の標準幅（中央寄せ・最大860px contained）
 * 大見出しの帯はフル幅のまま。箱・料金テーブル・Q&A などの内容ブロックに
 * sectionのCSSクラス（_css_classes）で .sp-box-contained を付与して使う共通ユーティリティ。
 */
.elementor-section.sp-box-contained,
.sp-box-contained {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

/* SPは画面端から少し離し、角丸が画面端に貼り付くのを防ぐ */
@media (max-width: 767px) {
    .elementor-section.sp-box-contained,
    .sp-box-contained {
        margin-left: 16px;
        margin-right: 16px;
    }
}

/**
 * 症状ページパーツ: 料金/薬剤テーブル
 * thead=アクセントオレンジ#E95C2Bベタ+白文字、罫線#e0e0e0。
 * 2列はSPで折返して収まり、列を増やすとラッパ(.sp-table-scroll)で横スクロールする。
 * 使い方: text-editorに <div class="sp-table-scroll"><table class="sp-price-table">…</table></div>
 */
.sp-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sp-price-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    font-family: "Noto Serif JP", serif;
    color: #333;
}

.sp-price-table th,
.sp-price-table td {
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: top;
    line-height: 1.7;
}

.sp-price-table thead th {
    background-color: #E95C2B;
    color: #fff;
    font-weight: 700;
    border-color: #E95C2B;
}

@media (max-width: 767px) {
    .sp-price-table th,
    .sp-price-table td {
        padding: 11px 14px;
    }
}

/**
 * 症状ページパーツ: Q&A（<details>ネイティブアコーディオン・JS不要）
 * Q=オレンジ#E95C2B丸+白 / A=グレー#888丸+白 / 右端に開閉インジケータ +/−。
 * 既存トップFAQ(.p-top-faq__*)とはクラス名前空間が別なので競合しない。
 * 使い方: text-editorに <div class="sp-qa"><details class="sp-qa__item">…</details>…</div>
 */
.sp-qa__item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.sp-qa__item:last-child {
    margin-bottom: 0;
}

.sp-qa__q {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    font-family: "Noto Serif JP", serif;
    font-weight: 700;
    color: #333;
    line-height: 1.6;
}

.sp-qa__q::-webkit-details-marker {
    display: none;
}

.sp-qa__q::after {
    content: "+";
    margin-left: auto;
    padding-left: 12px;
    font-size: 22px;
    line-height: 1;
    color: #E95C2B;
    font-weight: 700;
}

.sp-qa__item[open] .sp-qa__q::after {
    content: "\2212";
}

.sp-qa__a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0 18px 18px;
    font-family: "Noto Serif JP", serif;
    color: #333;
    line-height: 1.8;
}

.sp-qa__atext {
    padding-top: 2px;
}

.sp-qa__mark {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}

.sp-qa__mark--q {
    background-color: #E95C2B;
}

.sp-qa__mark--a {
    background-color: #888888;
}

/**
 * 症状ページパーツ: 装飾見出し（小見出し）
 * 左にアクセントオレンジ#E95C2Bの縦バー＋薄アイボリー背景#f7f1dc。
 * 大見出し（帯フル幅）・中見出し（中央下線）と差別化する、本文内の小見出し用途。
 * sectionに css_classes="sp-heading-decorated sp-box-contained" + gap=no（列パディング0）で使う。
 * 装飾はこのCSSが源（section設定にbg/borderを持たせない＝二重指定回避）。
 */
.elementor-section.sp-heading-decorated {
    background-color: #f7f1dc;
    border-left: 4px solid #E95C2B;
    border-radius: 2px;
    padding: 12px 16px;
}

.elementor-section.sp-heading-decorated .elementor-heading-title {
    font-family: "Noto Serif JP", serif;
}

/**
 * 症状ページパーツ: 目次
 * 上下罫線#e0e0e0・白背景・番号アンカーリンク。番号=オレンジ#E95C2B、「|」区切り。
 * 親(1,2,3…)=太字16px、子(1-1,2-1…)=インデント+15px通常。タイトル「目次」=中央+リストアイコン。
 * sectionに css_classes="sp-box-contained" + gap=no で使う（text-editorに <div class="sp-toc">…）。
 * リストは .sp-toc ul で list-style を打ち消す（テーマreset/上のtext-editor disc再有効化より高詳細度）。
 */
.sp-toc {
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 30px 20px;
    font-family: "Noto Serif JP", serif;
}

.sp-toc__title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 18px;
}

/* リストアイコン（CSS描画の3本線・オレンジ） */
.sp-toc__title::before {
    content: "";
    flex: 0 0 auto;
    width: 18px;
    height: 14px;
    background-image:
        linear-gradient(#E95C2B 0 0),
        linear-gradient(#E95C2B 0 0),
        linear-gradient(#E95C2B 0 0);
    background-size: 18px 2px;
    background-position: left top, left center, left bottom;
    background-repeat: no-repeat;
}

.sp-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sp-toc__item {
    margin: 0;
}

.sp-toc__item > a {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 4px;
    color: #333;
    text-decoration: none;
    line-height: 1.6;
}

.sp-toc__item > a:hover .sp-toc__text {
    text-decoration: underline;
}

.sp-toc__num {
    flex: 0 0 auto;
    min-width: 2em;
    color: #E95C2B;
    font-weight: 700;
}

.sp-toc__sep {
    flex: 0 0 auto;
    color: #d8d2c4;
}

.sp-toc__text {
    color: #333;
    font-size: 16px;
    font-weight: 700;
}

.sp-toc__item--child > a {
    padding-left: 26px;
}

.sp-toc__item--child .sp-toc__num {
    min-width: 2.6em;
}

.sp-toc__item--child .sp-toc__text {
    font-size: 15px;
    font-weight: 400;
}

/**
 * 症状ページパーツ: 関連記事リンク
 * 導入文 → オレンジラベル（✓付き）→ 記事カード（サムネ150x100 + タイトル + 抜粋3行truncate）。
 * カード枠#e0e0e0・hoverでオレンジ枠+影。SPはサムネ上・テキスト下の縦積み。
 * サムネは画像未設定時のCSSプレースホルダ（薄グレー+画像アイコンSVG）。実画像は <img> 差替で運用。
 * sectionに css_classes="sp-box-contained" + gap=no で使う（text-editorに <div class="sp-related">…）。
 */
.sp-related {
    font-family: "Noto Serif JP", serif;
}

.sp-related__intro {
    margin: 0 0 16px;
    color: #333;
    font-size: 16px;
    line-height: 1.8;
}

.sp-related__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 9px 16px;
    background-color: #E95C2B;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.5;
    border-radius: 4px;
}

.sp-related__check {
    font-weight: 700;
}

.sp-related__card {
    display: flex;
    gap: 16px;
    align-items: stretch;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fff;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sp-related__card:hover {
    border-color: #E95C2B;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.sp-related__thumb {
    flex: 0 0 150px;
    width: 150px;
    height: 100px;
    border-radius: 2px;
    background-color: #ece9e3;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%23b9b3a8' stroke-width='1.5'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.5'/%3E%3Cpath d='M21 16l-5-5L5 20'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 44px;
}

.sp-related__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.sp-related__title {
    color: #333;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

.sp-related__excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 767px) {
    .sp-related__card {
        flex-direction: column;
    }

    .sp-related__thumb {
        flex-basis: auto;
        width: 100%;
        height: 160px;
    }
}
