/* 登録日本語教員 採用LP — デザイン方針: docs/登録日本語教員_採用LP_デザイン方針_案_202612.md */

:root {
  /* 色の役割 */
  --paper: #FFFFFF;        /* 地 */
  --terms-bg: #EDF2EE;     /* 募集要項だけに敷く地(操作の緑をごく薄く) */
  --faq-bg: #F5F6F5;       /* FAQ・フォームの入力欄まわり */
  --ink: #22252A;          /* 本文・見出し */
  --ink-2: #4B5058;        /* 補足の文字 */
  --rule: #D8D6CF;         /* 罫線 */
  --rule-strong: #22252A;  /* 強い罫線 */
  --action: #24513C;       /* 操作(ボタン・リンク)。画像の緑と調和する深い緑 */
  --action-hover: #183A2A;
  --focus: #C98A1B;        /* フォーカスの枠 */
  --error: #B3261E;
  --error-bg: #FCF1EF;
  --tbd-ink: #8A5200;
  --tbd-bg: #FFF6E5;

  /* 文字(6段階+表示用) */
  --fs-xs: 0.8125rem;  /* 13 */
  --fs-sm: 0.9375rem;  /* 15 */
  --fs-base: 1rem;     /* 16 */
  --fs-md: 1.125rem;   /* 18 */
  --fs-lg: 1.375rem;   /* 22 */
  --fs-xl: 1.875rem;   /* 30 */
  --fs-display: clamp(1.875rem, 1.2rem + 2.8vw, 3rem);  /* 30-48 */
  --fs-scene: clamp(1.5rem, 1rem + 2.2vw, 2.5rem);      /* 24-40 */

  --font-body: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-head: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;

  /* 余白(4の倍数) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-6: 24px;
  --s-8: 32px; --s-12: 48px; --s-16: 64px; --s-24: 96px; --s-32: 128px;

  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.9;
  line-break: strict;
}
.nw { white-space: nowrap; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--action); text-underline-offset: 3px; }
a:hover { color: var(--action-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* 文節での改行は見出しと大きな文字だけ。本文は行末まで詰めて普通に折り返す */
h1, h2, h3, .hero__lead, .scenes li, .terms__lead { word-break: auto-phrase; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.tbd {
  display: inline-block; padding: 0 var(--s-2);
  border: 1.5px dashed var(--tbd-ink); border-radius: 4px;
  background: var(--tbd-bg); color: var(--tbd-ink);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.8;
}

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 var(--s-8);
  border-radius: var(--radius); border: 0;
  background: var(--action); color: #FFFFFF;
  font: inherit; font-size: var(--fs-md); font-weight: 700; text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--action-hover); color: #FFFFFF; }
.btn--small { min-height: 44px; padding: 0 var(--s-6); font-size: var(--fs-sm); }
.btn--ghost { background: transparent; color: var(--action); box-shadow: inset 0 0 0 1.5px var(--action); }
.btn--ghost:hover { background: #E6EEE8; color: var(--action-hover); }

/* ご用件の選択 */
.types { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.type {
  position: relative; display: flex; flex-direction: column; gap: var(--s-1);
  padding: var(--s-4) var(--s-4) var(--s-4) 48px;
  border: 1.5px solid #8F949B; border-radius: var(--radius); background: #FFFFFF; cursor: pointer;
}
.type input { position: absolute; left: 16px; top: 20px; width: 20px; height: 20px; margin: 0; accent-color: var(--action); }
.type__name { font-weight: 700; font-size: var(--fs-md); }
.type__desc { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.7; }
.type:has(input:checked) { border-color: var(--action); background: #EEF3EF; }
.type:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.field[data-invalid] .type { border-color: var(--error); }
[data-for][hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn:disabled { opacity: .6; cursor: wait; }
.apply-hint { margin-top: var(--s-2); }

/* ヘッダー */
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 64px; }
.site-head__logo { display: block; }
.site-head__logo img { width: auto; height: 24px; }

/* ファーストビュー(文字だけ) */
.hero { padding: var(--s-8) 0 var(--s-16); border-bottom: 1px solid var(--rule); }
.hero__title { font-family: var(--font-head); font-size: var(--fs-lg); font-weight: 800; letter-spacing: .04em; }
.hero__lead {
  margin-top: var(--s-6);
  font-family: var(--font-head); font-weight: 800;
  font-size: var(--fs-display); line-height: 1.4; letter-spacing: .02em;
}
.hero__terms-main { margin-top: var(--s-12); font-size: var(--fs-lg); font-weight: 700; line-height: 1.6; }
.hero__terms-sub { margin-top: var(--s-1); color: var(--ink-2); }
.timetable { margin-top: var(--s-6); border-collapse: collapse; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.timetable caption { caption-side: top; text-align: left; padding-bottom: var(--s-2); font-size: var(--fs-xs); color: var(--ink-2); }
.timetable th, .timetable td { border: 1px solid var(--rule); padding: var(--s-1) 3px; text-align: center; line-height: 1.6; }
.timetable thead th { background: var(--terms-bg); font-weight: 700; }
.timetable tbody th { font-weight: 700; text-align: left; white-space: nowrap; }
.timetable td { color: var(--action); }
.hero__cta { margin-top: var(--s-8); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.hero__cta .btn, .mid-cta .btn { width: 100%; }
.hero__cta-note { font-size: var(--fs-sm); color: var(--ink-2); }

/* セクション共通 */
.sec { padding: var(--s-16) 0; }
.sec__title { font-family: var(--font-head); font-weight: 800; font-size: var(--fs-xl); line-height: 1.5; }
.sec__body { display: flex; flex-direction: column; gap: var(--s-4); }
.narrow .sec__body { margin-top: var(--s-6); }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
.split .sec__body { margin-top: var(--s-1); }

/* 意義(4つの場面): 大きな文字だけ。罫線なし */
.sec--meaning { padding: var(--s-24) 0; }
.scenes__intro { margin-top: var(--s-6); }
.scenes { list-style: none; margin: var(--s-12) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-6); }
.scenes li { font-family: var(--font-head); font-weight: 600; font-size: var(--fs-scene); line-height: 1.5; }
.scenes__close { margin-top: var(--s-12); }

/* 働き方: 画像の帯+4項目 */
.work__figure { margin: var(--s-8) 0 0; }
.work__figure img { border-radius: var(--radius); width: 100%; }
.work__figure figcaption { margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--ink-2); }
.work__list { list-style: none; margin: var(--s-12) 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
.work__list b { display: block; font-size: var(--fs-md); margin-bottom: var(--s-1); }

/* 募集要項: このページで唯一、地に色を敷く */
.sec--terms { background: var(--terms-bg); }
.terms__lead { margin-top: var(--s-4); font-size: var(--fs-lg); font-weight: 700; }
.terms-table { width: 100%; border-collapse: collapse; margin-top: var(--s-8); }
.terms-table tr { display: block; padding: var(--s-3) 0; border-bottom: 1px solid var(--rule); }
.terms-table tr:first-child { border-top: 1px solid var(--rule-strong); }
.terms-table th, .terms-table td { display: block; padding: 0; vertical-align: top; text-align: left; }
.terms-table th { font-size: var(--fs-sm); font-weight: 400; color: var(--ink-2); }
.terms-table td { font-weight: 700; }
.terms-table td .plain { font-weight: 400; }
.times { display: grid; grid-template-columns: auto 1fr; gap: var(--s-1) var(--s-4); }
.times dt { font-weight: 400; color: var(--ink-2); }
.times dd { margin: 0; }
.mid-cta { margin-top: var(--s-12); display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* 会社: 罫線なし */
.company { margin: var(--s-8) 0 0; display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--fs-sm); }
.company div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.company dt { color: var(--ink-2); font-size: var(--fs-sm); }
.company dd { margin: 0; }

/* FAQ */
.sec--faq { background: var(--faq-bg); }
.faq { margin-top: var(--s-8); border-top: 1px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  min-height: 64px; padding: var(--s-3) 0; font-weight: 700; font-size: var(--fs-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg) translate(-3px, -3px); }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq .faq__a { padding: 0 0 var(--s-6); }

/* 応募 */
.apply-recap { margin-top: var(--s-4); font-weight: 700; font-size: var(--fs-md); }
.form { margin-top: var(--s-12); max-width: 44em; display: flex; flex-direction: column; gap: var(--s-8); }
.field { display: flex; flex-direction: column; gap: var(--s-2); border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 700; padding: 0; }
.field > legend { margin-bottom: var(--s-2); }
.req, .opt { margin-left: var(--s-2); font-size: var(--fs-xs); font-weight: 700; }
.req { color: var(--error); }
.opt { color: var(--ink-2); }
.hint { font-size: var(--fs-sm); color: var(--ink-2); }
.input, .textarea {
  width: 100%; min-height: 52px; padding: var(--s-3) var(--s-4);
  border: 1.5px solid #8F949B; border-radius: var(--radius);
  background: #FFFFFF; color: var(--ink); font: inherit; font-size: var(--fs-base); line-height: 1.6;
}
.textarea { min-height: 104px; resize: vertical; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .field[data-invalid] .choice { border-color: var(--error); }
.choices { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.choices--grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.choice {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: 52px; padding: var(--s-2) var(--s-4);
  border: 1.5px solid #8F949B; border-radius: var(--radius); background: #FFFFFF; cursor: pointer;
  line-height: 1.4;
}
.choice input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--action); }
.choice:has(input:checked) { border-color: var(--action); background: #EEF3EF; font-weight: 700; }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice__time { font-variant-numeric: tabular-nums; }
.group-label { font-size: var(--fs-sm); color: var(--ink-2); margin-top: var(--s-2); }
.err { font-size: var(--fs-sm); color: var(--error); font-weight: 700; }
.err[hidden] { display: none; }
.err-summary { padding: var(--s-4) var(--s-6); border: 2px solid var(--error); border-radius: var(--radius); background: var(--error-bg); }
.err-summary[hidden] { display: none; }
.err-summary ul { margin: var(--s-2) 0 0; padding-left: 1.2em; }
.err-summary a { color: var(--error); }
.consent { padding: var(--s-6); background: var(--faq-bg); border-radius: var(--radius); }
.consent .choice { border: 0; padding: 0; background: transparent; font-weight: 700; margin-top: var(--s-3); }
.form .btn { width: 100%; min-height: 60px; }
.done { margin-top: var(--s-12); max-width: 44em; padding: var(--s-12) var(--s-8); background: var(--terms-bg); border-radius: var(--radius); }
.done[hidden] { display: none; }
.done__title { font-family: var(--font-head); font-weight: 800; font-size: var(--fs-xl); }
.done p + p { margin-top: var(--s-3); }

/* フッター */
.site-foot { background: var(--ink); color: #D9DCE0; padding: var(--s-8) 0; font-size: var(--fs-sm); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); }
.site-foot__brand img { width: auto; height: 24px; margin-bottom: var(--s-3); }
.site-foot a { color: #FFFFFF; }
.site-foot__copy { margin-top: var(--s-8); text-align: center; font-size: var(--fs-xs); color: #A9AEB5; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); }

/* 広い画面(モバイルを基本に、幅が広いときだけ上書き) */
@media (min-width: 601px) {
  .types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choices--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero__cta .btn, .mid-cta .btn { width: auto; }
  .terms-table tr, .terms-table tr:first-child { display: table-row; padding: 0; border: 0; }
  .terms-table th, .terms-table td { display: table-cell; padding: var(--s-4) 0; border-bottom: 1px solid var(--rule); }
  .terms-table tr:first-child th, .terms-table tr:first-child td { border-top: 1px solid var(--rule-strong); }
  .terms-table th { width: 13em; padding-right: var(--s-6); font-size: var(--fs-base); }
  .company div { grid-template-columns: 7em minmax(0, 1fr); gap: var(--s-4); }
  .timetable { font-size: var(--fs-sm); }
  .timetable th, .timetable td { padding: var(--s-1) var(--s-3); }
  .timetable td { min-width: 3em; }
}
@media (min-width: 901px) {
  .hero { padding: var(--s-16) 0 var(--s-24); }
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-12); }
  .sec { padding: var(--s-24) 0; }
  .sec--meaning { padding: var(--s-32) 0; }
  .work__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8) var(--s-12); }
}
/* ヒーロー: 横幅に余裕があるときだけ、条件とボタンを左、時間割を右に並べる */
@media (min-width: 1100px) {
  .hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-12); align-items: start; }
  .hero__title, .hero__lead { grid-column: 1 / -1; }
  .hero__info { grid-column: 1; }
  .hero .timetable { grid-column: 2; margin-top: var(--s-12); }
}
