:root {
  --bg: #F5F0E8;
  --panel: #FFFFFF;
  --ink: #1E1A17;
  --primary: #2B2622;
  --secondary: #5A4F45;
  --accent: #cda85a;

  --display: 'Lora', serif;
  --body: 'Work Sans', sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
  margin: 0 0 16px;
}

h1 {
  font-size: 1.6rem;
}

h2 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 16px;
  color: var(--secondary);
}

.app {
  min-height: 100dvh;
  height: 100dvh;
  width: 100%;
  position: relative;
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.screen {
  position: absolute;
  inset: 0;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
}

.screen.active {
  display: block;
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .screen.active {
    animation: fade-in 320ms ease;
  }
}

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

.screen-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 40px;
}

.card {
  width: 100%;
  max-width: 480px;
  background: var(--panel);
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 1px 3px rgba(30, 26, 23, 0.08), 0 8px 24px rgba(30, 26, 23, 0.06);
}

.lede {
  margin-bottom: 24px;
}

.progress {
  max-width: 480px;
  margin: 0 auto 12px;
  padding: 0 4px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--secondary);
  text-align: center;
}

.field {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

label {
  font-size: 0.9rem;
  color: var(--secondary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid rgba(30, 26, 23, 0.15);
  border-radius: 10px;
  padding: 14px 16px;
  min-height: 48px;
  width: 100%;
}

input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.error {
  display: block;
  min-height: 1.2em;
  color: #a33b2b;
  font-size: 0.85rem;
  margin-top: 6px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 10px;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg);
  margin-top: 8px;
}

.btn-primary:active {
  background: var(--ink);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.option {
  width: 100%;
  min-height: 52px;
  text-align: left;
  background: var(--bg);
  border: 1px solid rgba(30, 26, 23, 0.15);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  .option, .btn, input {
    transition: border-color 160ms ease, background-color 160ms ease, opacity 160ms ease;
  }
}

.output-block {
  margin-bottom: 20px;
}

.output-block h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.closing-principle {
  font-family: var(--display);
  font-style: italic;
  color: var(--primary);
  border-top: 1px solid rgba(30, 26, 23, 0.12);
  padding-top: 20px;
  margin-top: 8px;
}

@media (min-width: 640px) {
  h1 {
    font-size: 1.9rem;
  }
  .card {
    padding: 40px 36px;
  }
}
