.form-page {
  min-height: 100vh;
  padding-top: var(--header-h);
  background: #fff;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.form-page .site-header {
  background: rgba(247,247,247,.96);
  box-shadow: 0 6px 22px rgba(25,43,54,.06);
}

.form-hero {
  position: relative;
  overflow: hidden;
  padding: 82px 0 76px;
  background: linear-gradient(90deg, #e6edef 0 30%, #fff 30% 100%);
}

.form-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 30%;
  width: 110px;
  height: 100%;
  background: linear-gradient(135deg, #e6edef 50%, transparent 50%);
  pointer-events: none;
}

.form-container {
  width: min(calc(100% - 80px), 1120px);
  margin-inline: auto;
}

.form-hero__inner { position: relative; z-index: 1; }
.form-hero__eyebrow {
  margin: 0 0 4px;
  color: var(--main);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
}
.form-hero h1 {
  margin: 0;
  color: #073966;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.25;
  letter-spacing: .05em;
}
.form-hero__en {
  margin: 4px 0 0;
  color: #073966;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
}
.sample-badge {
  display: inline-flex;
  margin-top: 22px;
  padding: 7px 14px;
  align-items: center;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--main);
  background: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
}

.form-content { padding: 76px 0 110px; }
.form-intro { max-width: 800px; margin-bottom: 52px; }
.form-intro h2 {
  margin: 0;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: .04em;
}
.form-intro p { margin: 14px 0 0; color: var(--ink-soft); }
.sample-alert {
  margin-top: 22px;
  padding: 14px 18px;
  border-left: 4px solid var(--accent);
  background: #eef3f3;
  color: var(--main);
  font-size: 14px;
  font-weight: 600;
}

.form-steps {
  width: min(100%, 520px);
  margin: 0 auto 54px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
}
.form-step {
  position: relative;
  color: #829097;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}
.form-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 18px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 2px;
  background: #d9dfe1;
}
.form-step__number {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  border: 2px solid #d9dfe1;
  border-radius: 50%;
  background: #fff;
  font-size: 15px;
}
.form-step.is-active { color: #073966; }
.form-step.is-active .form-step__number {
  color: #fff;
  border-color: #073966;
  background: #073966;
}
.form-step.is-complete::after { background: #78999d; }
.form-step.is-complete .form-step__number {
  color: #fff;
  border-color: #78999d;
  background: #78999d;
}

.form-panel {
  padding: 54px 58px;
  border-radius: 18px;
  background: #f5f7f7;
  box-shadow: 0 14px 38px rgba(29,49,61,.06);
}
.form-panel[hidden] { display: none; }
.form-panel__title {
  margin: 0 0 34px;
  font-family: "Noto Serif JP", serif;
  font-size: 25px;
  font-weight: 500;
}
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 22px; }
.field { min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label,
.field legend {
  display: block;
  margin-bottom: 9px;
  color: #173d57;
  font-weight: 600;
}
.field fieldset { margin: 0; padding: 0; border: 0; }
.required,
.optional {
  display: inline-block;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid #cfd6d9;
  font-size: 12px;
}
.required { color: #c84b4b; }
.optional { color: #7b898f; }
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 54px;
  padding: 13px 15px;
  border: 1px solid #cbd4d7;
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: #527b8c;
  box-shadow: 0 0 0 3px rgba(82,123,140,.16);
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #b93f3f; }
.choice-list { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.choice-list label,
.consent label {
  margin: 0;
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink);
  font-weight: 400;
  cursor: pointer;
}
.choice-list input,
.consent input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: #527b8c; flex: 0 0 auto; }
.consent {
  margin-top: 32px;
  padding: 22px;
  border: 1px solid #d4dcde;
  border-radius: 6px;
  background: #fff;
}
.consent a { color: #38667b; text-decoration: underline; text-underline-offset: 3px; }
.field-error { min-height: 1.5em; margin: 5px 0 0; color: #a52c2c; font-size: 12px; }
.form-actions { margin-top: 38px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.form-button {
  min-width: 230px;
  min-height: 58px;
  padding: 0 26px;
  border: 1px solid #073966;
  border-radius: 4px;
  color: #fff;
  background: #073966;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease;
}
.form-button:hover { transform: translateY(-2px); background: #002c51; }
.form-button--back { color: #073966; background: #fff; }
.form-button--back:hover { color: #fff; }

.confirm-list { margin: 0; background: #fff; }
.confirm-row { display: grid; grid-template-columns: 210px 1fr; border-bottom: 1px solid #dce2e4; }
.confirm-row:first-child { border-top: 1px solid #dce2e4; }
.confirm-row dt,
.confirm-row dd { margin: 0; padding: 18px 20px; }
.confirm-row dt { color: #173d57; background: #eaf0f1; font-weight: 600; }
.confirm-row dd { white-space: pre-wrap; overflow-wrap: anywhere; }

.complete-panel { padding-block: 74px; text-align: center; }
.complete-mark {
  width: 70px;
  height: 70px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 34px;
}
.complete-panel h2 { margin: 0; font-family: "Noto Serif JP", serif; font-size: clamp(27px, 3vw, 38px); font-weight: 500; }
.complete-panel p { max-width: 640px; margin: 16px auto 0; color: var(--ink-soft); }
.complete-panel .sample-alert { max-width: 640px; margin-inline: auto; text-align: left; }

@media (max-width: 1000px) {
  .form-page .floating-actions { display: none; }
}

@media (max-width: 760px) {
  .form-container { width: calc(100% - 36px); }
  .form-hero { padding: 62px 0 58px; background: #e6edef; }
  .form-hero::after { display: none; }
  .form-content { padding: 58px 0 80px; }
  .form-intro { margin-bottom: 42px; }
  .form-steps { margin-bottom: 40px; }
  .form-step { font-size: 10px; }
  .form-step__number { width: 34px; height: 34px; }
  .form-step:not(:last-child)::after { top: 16px; left: calc(50% + 16px); width: calc(100% - 32px); }
  .form-panel { padding: 34px 20px; border-radius: 12px; }
  .field-grid { grid-template-columns: 1fr; gap: 22px; }
  .field--full { grid-column: auto; }
  .confirm-row { grid-template-columns: 1fr; }
  .confirm-row dt { padding-bottom: 8px; }
  .confirm-row dd { padding-top: 8px; }
  .form-button { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .form-button { transition: none; }
}
