/* 研削・研磨。原稿固有の配置だけを共通CSSに追加。 */
#header .card > div:last-child { grid-template-columns: minmax(0,1fr); }
#check .card,
#safety > .stack > .card { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 16px; align-items: start; }
#check .card > p,
#safety > .stack > .card > div { margin-top: 0; min-width: 0; }
#related > .cta { display: grid; grid-template-columns: minmax(0,1fr); }
/* 表はスマホの幅に収める（雇われ方と職業訓練の比較表だけ、枠の中で横スクロールする）。 */
table[data-table-kind="koyou"] { min-width: 560px; }
table[data-table-kind="bairitsu"] td.n { white-space: nowrap; }
table[data-table-kind="safety"], table[data-table-kind="kentei"] { table-layout: fixed; }
table[data-table-kind="safety"] th:first-child, table[data-table-kind="kentei"] th:first-child { width: 4.5em; }
table[data-table-kind="safety"] th:nth-child(3) { width: 4.5em; }
table[data-table-kind="kentei"] th:nth-child(2) { width: 30%; }
table[data-table-kind="mikeiken"] { min-width: 560px; table-layout: fixed; }
table[data-table-kind="mikeiken"] th:first-child { width: 24%; }
@media (max-width: 767px) {
  table[data-table-kind="salary"], table[data-table-kind="salary-reference"], 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="salary-reference"] th, table[data-table-kind="salary-reference"] 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="salary-reference"] .n,
  table[data-table-kind="keiken"] .n { text-align: left; }
  table[data-table-kind="salary"] th:first-child, table[data-table-kind="salary-reference"] th:first-child { width: 2.8em; min-width: 0; }
  table[data-table-kind="salary"] th:nth-child(2), table[data-table-kind="salary-reference"] 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-reference"] th:nth-child(3) { width: 7.1em; }
  table[data-table-kind="salary"] tbody td:nth-child(2), table[data-table-kind="salary-reference"] 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)); }
}

.kensaku-photo { min-width: 0; margin: 0; }
#fv .hero-photo { order: 8; }
#fv .hero-photo .photo-placeholder { aspect-ratio: 4 / 3; }
.kensaku-salary-chart .chart-legend { display: block; }
.reference-legend { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.reference-swatch { width: 24px; border-top: 2px dashed var(--color-text); }
.kensaku-salary-chart .chart-item { grid-template-columns: minmax(0,1fr) 64px; gap: 12px; }
.kensaku-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); }
.comparison-figure, .grinding-safety { padding: var(--space-card); border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-bg); }
.comparison-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.comparison-panel { min-width: 0; }
.comparison-title { color: var(--color-navy); font-weight: 700; text-align: center; }
.comparison-caption { font-size: 14px; text-align: center; font-weight: 700; }
.grinder-linework { width: 100%; height: auto; color: var(--color-navy); }
.comparison-figure > figcaption, .grinding-safety > figcaption { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--color-border); }
.grinder-scene { position: relative; }
.grinder-drawing { position: relative; }
.machine-label { position: absolute; margin: 0; padding: 3px 5px; color: var(--color-navy); background: white; font-size: 14px; font-weight: 700; line-height: 1.5; }
.machine-label span { display: block; }
.label-cover { top: 5%; left: 65%; }
.label-wheel { top: 32%; left: 65%; }
.label-table { top: 76%; left: 36%; }
.trial-note { margin-top: 16px; padding: 12px; border-left: 3px solid var(--color-primary); background: var(--color-accent-bg); color: var(--color-navy); font-size: 14px; }
@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; }
  .comparison-grid { gap: 24px; }
  .comparison-title { font-size: 20px; }
  .machine-label { font-size: 16px; }
  .trial-note { position: absolute; top: 51%; left: 70%; width: 30%; margin: 0; }
  #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 {
  .kensaku-salary-chart, .comparison-figure, .grinding-safety, .learning-figure { break-inside: avoid; }
}
