@font-face {
  font-family: 'Signature Script';
  src: url('assets/DancingScript.ttf') format('truetype');
  font-weight: 400 700;
}

:root {
  --pink: #E4007C;
  --pink-dark: #9C0057;
  --pink-tint: #FDE8F2;
  --gold: #B8952A;
  --gold-light: #F3E3B0;
  --ink: #171717;
  --ink-soft: #5B5B58;
  --line: #E9E5D8;
  --cream: #FAF8F3;
  --white: #FFFFFF;
  --danger: #B3261E;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(23,23,23,0.06), 0 8px 24px rgba(23,23,23,0.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px 48px;
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: center;
  padding: 32px 0 12px;
}
.logo {
  height: 190px;
  width: auto;
  object-fit: contain;
}

.progress-shell {
  position: sticky;
  top: 0;
  background: var(--cream);
  padding: 12px 0 14px;
  z-index: 10;
}
.progress-track {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}
.progress-track .seg {
  height: 3px;
  flex: 1;
  background: var(--line);
  border-radius: 2px;
  transition: background .25s ease;
}
.progress-track .seg.done { background: var(--ink); }
.progress-track .seg.active { background: var(--pink); }

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-soft);
}
.progress-meta #stepName { color: var(--gold); font-weight: 500; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px 24px 24px;
}

.step-title {
  font-size: 22px;
  margin-bottom: 4px;
}
.step-subtitle {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 22px;
}

.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 5px;
  font-weight: 500;
}
.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field input[type=number],
.field input[type=date],
.field textarea,
.field select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  font-size: 14.5px;
  font-family: inherit;
  background: var(--cream);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea {
  height: auto;
  min-height: 70px;
  padding: 10px 13px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px var(--pink-tint);
  background: var(--white);
}
.field .error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}
.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: var(--danger);
}
.field.has-error .error { display: block; }

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .row-2 { grid-template-columns: 1fr; }
}

.pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill {
  border: 1px solid var(--line);
  background: var(--cream);
  border-radius: 20px;
  padding: 9px 18px;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--ink);
  user-select: none;
  transition: all .12s ease;
}
.pill:hover { border-color: var(--gold); }
.pill.selected {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--white);
  font-weight: 500;
}

.trust-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11.5px;
  color: var(--ink-soft);
  margin: 4px 0 2px;
}
.trust-note .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 5px;
  flex-shrink: 0;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 22px 0 18px;
  position: relative;
}
.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 14px;
  padding-left: 10px;
  border-left: 2px solid var(--gold);
}

.nav-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.btn {
  height: 46px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .08s ease, opacity .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-ghost {
  flex: 0 0 auto;
  padding: 0 20px;
  background: var(--white);
  border-color: var(--line);
  color: var(--ink-soft);
}
.btn-primary {
  flex: 1;
  background: var(--pink);
  color: var(--white);
}
.btn-primary:hover { background: var(--pink-dark); }
.btn-secondary {
  background: var(--white);
  border-color: var(--gold);
  color: var(--gold);
  padding: 0 22px;
  text-decoration: none;
  margin-top: 18px;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.arrow { font-size: 15px; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  margin-bottom: 4px;
  font-size: 13.5px;
  color: var(--ink);
}
.checkbox-row input[type=checkbox] {
  width: 17px;
  height: 17px;
  accent-color: var(--pink);
  cursor: pointer;
  flex-shrink: 0;
}
.group-children {
  padding-left: 14px;
  border-left: 2px solid var(--line);
  margin: 10px 0 16px;
}

.fixed-value {
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 13px;
  font-size: 14.5px;
  background: var(--pink-tint);
  color: var(--pink-dark);
  font-weight: 500;
  display: flex;
  align-items: center;
}

.sig-typed-wrap {
  border: 1.5px dashed var(--gold);
  border-radius: 10px;
  background: var(--cream);
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
}
.typed-sig {
  font-family: 'Signature Script', cursive;
  font-size: 44px;
  color: var(--ink);
  line-height: 1;
  word-break: break-word;
  text-align: center;
}

.sig-wrap {
  border: 1.5px dashed var(--gold);
  border-radius: 10px;
  background: var(--cream);
  overflow: hidden;
}
#sigPad {
  width: 100%;
  height: 160px;
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.sig-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.sig-clear {
  font-size: 12.5px;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

.consent-box {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.success-card {
  text-align: center;
  padding: 40px 28px;
}
.success-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--pink-tint);
  color: var(--pink);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.success-card h1 { font-size: 22px; margin-bottom: 10px; }
.success-card p { color: var(--ink-soft); font-size: 14px; line-height: 1.6; margin: 0; }

.footnote {
  text-align: center;
  font-size: 11px;
  color: var(--ink-soft);
  opacity: .7;
  margin-top: 28px;
  letter-spacing: .03em;
}

.submit-error {
  color: var(--danger);
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
  display: none;
}
