/*
 * Страница записи клиента — вид К1 «Пошагово» (design/variants.html).
 * Только своё: системные шрифты, никаких картинок и адресов со стороны (R06).
 * Размеры под телефон: кнопки не ниже 44 px, на 375 px нет горизонтальной прокрутки.
 */

:root {
  --bg: #ffffff;
  --fg: #15201a;
  --muted: #56635c;
  --card: #ffffff;
  --line: #d3dcd7;
  --acc: #2e6b4f;
  --acc-fg: #ffffff;
  --danger: #b3261e;
  --soft: #edf4f0;
  --r: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.4 var(--font);
  overflow-x: hidden;
}
button, input { font-family: inherit; }
h1, h2 { overflow-wrap: anywhere; }
a { color: var(--acc); }
.lnk { color: var(--acc); font-weight: 600; }
.nb { white-space: nowrap; }

:focus-visible { outline: 3px solid #1d5cd6; outline-offset: 2px; }

/* ===== Каркас ===== */
.shell { max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; }
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); }
.bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 56px; padding: 4px 8px; }
.back {
  justify-self: start; min-width: 44px; min-height: 44px; padding: 0 10px;
  border: 0; background: none; color: var(--acc); font-size: 16px; font-weight: 600; cursor: pointer;
}
.back.off { visibility: hidden; }
.ttl { text-align: center; font-weight: 700; font-size: 16px; line-height: 1.15; overflow-wrap: anywhere; }
.demo-badge {
  justify-self: end; margin-right: 6px; padding: 1px 6px;
  border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 11px;
}
.prog { height: 3px; background: var(--soft); }
.prog i {
  display: block; width: 100%; height: 100%; background: var(--acc);
  transform-origin: left center; transform: scaleX(.2); transition: transform .25s;
}
body[data-step="2"] .prog i { transform: scaleX(.4); }
body[data-step="3"] .prog i { transform: scaleX(.6); }
body[data-step="4"] .prog i { transform: scaleX(.8); }
body[data-step="5"] .prog i { transform: scaleX(1); }

.body { padding: 22px 16px 36px; }
.body h2 { margin: 0 0 6px; font-size: 27px; line-height: 1.15; letter-spacing: -.01em; }
.sub { margin: 0 0 18px; color: var(--muted); }
.note { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.boot { margin: 0; color: var(--muted); }
noscript .boot { padding: 22px 16px; }

/* ===== Кнопки-варианты: услуга, мастер ===== */
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 66px;
  margin-bottom: 10px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  color: var(--fg); font-size: 16px; text-align: left; cursor: pointer;
}
.opt:hover { border-color: #9db5a8; }
.opt.on { border-color: var(--acc); background: var(--soft); box-shadow: inset 0 0 0 1px var(--acc); }
.o-t { display: block; flex: 1; min-width: 0; }
.o-n { display: block; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.o-m { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; }
.o-p { font-weight: 700; white-space: nowrap; }
.ava {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%; color: #fff; font-size: 17px; font-weight: 700;
}
.ava.c0 { background: linear-gradient(140deg, #f2b6c6, #b24f6e); }
.ava.c1 { background: linear-gradient(140deg, #c9b8f0, #5c46a6); }
.ava.c2 { background: linear-gradient(140deg, #a8dec4, #2c7656); }
.ava.c3 { background: linear-gradient(140deg, #f2d9a4, #a8741e); }
.ava.c4 { background: linear-gradient(140deg, #a9d3ee, #2a6a98); }

/* ===== Сводка выбора ===== */
.sum { margin: 0 0 18px; padding: 12px 14px; border-radius: var(--r); background: var(--soft); font-size: 14px; line-height: 1.5; }
.sum b { font-size: 15px; font-weight: 650; }

/* ===== Предупреждения ===== */
.notice {
  margin: 0 0 14px; padding: 12px 14px; border: 1px solid #f2b8b1; border-radius: var(--r);
  background: #fdecea; color: #7a1c14; font-weight: 600;
}
.demo-note {
  margin: 0 0 14px; padding: 10px 14px; border: 1px dashed var(--muted); border-radius: var(--r);
  background: #fff8dc; color: #3d2e00; font-size: 14px; font-weight: 600;
}
.tz-note { margin: 0 0 14px; color: var(--muted); font-size: 14px; }

/* ===== День ===== */
.ds {
  display: flex; gap: 8px; margin: 0 -16px; padding: 2px 16px 8px;
  overflow-x: auto; scrollbar-width: none;
}
.ds::-webkit-scrollbar { display: none; }
.ds-d {
  display: flex; flex: none; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 64px; min-height: 74px; padding: 6px 2px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  color: var(--fg); cursor: pointer;
}
.ds-w { color: var(--muted); font-size: 12px; }
.ds-n { font-size: 20px; font-weight: 700; line-height: 1.1; }
.ds-m { color: var(--muted); font-size: 11px; }
.ds-d.none { background: #f4f6f5; }
.ds-d.none .ds-n { color: var(--muted); }
.ds-d.on { border-color: var(--acc); background: var(--acc); color: var(--acc-fg); }
.ds-d.on .ds-w, .ds-d.on .ds-n, .ds-d.on .ds-m { color: inherit; }

/* ===== Время ===== */
.sl-g { margin: 14px 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.sl-r { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sl-t {
  min-height: 46px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  color: var(--fg); font-size: 15px; font-weight: 600; cursor: pointer;
}
.sl-t.on { border-color: var(--acc); background: var(--acc); color: var(--acc-fg); }

/* ===== Нет свободного времени ===== */
.nofree { margin-top: 12px; padding: 16px; border: 1px dashed var(--muted); border-radius: var(--r); background: var(--card); }
.nf-t { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.nf-p { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

/* ===== Кнопки действий ===== */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px;
  padding: 0 18px; border: 0; border-radius: var(--r); background: var(--acc); color: var(--acc-fg);
  font-size: 16px; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { border: 1px solid var(--line); background: transparent; color: var(--fg); }
.btn + .btn { margin-top: 10px; }
.btn.stack { flex-direction: column; gap: 0; padding: 8px 14px; line-height: 1.25; }
.btn.stack small { font-size: 12px; font-weight: 400; opacity: .9; }
.again { margin-top: 18px; }

/* ===== Форма: имя, телефон, согласие ===== */
.cf-f { display: block; margin-bottom: 6px; }
.cf-l { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.cf-i {
  width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--card); color: var(--fg); font-size: 16px;
}
.cf-i.bad { border-color: var(--danger); }
.cf-e { margin: 0 0 8px; color: var(--danger); font-size: 13px; }
.cf-c { margin: 14px 0 16px; }
.cf-ck { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 8px 0; font-size: 15px; cursor: pointer; }
.cf-ck input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--acc); }
.cf-ck input.bad { outline: 2px solid var(--danger); outline-offset: 2px; }
.cf-pol { display: inline-flex; align-items: center; min-height: 44px; margin-left: 34px; color: var(--acc); font-size: 14px; }
/* Ловушка для ботов: человеку не видна и до неё не добраться с клавиатуры, робот поле заполнит. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ===== Подтверждение ===== */
.ok {
  position: relative; width: 64px; height: 64px; margin: 6px 0 16px; border-radius: 50%; background: var(--soft);
}
.ok::after {
  content: ""; position: absolute; left: 24px; top: 15px; width: 13px; height: 25px;
  border: solid var(--acc); border-width: 0 4px 4px 0; transform: rotate(45deg);
}
.dn { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.dn div { display: flex; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.dn div:first-child { border-top: 0; }
.dn dt { flex: none; width: 84px; color: var(--muted); font-size: 14px; }
.dn dd { min-width: 0; margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.dn-p { margin: 14px 0 0; font-size: 15px; }
.dn-s { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* ===== Страница политики ===== */
.doc-page { background: var(--bg); }
.doc { max-width: 640px; margin: 0 auto; padding: 22px 16px 48px; }
.doc-studio { margin: 0 0 4px; color: var(--muted); font-size: 14px; font-weight: 600; }
.doc h1 { margin: 0 0 16px; font-size: 24px; line-height: 1.2; }
.doc-text { overflow-wrap: anywhere; }
.doc-text p { margin: 0 0 12px; }
.doc-back { margin: 24px 0 0; }
.doc-back .lnk { display: inline-flex; align-items: center; min-height: 44px; }

@media (prefers-reduced-motion: reduce) {
  .prog i { transition: none; }
}
