/* ① 文書全体で figure カウンタを一度だけ初期化（競合しにくい固有名） */
/*:root { counter-reset: figureCounter; }*/

/* ② すべての figure の figcaption で番号を進める（.graph 以外も連番） */
/*figure figcaption::before {
  counter-increment: figureCounter;
  content: "Fig. " counter(figureCounter) "． ";
  font-weight: 600;
}*/

/* ③ レイアウトや見た目は従来通り .graph に適用（体裁維持） */
figure.graph {
    margin: 1.25rem auto;
    text-align: center;
    /* 画像自体の中央寄せ */
    break-inside: avoid;
    /* 印刷やPDF書き出し時に分割されにくくする */
}

figure.graph img {
    max-width: 100%;
    height: auto;
}

figure.graph figcaption {
    text-align: center;
    /* ← キャプションの中央揃え */
    font-size: 1.0rem;
    color: var(--text-body);
    margin-top: 0.5rem;
    line-height: 1.5;
}


/* ③ レイアウトや見た目は従来通り .image に適用（体裁維持） */
figure.image {
    margin: 1.25rem auto;
    text-align: center;
    /* 画像自体の中央寄せ */
    break-inside: avoid;
    /* 印刷やPDF書き出し時に分割されにくくする */
}

figure.image img {
    max-width: 100%;
    height: auto;
}

figure.image figcaption {
    text-align: center;
    /* ← キャプションの中央揃え */
    font-size: 1.0rem;
    color: var(--text-body);
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* すべての <hr> を二重線に 
hr {
    border: none;
    border-top: 3px double #444;
    二重線 
    margin: 1.5rem 0;
}*/

/* またはクラスを分けたい場合 */
hr.double {
    border: none;
    border-top: 4px double #aaa;
    margin: 1.5rem 0;
}

/* === Prevew モード（読み取り専用表示）で中央寄せ === */
.markdown-preview-view table {
    margin-left: auto;
    margin-right: auto;
}

/* === Live Preview（ライティングビュー）でも中央寄せ === */
/* Obsidian のエディタは CodeMirror ベースなのでこちらにも適用 */
.cm-s-obsidian .HyperMD-table table,
.markdown-source-view.mod-cm6 .cm-table-widget table {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* （オプション）表全体を中央ぞろえにしたい場合 */
.markdown-preview-view table,
.cm-s-obsidian .HyperMD-table table,
.markdown-source-view.mod-cm6 .cm-table-widget table {
    text-align: center;
}

/* （オプション）セル内容だけ左に戻したい場合はこれを追加 */
/*
.markdown-preview-view th, .markdown-preview-view td,
.cm-s-obsidian .HyperMD-table th, .HyperMD-table td,
.markdown-source-view.mod-cm6 .cm-table-widget th,
.markdown-source-view.mod-cm6 .cm-table-widget td {
  text-align: left;
}
*/

/* Mermaid 図をスマホで切れないように横スクロール可能にする */
.mermaid {
    overflow-x: auto !important;
    overflow-y: hidden;
    max-width: 100%;
}

/* Mermaid SVG を親幅に合わせて縮小 */
.mermaid svg {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
}

/* spanタグ用の設定 */
span.caption {
    display: block;
    text-align: center;
    font-size: 1.0rem;
    color: var(--text-body);
    margin-top: 0.5rem;
    line-height: 1.5;
}

span.caption em {
    font-style: normal;
}


