/* ==========================================================
   基本設定（全ページ共通）
   ========================================================== */

html {
    font-size: 16px;
}

body {
    line-height: 1.7;
    font-family: "Hiragino Sans", "Yu Gothic Medium", "Noto Sans JP", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f3e9;
}

/* ==========================================================
   レイアウト
   ========================================================== */

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================================
   見出し（h1～h4）
   ========================================================== */

h1 {
    font-size: 1.6rem;
    margin-top: 10px;
    margin-bottom: 6px;
    line-height: 1.3;
}

.title-main {
  color: #333366;
  padding: 0.1em 0.4em;
  display: inline-block;
}

h2 {
    font-size: 1.2rem;
    margin-top: 30px;
    margin-bottom: 5px;
    line-height: 1.3;
}

h3 {
    font-size: 1.2rem;
    margin-top: 5px;
    margin-bottom: 10px;
    line-height: 1.3;
}

h4 {
    font-size: 1.1rem;
    font-weight: normal;
    margin-top: 4px;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* ==========================================================
   段落
   ========================================================== */

p {
    margin-top: 5px;
    margin-bottom: 6px;
    line-height: 1.5;
}

/* ==========================================================
   画像関連
   ========================================================== */

.img-center {
  text-align: center;
}

.img-large {
  max-width: 800px;
  width: 100%;
  height: auto;
}

.img-medium {
  max-width: 600px;
  width: 100%;
  height: auto;
  margin-bottom: 2px;
}

.img-small {
  max-width: 400px;
  width: 100%;
  height: auto;
  margin-bottom: 2px;
}

.figure-link {
  text-align: left;
  margin-top: 2px;
  font-size: 0.9em;
}

.img-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ==========================================================
   強調表示
   ========================================================== */

.highlight {
  color: red;
  font-weight: bold;
}

.highlight2 {
  color: red;
  font-weight: normal;
}

.highlight3 {
  font-weight: bold;
}

.highlight4 {
  color: blue;
  font-weight: normal;
}

.highlight5 {
  background-color: #fff3b0;
}


/* ==========================================================
   ページ下部ナビ
   ========================================================== */

.page-nav {
  margin-top: 20px;
  text-align: center;
  font-size: 1em;
}

/* ==========================================================
   画像の横並び（PC）→縦並び（スマホ）
   ========================================================== */

.responsive-two {
  display: flex;
  gap: 30px;
}

.responsive-two img {
  width: 100%;
  max-width: 300px;
  height: auto;
}

/* ==========================================================
   スマホ用レイアウト
   ========================================================== */

@media (max-width: 600px) {
  .responsive-two {
    flex-direction: column;
  }

  .responsive-two img {
    max-width: 100%;
  }
}

/* ==========================================================
   表デザイン最適化
   ========================================================== */

/* ▼ 基本の表デザイン（map-table のみ適用） */
.map-table {
  width: auto;
  max-width: 600px;
  margin: 1.5em 0;
  border-collapse: collapse;
  font-size: 0.95rem;
  background-color: #ffffff;
}

.map-table th,
.map-table td {
  border: 1px solid #ccc;
  padding: 8px 10px;
  white-space: nowrap;
}

/* ▼ 見出し */
.map-table th {
  background-color: #e8f4ff;
  font-weight: bold;
  text-align: center;
}

/* ▼ 偶数行の背景 */
.map-table tbody tr:nth-child(even) {
  background-color: #f5f5f5;
}

/* ▼ 長文用（compact） */
.map-table.compact {
  max-width: 900px;
  margin-left: 0;
  margin-right: auto;
}

.map-table.compact th,
.map-table.compact td {
  white-space: normal;
  line-height: 1.6;
}

/* 1列目（No）は固定幅 */
.map-table.compact td:first-child,
.map-table.compact th:first-child {
  width: 30px;
  min-width: 30px;
  text-align: normal;
  white-space: nowrap;
}

/* 2列目（施設名）の最大幅 */
.map-table.compact td:nth-child(2),
.map-table.compact th:nth-child(2) {
  max-width: 260px;
}

/* 3列目（描画状況）の最大幅 */
.map-table.compact td:nth-child(3),
.map-table.compact th:nth-child(3) {
  max-width: 260px;
}

/* 4列目（図番）は自然に折り返す */
.map-table.compact td:nth-child(4),
.map-table.compact th:nth-child(4) {
  white-space: normal;
  word-break: keep-all;
}

/* ▼ 表（短文用・PCではコンパクト） */
.map-table.small {
  max-width: 400px;       /* PCではコンパクトに */
  font-size: 0.9rem;
}

.map-table.small th,
.map-table.small td {
  padding: 4px 6px;
  white-space: nowrap;
}


/* ▼ スマホで表がはみ出すのを防ぐ（横スクロール） */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-left: 2px;
  padding-right: 2px;
}

.table-wrapper table {
  width: 100%;
  max-width: none;
}

/* ▼ PC閲覧時：ヘッダー行を固定（便利） */
@media (min-width: 768px) {
  .map-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
  }
}

@media (max-width: 600px) {

  /* wrapper はスマホでは画面幅に合わせる */
  .table-wrapper {
    width: 100%;
  }

  /* style.css の width:100% を解除 */
  .table-wrapper table {
    width: auto !important;
  }

  /* compact の max-width:900px を解除 */
  .map-table.compact {
    max-width: none !important;
    width: auto;
  }

  /* 読みやすさ調整（任意） */
  .map-table {
    font-size: 0.85rem;
  }
}

.hang {
  padding-left: 1.5em;
  text-indent: -1.5em;
  line-height: 1.5;
}
