:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1f2430;
  --muted: #6b7280;
  --border: #d9dce3;
  --accent: #2e6bf2;
  --accent-bg: #eaf0ff;
  --danger: #d64545;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

.page { max-width: 480px; margin: 0 auto; padding: 16px 16px 40px; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 16px; }
.brand { font-size: 20px; font-weight: 700; }
.lang { display: flex; gap: 4px; }
.lang__btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
}
.lang__btn--active { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }

.card {
  background: var(--surface); border-radius: var(--radius); padding: 20px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
}
h1 { margin: 0 0 14px; font-size: 20px; line-height: 1.25; }
section[hidden], [hidden] { display: none !important; }

.consent {
  max-height: 46vh; overflow-y: auto; padding: 12px 14px; margin-bottom: 12px;
  border: 1px solid var(--border); border-radius: 10px; background: #fafbfc;
  font-size: 14px; white-space: pre-line;
}
.hint { margin: 8px 0 14px; font-size: 13px; color: var(--muted); }
.status { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--accent-bg); font-size: 15px; }
.status--bad { background: #fdecec; color: var(--danger); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
input[type="text"], input[type="tel"] {
  width: 100%; padding: 12px 14px; font-size: 17px; font-family: inherit;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text);
}
input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input.invalid { border-color: var(--danger); }
.phone { display: flex; align-items: stretch; }
.phone__prefix {
  display: flex; align-items: center; padding: 0 12px; font-size: 17px; font-weight: 600;
  border: 1px solid var(--border); border-right: 0; border-radius: 10px 0 0 10px; background: #f0f1f4;
}
.phone input { border-radius: 0 10px 10px 0; }
.field__error { display: block; margin-top: 6px; color: var(--danger); font-size: 13px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 4px 0 0; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; }

.code-input {
  text-align: center; font-size: 30px !important; letter-spacing: 6px; font-weight: 600; margin: 4px 0;
}

.summary { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.summary__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.summary .hint { margin: 8px 0 0; }
.summary form { margin-top: 10px; }
.summary form input { margin-bottom: 8px; }
.summary__actions { display: flex; gap: 8px; }
.summary__actions .btn { margin-top: 0; padding: 10px 12px; font-size: 15px; }
.btn--inline { border: 0; background: transparent; color: var(--accent); font-size: 14px; font-family: inherit; font-weight: 600; padding: 4px 0; white-space: nowrap; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: block; width: 100%; padding: 14px 16px; font-size: 17px; font-weight: 600; font-family: inherit;
  border-radius: 10px; border: 1px solid transparent; text-align: center; text-decoration: none; cursor: pointer;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:disabled { opacity: 0.55; cursor: default; }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--muted); margin-top: 10px; }
.btn--link { background: transparent; color: var(--accent); font-size: 15px; margin-top: 10px; }
.btn--link:disabled { color: var(--muted); cursor: default; }
.actions { margin-top: 6px; }

.error { margin: 10px 0 12px; color: var(--danger); font-size: 14px; }
.ok {
  width: 56px; height: 56px; border-radius: 50%; margin: 4px auto 12px; display: flex;
  align-items: center; justify-content: center; font-size: 32px; background: #e6f6ec; color: #1c8a4b;
}
#step-done { text-align: center; }
#step-done .btn { margin-top: 14px; }
