.contact-hero {
  padding: 40px 0 30px;
  background: linear-gradient(180deg, rgba(233, 239, 248, 0.82), rgba(229, 235, 244, 0.66));
  border-bottom: 1px solid #d9dee6;
}

.contact-eyebrow {
  margin-bottom: 12px;
  color: #6d6f75;
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
}

.contact-lead {
  max-width: 62ch;
  color: #4d5058;
  font-size: 0.96rem;
  letter-spacing: 0.03em;
  line-height: 1.9;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: pretty;
}

.contact-section {
  padding-top: 20px;
  padding-bottom: 12px;
  background: linear-gradient(180deg, #e9eef6, #e4eaf2);
}

.contact-form-card {
  position: relative;
  border: 1px solid #d3d8e1;
  border-radius: 20px;
  background: linear-gradient(162deg, rgba(246, 248, 252, 0.95), rgba(238, 242, 248, 0.92));
  box-shadow: 0 12px 24px rgba(24, 30, 40, 0.076), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  padding: 24px 22px;
}

.contact-form-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: calc(100% - 72px);
  height: 4px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, #c7ccd5 0%, #646f7f 100%);
}

.contact-field {
  margin-bottom: 18px;
}

.contact-field label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #2f3b4f;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.required-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7f8898;
  font-family: "Montserrat", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  transform: translateY(-1px);
}

.required-badge::before {
  content: "*";
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfd6e1;
  border-radius: 10px;
  background: #fbfcfe;
  color: #2f3d53;
  font: inherit;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.contact-field textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: #2f63b8;
  box-shadow: 0 0 0 3px rgba(47, 99, 184, 0.22);
  background: #fff;
}

.contact-submit {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  min-height: 52px;
  border: 1px solid #aeb7c6;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7f9fc 0%, #e9eef5 100%);
  color: #2f3f58;
  font-family: "Montserrat", "Noto Sans JP", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.24s ease, box-shadow 0.24s ease, filter 0.24s ease, background-color 0.24s ease, border-color 0.24s ease, color 0.24s ease;
}

.contact-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.52) 50%, rgba(255, 255, 255, 0) 80%);
  transform: translateX(-130%);
  transition: transform 0.7s ease;
}

.contact-submit:hover {
  transform: translateY(-1px);
  border-color: #21395c;
  background: linear-gradient(180deg, #eaf0f8 0%, #dfe7f2 100%);
  color: #223652;
  box-shadow: 0 12px 20px rgba(23, 35, 55, 0.2);
  filter: brightness(1.01);
}

.contact-submit:hover::before {
  transform: translateX(130%);
}

.contact-submit:focus-visible::before {
  transform: translateX(130%);
}

.contact-result-card {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 42px 28px 38px;
  border: 1px solid #d3d8e1;
  border-radius: 20px;
  background: linear-gradient(162deg, rgba(246, 248, 252, 0.97), rgba(238, 242, 248, 0.94));
  box-shadow: 0 14px 30px rgba(24, 30, 40, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  text-align: center;
  overflow: hidden;
}

.contact-result-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: calc(100% - 72px);
  height: 4px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, #c7ccd5 0%, #646f7f 100%);
}

.contact-result-card.is-success::after {
  background: linear-gradient(180deg, #c5b37d 0%, #8f7a4e 100%);
}

.contact-result-mark {
  margin: 0 0 14px;
  color: #7d8492;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.contact-result-message {
  margin: 0 auto;
  max-width: 46em;
  color: #2f3b4f;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.9;
}

.contact-result-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 28px;
  padding: 0 24px;
  border: 1px solid #aeb7c6;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7f9fc 0%, #e9eef5 100%);
  color: #2f3f58;
  font-family: "Montserrat", "Noto Sans JP", sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.contact-result-button:hover {
  transform: translateY(-1px);
  border-color: #21395c;
  box-shadow: 0 12px 20px rgba(23, 35, 55, 0.16);
}

.nav a.is-current::after {
  transform: scaleX(1);
}

html,
body,
main,
.contact-section,
.contact-section .container {
  max-width: 100vw !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

.contact-form-card,
.contact-field,
.contact-field label,
.contact-field input,
.contact-field textarea,
.contact-submit {
  box-sizing: border-box !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.contact-lead,
.contact-field label,
.contact-field input,
.contact-field textarea,
.contact-submit {
  white-space: normal !important;
  word-break: break-all !important;
  overflow-wrap: anywhere !important;
  line-break: auto !important;
}

@media (max-width: 900px) {
  .contact-hero {
    padding: 32px 0 20px;
  }

  .contact-lead {
    max-width: none;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    line-height: 1.82;
  }

  .contact-section {
    padding-top: 12px;
    padding-bottom: 8px;
  }

  .contact-form-card {
    border-radius: 16px;
    padding: 20px 14px;
  }

  .contact-form-card::after {
    width: calc(100% - 48px);
  }

  .contact-result-card {
    border-radius: 16px;
    padding: 34px 18px 30px;
  }

  .contact-result-card::after {
    width: calc(100% - 48px);
  }

  .contact-result-message {
    font-size: 0.92rem;
    line-height: 1.82;
  }

  .contact-field {
    margin-bottom: 14px;
  }

  .contact-field label {
    font-size: 0.86rem;
  }

  .required-badge {
    font-size: 0.84rem;
  }

  .contact-field input,
  .contact-field textarea {
    min-height: 44px;
    border-radius: 9px;
    padding: 10px 11px;
    font-size: 0.92rem;
  }

  .contact-submit {
    min-height: 48px;
    font-size: 0.84rem;
  }

}

@media (max-width: 480px) {
  .contact-hero {
    padding: 24px 0 12px;
  }

  .contact-hero .section-title {
    margin-bottom: 12px;
    font-size: clamp(1.28rem, 8vw, 1.64rem);
  }

  .contact-eyebrow {
    margin-bottom: 8px;
    font-size: 0.6rem;
    letter-spacing: 0.14em;
  }

  .contact-lead {
    font-size: 0.84rem;
    line-height: 1.65;
  }

  .contact-section {
    padding-top: 8px;
    padding-bottom: 0;
  }

  .contact-form-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px 12px 18px;
    border-radius: 16px;
    overflow: visible;
  }

  .contact-field {
    margin-bottom: 10px;
  }

  .contact-field label {
    margin-bottom: 6px;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .contact-field input,
  .contact-field textarea {
    width: 100% !important;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 16px;
    line-height: 1.5;
  }

  .contact-field textarea {
    min-height: 96px;
    resize: vertical;
  }

  .contact-submit {
    width: 100%;
    min-height: 44px;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
  }
}
