/* brand-quiz: механика kitUP в фирменных цветах demo-v1 (V1 SEARADAR) —
   белый фон, серые блоки #F8F8F8, жёлтая CTA #F5DC44, синий выбор #258CDC,
   Inter + DM Sans, радио-пилюли */
:root {
  --bg: #ffffff;
  --block: #F8F8F8;
  --ink: #242424;
  --muted: rgba(0, 0, 0, 0.54);
  --accent: #258CDC;   /* синий выбора V1 */
  --cta: #F5DC44;      /* жёлтая кнопка V1 */
  --cta-hover: #ffcc00;
  --card-border: #E0E0E0;
  --dashed: #F2C94C;   /* пунктир V1 */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- шапка: логотип + прогресс-вехи (компактная: шаг влезает в 360×640) ---- */
.top { padding: 12px 20px 4px; }

.logo {
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.logo span { color: var(--accent); }

/* кнопка «назад»: из подвопроса — к родительскому списку, иначе — на экран назад */
.back {
  position: fixed;
  top: 12px; left: 10px;
  z-index: 30;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 6px 10px;
  cursor: pointer;
  transition: color 0.2s;
}
.back:hover { color: var(--accent); }

.progress { max-width: 300px; margin: 10px auto 0; }
.progress__track {
  position: relative;
  height: 0;
  border-top: 3px dashed var(--dashed); /* пунктир как линия квиза V1 */
}
.progress__fill {
  position: absolute; left: 0; top: -3px;
  height: 3px;
  width: 0; background: var(--accent);
  transition: width 0.4s ease;
}
.progress__dot {
  position: absolute; top: -1px;
  width: 12px; height: 12px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff; border: 2px solid var(--card-border);
  transition: border-color 0.3s, background 0.3s;
}
.progress__dot[data-mile="0"] { left: 2%; }
.progress__dot[data-mile="1"] { left: 34%; }
.progress__dot[data-mile="2"] { left: 66%; }
.progress__dot[data-mile="3"] { left: 98%; }
.progress__dot--done { border-color: var(--accent); background: var(--accent); }
.progress__label {
  margin-top: 8px;
  text-align: center;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ---- сцена ---- */
.stage {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 16px 120px;
  position: relative;
}

.screen { display: none; animation: rise 0.35s ease; }
.screen--active { display: block; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.screen__title {
  font-family: 'DM Sans', sans-serif;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}
.screen__title .brand { color: var(--accent); }
.screen__title b { color: var(--accent); font-weight: 700; }

.screen__quote {
  margin: 12px auto 0;
  max-width: 420px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  text-transform: none;
}

.screen__hint {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---- соц-доказательство ---- */
.proof {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.proof__item {
  background: var(--block);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}
.proof__item b { display: block; font-family: 'DM Sans', sans-serif; font-size: 20px; font-weight: 700; color: var(--ink); }
.proof__item small { color: var(--muted); font-size: 12px; }

/* ---- карточки-опции: радио-пилюли V1 (компактные — инвариант 11) ---- */
.options {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--card-border);
  border-radius: 59px; /* пилюля V1 */
  padding: 11px 16px;
  cursor: pointer;
  transition: border-color 0.3s ease-in-out, background 0.2s;
}
.option:hover { border-color: var(--accent); }
.option--selected { border-color: var(--accent); background: #EEF4FF; }
.option__emoji { font-size: 18px; line-height: 1; min-width: 22px; text-align: center; }

/* компактная сетка 2 колонки для длинных списков (12 стран, регионы >6) —
   иначе шаг не влезает в 360×640 без прокрутки */
.options--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.options--grid .option {
  border-width: 2px;
  border-radius: 30px;
  padding: 9px 8px;
  font-size: 13px;
  gap: 6px;
}
.options--grid .option__emoji { font-size: 15px; min-width: 18px; }

/* ---- даты и контакт ---- */
.dates-box, .contact-box {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dates-box input, .contact-box input {
  font: inherit;
  font-size: 16px; /* не меньше 16px — iOS не зумит поле */
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--card-border);
  border-radius: 59px;
  padding: 11px 20px;
  width: 100%;
}
.dates-box input:focus, .contact-box input:focus {
  outline: none;
  border-color: var(--accent);
}

.fine {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ---- интерлюдия ---- */
.plan-bar {
  margin: 30px auto 0;
  max-width: 320px;
  height: 8px;
  background: var(--block);
  border-radius: 4px;
  overflow: hidden;
}
.plan-bar__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--dashed));
  border-radius: 4px;
  transition: width 0.3s linear;
}

.error {
  position: fixed;
  left: 50%; bottom: 100px;
  transform: translateX(-50%);
  background: #fff;
  color: #E03131;
  font-style: italic;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 20;
  white-space: nowrap;
}

/* ---- фиксированный низ: жёлтая CTA V1 ---- */
.bottom {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 10px 16px 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--bg) 40%);
}
.cta {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: #000;
  background: var(--cta);
  border: 0;
  border-radius: 46px; /* пилюля V1 */
  padding: 13px;
  cursor: pointer;
  transition: background 0.3s ease-in-out, opacity 0.15s;
}
.cta:hover:not(:disabled) { background: var(--cta-hover); }
.cta:active:not(:disabled) { background: #DCC850; }
.cta:disabled { background: #9F9F9F; cursor: default; }

.bottom__links {
  margin-top: 8px;
  text-align: center;
  font-size: 10px;
  color: rgba(0, 0, 0, 0.35);
}
.bottom__links a { color: inherit; text-decoration: none; }
.bottom__links a:hover { color: var(--cta-hover); }

/* календарь ядра — в тон V1 */
.sr-cal__field {
  background: #fff;
  border: 3px solid var(--card-border);
  border-radius: 59px;
  padding: 11px 20px;
  font-size: 16px;
}
.sr-cal__field:hover { border-color: var(--accent); }

/* десктоп: возвращаем воздух (высота экрана позволяет) */
@media (min-width: 700px) {
  .top { padding: 18px 20px 6px; }
  .logo { font-size: 22px; }
  .stage { padding: 28px 20px 140px; }
  .screen__title { font-size: 30px; }
  .options { margin-top: 24px; gap: 12px; }
  .option { padding: 13px 20px; font-size: 16px; }
  .options--grid { gap: 12px; }
  .options--grid .option { font-size: 15px; padding: 11px 14px; }
  .proof { margin-top: 30px; gap: 14px; }
  .proof__item { padding: 16px 12px; }
  .cta { padding: 16px; font-size: 17px; }
}
