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

:root {
  --bg: #ecfdf9;
  --bg-card: #ffffff;
  --text: #134e4a;
  --text-muted: #5b7c78;
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --accent-soft: rgba(13, 148, 136, 0.12);
  --accent-glow: rgba(13, 148, 136, 0.35);
  --danger: #dc2626;
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(15, 118, 110, 0.12);
  --shadow-sm: 0 4px 16px rgba(15, 118, 110, 0.08);
  --font: "Manrope", system-ui, -apple-system, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tap: 48px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.bg-blob--1 {
  width: 280px;
  height: 280px;
  background: #5eead4;
  top: -80px;
  right: -60px;
  animation: float 12s ease-in-out infinite;
}

.bg-blob--2 {
  width: 320px;
  height: 320px;
  background: #a7f3d0;
  bottom: 10%;
  left: -100px;
  animation: float 14s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -16px) scale(1.05); }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 10px;
  background: rgba(236, 253, 249, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-dark);
}

.topbar__icon {
  font-size: 1.25rem;
}

.topbar__step {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.progress-wrap {
  position: sticky;
  top: 52px;
  z-index: 19;
  padding: 0 18px 8px;
  background: rgba(236, 253, 249, 0.85);
  backdrop-filter: blur(8px);
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.15);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #2dd4bf);
  transition: width 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 18px calc(24px + var(--safe-bottom));
}

.view {
  animation: view-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px;
  text-align: center;
}

.hero-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-card h1 {
  font-size: clamp(1.35rem, 5vw, 1.65rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.hero-list {
  list-style: none;
  text-align: left;
  margin: 20px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
}

.hero-list li::before {
  content: "✓";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.7rem;
  font-weight: 800;
}

.question-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px 18px;
}

.question-card h2 {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.question-card .hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 12px 16px;
  border: 2px solid rgba(13, 148, 136, 0.18);
  border-radius: var(--radius-sm);
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.chip:active {
  transform: scale(0.98);
}

.chip.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.chip__radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(13, 148, 136, 0.35);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}

.chip.selected .chip__radio {
  border-color: var(--accent);
  background: var(--accent);
}

.chip.selected .chip__radio::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.chip--multi.selected .chip__radio {
  border-radius: 6px;
}

.chip--multi.selected .chip__radio::after {
  content: "✓";
  width: auto;
  height: auto;
  background: none;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.chip__label {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 4px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.field input,
.field textarea,
.field-note textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  border: 2px solid rgba(13, 148, 136, 0.2);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text);
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
  touch-action: manipulation;
}

.field input:focus,
.field textarea:focus,
.field-note textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field textarea,
.field-note textarea {
  min-height: 88px;
  resize: vertical;
  font-weight: 500;
}

.field-note {
  margin-top: 14px;
}

.field-note label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.nav-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  flex: 1;
  min-height: var(--tap);
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn--ghost {
  background: transparent;
  color: var(--accent-dark);
  border: 2px solid rgba(13, 148, 136, 0.25);
  flex: 0 0 auto;
  min-width: 100px;
}

.btn--wide {
  width: 100%;
  flex: none;
}

/* Analyzing */
.analyze {
  text-align: center;
  padding: 40px 20px;
}

.analyze__orb {
  width: 100px;
  height: 100px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), #5eead4, var(--accent));
  animation: spin 1.2s linear infinite;
  position: relative;
}

.analyze__orb::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--bg-card);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.analyze h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.analyze p {
  color: var(--text-muted);
  font-size: 0.9rem;
  min-height: 1.5em;
}

.analyze__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.analyze__dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-pulse 1.2s ease-in-out infinite;
}

.analyze__dots span:nth-child(2) { animation-delay: 0.15s; }
.analyze__dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dot-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

/* Offer */
.offer-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 20px;
  text-align: center;
}

.offer-card__success {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--success-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.offer-card h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.offer-card .lead {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 22px;
}

.price-box {
  background: linear-gradient(145deg, #f0fdfa, #ecfdf5);
  border: 2px dashed rgba(13, 148, 136, 0.25);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 20px;
}

.price-old {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--danger);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.price-new {
  font-size: 2rem;
  font-weight: 800;
  color: var(--success);
  margin: 4px 0;
  letter-spacing: -0.03em;
}

.price-note {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.benefits {
  list-style: none;
  text-align: left;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.benefits li {
  font-size: 0.88rem;
  padding-left: 1.4em;
  position: relative;
}

.benefits li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 800;
}

/* Results */
.results-header {
  text-align: center;
  margin-bottom: 18px;
}

.results-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
}

.results-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.paid-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.info-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 16px;
  margin-bottom: 12px;
  animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.info-card h3 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-card li {
  font-size: 0.88rem;
  line-height: 1.4;
  padding-left: 1.1em;
  position: relative;
  color: var(--text);
}

.info-card li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
}

.info-card--highlight {
  border: 2px solid rgba(13, 148, 136, 0.2);
  background: linear-gradient(145deg, #fff, #f0fdfa);
}

.info-card p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: var(--tap);
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.link-btn:active {
  transform: scale(0.98);
}

.promo {
  font-weight: 800;
  color: var(--accent-dark);
}

.processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(19, 78, 74, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 0.25s ease;
}

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

.processing-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  box-shadow: var(--shadow);
}

.processing-box .analyze__orb {
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
}

.shake-hint {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 8px;
  min-height: 1.2em;
}

@media (min-width: 520px) {
  .app {
    padding-top: 16px;
  }
}

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