:root {
  --bg: #fafbfc;
  --bg-subtle: #f0f2f5;
  --card: #ffffff;
  --primary: #0f7b3f;
  --primary-mid: #16a34a;
  --primary-light: #ecfdf3;
  --primary-lighter: #f0fdf4;
  --primary-glow: rgba(15, 123, 63, 0.10);
  --primary-border: rgba(15, 123, 63, 0.20);
  --accent: #059669;
  --text: #111827;
  --text-mid: #374151;
  --text-light: #6b7280;
  --text-muted: #9ca3af;
  --text-faint: #d1d5db;
  --border: #e5e7eb;
  --border-light: #f0f1f3;
  --input-bg: #f9fafb;
  --input-focus-bg: #fff;
  --danger: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.10);
  --shadow-glow: 0 0 0 3px rgba(15, 123, 63, 0.12);
  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Background decoration ─── */
.bg-decoration {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 800px 600px at 10% -10%, rgba(15,123,63,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 600px 400px at 90% 100%, rgba(15,123,63,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 50% 50%, rgba(15,123,63,0.02) 0%, transparent 70%);
}

.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(15,123,63,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,123,63,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
}

/* ─── Layout ─── */
.app-container {
  position: relative; z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  min-height: 100vh;
}

/* ─── Top bar / Logo ─── */
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 32px;
}

.btn-reset-form {
  display: flex; align-items: center; gap: 5px;
  background: none; border: 1px solid #e0e0e0; border-radius: 8px;
  padding: 6px 14px; font-size: 13px; color: #888; cursor: pointer;
  transition: all 0.2s;
}
.btn-reset-form:hover { color: #e74c3c; border-color: #e74c3c; }

.logo-mark { display: flex; align-items: center; gap: 10px; }

.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(15,123,63,0.25);
}

.logo-icon svg { width: 22px; height: 22px; fill: #fff; }

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 18px; font-weight: 700;
  color: var(--text); letter-spacing: -0.3px;
}

.logo-text span { color: var(--primary); }

/* ─── Progress bar ─── */
.progress-container {
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.progress-container.visible { opacity: 1; transform: translateY(0); }

.progress-info {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}

.progress-label {
  font-family: 'Outfit', sans-serif;
  font-size: 13px; font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.5px;
}

.progress-count {
  font-family: 'Outfit', sans-serif;
  font-size: 13px; font-weight: 600;
  color: var(--primary);
}

.progress-track {
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-mid), #34d399);
  border-radius: 100px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px;
  background: #fff;
  border: 3px solid var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(15,123,63,0.12);
}

/* ─── Step cards ─── */
.step {
  display: none;
  animation: fadeSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.step.active { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Welcome screen ─── */
.welcome-card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  text-align: center;
}

.welcome-header {
  background: linear-gradient(135deg, #065f30 0%, var(--primary) 40%, var(--primary-mid) 100%);
  padding: 56px 40px 48px;
  position: relative;
  overflow: hidden;
}

.welcome-header::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.welcome-icon {
  width: 72px; height: 72px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  position: relative;
}

.welcome-icon svg { width: 36px; height: 36px; fill: #fff; }

.welcome-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 32px; font-weight: 800;
  color: #fff; margin-bottom: 10px;
  letter-spacing: -0.5px; position: relative;
}

.welcome-header p {
  font-size: 15px; color: rgba(255,255,255,0.8);
  max-width: 400px; margin: 0 auto;
  line-height: 1.6; position: relative;
}

.welcome-features {
  display: flex; gap: 0; padding: 0;
  border-bottom: 1px solid var(--border-light);
}

.welcome-feature {
  flex: 1; padding: 24px 16px;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  border-right: 1px solid var(--border-light);
}

.welcome-feature:last-child { border-right: none; }

.feature-icon {
  width: 40px; height: 40px;
  background: var(--primary-light);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
}

.feature-icon svg {
  width: 20px; height: 20px; stroke: var(--primary);
  fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.feature-text {
  font-family: 'Outfit', sans-serif;
  font-size: 13px; font-weight: 600;
  color: var(--text-mid);
}

.welcome-body { padding: 32px 40px 40px; }

.btn-start {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: #fff; border: none; border-radius: 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 17px; font-weight: 700;
  cursor: pointer; transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(15,123,63,0.3);
  letter-spacing: 0.2px;
}

.btn-start:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(15,123,63,0.4);
}

.btn-start:active { transform: translateY(-1px); }
.btn-start svg { width: 20px; height: 20px; fill: #fff; transition: transform 0.3s ease; }
.btn-start:hover svg { transform: translateX(4px); }

/* ─── Question Card ─── */
.question-card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.question-section-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--primary-light);
  border-radius: 100px;
  font-family: 'Outfit', sans-serif;
  font-size: 11px; font-weight: 700;
  color: var(--primary);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 8px;
}

.question-counter {
  font-family: 'Outfit', sans-serif;
  font-size: 13px; font-weight: 500;
  color: var(--text-muted); margin-bottom: 10px;
}

.question-card-body { padding: 36px 40px 40px; }

.question-title {
  font-family: 'Outfit', sans-serif;
  font-size: 24px; font-weight: 700;
  color: var(--text); margin-bottom: 8px;
  letter-spacing: -0.3px; line-height: 1.3;
}

.question-subtitle {
  font-size: 14px; color: var(--text-light);
  margin-bottom: 28px; line-height: 1.5;
}

/* ─── Inputs ─── */
.input-group { margin-bottom: 20px; }
.input-group:last-child { margin-bottom: 0; }

.input-label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 12px; font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.text-input, .textarea-input {
  width: 100%; padding: 14px 18px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 15px; color: var(--text);
  outline: none; transition: all 0.25s ease;
}

.text-input::placeholder, .textarea-input::placeholder { color: var(--text-muted); }
.text-input:hover, .textarea-input:hover { border-color: var(--text-muted); }

.text-input:focus, .textarea-input:focus {
  border-color: var(--primary);
  background: var(--input-focus-bg);
  box-shadow: var(--shadow-glow);
}

.textarea-input { resize: vertical; min-height: 100px; }

/* ─── Radio Cards ─── */
.radio-cards { display: flex; flex-direction: column; gap: 12px; }

.radio-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: var(--input-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer; transition: all 0.25s ease;
  user-select: none;
}

.radio-card:hover {
  border-color: var(--primary-border);
  background: var(--primary-lighter);
}

.radio-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(15,123,63,0.08), rgba(15,123,63,0.15));
  box-shadow: 0 0 0 4px rgba(15,123,63,0.15), 0 4px 12px rgba(15,123,63,0.1);
}

/* Dim unselected cards when a sibling is selected */
.radio-cards:has(.radio-card.selected) .radio-card:not(.selected) {
  opacity: 0.5;
  border-color: var(--border-light);
  background: var(--card);
}
.radio-cards:has(.radio-card.selected) .radio-card:not(.selected):hover {
  opacity: 0.8;
}

.radio-card input { display: none; }

.radio-dot {
  width: 22px; height: 22px; min-width: 22px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
}

.radio-card.selected .radio-dot {
  border-color: var(--primary);
  background: var(--primary);
  position: relative;
}

.radio-card.selected .radio-dot::after {
  content: '✓';
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  animation: popIn 0.2s ease;
}

@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }

.radio-icon {
  width: 42px; height: 42px;
  background: var(--card);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  font-size: 22px;
}

.radio-card.selected .radio-icon {
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(15,123,63,0.25);
}

.radio-card.selected .radio-icon svg { stroke: #fff; }

.radio-info { flex: 1; }

.radio-title {
  font-family: 'Outfit', sans-serif;
  font-size: 15px; font-weight: 600;
  color: var(--text); margin-bottom: 2px;
}

.radio-desc { font-size: 13px; color: var(--text-light); }

/* ─── Checkbox Cards ─── */
.checkbox-cards { display: flex; flex-direction: column; gap: 10px; }

.checkbox-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--input-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer; transition: all 0.25s ease;
  user-select: none;
}

.checkbox-card:hover {
  border-color: var(--primary-border);
  background: var(--primary-lighter);
}

.checkbox-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.checkbox-card input { display: none; }

.check-mark {
  width: 22px; height: 22px; min-width: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
}

.checkbox-card.selected .check-mark {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(15,123,63,0.2);
}

.checkbox-card.selected .check-mark::after {
  content: '';
  width: 6px; height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  margin-top: -2px;
  animation: popIn 0.2s ease;
}

.checkbox-text {
  font-size: 14px; font-weight: 500;
  color: var(--text-mid); flex: 1;
}

.other-input {
  margin-top: 10px; padding: 12px 16px;
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px; color: var(--text);
  outline: none; transition: all 0.25s ease;
  display: none;
}

.other-input.visible { display: block; animation: fadeSlideIn 0.3s ease; }
.other-input:focus { border-color: var(--primary); box-shadow: var(--shadow-glow); }

/* ─── Yes/No toggles ─── */
.yesno-group { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }

.yesno-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
}

.yesno-label { font-size: 14px; font-weight: 500; color: var(--text-mid); }

.yesno-toggle {
  display: flex; gap: 2px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 8px; padding: 3px;
}

.yesno-toggle input { display: none; }

.yesno-toggle label {
  font-size: 12px; font-weight: 600;
  padding: 5px 14px; border-radius: 5px;
  cursor: pointer; transition: all 0.2s ease;
  color: var(--text-muted); user-select: none;
}

.yesno-toggle label:hover { color: var(--text-light); }

.yesno-toggle input:checked + label {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 4px rgba(15,123,63,0.2);
}

.conditional-input { display: none; margin-top: 10px; animation: fadeSlideIn 0.3s ease; }
.conditional-input.visible { display: block; }

/* ─── Site address ─── */
.address-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--input-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.25s ease;
  margin-bottom: 8px; user-select: none;
}

.address-option.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(15,123,63,0.08), rgba(15,123,63,0.15));
  box-shadow: 0 0 0 4px rgba(15,123,63,0.15), 0 4px 12px rgba(15,123,63,0.1);
}

.address-option.selected .radio-dot {
  border-color: var(--primary);
  background: var(--primary);
  position: relative;
}

.address-option.selected .radio-dot::after {
  content: '✓';
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  animation: popIn 0.2s ease;
}

/* Dim unselected address options */
.address-fields:has(.address-option.selected) .address-option:not(.selected) {
  opacity: 0.5;
}
.address-fields:has(.address-option.selected) .address-option:not(.selected):hover {
  opacity: 0.8;
}

.address-option input { display: none; }

/* Same-as-business address preview */
.same-address-preview {
  margin-top: 8px;
  padding: 12px 16px;
  background: var(--primary-lighter);
  border: 1px dashed var(--primary-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-mid);
  display: none;
  animation: fadeSlideIn 0.3s ease;
}
.same-address-preview.visible { display: block; }
.same-address-preview strong { color: var(--text); }

.address-fields {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px dashed var(--border);
  animation: fadeSlideIn 0.35s ease;
}
.address-fields.visible { display: block; }

.dynamic-addresses { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

.address-row {
  display: flex; align-items: center; gap: 10px;
  animation: fadeSlideIn 0.2s ease;
}

.address-row .text-input { flex: 1; }

.address-num {
  width: 28px; height: 28px; min-width: 28px;
  background: var(--primary);
  color: #fff; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 12px; font-weight: 700;
}

.btn-remove {
  width: 32px; height: 32px; min-width: 32px;
  border: 1.5px solid var(--border);
  background: var(--card); border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all 0.2s ease;
}

.btn-remove:hover {
  border-color: var(--danger);
  color: var(--danger); background: #fef2f2;
}

.btn-confirm-count {
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-confirm-count:hover { background: var(--primary-dark, #0a6332); }

.btn-add-address {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  background: var(--card); color: var(--primary);
  border: 1.5px dashed var(--primary-border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
  margin-top: 8px;
}

.btn-add-address:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.btn-add-address svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 2.5;
}

/* ─── Animals grid ─── */
.animals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.animal-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
}

.animal-label { font-size: 14px; font-weight: 500; color: var(--text-mid); flex: 1; }

.animal-input {
  width: 80px; padding: 8px 12px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: 'Inter', sans-serif;
  font-size: 14px; text-align: center;
  color: var(--text); outline: none;
  transition: all 0.25s ease;
}

.animal-input:focus { border-color: var(--primary); box-shadow: var(--shadow-glow); }

/* ─── Dual fields ─── */
.dual-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ─── Navigation ─── */
.nav-bar {
  display: flex; justify-content: space-between;
  align-items: center; margin-top: 24px; gap: 12px;
}

.btn-nav {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border: none;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.25s ease;
  letter-spacing: 0.1px;
}

.btn-back {
  background: var(--card); color: var(--text-light);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-back:hover {
  border-color: var(--text-muted);
  color: var(--text); transform: translateX(-2px);
}

.btn-back svg {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}

.btn-next {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(15,123,63,0.25);
  margin-left: auto;
}

.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(15,123,63,0.35);
}

.btn-next:active { transform: translateY(0); }
.btn-next svg { width: 18px; height: 18px; fill: #fff; transition: transform 0.3s ease; }
.btn-next:hover svg { transform: translateX(3px); }

.btn-next:disabled {
  opacity: 0.5; cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-submit {
  background: linear-gradient(135deg, var(--primary) 0%, #059669 50%, var(--primary-mid) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(15,123,63,0.3);
  padding: 16px 40px; font-size: 16px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(15,123,63,0.4);
}

/* ─── Completion screen ─── */
.completion-card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  text-align: center;
  padding: 60px 40px;
  overflow: hidden;
  position: relative;
}

.completion-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-mid), #34d399, var(--primary));
}

.completion-icon {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(15,123,63,0.3);
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn { from { transform: scale(0); } to { transform: scale(1); } }

.completion-icon svg {
  width: 40px; height: 40px;
  stroke: #fff; fill: none;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}

.completion-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 28px; font-weight: 800;
  color: var(--text); margin-bottom: 10px;
}

.completion-card p {
  font-size: 15px; color: var(--text-light);
  max-width: 400px; margin: 0 auto; line-height: 1.6;
}

/* ─── Sub sections ─── */
.sub-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-light); }

.sub-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 13px; font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* ─── Validation ─── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.shake { animation: shake 0.4s ease; }

.input-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1) !important;
}

.validation-msg {
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
  animation: fadeSlideIn 0.3s ease;
}

/* ─── Toast notifications ─── */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f2937;
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 200;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: var(--danger);
}

/* ─── Tablet ─── */
@media (max-width: 768px) {
  .app-container { max-width: 100%; padding: 32px 20px 70px; }
  .welcome-header { padding: 44px 28px 40px; }
  .welcome-header h1 { font-size: 28px; }
  .question-card-body { padding: 32px 28px 36px; }
  .question-title { font-size: 22px; }
  .dual-fields { grid-template-columns: 1fr; }
}

/* ─── Mobile ─── */
@media (max-width: 480px) {
  body { -webkit-text-size-adjust: 100%; }
  .bg-grid { display: none; }
  .app-container { padding: 16px 14px 100px; }

  .top-bar { padding: 0 0 20px; }
  .logo-icon { width: 34px; height: 34px; border-radius: 9px; }
  .logo-icon svg { width: 18px; height: 18px; }
  .logo-text { font-size: 15px; }

  .progress-container { margin-bottom: 20px; }
  .progress-info { margin-bottom: 8px; }
  .progress-label { font-size: 11px; }
  .progress-count { font-size: 12px; }
  .progress-fill::after { width: 10px; height: 10px; border-width: 2.5px; }

  .welcome-card { border-radius: 16px; }
  .welcome-header { padding: 32px 20px 28px; }
  .welcome-header h1 { font-size: 24px; line-height: 1.2; }
  .welcome-header p { font-size: 13px; }
  .welcome-icon { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 16px; }
  .welcome-icon svg { width: 28px; height: 28px; }
  .welcome-features { flex-direction: column; }
  .welcome-feature {
    flex-direction: row; border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 14px 20px; gap: 12px; justify-content: flex-start;
  }
  .welcome-feature:last-child { border-bottom: none; }
  .feature-icon { width: 36px; height: 36px; min-width: 36px; border-radius: 9px; }
  .feature-icon svg { width: 18px; height: 18px; }
  .feature-text { font-size: 13px; }
  .welcome-body { padding: 24px 20px 28px; }
  .btn-start {
    width: 100%; justify-content: center;
    padding: 15px 32px; font-size: 16px; border-radius: 12px;
  }

  .question-card { border-radius: 16px; }
  .question-card-body { padding: 24px 20px 28px; }
  .question-section-badge { font-size: 10px; padding: 5px 12px; }
  .question-counter { font-size: 12px; margin-bottom: 6px; }
  .question-title { font-size: 19px; margin-bottom: 6px; }
  .question-subtitle { font-size: 13px; margin-bottom: 22px; }

  .text-input, .textarea-input {
    padding: 14px 16px; font-size: 16px; border-radius: 10px;
  }
  .textarea-input { min-height: 90px; }

  .radio-cards { gap: 10px; }
  .radio-card { padding: 14px 16px; gap: 12px; border-radius: 12px; }
  .radio-dot { width: 20px; height: 20px; min-width: 20px; }
  .radio-card.selected .radio-dot::after { width: 9px; height: 9px; }
  .radio-icon { width: 38px; height: 38px; border-radius: 10px; font-size: 20px; }
  .radio-title { font-size: 14px; }
  .radio-desc { font-size: 12px; }

  .checkbox-cards { gap: 8px; }
  .checkbox-card { padding: 14px 14px; gap: 12px; border-radius: 10px; }
  .check-mark { width: 20px; height: 20px; min-width: 20px; border-radius: 5px; }
  .checkbox-card.selected .check-mark::after { width: 5px; height: 9px; }
  .checkbox-text { font-size: 13px; }
  .other-input { padding: 12px 14px; font-size: 16px; border-radius: 10px; }

  .yesno-item { padding: 14px 16px; flex-wrap: wrap; gap: 10px; border-radius: 10px; }
  .yesno-label { font-size: 13px; flex: 1; min-width: 0; }
  .yesno-toggle { flex-shrink: 0; }
  .yesno-toggle label { padding: 5px 12px; font-size: 11px; }

  .address-option { padding: 12px 14px; gap: 10px; border-radius: 10px; }
  .address-option .checkbox-text { font-size: 13px; }

  .address-row { gap: 8px; }
  .address-num { width: 26px; height: 26px; min-width: 26px; font-size: 11px; border-radius: 7px; }
  .btn-remove { width: 30px; height: 30px; min-width: 30px; }
  .btn-add-address { font-size: 12px; padding: 10px 16px; }

  .animals-grid { grid-template-columns: 1fr; gap: 8px; }
  .animal-item { padding: 12px 14px; border-radius: 10px; }
  .animal-label { font-size: 13px; }
  .animal-input { width: 70px; padding: 8px 10px; font-size: 16px; }

  .dual-fields { grid-template-columns: 1fr; gap: 12px; }
  .input-label { font-size: 11px; }

  .sub-section { margin-top: 16px; padding-top: 16px; }
  .sub-section-title { font-size: 12px; margin-bottom: 10px; }

  .nav-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--card);
    padding: 14px 16px; margin: 0;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
    z-index: 100;
    display: flex; gap: 10px;
  }
  .btn-nav {
    flex: 1; justify-content: center;
    padding: 13px 16px; font-size: 14px;
    border-radius: 10px; min-width: 0;
  }
  .btn-back { flex: 0.7; }
  .btn-next, .btn-submit { flex: 1.3; }
  .btn-submit { font-size: 14px; padding: 13px 16px; }

  .completion-card { padding: 48px 24px; border-radius: 16px; }
  .completion-icon { width: 64px; height: 64px; margin-bottom: 20px; }
  .completion-icon svg { width: 32px; height: 32px; }
  .completion-card h2 { font-size: 24px; }
  .completion-card p { font-size: 14px; }

  .yesno-item[style*="flex-direction:column"] { gap: 8px; }
  .yesno-item[style*="flex-direction:column"] > div[style*="display:flex"] {
    flex-wrap: wrap; gap: 8px;
  }
}

@media (max-width: 360px) {
  .app-container { padding: 12px 10px 100px; }
  .welcome-header h1 { font-size: 21px; }
  .question-title { font-size: 17px; }
  .question-card-body { padding: 20px 16px 24px; }
  .radio-card { padding: 12px 12px; }
  .checkbox-card { padding: 12px 12px; }
  .btn-start { padding: 14px 24px; font-size: 15px; }
  .nav-bar { padding: 12px 12px; }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 480px) {
    .nav-bar { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
    .app-container { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  }
}

@media (hover: none) and (pointer: coarse) {
  .radio-card, .checkbox-card, .address-option { -webkit-tap-highlight-color: transparent; }
  .radio-card:active { transform: scale(0.98); }
  .checkbox-card:active { transform: scale(0.98); }
  .btn-nav:active { transform: scale(0.97); }
  .btn-start:active { transform: scale(0.97); }
}
