/* Contact page only. Shared header, hero, footer and CTA come from top/subpage CSS. */
.estex-contact .subpage-hero__image { object-position: center 38%; }
.estex-contact .contact-options__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.estex-contact .contact-option { display: flex; min-height: 286px; flex-direction: column; align-items: flex-start; padding: 42px; border-radius: 18px; background: #fff; }
.estex-contact .contact-option__label { margin: 0 0 22px; color: var(--subpage-accent); font-family: var(--top-en); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.estex-contact .contact-option h3 { margin: 0 0 18px; font-size: 21px; font-weight: 500; line-height: 1.6; }
.estex-contact .contact-option p:not(.contact-option__label) { margin: 0; font-size: 14px; line-height: 1.9; }
.estex-contact .contact-option__phone { margin: 0 0 16px; color: var(--subpage-ink); font-family: var(--top-en); font-size: 32px; font-weight: 500; letter-spacing: .03em; text-decoration: none; }
.estex-contact .contact-option .subpage-button { margin: auto auto 0; }

.estex-contact .contact-form,
.estex-contact .contact-confirm { padding: 56px 64px; border-radius: 22px; background: #fff; }
.estex-contact .contact-form__fields { border-top: 1px solid #dedede; }
.estex-contact .contact-field { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; margin: 0; padding: 30px 0; border: 0; border-bottom: 1px solid #dedede; }
.estex-contact .contact-field > label,
.estex-contact .contact-field > legend { margin: 0; padding: 13px 0 0; color: var(--subpage-ink); font-size: 15px; font-weight: 600; line-height: 1.6; }
.estex-contact .contact-required,
.estex-contact .contact-optional { display: inline-flex; align-items: center; min-height: 22px; margin-left: 8px; padding: 1px 8px 0; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .04em; vertical-align: 1px; }
.estex-contact .contact-required { background: var(--subpage-ink); color: #fff; }
.estex-contact .contact-optional { border: 1px solid #c7c7c7; color: #777; }

.estex-contact input[type="text"],
.estex-contact input[type="email"],
.estex-contact input[type="tel"],
.estex-contact select,
.estex-contact textarea { width: 100%; border: 1px solid #c9c9c9; border-radius: 10px; background: #f7f7f7; color: var(--subpage-ink); font: inherit; font-size: 16px; line-height: 1.6; }
.estex-contact input[type="text"],
.estex-contact input[type="email"],
.estex-contact input[type="tel"],
.estex-contact select { min-height: 52px; padding: 0 16px; }
.estex-contact textarea { display: block; min-height: 220px; padding: 15px 16px; resize: vertical; }
.estex-contact input::placeholder,
.estex-contact textarea::placeholder { color: #999; }
.estex-contact input:focus-visible,
.estex-contact select:focus-visible,
.estex-contact textarea:focus-visible { border-color: var(--subpage-ink); outline: 2px solid var(--subpage-ink); outline-offset: 2px; background: #fff; }
.estex-contact [aria-invalid="true"] { border-color: #a12a25 !important; }
.estex-contact .contact-field__select-wrap { position: relative; }
.estex-contact .contact-field__select-wrap::after { position: absolute; top: 50%; right: 18px; width: 8px; height: 8px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; content: ''; pointer-events: none; transform: translateY(-70%) rotate(45deg); }
.estex-contact select { appearance: none; padding-right: 46px; }
.estex-contact .contact-choice-list { display: flex; flex-wrap: wrap; gap: 12px 28px; padding-top: 9px; }
.estex-contact .contact-choice-list label { display: inline-flex; align-items: center; gap: 9px; min-height: 34px; font-size: 15px; cursor: pointer; }
.estex-contact .contact-choice-list input,
.estex-contact .contact-consent input { width: 20px; height: 20px; margin: 0; accent-color: var(--subpage-ink); }
.estex-contact .contact-consent { display: flex; align-items: flex-start; justify-content: center; gap: 12px; margin: 36px auto 0; font-size: 14px; line-height: 1.8; cursor: pointer; }
.estex-contact .contact-consent input { flex: 0 0 auto; margin-top: 3px; }
.estex-contact .contact-consent a { color: var(--subpage-ink); text-underline-offset: 3px; }
.estex-contact .contact-form__error { margin: 20px 0 0; color: #a12a25; font-size: 14px; text-align: center; }

.estex-contact .contact-submit { display: flex; min-width: 280px; min-height: 58px; align-items: center; justify-content: center; margin: 30px auto 0; padding: 0 34px; border: 1px solid var(--subpage-ink); border-radius: 999px; background: var(--subpage-ink); color: #fff; font: inherit; font-size: 15px; cursor: pointer; transition: background .2s ease, color .2s ease; }
.estex-contact .contact-submit:hover { background: #fff; color: var(--subpage-ink); }
.estex-contact .contact-submit:focus-visible { outline: 2px solid var(--subpage-ink); outline-offset: 3px; }
.estex-contact .contact-submit--back { background: #fff; color: var(--subpage-ink); }
.estex-contact .contact-submit--back:hover { background: var(--subpage-ink); color: #fff; }
.estex-contact .contact-form__preview-note { margin: 20px 0 0; color: #858585; font-size: 12px; line-height: 1.7; text-align: center; }
.estex-contact .contact-confirm h3 { margin: 0 0 30px; font-size: 22px; font-weight: 500; text-align: center; }
.estex-contact .contact-confirm dl { margin: 0; border-top: 1px solid #dedede; }
.estex-contact .contact-confirm dl > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; padding: 22px 0; border-bottom: 1px solid #dedede; }
.estex-contact .contact-confirm dt { font-size: 14px; font-weight: 600; }
.estex-contact .contact-confirm dd { margin: 0; font-size: 15px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.estex-contact .contact-confirm > p { margin: 28px 0 0; color: #777; font-size: 13px; text-align: center; }

@media (max-width: 767px), (min-width: 768px) and (max-width: 1366px) {
  .estex-contact .contact-options__grid { grid-template-columns: 1fr; gap: 16px; }
  .estex-contact .contact-option { min-height: 0; padding: 28px 24px; border-radius: 14px; }
  .estex-contact .contact-option__label { margin-bottom: 16px; font-size: 12px; }
  .estex-contact .contact-option h3 { margin-bottom: 14px; font-size: 18px; }
  .estex-contact .contact-option__phone { margin-bottom: 12px; font-size: 27px; }
  .estex-contact .contact-option .subpage-button { margin-top: 24px; }
  .estex-contact .contact-form,
  .estex-contact .contact-confirm { padding: 30px 20px; border-radius: 14px; }
  .estex-contact .contact-field { grid-template-columns: 1fr; gap: 10px; padding: 22px 0; }
  .estex-contact .contact-field > label,
  .estex-contact .contact-field > legend { padding-top: 0; font-size: 14px; }
  /* fieldsetのlegendだけは、直前の罫線から十分に離して読ませる。 */
  .estex-contact fieldset.contact-field--choice > legend { padding-top: 28px; }
  .estex-contact .contact-choice-list { gap: 8px 18px; padding-top: 0; }
  .estex-contact .contact-choice-list label { font-size: 14px; }
  .estex-contact .contact-consent { justify-content: flex-start; margin-top: 26px; font-size: 13px; }
  .estex-contact .contact-submit { width: 100%; min-width: 0; min-height: 54px; margin-top: 26px; }
  .estex-contact .contact-confirm dl > div { grid-template-columns: 1fr; gap: 8px; padding: 18px 0; }
  .estex-contact .contact-confirm h3 { margin-bottom: 24px; font-size: 19px; }
  .estex-contact .contact-confirm dd { font-size: 14px; }
}

@media (min-width: 768px) and (max-width: 1366px) {
  .estex-contact .contact-options__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .estex-contact .contact-option {
    height: 100%;
  }

  .estex-contact .contact-option .subpage-button {
    width: fit-content;
    margin: auto auto 0;
  }
}

.estex-contact [hidden] { display: none !important; }
.estex-contact .estex-contact__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.estex-contact button:disabled { opacity: .6; cursor: wait; }
.estex-contact .contact-form__error { color: #a12a25; }

