.page-contact .contact_body {
  border-radius: 80px;
  background: #F7F5F4;
  overflow: hidden;
}

.page-contact .contact_section {
  margin-top: 40px;
  padding: 100px 0 130px;
}

.contact_section .section_title {
  margin-bottom: 48px;
}

.contact_lead {
  margin: 0 auto 50px;
  text-align: center;
  line-height: 1.8;
}

.contact_lead p + p {
  margin-top: 12px;
}

.contact_required_text {
  color: #D95D1B;
}

.contact_panel {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 64px 60px;
  border-radius: 40px;
  background: #fff;
}

.contact_row {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 40px;
  min-width: 0;
  margin: 0;
  padding: 28px 0;
  border: 0;
  border-bottom: 1px solid #EAE5DF;
}

fieldset.contact_row {
  display: block;
}

fieldset.contact_row > legend {
  float: left;
  width: 268px;
}

.contact_choices {
  margin-left: 308px;
}

.contact_label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.6;
}

.contact_badge {
  flex: 0 0 auto;
  padding: 2px 10px;
  border-radius: 5px;
  background: #F0EEEC;
  color: #595959;
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.6;
}

.contact_badge.is-required {
  background: #EF7E3A;
  color: #fff;
}

.contact_control {
  min-width: 0;
}

.contact_control input:not([type="radio"]),
.contact_control select,
.contact_control textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 13px 16px;
  border: 1px solid #CCC;
  border-radius: 8px;
  background: #fff;
  color: #3C3C3C;
  font: inherit;
  line-height: 1.6;
}

.contact_control select {
  min-height: 54px;
  padding-right: 32px;
}

.contact_control textarea {
  resize: vertical;
}

.contact_control input::placeholder,
.contact_control textarea::placeholder {
  color: #767676;
  opacity: 1;
}

.contact_control :focus-visible,
.contact_check input:focus-visible,
.contact_button:focus-visible {
  outline: 3px solid #D95D1B;
  outline-offset: 4px;
}

.contact_choices label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
  line-height: 1.6;
}

.contact_choices input,
.contact_check input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #D95D1B;
  vertical-align: middle;
}

.contact_age {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact_control .contact_age input {
  width: 120px;
}

.contact_hint {
  margin-top: 8px;
  color: #656565;
  font-size: 1.4rem;
  line-height: 1.6;
}

.contact_error {
  margin-top: 8px;
  color: #B32724;
  font-size: 1.4rem;
  line-height: 1.6;
}

.contact_control [aria-invalid="true"] {
  border-color: #B32724;
}

.contact_summary {
  margin: 24px 0 0;
  padding: 20px;
  border: 1px solid #B32724;
  border-radius: 8px;
  color: #B32724;
  line-height: 1.8;
}

.contact_summary ul {
  margin-top: 8px;
}

.contact_summary a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact_check {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  cursor: pointer;
  line-height: 1.8;
}

.contact_check_error,
.contact_preview_note {
  text-align: center;
}

.contact_preview_note {
  margin: 28px 0 20px;
  color: #656565;
  font-size: 1.4rem;
  line-height: 1.8;
}

.contact_button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  width: min(100%, 360px);
  min-height: 64px;
  margin: 0 auto;
  padding: 16px 24px;
  border: 1px solid #EF7E3A;
  border-radius: 40px;
  background: #EF7E3A;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.contact_button.is-back {
  border-color: #8AC925;
  background: #fff;
  color: #3C3C3C;
}

@media (hover: hover) {
  .contact_button:hover {
    background: #D96825;
    transform: translateY(-2px);
  }

  .contact_button.is-back:hover {
    background: #F1F8E8;
  }
}

.contact_review h3 {
  margin: 24px 0;
  font-size: 2.8rem;
  font-weight: 700;
  text-align: center;
}

.contact_review > p {
  line-height: 1.8;
  text-align: center;
}

.contact_review dl {
  margin-top: 28px;
}

.contact_review .contact_row {
  gap: 40px;
}

.contact_review dt {
  font-weight: 700;
}

.contact_review dd {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
}

.page-contact [hidden] {
  display: none !important;
}

@media screen and (max-width: 1000px) {
  .contact_panel {
    padding: 20px 32px 48px;
  }

  .contact_row,
  .contact_review .contact_row {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
  }

  fieldset.contact_row > legend {
    width: 220px;
  }

  .contact_choices {
    margin-left: 244px;
  }
}

@media screen and (max-width: 768px) {
  .page-contact .contact_body {
    border-radius: 30px;
  }

  .page-contact .contact_section {
    margin-top: 24px;
    padding: 64px 0 72px;
  }

  .contact_section .section_title {
    margin-bottom: 28px;
  }

  .contact_lead {
    margin-bottom: 30px;
    text-align: left;
  }

  .contact_panel {
    padding: 8px 20px 32px;
    border-radius: 20px;
  }

  .contact_row,
  .contact_review .contact_row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 24px 0;
  }

  .contact_label {
    justify-content: flex-start;
    padding: 0;
    font-size: 1.6rem;
  }

  fieldset.contact_row > legend {
    float: none;
    width: 100%;
    padding-top: 24px;
  }

  .contact_choices {
    margin-left: 0;
  }

  .contact_check {
    justify-content: flex-start;
    gap: 10px;
    margin-top: 28px;
  }

  .contact_review h3 {
    font-size: 2.2rem;
  }
}

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