/* === ベーススタイル === */
body {
  font-family: "Noto Sans JP", sans-serif;
  line-height: 1.8;
  background: #fdfdfd;
  padding: 20px;
  color: #333;
}

main.clinic-info {
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 100px;
}

h1, h2 {
  color: #29A449;
  border-left: 6px solid #29A449;
  padding-left: 0.6em;
  margin-top: 80px;
}

main ul {
  list-style-type: none;
  padding-left: 1em;
}

main ul li::before {
  content: "✔ ";
  color: #29A449;
  margin-right: 5px;
}

.vaccine-table thead th > span {
  writing-mode: vertical-rl;

  /* 値を 'upright' に変更 */
  -webkit-text-orientation: upright; /* Safari, Chrome向け */
  text-orientation: upright;

  display: inline-block;
  white-space: nowrap;
}

/* th自体のスタイルは元のままでOK */
.vaccine-table thead th {
  height: 100px;
  padding: 6px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  font-size: 0.75rem;
  text-align: center; /* 縦書きにしたspanを中央に配置 */
}


.vaccine-table th:first-child,
.vaccine-table td:first-child {
  width: 30%;
  text-align: center;
}

.vaccine-table th:not(:first-child),
.vaccine-table td:not(:first-child) {
  width: 3.0%;
  text-align: center;
}

/* === 表スタイル共通 === */
.checkup-table,
.vaccine-table,
.optional-vaccine-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.95em;
  min-width: 600px;
}

.checkup-table th,
.checkup-table td,
.vaccine-table th,
.vaccine-table td,
.optional-vaccine-table th,
.optional-vaccine-table td {
  border: 1px solid #ccc;
  padding: 10px 12px;
  text-align: center;
}

.checkup-table th:first-child,
.checkup-table td:first-child,
.vaccine-table th:first-child,
.vaccine-table td:first-child,
.optional-vaccine-table th:first-child,
.optional-vaccine-table td:first-child {
  text-align: center;
  font-weight: bold;
}

.checkup-table thead,
.vaccine-table thead,
.optional-vaccine-table thead {
  background-color: #29A449;
  color: #fff;
}

.checkup-table thead th:first-child,
.vaccine-table thead th:first-child,
.optional-vaccine-table thead th:first-child {
  border-top-left-radius: 10px;
  border-left: none;
}

.checkup-table thead th:last-child,
.vaccine-table thead th:last-child,
.optional-vaccine-table thead th:last-child {
  border-top-right-radius: 10px;
  border-right: none;
}

.checkup-table tbody tr:nth-child(even),
.vaccine-table tbody tr:nth-child(even),
.optional-vaccine-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* === テーブルラッパー === */
.table-scroll {
  overflow-x: auto;
  margin: 20px 0;
}

.table-scroll table {
  width: 100%;
  min-width: 100px;
  font-size: 0.8rem;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0 auto;  /* ← 中央寄せを追加！ */
}

.table-scroll th,
.table-scroll td {
  border: 1px solid #ccc;
  padding: 6px 8px;
  text-align: center;
}

/* === 補足テキストなど === */
.vaccine-note,
.note {
  font-size: 0.9em;
  color: #555;
  margin-top: 10px;
}

/* === メニューリスト初期化 === */
.menu-list,
.menu-list li {
  list-style: none !important;
}

/* === スマホ対応 === */
@media screen and (max-width: 600px) {
  body {
    font-size: 0.9em;
  }

  h1, h2 {
    font-size: 1.2em;
  }

  .table-scroll {
    margin: 20px 0;
  }

  .table-scroll table {
    font-size: 0.5rem;
  }

  .checkup-table th,
  .checkup-table td,
  .optional-vaccine-table th,
  .optional-vaccine-table td {
    font-size: 0.6rem;
    padding: 8px;
  }

  main ul li::before {
    content: "\2022 ";
    color: #29A449;
  }
}

@media (min-width: 769px) {
  .vaccine-table thead th {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    height: 100px;
  }
}

@media (max-width: 768px) {
  .vaccine-table thead th {
    writing-mode: horizontal-tb;
    transform: none;
    display: table-cell;
    height: auto;
    text-align: center;
  }
}

@media screen and (max-width: 600px) {
  .vaccine-table {
    font-size: 0.4rem; /* さらに小さく */
  }

  .vaccine-table th,
  .vaccine-table td {
    padding: 2px 4px;    /* パディングを最小限に */
    min-width: unset;    /* 自動で小さくなるように */
  }

  .vaccine-table thead th {
    height: 70px;          /* 縦書きの高さ調整 */
    font-size: 0.5rem;
    writing-mode: vertical-rl;
    justify-content: center;
    align-items: center;
  }

  .vaccine-table th:first-child,
  .vaccine-table td:first-child {
    width: 40% !important;
  }

  .vaccine-table th:not(:first-child),
  .vaccine-table td:not(:first-child) {
    width: auto;
  }
}


.vaccine-table.yobou thead th {
  text-orientation: upright !important;
}

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