@charset "utf-8";

/* Z-ITの本サイトと共通の色・書体 */
:root {
  color-scheme: light;
  --color-text: #444444;
  --color-heading: #262626;
  --color-muted: #6b7280;
  --color-accent: #24669d;
  --color-surface: #f8f8f8;
  --color-border: #dedfe3;
  --color-error: #aa3f40;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--color-text);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: .025em;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul { margin: 0; }
h1, h2, h3 { color: var(--color-heading); line-height: 1.5; }
a { color: var(--color-accent); text-underline-offset: .25em; }
a:hover { text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
input, textarea, select, button { font: inherit; letter-spacing: inherit; }
[hidden], input[type="hidden"] { display: none !important; }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 4px; }

/* ヘッダーとページタイトル */
.form-header { border-bottom: 1px solid #eceef1; background: #fff; }
.form-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1400px, calc(100% - 80px));
  min-height: 88px;
  margin: 0 auto;
}
.form-brand { display: block; flex-shrink: 0; width: 100px; }
.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 24px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-heading);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.home-link:hover { color: var(--color-accent); border-color: var(--color-accent); background: #edf4fa; }
.form-hero { padding: 64px 0; background: var(--color-surface); }
.form-container { width: min(1160px, calc(100% - 80px)); margin: 0 auto; }
.eyebrow {
  margin-bottom: 12px;
  color: var(--color-accent);
  font-family: "Roboto", "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .12em;
}
.form-hero h1 { font-size: clamp(28px, 3.6vw, 46px); font-weight: 500; }
.form-hero__lead { margin-top: 16px; font-size: 15px; }

/* フォーム本体。Xserverの既存クラス名を維持 */
#wrapper { width: min(900px, calc(100% - 80px)); margin: 0 auto; }
#main { padding: 48px 0 72px; }
.section { margin-bottom: 0; }
.section__ttl { margin-bottom: 12px; font-size: clamp(19px, 2vw, 24px); font-weight: 600; }
.section__body { padding: 0; }
#txt_explain { margin-bottom: 32px; font-size: 14px; }
.required-note { color: var(--color-muted); font-size: 13px; }
.red, .red_txt { color: var(--color-error); }
.red { margin-left: .35em; font-weight: 700; }
.required-note .red { margin-left: 0; margin-right: .2em; }
.red_txt { font-size: 14px; font-weight: 500; }
.red_txt:not(:empty) { margin-bottom: 24px; padding: 16px 20px; border-left: 3px solid var(--color-error); background: #fff3f2; }
.red_txt ul, .red_txt ol { padding-left: 1.4em; }

/* 実際の3画面の流れを表示 */
.form-progress { margin-bottom: 48px; }
.form-progress ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0; list-style: none; }
.form-progress li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 8px;
  border-bottom: 2px solid var(--color-border);
  color: var(--color-muted);
  font-size: 14px;
}
.form-progress__number { font-family: "Roboto", sans-serif; font-size: 13px; letter-spacing: .08em; }
.form-progress [aria-current="step"] { border-bottom-color: var(--color-accent); color: var(--color-accent); font-weight: 700; }

/* 動的に生成される入力項目 */
.table { width: 100%; border-collapse: collapse; border-spacing: 0; table-layout: fixed; }
.table tr { border-top: 1px solid var(--color-border); }
.table tr:last-child { border-bottom: 1px solid var(--color-border); }
.table th, .table td { padding: 26px 0; text-align: left; vertical-align: top; }
.table th { width: 31%; padding-right: 28px; color: var(--color-heading); font-size: 14px; font-weight: 600; }
.table td { font-size: 15px; }
.table td p + p { margin-top: 12px; }
.table input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
.table textarea, .table select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #d5d8df;
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.65;
  box-shadow: none;
  transition: border-color .18s ease, background-color .18s ease;
}
.table textarea { min-height: 190px; resize: vertical; }
.table select { padding-right: 32px; }
.table input:focus, .table textarea:focus, .table select:focus { border-color: var(--color-accent); background: #fff; }
.table input::placeholder, .table textarea::placeholder { color: #747a83; opacity: 1; }
.table input[type="checkbox"], .table input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  vertical-align: middle;
  accent-color: var(--color-accent);
}
.table label { cursor: pointer; line-height: 2; }
.table input:disabled, .table textarea:disabled, .table select:disabled { opacity: .65; cursor: not-allowed; }

/* 案内と操作ボタン */
.form-privacy { margin-top: 28px; font-size: 13px; line-height: 1.9; }
.button_box { clear: both; padding: 36px 0 0; text-align: center; }
.button_box input[type="submit"], .button_box button[type="submit"] {
  display: inline-block;
  min-width: 240px;
  max-width: 100%;
  min-height: 56px;
  padding: 14px 40px;
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
  appearance: none;
  transition: background-color .18s ease, border-color .18s ease;
}
.button_box input[type="submit"]:hover, .button_box button[type="submit"]:hover { border-color: #1b507e; background: #1b507e; }
.button_box input[type="button"], .button_box button[type="button"], .button_box input[type="reset"] {
  min-height: 48px;
  max-width: 100%;
  margin: 8px;
  padding: 10px 28px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #fff;
  color: var(--color-heading);
  cursor: pointer;
}
.button_box input:disabled, .button_box button:disabled { opacity: .6; cursor: not-allowed; }
.button-note { margin-top: 12px; color: var(--color-muted); font-size: 12px; }
.form-back { margin-top: 36px; text-align: center; font-size: 13px; }
.form-back a { color: var(--color-muted); }
.left_txt { text-align: left; }
.block { margin-bottom: 16px; }
.block__ttl { margin-bottom: 8px; font-weight: 600; }

/* フッター */
.form-footer { border-top: 1px solid var(--color-border); }
.form-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1160px, calc(100% - 80px));
  margin: 0 auto;
  padding: 28px 0;
}
.form-footer__company { color: var(--color-heading); font-size: 14px; font-weight: 600; }
.form-footer small { color: var(--color-muted); font-size: 11px; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 10; padding: 10px 18px; background: #fff; color: var(--color-accent); }
.skip-link:focus { top: 12px; }

/* 確認画面・完了画面 */
.form-title-suffix { font-size: .7em; font-weight: 400; white-space: nowrap; }
.form-progress .is-complete { color: var(--color-accent); border-bottom-color: #a8c6df; }
.table--confirm td { line-height: 1.95; overflow-wrap: anywhere; }
.button_box--confirm { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.button_box input[type="submit"].button--back {
  min-width: 160px;
  border-color: var(--color-border);
  background: #fff;
  color: var(--color-heading);
}
.button_box input[type="submit"].button--back:hover {
  border-color: var(--color-accent);
  background: #edf4fa;
  color: var(--color-accent);
}
.completion { padding: 48px 32px; border-radius: 20px; background: var(--color-surface); text-align: center; }
.completion__label { margin-bottom: 16px; color: var(--color-accent); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.completion .section__ttl { margin-bottom: 24px; font-size: clamp(22px, 2.5vw, 30px); }
.completion #txt_explain { margin-bottom: 0; font-size: 15px; line-height: 2; }
.button_box .button-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  max-width: 100%;
  min-height: 56px;
  padding: 14px 32px;
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease;
}
.button_box .button-home:hover { border-color: #1b507e; background: #1b507e; }

@media (max-width: 640px) {
  .button_box--confirm { gap: 12px; }
  .button_box--confirm input[type="submit"].button--back { min-width: 0; }
  .completion { padding: 32px 20px; border-radius: 16px; }
  .completion .section__ttl { margin-bottom: 18px; }
  .completion #txt_explain { font-size: 14px; }
  .button_box .button-home { width: 100%; min-width: 0; padding-inline: 20px; }
  .form-header__inner { width: calc(100% - 40px); min-height: 72px; gap: 16px; }
  .form-brand { width: 84px; }
  .home-link { min-height: 40px; padding: 8px 16px; font-size: 12px; }
  .form-container, #wrapper, .form-footer__inner { width: calc(100% - 40px); }
  .form-hero { padding: 40px 0; }
  .form-hero__lead { margin-top: 12px; font-size: 14px; }
  #main { padding: 28px 0 48px; }
  .form-progress { margin-bottom: 32px; }
  .form-progress ol { gap: 10px; }
  .form-progress li { gap: 6px; padding: 10px 4px; font-size: 13px; }
  .form-progress__number { font-size: 11px; }
  #txt_explain { margin-bottom: 24px; }
  .table, .table tbody, .table tr, .table th, .table td { display: block; width: 100%; }
  .table th { padding: 20px 0 10px; }
  .table td { padding: 0 0 20px; }
  .table textarea { min-height: 170px; }
  .form-privacy { margin-top: 24px; }
  .button_box { padding-top: 28px; }
  .button_box input[type="submit"], .button_box button[type="submit"] { width: 100%; min-width: 0; }
  .form-back { margin-top: 28px; }
  .form-footer__inner { flex-wrap: wrap; gap: 6px 20px; padding: 24px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}