:root {
  --bg: #000;
  --text: #fff;
  --muted: #8a8a8a;
  --field: #2a2a2a;
  --field-border: #3a3a3a;
  --field-focus: #d9d9d9;
  --accent: #006be6;
  --accent-hover: #0a78f5;
  --danger: #ff1e2d;
  --back: #5c5c5c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.app {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 16px calc(32px + env(safe-area-inset-bottom));
}

/* Логотип */
.logo {
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}
.logo__img { width: 100%; max-width: 280px; height: auto; display: block; }

.title {
  margin: 0 0 32px;
  text-align: center;
  font-weight: 400;
  font-size: 21px;
  line-height: 1.5;
}

/* Шаги */
.step { display: none; }
.step.is-active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.field { margin-bottom: 20px; }

.hint {
  margin: 0 0 18px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.note {
  margin: 4px 0 0;
  text-align: center;
  color: var(--danger);
  font-size: 15px;
  line-height: 1.5;
}

.input {
  width: 100%;
  height: 60px;
  padding: 0 22px;
  border-radius: 30px;
  border: 1px solid var(--field-border);
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  outline: none;
  transition: border-color .15s, background-color .15s;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: var(--muted); }
.input:focus { border-color: var(--field-focus); }
.input.is-invalid { border-color: var(--danger); }

/* Автозаполнение — как на макете (светло-голубой фон) */
.input:-webkit-autofill {
  -webkit-text-fill-color: #000;
  -webkit-box-shadow: 0 0 0 100px #e1ecfa inset;
  caret-color: #000;
}

/* Кнопка «Взять номер из Telegram» под полем телефона */
.btn-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px auto 0;
  padding: 6px 12px;
  border: 0;
  background: none;
  color: var(--accent-hover);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.btn-contact[hidden] { display: none; }
.btn-contact svg { width: 18px; height: 18px; }
.btn-contact:disabled { opacity: .6; cursor: default; }

.select-wrap { position: relative; }
.select { padding-right: 56px; cursor: pointer; background: #333; border-color: #bdbdbd; }
.select:invalid { color: var(--muted); }
.select option { color: #000; background: #fff; }
.select-chevron {
  position: absolute;
  right: 22px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.error {
  min-height: 20px;
  margin: 0 0 8px;
  text-align: center;
  color: var(--danger);
  font-size: 14px;
}

/* Кнопки */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}
.btn-back, .btn-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  border: 0;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
}
.btn-back svg, .btn-next svg { width: 9px; height: 15px; }
.btn-back {
  background: none;
  color: var(--back);
}
.btn-back:disabled { cursor: default; opacity: .6; }
.btn-next {
  border-radius: 26px;
  background: var(--accent);
  color: #fff;
  transition: background-color .15s, opacity .15s;
}
.btn-next:hover { background: var(--accent-hover); }
.btn-next:disabled { opacity: .6; cursor: default; }

.step--done { text-align: center; padding-top: 8px; }
.done__title { font-size: 24px; font-weight: 600; margin: 0 0 12px; }
.actions[hidden] { display: none; }
