:root {
  --eg-survey-text: #212121;
  --eg-survey-muted: #797979;
  --eg-survey-placeholder: #b3b3b3;
  --eg-survey-primary: #212121;
  --eg-survey-surface: #ffffff;
  --eg-survey-field-bg: #fcfcfc;
  --eg-survey-soft: #f5f5f5;
  --eg-survey-border: #b3b3b3;
  --eg-survey-line: #d9d9d9;
  --eg-survey-required-bg: #fbdada;
  --eg-survey-required: #ba000c;
  --eg-survey-optional-bg: #e5e5e5;
  --eg-survey-error: #ba000c;
  --eg-survey-radius: 10px;
  --eg-survey-control-radius: 8px;
  --eg-survey-font-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --eg-survey-font-head: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --eg-survey-font-en: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #fff;
}

body.en-gallery-survey-page {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: url("../img/common/bg-paper@2x.webp") center top / 1440px auto repeat #fff;
  color: var(--eg-survey-text);
  font-family: var(--eg-survey-font-head);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.en-gallery-survey-page button,
.en-gallery-survey-page input,
.en-gallery-survey-page select,
.en-gallery-survey-page textarea {
  font: inherit;
}

.eg-survey-page {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 50px 20px 120px;
}

.eg-survey-page__brand {
  display: block;
  width: max-content;
  margin: 0 auto 47px;
  line-height: 1;
}

.eg-survey-page__brand .eg-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.eg-survey-page__brand .eg-logo__mark {
  display: block;
  width: 176px;
  height: auto;
}

.eg-survey-page__brand .eg-logo__text {
  display: block;
  width: 143px;
  height: auto;
}

.eg-survey-page__content {
  width: 100%;
}

.eg-survey-page__recaptcha {
  width: 100%;
  margin: 32px 0 0;
  color: var(--eg-survey-muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.eg-survey-page__recaptcha a {
  color: inherit;
  text-decoration: underline;
}

.grecaptcha-badge {
  visibility: hidden;
}

.eg-survey-form {
  overflow: hidden;
  border-radius: var(--eg-survey-radius);
  background: var(--eg-survey-surface);
}

.wpcf7-form .hidden-fields-container {
  display: none;
}

.wpcf7 .screen-reader-response {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.eg-survey-form [hidden] {
  display: none !important;
}

.eg-survey-intro,
.eg-survey-step,
.eg-survey-thanks {
  padding: 60px 80px;
}

.eg-survey-intro,
.eg-survey-thanks {
  text-align: center;
}

.eg-survey-intro {
  display: grid;
  justify-items: center;
}

.eg-survey-intro__eyebrow,
.eg-survey-step__eyebrow {
  margin: 0 0 8px;
  color: var(--eg-survey-text);
  font-family: var(--eg-survey-font-en);
  font-size: 16px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: calc(1.6 / 16 * 1em);
  text-transform: uppercase;
}

.eg-survey-intro__title,
.eg-survey-thanks h2 {
  margin: 0;
  text-wrap: pretty;
  color: var(--eg-survey-text);
  font-family: var(--eg-survey-font-head);
  font-size: 38px;
  font-weight: 500;
  line-height: 1.5;
}

.eg-survey-intro__text,
.eg-survey-thanks p {
  max-width: 100%;
  margin: 40px auto 0;
  color: var(--eg-survey-muted);
  font-size: 18px;
  line-height: 1.8;
}

.eg-survey-intro__text + .eg-survey-intro__text {
  margin-top: 0;
}

.eg-survey-intro__note {
  margin: 20px 0 0;
  color: var(--eg-survey-required);
  font-family: var(--eg-survey-font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.eg-survey-intro__note::before {
  content: "※";
}

.eg-survey-intro .eg-survey-actions--single {
  width: 100%;
  margin-top: 40px;
}

.eg-survey-intro .eg-survey-button--primary {
  width: min(100%, 340px);
}

.eg-survey-progress {
  padding: 60px 80px 0;
}

.eg-survey-progress__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.eg-survey-progress__item {
  position: relative;
  padding-top: 26px;
  color: var(--eg-survey-placeholder);
  font-family: var(--eg-survey-font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.eg-survey-progress__item::before {
  position: absolute;
  top: 2px;
  left: 50%;
  z-index: 2;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--eg-survey-line);
  content: "";
}

.eg-survey-progress__item::after {
  position: absolute;
  top: 7px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--eg-survey-line);
  content: "";
}

.eg-survey-progress__item:first-child::after {
  display: none;
}

.eg-survey-progress__item.is-current,
.eg-survey-progress__item.is-complete {
  color: var(--eg-survey-text);
}

.eg-survey-progress__item.is-complete::before {
  background: var(--eg-survey-primary);
}

.eg-survey-progress__item.is-current::before {
  top: 0;
  width: 16px;
  height: 16px;
  background: var(--eg-survey-primary);
}

.eg-survey-step__header {
  margin-bottom: 40px;
  text-align: center;
}

.eg-survey-step__title {
  margin: 0;
  font-family: var(--eg-survey-font-head);
  font-size: 38px;
  font-weight: 500;
  line-height: 1.5;
}

.eg-survey-step__title:focus {
  outline: none;
}

.eg-survey-step__description {
  margin: 20px 0 0;
  text-wrap: pretty;
  color: var(--eg-survey-muted);
  font-size: 18px;
  line-height: 1.8;
}

.eg-survey-fields {
  display: grid;
  gap: 30px;
}

.eg-survey-field {
  min-width: 0;
}

fieldset.eg-survey-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.eg-survey-field__label,
.eg-survey-field legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  color: var(--eg-survey-text);
  font-family: var(--eg-survey-font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.eg-survey-field__hint {
  display: block;
  margin-top: 8px;
  color: var(--eg-survey-muted);
  font-family: var(--eg-survey-font-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}

.eg-survey-required,
.eg-survey-optional {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 30px;
  font-family: var(--eg-survey-font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.eg-survey-required {
  background: var(--eg-survey-required-bg);
  color: var(--eg-survey-required);
}

.eg-survey-optional {
  background: var(--eg-survey-optional-bg);
  color: var(--eg-survey-text);
}

.eg-survey-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 20px;
}

.eg-survey-form input[type="text"],
.eg-survey-form input[type="email"],
.eg-survey-form input[type="tel"],
.eg-survey-form input[type="number"],
.eg-survey-form input[type="url"],
.eg-survey-form input[type="date"],
.eg-survey-form select,
.eg-survey-form textarea {
  width: 100%;
  min-height: 56px;
  padding: 14px 10px;
  border: 1px solid var(--eg-survey-border);
  border-radius: var(--eg-survey-control-radius);
  outline: 0;
  background: var(--eg-survey-field-bg);
  color: var(--eg-survey-text);
  font-family: var(--eg-survey-font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.eg-survey-form ::placeholder {
  color: var(--eg-survey-placeholder);
  opacity: 1;
}

.eg-survey-form select {
  padding-right: 42px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23212121' stroke-width='1.5'/%3E%3C/svg%3E");
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 12px 8px;
}

.eg-survey-form textarea {
  min-height: 160px;
  resize: vertical;
}

.eg-survey-form input:focus,
.eg-survey-form select:focus,
.eg-survey-form textarea:focus {
  border-color: var(--eg-survey-primary);
  box-shadow: 0 0 0 3px rgba(33, 33, 33, 0.12);
}

.eg-survey-field.is-invalid input,
.eg-survey-field.is-invalid select,
.eg-survey-field.is-invalid textarea {
  border-color: var(--eg-survey-error);
}

.eg-survey-choice-list .wpcf7-form-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.eg-survey-choice-list--wide .wpcf7-form-control {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.eg-survey-choice-list .wpcf7-list-item {
  display: block;
  height: 100%;
  margin: 0;
}

.eg-survey-choice-list label {
  display: flex;
  position: relative;
  align-items: center;
  height: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid var(--eg-survey-border);
  border-radius: var(--eg-survey-control-radius);
  background: var(--eg-survey-field-bg);
  color: var(--eg-survey-text);
  cursor: pointer;
  font-family: var(--eg-survey-font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.eg-survey-choice-list input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0 10px 0 0;
  accent-color: var(--eg-survey-primary);
}

.eg-survey-choice-list label:has(input:checked) {
  border-color: var(--eg-survey-primary);
  background: var(--eg-survey-soft);
}

.eg-survey-choice-list label:has(input:focus-visible) {
  outline: 2px solid var(--eg-survey-primary);
  outline-offset: 2px;
}

.eg-survey-subsection {
  display: grid;
  gap: 30px;
  padding: 30px;
  border-radius: var(--eg-survey-radius);
  background: var(--eg-survey-soft);
}

.eg-survey-character-count {
  margin: 8px 0 0;
  color: var(--eg-survey-muted);
  font-family: var(--eg-survey-font-body);
  font-size: 13px;
  font-weight: 400;
  text-align: right;
}

.eg-survey-consent label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--eg-survey-border);
  border-radius: var(--eg-survey-control-radius);
  background: var(--eg-survey-field-bg);
  cursor: pointer;
  font-family: var(--eg-survey-font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
}

.eg-survey-consent input {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  margin-top: 4px;
  accent-color: var(--eg-survey-primary);
}

.eg-survey-consent.is-invalid label {
  border-color: var(--eg-survey-error);
}

.eg-survey-error,
.wpcf7-not-valid-tip {
  display: block;
  margin: 8px 0 0;
  color: var(--eg-survey-error);
  font-family: var(--eg-survey-font-body);
  font-size: 13px;
  font-weight: 400;
}

.eg-survey-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.eg-survey-actions--single {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.eg-survey-button,
.eg-survey-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 12px 24px;
  border: 1px solid var(--eg-survey-primary);
  border-radius: var(--eg-survey-control-radius);
  cursor: pointer;
  font-family: var(--eg-survey-font-head);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  transition: opacity 0.3s;
}

.eg-survey-button:focus-visible,
.eg-survey-submit:focus-visible {
  outline: 2px solid var(--eg-survey-primary);
  outline-offset: 3px;
}

.eg-survey-button--primary,
.eg-survey-submit {
  width: min(100%, 420px);
  background: var(--eg-survey-primary);
  color: #fff;
}

.eg-survey-button--secondary {
  padding-inline: 80px;
  background: #fff;
  color: var(--eg-survey-text);
}

.eg-survey-submit {
  -webkit-appearance: none;
  appearance: none;
}

.eg-survey-thanks {
  display: grid;
  justify-items: center;
}

.eg-survey-thanks__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--eg-survey-soft);
  color: var(--eg-survey-primary);
  font-size: 1.6rem;
}

.eg-survey-thanks p {
  margin-top: 20px;
}

.wpcf7-response-output {
  margin: 0 80px 40px !important;
  padding: 12px 15px !important;
  border-radius: var(--eg-survey-control-radius);
  font-family: var(--eg-survey-font-body);
  font-size: 14px;
  font-weight: 400;
}

.eg-survey-form.is-complete + .wpcf7-response-output {
  display: none;
}

.wpcf7-spinner {
  display: block;
  margin: 10px auto 0;
}

@media (any-hover: hover) {
  .eg-survey-button:hover,
  .eg-survey-submit:hover {
    opacity: 0.8;
  }

  .eg-survey-choice-list label:hover {
    border-color: var(--eg-survey-primary);
  }
}

@media (max-width: 767px) {
  .eg-survey-page {
    padding: 30px 16px 60px;
  }

  .eg-survey-page__brand {
    margin-bottom: 30px;
  }

  .eg-survey-page__brand .eg-logo__mark {
    width: 132px;
  }

  .eg-survey-page__brand .eg-logo__text {
    width: 107px;
  }

  .eg-survey-intro,
  .eg-survey-step,
  .eg-survey-thanks {
    padding: 40px 20px;
  }

  .eg-survey-progress {
    padding: 30px 20px 0;
  }

  .eg-survey-intro__eyebrow,
  .eg-survey-step__eyebrow {
    font-size: 13px;
  }

  .eg-survey-intro__title,
  .eg-survey-thanks h2,
  .eg-survey-step__title {
    font-size: 26px;
    text-wrap: wrap;
  }

  .eg-survey-intro__text,
  .eg-survey-thanks p,
  .eg-survey-step__description {
    font-size: 15px;
  }

  .eg-survey-intro__text {
    margin-top: 30px;
    text-align: left;
  }

  .eg-survey-step__header {
    margin-bottom: 30px;
  }

  .eg-survey-field__label,
  .eg-survey-field legend {
    margin-bottom: 12px;
    font-size: 15px;
  }

  .eg-survey-choice-list--wide .wpcf7-form-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eg-survey-subsection {
    padding: 20px 16px;
  }

  .eg-survey-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12px;
  }

  .eg-survey-button--primary,
  .eg-survey-submit,
  .eg-survey-button--secondary {
    width: 100%;
    min-height: 56px;
    padding-inline: 20px;
  }

  .wpcf7-response-output {
    margin: 0 20px 30px !important;
  }
}

@media (max-width: 480px) {
  .eg-survey-columns,
  .eg-survey-choice-list .wpcf7-form-control,
  .eg-survey-choice-list--wide .wpcf7-form-control {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
