:root {
  --cream: #f7edd9;
  --cream-2: #efe2c3;
  --ink: #3d2b1a;
  --ink-soft: #8a7a63;
  --green: #4d6e3f;
  --green-dark: #3a5730;
  --green-line: #cdd9c2;
  --shadow: 0 20px 40px rgba(30, 40, 20, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Georgia", "Iowan Old Style", "Times New Roman", serif;
  color: var(--ink);
}

body {
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.15) 100%),
    url('../assets/img/orchard-bg.png') center / cover no-repeat;
  min-height: 100vh;
  min-height: 100dvh;
}

.scene {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
}

.card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px 24px 24px;
  position: relative;
  min-height: 460px;
  display: flex;
  flex-direction: column;
}

.card::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  background: no-repeat center / contain url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><path d="M20 4C10 8 6 18 10 28c3 7 10 8 14 4-6-1-10-6-10-13 0-6 3-11 6-15z" fill="%234d6e3f"/></svg>');
  opacity: 0.85;
}

.header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
}

.back-btn {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  padding: 4px;
  visibility: hidden;
}

.back-btn.is-visible { visibility: visible; }

.title {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  flex: 1;
  text-align: center;
  padding-right: 26px;
}

.progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 30px;
}

.dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--green);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  flex: none;
}

.dot.is-done,
.dot.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.dot-line {
  flex: 1;
  height: 2px;
  background: var(--green-line);
  min-width: 12px;
}

.dot-line.is-done { background: var(--green); }

.question {
  font-size: 21px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 24px;
  line-height: 1.3;
}

.field {
  flex: 1;
  margin-bottom: 24px;
}

.field input,
.field textarea {
  width: 100%;
  border: none;
  border-radius: 12px;
  background: #fff;
  padding: 16px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(61,43,26,0.06);
}

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

.field input::placeholder,
.field textarea::placeholder {
  color: #9a9a94;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  padding: 16px;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn:hover { background: var(--green-dark); }
.btn:disabled { opacity: 0.6; cursor: default; }

.error-text {
  color: #a33d3d;
  font-size: 13px;
  margin: -14px 0 16px;
  text-align: center;
}

/* Экран благодарности */
.thanks {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 0;
}

.thanks .badge {
  width: 110px;
  height: 110px;
  margin-bottom: 20px;
}

.thanks h2 {
  font-size: 26px;
  margin: 0 0 14px;
}

.thanks p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
  max-width: 260px;
}
