.contact-wizard {
  --wizard-primary: hsl(192 80% 53%);
  --wizard-secondary: hsl(32 60% 27%);
  --wizard-border: hsl(38 40% 85%);
  --wizard-soft: hsl(190 70% 96%);
  --wizard-warm: hsl(38 40% 92%);
  margin-top: 1.5rem;
}

.wizard-top {
  display: grid;
  grid-template-columns: minmax(92px, 118px) 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--wizard-border);
  border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--wizard-soft), #fff 72%);
}

.wizard-gif-frame {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #fff;
}

.wizard-gif {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wizard-progress-copy {
  min-width: 0;
}

.wizard-progress-copy strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--wizard-secondary);
  font-size: 0.95rem;
}

.wizard-progress-copy p {
  margin: 0;
  color: #765f48;
  font-size: 0.9rem;
  line-height: 1.5;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.wizard-progress span {
  height: 0.3rem;
  border-radius: 99px;
  background: hsl(38 40% 86%);
  transition: background 180ms ease, transform 180ms ease;
}

.wizard-progress span.is-active {
  background: var(--wizard-primary);
}

.wizard-progress span.is-current {
  transform: scaleY(1.5);
}

.wizard-step {
  animation: wizard-step-in 240ms ease both;
}

.wizard-step-heading {
  margin: 0 0 1rem;
  color: var(--wizard-secondary);
  font-size: 1.1rem;
  font-weight: 700;
}

.wizard-step-copy {
  margin: -0.45rem 0 1.25rem;
  color: #806b56;
  font-size: 0.9rem;
  line-height: 1.55;
}

.wizard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1rem;
}

.wizard-grid > .wizard-field:only-child,
.wizard-field--full {
  grid-column: 1 / -1;
}

.wizard-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.4rem;
  color: #624c37;
  font-size: 0.82rem;
  font-weight: 600;
}

.wizard-field input,
.wizard-field select,
.wizard-field textarea {
  width: 100%;
  border: 1px solid #d8d0c7;
  border-radius: 0.45rem;
  background: #fff;
  color: #5d4a39;
  font: inherit;
  font-weight: 400;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.wizard-field input,
.wizard-field select {
  min-height: 2.65rem;
  padding: 0.65rem 0.75rem;
}

.wizard-field textarea {
  min-height: 8rem;
  padding: 0.75rem;
  resize: vertical;
  line-height: 1.5;
}

.wizard-field input:focus,
.wizard-field select:focus,
.wizard-field textarea:focus {
  border-color: var(--wizard-primary);
  box-shadow: 0 0 0 3px hsl(192 80% 53% / 0.14);
}

.wizard-field input[aria-invalid='true'],
.wizard-field select[aria-invalid='true'],
.wizard-field textarea[aria-invalid='true'] {
  border-color: #c95745;
}

.wizard-optional {
  color: #8f7e6d;
  font-size: 0.76rem;
  font-weight: 500;
}

.wizard-field-error {
  display: none;
  color: #b44839;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
}

.wizard-field-error.is-visible {
  display: block;
}

.wizard-field--textarea {
  margin-top: 1.1rem;
}

.wizard-textarea-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #927f6c;
  font-size: 0.73rem;
  font-weight: 400;
}

.wizard-textarea-meta .wizard-field-error {
  text-align: right;
}

.wizard-inline-media {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.55rem;
  background: var(--wizard-warm);
  color: #755e47;
  font-size: 0.78rem;
  line-height: 1.4;
}

.wizard-inline-media img {
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.wizard-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  margin-top: 1.25rem;
  color: #765f49;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.5;
}

.wizard-consent input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  accent-color: var(--wizard-primary);
}

.wizard-consent a {
  color: var(--wizard-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wizard-consent .wizard-field-error {
  grid-column: 2;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--wizard-border);
}

.wizard-actions .button {
  min-width: 8.25rem;
}

.wizard-actions .wizard-back {
  border: 1px solid var(--wizard-border);
  color: var(--wizard-secondary);
  background: transparent;
}

.wizard-actions .wizard-back:hover {
  background: var(--wizard-warm);
}

.wizard-required-note {
  margin: 1rem 0 0;
  color: #927f6c;
  font-size: 0.72rem;
  line-height: 1.5;
}

.wizard-required-note em {
  color: #b44839;
  font-style: normal;
}

.wizard-success-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: hsl(32 28% 13% / 0.68);
  backdrop-filter: blur(5px);
  animation: wizard-fade-in 180ms ease both;
}

.wizard-success-modal {
  position: relative;
  width: min(32rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.4rem;
  border: 1px solid var(--wizard-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1.5rem 4rem hsl(32 28% 13% / 0.28);
}

.wizard-success-close {
  position: absolute;
  z-index: 1;
  top: 0.65rem;
  right: 0.65rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: hsl(38 40% 92%);
  color: var(--wizard-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  transition: background 160ms ease, transform 160ms ease;
}

.wizard-success-close:hover {
  background: hsl(192 80% 53% / 0.16);
  transform: scale(1.05);
}

.wizard-success {
  padding: 0.25rem 0;
  text-align: center;
  animation: wizard-step-in 240ms ease both;
}

.wizard-success .wizard-gif-frame {
  width: 9rem;
  margin: 0 auto 1rem;
  background: var(--wizard-soft);
}

.wizard-success h3 {
  margin: 0 0 0.65rem;
  color: var(--wizard-secondary);
  font-size: 1.35rem;
}

.wizard-success p {
  max-width: 30rem;
  margin: 0 auto 1.25rem;
  color: #806b56;
  font-size: 0.9rem;
  line-height: 1.6;
}

.wizard-feedback {
  margin-top: 1.35rem;
  padding: 1rem;
  border: 1px solid hsl(192 80% 53% / 0.22);
  border-radius: 0.85rem;
  background: linear-gradient(135deg, hsl(190 70% 97%), #fff 75%);
  text-align: left;
}

.wizard-feedback-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wizard-feedback-gif {
  display: grid;
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  overflow: hidden;
  border-radius: 0.65rem;
  background: #fff;
}

.wizard-feedback-gif-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wizard-feedback-header strong {
  display: block;
  color: var(--wizard-secondary);
  font-size: 0.92rem;
}

.wizard-feedback-header p {
  margin: 0.25rem 0 0;
  color: #806b56;
  font-size: 0.78rem;
  line-height: 1.45;
}

.wizard-feedback-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.wizard-feedback-choice {
  display: flex;
  min-height: 4.35rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.22rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--wizard-border);
  border-radius: 0.6rem;
  background: #fff;
  color: var(--wizard-secondary);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.wizard-feedback-choice:hover,
.wizard-feedback-choice:focus-visible {
  border-color: var(--wizard-primary);
  background: hsl(192 80% 53% / 0.07);
  outline: none;
  transform: translateY(-1px);
}

.wizard-feedback-choice strong {
  font-size: 0.79rem;
}

.wizard-feedback-choice span {
  color: #8a7765;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.35;
}

.wizard-feedback-response {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid hsl(38 40% 85% / 0.9);
  animation: wizard-step-in 220ms ease both;
}

.wizard-feedback-response strong {
  display: block;
  color: var(--wizard-secondary);
  font-size: 0.85rem;
}

.wizard-feedback-response p {
  margin: 0.3rem 0 0.75rem;
  color: #806b56;
  font-size: 0.78rem;
  line-height: 1.45;
}

.wizard-google-link {
  width: 100%;
}

.wizard-feedback-done {
  margin-top: 0.65rem !important;
}

.wizard-feedback-field {
  display: block;
}

.wizard-feedback-field textarea {
  display: block;
  width: 100%;
  min-height: 5rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid #d8d0c7;
  border-radius: 0.45rem;
  background: #fff;
  color: #5d4a39;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.45;
  outline: none;
  resize: vertical;
}

.wizard-feedback-field textarea:focus {
  border-color: var(--wizard-primary);
  box-shadow: 0 0 0 3px hsl(192 80% 53% / 0.14);
}

.wizard-feedback-response-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.wizard-feedback-response-actions .button {
  flex: 1;
  min-width: 0;
}

.wizard-feedback-note {
  display: block;
  margin-top: 0.7rem;
  color: #927f6c;
  font-size: 0.7rem;
  line-height: 1.4;
}

.wizard-success .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.wizard-success .text-button {
  display: block;
  margin: 1rem auto 0;
  border: 0;
  background: transparent;
  color: var(--wizard-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@keyframes wizard-step-in {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wizard-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .wizard-top {
    grid-template-columns: 76px 1fr;
    gap: 0.85rem;
    padding: 0.75rem;
  }

  .wizard-progress-copy p {
    font-size: 0.82rem;
  }

  .wizard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .wizard-grid > .wizard-field:only-child,
  .wizard-field--full {
    grid-column: auto;
  }

  .wizard-actions .button {
    min-width: 0;
    flex: 1;
  }

  .wizard-success .wizard-gif-frame {
    width: 7rem;
  }

  .wizard-feedback-choices {
    grid-template-columns: 1fr;
  }

  .wizard-feedback-response-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 0.15rem;
  }
}