:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --text: #1e1b16;
  --muted: #5f5a54;
  --border: #d8d1c7;
  --accent: #1e1b16;
  --accent-soft: #efe6db;
  --error: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top, #ffffff 0%, var(--bg) 70%);
  color: var(--text);
  font-family: "Iowan Old Style", "Palatino", "Times New Roman", serif;
}

#app {
  width: 100%;
  max-width: 520px;
}

.step,
.completion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 24px;
  box-shadow: 0 18px 45px rgba(30, 27, 22, 0.08);
  animation: fadeIn 240ms ease-out;
}

.survey-title {
  margin: 0 0 14px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.question {
  margin: 0 0 24px;
  font-size: 1.5rem;
  line-height: 1.3;
}

.progress {
  margin-bottom: 18px;
}

.progress-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

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

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

.content {
  display: grid;
  gap: 12px;
}

.info-wrap {
  display: grid;
  gap: 10px;
  padding: 6px 2px;
}

.info-line {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option:focus-visible,
.next:focus-visible,
.text-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.fields {
  display: grid;
  gap: 20px;
}

.field-label {
  margin: 0 0 10px;
  font-weight: 600;
  font-size: 1rem;
}

.input-wrap {
  display: grid;
  gap: 10px;
}

.text-input {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 1rem;
  width: 100%;
  font-family: inherit;
}

.help {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.error,
.feedback {
  margin: 8px 0 0;
  color: var(--error);
  font-size: 0.9rem;
}

.footer {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.next {
  border: none;
  background: var(--accent);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.completion p {
  margin: 12px 0 0;
  color: var(--muted);
}

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

@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .step,
  .completion {
    padding: 24px 18px;
  }

  .question {
    font-size: 1.3rem;
  }
}
