/* 射出成形。共通CSSにない表示だけを追加。 */
#header .card > div:last-child { grid-template-columns: minmax(0,1fr); }
#check .card { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 16px; align-items: start; }
#check .card > p { margin-top: 0; }
#related > .cta { display: grid; grid-template-columns: minmax(0,1fr); }
table[data-table-kind="bairitsu"] td.n { white-space: nowrap; }
table[data-table-kind="kentei"] { table-layout: fixed; }
table[data-table-kind="kentei"] th:first-child { width: 4.5em; }
table[data-table-kind="kentei"] th:nth-child(2) { width: 30%; }
table[data-table-kind="koyou"] { min-width: 560px; }
@media (max-width: 767px) {
  table[data-table-kind="salary"], table[data-table-kind="keiken"] { min-width: 0; table-layout: fixed; }
  table[data-table-kind="salary"] th, table[data-table-kind="salary"] td,
  table[data-table-kind="keiken"] th, table[data-table-kind="keiken"] td { padding-inline: 4px; }
  table[data-table-kind="salary"] .n, table[data-table-kind="keiken"] .n { text-align: left; overflow-wrap: anywhere; }
  table[data-table-kind="salary"] th:first-child { width: 2.8em; min-width: 0; }
  table[data-table-kind="salary"] th:nth-child(2) { width: 4.6em; }
  table[data-table-kind="salary"] th:nth-child(3) { width: 4.1em; }
  table[data-table-kind="salary"] th:nth-child(4) { width: 2.9em; }
  table[data-table-kind="salary"] tbody td:nth-child(2) { white-space: nowrap; }
  table[data-table-kind="keiken"] th:first-child { width: 4.1em; min-width: 0; }
  table[data-table-kind="keiken"] th:nth-child(2), table[data-table-kind="keiken"] th:nth-child(3) { width: 5.3em; }
  table[data-table-kind="keiken"] tbody td:nth-child(2), table[data-table-kind="keiken"] tbody td:nth-child(3) { white-space: nowrap; }
}
@media (min-width: 768px) {
  #header .card > div:last-child { width: auto; }
  #related > .cta { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* 写真の比率を先に確保し、注記を枠の外に置く。 */
.seikei-photo { min-width: 0; margin: 0; }
#fv .hero-photo { order: 8; }
#fv .hero-photo .photo-placeholder { aspect-ratio: 4 / 3; }
.seikei-salary-chart .chart-legend { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.reference-legend { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.reference-swatch { width: 24px; height: 0; border-top: 2px dashed var(--color-text); }
.age-legend { font-size: 13px; color: var(--color-text-sub); }
.seikei-salary-chart .chart-item { grid-template-columns: minmax(0,1fr) 56px 48px; gap: 8px; }
.seikei-salary-chart .chart-caution { grid-column: auto; text-align: right; white-space: nowrap; }
.seikei-salary-chart .chart-track { position: relative; }
.national-reference { position: absolute; top: -5px; bottom: -5px; left: var(--reference-size); width: 0; border-left: 2px dashed var(--color-text); }
@media (min-width: 768px) {
  #fv .hero-photo { grid-area: 4 / 2 / 6 / 3; align-self: start; order: initial; }
  #fv .hero-photo .photo-placeholder { aspect-ratio: 16 / 9; }
  .seikei-salary-chart .chart-item { grid-template-columns: minmax(0,1fr) 64px 64px; gap: 12px; }
  #flow > .stack { max-width: var(--width-wide); grid-template-columns: repeat(6,minmax(0,1fr)); gap: 16px; }
  #flow .step { display: block; min-width: 0; padding-bottom: 0; }
  #flow .step > .num { margin: 0 auto 16px; }
  #flow .step .h3 { font-size: 18px; }
  #flow .step p { font-size: 16px; }
  #flow .step:not(:last-child)::after { top: 19px; bottom: auto; left: calc(50% + 20px); width: calc(100% - 24px); height: 2px; }
}
@media print {
  .seikei-salary-chart, .learning-figure { break-inside: avoid; }
}
