/* =========================================================
   テーブル
   - Bootstrap の table クラスは使わない
   - 素 = 狭い画面
   - .simple-table だけ、769px以上で3列に戻す
   - 左右開始位置は本文基準線が決まるまで触らない
   ========================================================= */

table {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  border-color: #ccc;
}

th,
td {
  padding: 14px;
  border: 0.8px solid #ccc;
  vertical-align: top;
}

th {
  background-color: #fcc;
  font-weight: 650;
  text-align: left;
}

/* ---------------------------------------------------------
   汎用3列テーブル（.simple-table）
   狭い画面では行をカードにする。
   thead は画面上から消し、中身は td の並びで読む。
   --------------------------------------------------------- */
.simple-table {
  width: 100%;
  margin: 1.5rem 0;
  font-size: 1rem;
}

.simple-table,
.simple-table thead,
.simple-table tbody,
.simple-table tr,
.simple-table th,
.simple-table td {
  display: block;
}

.simple-table thead {
  display: none;
}

.simple-table tr {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.simple-table td {
  padding: 10px 0;
  border: none;
}

.simple-table td:first-child {
  padding-bottom: 6px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #222;
}

.simple-table td:last-child img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* 769px以上: 通常の表に戻す */
@media (min-width: 769px) {
  .simple-table,
  .simple-table thead,
  .simple-table tbody,
  .simple-table tr,
  .simple-table th,
  .simple-table td {
    display: revert;
  }

  .simple-table thead {
    display: table-header-group;
  }

  .simple-table tr {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .simple-table th,
  .simple-table td {
    padding: 12px 14px;
    border: none;
    border-bottom: 1px solid #ddd;
  }

  .simple-table td:first-child {
    padding-bottom: 12px;
    font-size: inherit;
  }

  .simple-table th:nth-child(1) { width: 25%; }
  .simple-table th:nth-child(2) { width: 45%; }
  .simple-table th:nth-child(3) { width: 30%; }
}

/* =========================================================
   .info-table
   1行の見出し帯。データ表ではない。
   旧指定の幅312px / 高さ35px / ピンク地に白文字を踏襲する。
   幅は上限だけ残し、画面が狭いときは 100% に縮める。
   ========================================================= */
/* =========================================================
   .info-table
   2列の定義表。クラスは table 自身だけ。
   1列目 = 狭い帯（背景 #d98b8b、白文字）
   2列目 = 本文
   ========================================================= */

table.info-table th:first-child,
table.info-table td:first-child {
  width: 32%;
  min-width: 8rem;
  max-width: 12rem;
  background-color: #d98b8b;
  color: #fff;
  font-weight: 650;
  letter-spacing: 0.04em;
  white-space: normal;
}

@media (min-width: 769px) {
  table.info-table th:first-child,
  table.info-table td:first-child {
    width: 10rem;
    min-width: 10rem;
    max-width: 12rem;
  }
}
