:root {
  --primary: #1677ff;
  --primary-dark: #0e5ed8;
  --teal: #12b8a6;
  --ink: #172033;
  --muted: #6b7280;
  --line: #e7ebf2;
  --soft: #f5f8fc;
  --white: #fff;
  --danger: #e5484d;
  --radius: 16px;
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #eef3f9;
  color: var(--ink);
}

body {
  min-height: 100vh;
}

button, input, textarea, select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--white);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(23, 32, 51, .06);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 11px;
  flex: 0 0 auto;
}

.brand-name {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.icon-btn, .text-btn {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
}

.icon-btn:hover { background: var(--soft); }
.text-btn { color: var(--muted); font-size: 12px; font-weight: 600; }
.text-btn:hover { color: var(--ink); }

.hidden { display: none !important; }

.progress-wrap {
  padding: 13px 18px 8px;
  background: var(--white);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
}

.progress-track {
  height: 5px;
  background: #edf1f6;
  border-radius: 999px;
  overflow: hidden;
}

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

.screen {
  flex: 1;
  padding: 22px 18px 110px;
  animation: fadeIn .18s ease;
}

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

.hero {
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 28px 20px 50px;
}

.hero-logo {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 14px 35px rgba(22,119,255,.14);
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -.5px;
}

.hero .lead {
  max-width: 420px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 14px 0 16px;
}

.time-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f0f7ff;
  color: #1665d8;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 28px;
}

.primary-btn, .secondary-btn {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(22,119,255,.18);
}

.primary-btn:hover { background: var(--primary-dark); }
.primary-btn:active, .secondary-btn:active { transform: scale(.99); }

.secondary-btn {
  background: var(--soft);
  color: var(--ink);
}

.footer {
  position: fixed;
  z-index: 15;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 560px);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}

.page-title {
  margin: 0 0 8px;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -.3px;
}

.page-desc {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 13px;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.required::after {
  content: " *";
  color: var(--danger);
}

.input, .textarea, .select {
  width: 100%;
  border: 1px solid #d9e0ea;
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}

.input:focus, .textarea:focus, .select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22,119,255,.10);
}

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

.choice-grid {
  display: grid;
  gap: 9px;
}

.choice-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid #dfe5ed;
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.35;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.choice label::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border: 1.5px solid #b8c1ce;
  border-radius: 5px;
  background: #fff;
}

.choice.radio label::before {
  border-radius: 50%;
}

.choice input:checked + label {
  border-color: var(--primary);
  background: #f2f7ff;
  box-shadow: 0 0 0 2px rgba(22,119,255,.06);
}

.choice input:checked + label::before {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 4px #fff;
}

.choice.radio input:checked + label::before {
  box-shadow: inset 0 0 0 4px #fff;
}

.feature-section {
  margin-bottom: 22px;
}

.feature-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 9px;
}

.counter {
  display: inline-flex;
  align-items: center;
  background: #f0f7ff;
  color: #1665d8;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 14px;
}

.error {
  color: var(--danger);
  font-size: 11px;
  margin-top: 7px;
}

.review-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px;
  margin-bottom: 11px;
  background: #fff;
}

.review-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 8px;
}

.review-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 12px;
}

.review-row span:first-child {
  color: var(--muted);
  flex: 0 0 38%;
}

.review-row span:last-child {
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 6px 8px;
  border-radius: 999px;
  background: #f2f6fb;
  font-size: 10px;
  color: #344054;
}

.success {
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px 60px;
}

.success-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eafaf7;
  color: var(--teal);
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 18px;
}

.requirement-id {
  margin: 18px 0 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--soft);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .7px;
}

.muted { color: var(--muted); }

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 86px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #202938;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  transition: opacity .2s, transform .2s;
  max-width: calc(100% - 32px);
  text-align: center;
}

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

.small-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 390px) {
  .choice-grid.two { grid-template-columns: 1fr; }
  .page-title { font-size: 21px; }
  .screen { padding-left: 15px; padding-right: 15px; }
}
