/* 道案内ページ専用スタイル */
.access-toc {
  text-align: center;
  width: fit-content;
  max-width: 85vw;
  margin: 1.25rem auto 2rem;
  padding: .75rem 1rem;
}

.section-box {
  max-width: 980px;
  margin: 0 auto 2rem;
}

.step-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 1rem 1rem 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  margin-bottom: 1.25rem;
}

.step-card img {
  display: block;
  width: min(900px, 95%);
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

/* 戻るリンク */
.access-back {
  text-align: center;
  margin: 1.5rem 0 2rem;
}
.access-back a {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 10px;
  border: 1px solid #94a3b8;
  background: #eff6ff;
  text-decoration: none;
  font-weight: 700;
}
.access-back a:hover {
  background: #dbeafe;
}

/* ===== 追加: 道案内ページ 画像サイズ制限 & フルスクリーン表示（モーダル） ===== */

/* ページ内の通常表示: 横幅・縦幅の上限（比率維持） */
.step-card img {
  display: block;
  width: auto;                 /* 自然比率維持 */
  max-width: min(900px, 95%);  /* 横の上限 */
  height: auto;
  max-height: 70vh;            /* 縦の上限 */
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  cursor: zoom-in;             /* 拡大できることを示す */
}

/* モーダル本体 */
.modal-open { overflow: hidden; }

.img-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.82);
  z-index: 1000;
  padding: 2rem;
  touch-action: none; /* iOSでページ側ピンチズームを抑制 */
}
.img-modal.is-open { display: flex; }

/* モーダル内コンテンツ */
.img-modal__viewport {
  position: relative;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  width: 100%;
  height: auto;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

.img-modal__viewport img {
  display: block;
  /* どちらの辺にも収まるようにする（縦長・横長どちらでもOK） */
  max-width: 100%;
  max-height: 92vh;  /* ここがポイント：画面の高さに合わせる */
  width: auto;
  height: auto;
  margin: 0 auto;
}


/* 閉じるボタン */
.img-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.img-modal__close:hover { background: #f3f4f6; }

/* 背景クリックで閉じられるようにするための領域 */
.img-modal__backdrop {
  position: fixed;
  inset: 0;
}

figcaption {
  font-size: 1.25rem;     /* h4相当の文字サイズ */
  font-weight: 700;       /* h4相当の太字 */
  line-height: 1.4;       /* h4相当の行間 */
  margin-top: 0.7em;      /* h4 の上余白 */
  margin-bottom: 1.4em;   /* ★ 下だけ 2倍（0.7em → 1.4em） */

  max-width: 900px;     /* 画像に近い幅 */
  width: 95%;           /* 画面が狭い時は小さめに */
  margin-left: auto;
  margin-right: auto;   /* → これで中央に“細長い箱”を作る */
  text-align: left;     /* → 箱の内部で左寄せに */
}


/* =========== 目次（最終版） =========== */

/* 目次ボックス全体（中央寄せ ＋ 背景/枠は既存スタイル踏襲） */
.toc {
  display: block;
  width: fit-content;                /* 内容に応じて横幅が決まる */
  max-width: 85vw;                   /* 画面の85%までに制限 */
  margin: 1.5rem auto 2rem;          /* 全体を中央寄せ */
  padding: 1rem 1.5rem;
  border: 3px solid #0ea5e9;
  border-radius: 14px;
  background: #ecfeff;
  position: relative;
  text-align: left;                  /* ★文字は左揃え */
}

/* 「目次」ラベル（既存デザインを流用） */
.toc::before {
  content: "目次";
  position: absolute;
  top: -14px;
  left: 14px;
  background: #0ea5e9;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

/* リスト：中身は左寄せ・中央寄せ解除 */
.toc ul {
  margin: .4rem 0 0 1em;
  padding: 0;
  list-style: disc;
  text-align: left;
}

/* 項目リンク */
.toc a {
  display: inline-block;
  padding: .25rem .5rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid transparent;
  color: inherit;
}
.toc a:hover, .toc a:focus {
  background: #e0f2fe;
  border-color: #7dd3fc;
}


.section-box {
  padding-top: 3rem;               /* 上に余白 */
  border-top: 6px solid #a0fffe;   /* ★淡い青の区切り線 */
  margin-top: 4rem;                /* 前の要素との距離 */
}