:root {
  --primary: #2f6bff;
  --accent: #22d3ee;
  --bg: #f6faff;
  --surface: #ffffff;
  --border: #e6f0ff;
  --text: #0f172a;
  --muted: #475569;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 16px 40px rgba(47, 107, 255, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Manrope", sans-serif;
  background: radial-gradient(circle at 20% 10%, #d9ebff 0%, var(--bg) 35%),
    linear-gradient(160deg, #f8fbff 0%, #eef5ff 100%);
  min-height: 100%;
  color: var(--text);
}

body {
  position: relative;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  z-index: 0;
  pointer-events: none;
  filter: blur(2px);
}

.orb-1 {
  width: 260px;
  height: 260px;
  top: -80px;
  right: -60px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.3), rgba(34, 211, 238, 0));
  animation: floatA 9s ease-in-out infinite;
}

.orb-2 {
  width: 220px;
  height: 220px;
  left: -80px;
  bottom: -60px;
  background: radial-gradient(circle, rgba(47, 107, 255, 0.26), rgba(47, 107, 255, 0));
  animation: floatB 10s ease-in-out infinite;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 16px 124px;
}

.topbar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  animation: riseIn 0.35s ease;
}

.brand {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
}

.title {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.2;
}

.progress-block {
  margin-top: 14px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 7px;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #dceaff;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: inherit;
  transition: width 0.24s ease;
}

.screen {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-height: 420px;
  animation: fadeIn 0.2s ease;
}

.step-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.step-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.cards,
.chips,
.radio-grid {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card-option {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px;
  font-weight: 600;
  background: #fbfdff;
  transition: all 0.2s ease;
  cursor: pointer;
}

.card-option:hover {
  border-color: rgba(47, 107, 255, 0.35);
  transform: translateY(-1px);
}

.card-option.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.14);
  background: #f3f7ff;
}

.chips {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  background: #fbfdff;
  font-weight: 600;
  color: #1e2d44;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip.active {
  border-color: var(--primary);
  background: #eaf1ff;
  color: #112a62;
}

.input,
.textarea,
.select {
  width: 100%;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  font: inherit;
  color: var(--text);
  background: #fcfeff;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: rgba(47, 107, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.14);
}

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

.helper {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.radio-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.radio-option {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.radio-option.active {
  border-color: var(--primary);
  background: #f3f8ff;
}

.hidden {
  display: none !important;
}

.summary {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.summary-item {
  padding: 12px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid var(--border);
}

.summary-item h4 {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.summary-item p {
  margin: 4px 0 0;
  white-space: pre-wrap;
}

.success-card {
  text-align: center;
  max-width: 560px;
  margin: 26px auto;
}

.success-icon {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  margin: 0 auto 14px;
  background: linear-gradient(145deg, #ccfbf1, #dbeafe);
  color: #0f766e;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 700;
}

.success-actions {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.cta-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(860px, 100%);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.btn {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  color: white;
  background: linear-gradient(120deg, var(--primary), #4d8eff);
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  color: #163268;
  background: #eaf2ff;
}

.btn-link {
  background: #e8fdfd;
  color: #045f70;
}

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

.error-text {
  margin-top: 10px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  opacity: 0;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  transition: all 0.2s ease;
  z-index: 3;
}

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

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

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

@keyframes floatA {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(12px, 18px);
  }
}

@keyframes floatB {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-10px, -16px);
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 12px 12px 116px;
  }

  .screen {
    padding: 16px;
    min-height: 380px;
  }

  .title {
    font-size: 20px;
  }

  .step-title {
    font-size: 20px;
  }

  .cta-bar {
    padding-inline: 12px;
  }
}
