/* ============================================================
   useful-require.css
   /useful/require/ 専用スタイル。
   共通は guide-common.css。ここでは条件表と補助要素のみ上書きする。
   ============================================================ */

/* ---- 導入文 ---- */
.req-lede {
  max-width: 780px;
}

/* ---- 冒頭の結論 ---- */
.req-conclusion-card {
  padding: 22px 26px;
  background: var(--guide-gold-pale);
  border: 1px solid #f1dfad;
  border-radius: 14px;
}

.req-conclusion-card ul {
  margin: 0;
  padding-left: 1.2em;
}

.req-conclusion-card li {
  margin-bottom: 8px;
  line-height: 1.75;
}

.req-conclusion-card li:last-child {
  margin-bottom: 0;
}

/* ---- 取得条件と入校条件の違い ---- */
.req-kind-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 8px;
}

.req-kind-card {
  padding: 20px 22px;
  background: var(--guide-soft);
  border: 1px solid var(--guide-border);
  border-radius: 12px;
}

.req-kind-card h3 {
  margin: 0 0 8px;
  color: var(--guide-ink);
  font-size: 1.04rem;
  line-height: 1.55;
}

.req-kind-card__who {
  margin: 0 0 12px !important;
  color: var(--guide-gold-dark);
  font-size: 0.86rem;
  font-weight: 700;
}

.req-kind-card ul {
  margin: 0;
  padding-left: 1.2em;
}

.req-kind-card li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.req-kind-card__note {
  margin: 14px 0 0 !important;
  padding-top: 12px;
  border-top: 1px solid var(--guide-border);
  color: var(--guide-muted);
  font-size: 0.86rem;
  line-height: 1.75;
}

/* ---- 箇条書き（各条件の説明） ---- */
.req-point-list,
.req-note-list {
  margin: 4px 0 0;
  padding-left: 1.2em;
}

.req-point-list li {
  margin-bottom: 10px;
  line-height: 1.8;
}

.req-note-list {
  margin-top: 18px;
}

.req-note-list li {
  margin-bottom: 8px;
  color: var(--guide-muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

/* ---- 条件表（共通） ---- */
.req-age-table caption,
.req-eyesight-table caption {
  caption-side: top;
  padding: 0 2px 12px;
  color: var(--guide-muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
}

.req-age-table,
.req-eyesight-table {
  min-width: 600px;
}

.req-age-table td,
.req-eyesight-table td {
  text-align: left;
}

.req-age-table .req-age-table__name {
  min-width: 132px;
}

.req-age-table .req-age-table__age {
  min-width: 104px;
  white-space: nowrap;
}

.req-age-table .req-age-table__career {
  min-width: 178px;
}

.req-age-table .req-age-table__note {
  min-width: 186px;
  color: var(--guide-muted);
  font-size: 0.9rem;
}

.req-eyesight-table tbody th {
  min-width: 190px;
}

/* ---- 申込み前の確認事項（表示のみ。入力欄は設けない） ---- */
.req-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.req-checklist li {
  position: relative;
  padding: 8px 12px 8px 34px;
  background: #fff;
  border: 1px solid var(--guide-border);
  border-radius: 10px;
  line-height: 1.6;
}

.req-checklist li::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 12px;
  width: 10px;
  height: 6px;
  border-left: 3px solid var(--guide-gold-dark);
  border-bottom: 3px solid var(--guide-gold-dark);
  transform: rotate(-45deg);
}

/* ---- 公式情報 ---- */
.req-official-list {
  margin: 4px 0 0;
  padding-left: 1.2em;
}

.req-official-list li {
  margin-bottom: 12px;
  line-height: 1.75;
}

.req-official-list a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.req-official-list span {
  display: block;
  color: var(--guide-muted);
  font-size: 0.88rem;
}

/* ---- 関連ページ ---- */
.req-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 6px;
}

.req-related-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--guide-border);
  border-radius: 12px;
  color: var(--guide-ink);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.req-related-card:hover {
  border-color: var(--guide-gold);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.req-related-card strong {
  color: var(--guide-gold-dark);
}

.req-related-card span {
  color: var(--guide-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---- タブレット ---- */
@media (max-width: 768px) {
  .req-kind-grid,
  .req-checklist,
  .req-related-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- モバイル：条件表を横スクロールさせず、免許ごとに縦へ積む ----
   role 属性を明示しているため、display を変更しても表としての
   読み上げ構造は保たれる。 */
@media (max-width: 767px) {
  .useful-require-guide .guide-table-scroll {
    overflow-x: visible;
    border: 0;
    border-radius: 0;
  }

  .useful-require-guide .guide-table-scroll::after {
    content: none;
  }

  .req-age-table,
  .req-eyesight-table {
    display: block;
    min-width: 0;
    background: none;
  }

  .req-age-table caption,
  .req-eyesight-table caption {
    display: block;
  }

  .req-age-table thead,
  .req-eyesight-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .req-age-table tbody,
  .req-eyesight-table tbody {
    display: block;
  }

  .req-age-table tbody tr,
  .req-eyesight-table tbody tr {
    display: block;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid var(--guide-border);
    border-radius: 12px;
    overflow: hidden;
  }

  .req-age-table tbody tr:last-child,
  .req-eyesight-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .req-age-table tbody th,
  .req-eyesight-table tbody th,
  .req-age-table tbody td,
  .req-eyesight-table tbody td {
    display: block;
    min-width: 0;
    border: 0;
    border-bottom: 1px solid var(--guide-border);
  }

  .req-age-table tbody th,
  .req-eyesight-table tbody th {
    padding: 12px 16px;
    background: var(--guide-ink);
    color: #fff;
    font-size: 1rem;
    text-align: left;
  }

  .req-age-table tbody td,
  .req-eyesight-table tbody td {
    padding: 12px 16px;
    text-align: left;
  }

  .req-age-table tbody tr > *:last-child,
  .req-eyesight-table tbody tr > *:last-child {
    border-bottom: 0;
  }

  .req-age-table tbody td::before,
  .req-eyesight-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--guide-gold-dark);
    font-size: 0.78rem;
    font-weight: 700;
  }

  .req-age-table .req-age-table__age {
    white-space: normal;
  }
}
