/* Страница записи — как разделы сайта «Zonen» и «FAQ» (D-138): шаги — «таблетки» вкладок, зоны —
   стеклянные карточки с кружком «+», дни — список с «+», как вопросы, время — светлые таблетки; итог и
   кнопка «дальше» всегда на виду (D-117). Общий вид страниц для клиентов — в client.css. */

/* Верхний блок первого шага — заголовок раздела на светлом фоне, как на сайте. */
.hero {
  margin: 0;
}

.hero h1 em {
  font-size: 1.08em;
  color: var(--ink);
}

.hero-lead {
  margin: 0;
  font-size: 1.125rem;
  color: var(--mocha-soft);
}

/* Вопрос первого шага — над карточками «для кого». */
.split-body > .lead {
  max-width: none;
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--ink);
}

/* «Для женщин» / «Для мужчин» — карточки, как зоны на сайте: название и стрелка. */
.audiences {
  display: grid;
  gap: 0.875rem;
}

.choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.5rem;
  padding: 1.4rem 1.5rem;
  background: var(--glass-fill);
  border: 1px solid var(--glass-edge);
  border-radius: 18px;
  box-shadow: var(--glass-shadow);
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

.choice .arr {
  color: var(--gold);
  font-size: 1.25rem;
}

.choice:hover {
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-2px);
}

.choice:hover .arr {
  transform: translateX(3px);
}

/* Вернулась к «для кого» — выбранное раньше отмечено бронзовой каймой (D-122). */
.choice.chosen {
  background: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 0 0 1px rgba(168, 143, 104, 0.6),
    0 14px 34px rgba(90, 64, 44, 0.14);
}

fieldset {
  min-width: 0;
  margin: 0 0 2.25rem;
  padding: 0;
  border: 0;
}

/* Название группы — как надпись «ZONEN ——» на сайте. */
legend {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

legend::after {
  content: "";
  width: 3.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* Позиция — карточка-«стекло», как зона на сайте: название, минуты и цена; справа кружок «+»,
   отмеченная — светлая, с бронзовой каймой и тёмным кружком с галочкой. */
.items {
  display: grid;
  gap: 0.875rem;
}

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1rem;
  padding: 1.2rem 1.25rem 1.2rem 1.5rem;
  background: var(--glass-fill);
  border: 1px solid var(--glass-edge);
  border-radius: 18px;
  box-shadow: var(--glass-shadow);
  cursor: pointer;
  transition:
    background-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

.item:hover {
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-2px);
}

.item:has(input:checked) {
  background: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 0 0 1px rgba(168, 143, 104, 0.6),
    0 14px 34px rgba(90, 64, 44, 0.14);
}

.item input {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 3;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  border: 1px solid rgba(168, 143, 104, 0.5);
  border-radius: 50%;
  background:
    linear-gradient(var(--gold), var(--gold)) center / 0.75rem 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) center / 1.5px 0.75rem no-repeat,
    rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}

.item input:checked {
  border-color: var(--ink);
  background: var(--ink);
}

.item input:checked::before {
  content: "";
  width: 0.6rem;
  height: 0.32rem;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}

.item input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.item .name {
  grid-column: 1;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.3;
}

.item .meta {
  grid-column: 1;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Пояснение у карточки (D-112, D-140): «вместо …» — что сняла эта позиция; «уже входит в …». */
.item .hint {
  grid-column: 1;
  margin-top: 0.3rem;
  color: var(--mocha-soft);
  font-size: 0.84rem;
  line-height: 1.4;
}

/* Уже входит в отмеченную позицию: карточка спокойнее, в кружке — бронзовая галочка. Нажать можно —
   тогда снимется большая позиция. */
.item.included {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: none;
}

.item.included .name,
.item.included .meta {
  opacity: 0.7;
}

.item:where(.included) input:not(:checked) {
  border-color: rgba(168, 143, 104, 0.55);
  background: rgba(255, 255, 255, 0.45);
}

.item:where(.included) input:not(:checked)::before {
  content: "";
  width: 0.6rem;
  height: 0.32rem;
  border-bottom: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
  transform: translateY(-1px) rotate(-45deg);
}

/* Вся группа уже входит в выбранное (D-112): одна подсказка под заголовком. */
.group-hint {
  margin: -0.25rem 0 0.9rem;
  color: var(--mocha-soft);
  font-size: 0.9rem;
}

/* Итог и «дальше» (D-117) — «стеклянная» капсула внизу экрана, как нижняя панель сайта: слева что
   выбрано и цена, справа кнопка. Едет вместе с прокруткой, пока видна форма; в конце встаёт под ней. */
.next {
  position: sticky;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin: 2rem 0 0;
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  background: rgba(243, 232, 218, 0.88);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--pill);
  box-shadow: 0 10px 30px rgba(74, 48, 30, 0.18);
}

/* Итог занимает свободное место, кнопка — по своему тексту; не хватает места — кнопка встаёт строкой ниже
   во всю ширину. */
.next-total {
  display: grid;
  flex: 999 1 8.5rem;
  min-width: 0;
  margin: 0;
  line-height: 1.3;
}

.next-line {
  color: var(--mocha-soft);
  font-size: 0.875rem;
}

.next-price {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
}

.next-price:empty {
  display: none;
}

.next button {
  flex: 1 0 auto;
  width: auto;
  transition:
    background-color 0.25s,
    color 0.25s,
    box-shadow 0.25s,
    transform 0.25s;
}

/* «Дальше» приглушена, пока идти дальше нельзя (D-118): на «Зонах» не отмечено ни одной позиции,
   на «Контактах» не заполнены обязательные поля и согласие. Нажать можно — подскажут, чего не хватает. */
:where(form[data-selection]:not(:has(input[name="items"]:checked))) .next button,
:where(form:invalid) .next button {
  background: var(--cashmere);
  color: var(--muted);
  box-shadow: none;
}

/* Можно идти дальше — кнопка «загорается»: бронзовое свечение и одна вспышка. */
:where(form[data-selection]:has(input[name="items"]:checked)) .next button,
:where(form:not([data-selection]):valid) .next button {
  box-shadow:
    0 0 0 3px rgba(205, 185, 149, 0.55),
    0 10px 24px rgba(59, 42, 33, 0.3);
}

@media (prefers-reduced-motion: no-preference) {
  :where(form[data-selection]:has(input[name="items"]:checked)) .next button,
  :where(form:not([data-selection]):valid) .next button {
    animation: next-ready 0.7s ease-out;
  }
}

@keyframes next-ready {
  0% {
    transform: scale(0.97);
    box-shadow:
      0 0 0 0 rgba(205, 185, 149, 0.9),
      0 10px 24px rgba(59, 42, 33, 0.3);
  }

  55% {
    transform: scale(1.04);
    box-shadow:
      0 0 0 12px rgba(205, 185, 149, 0),
      0 10px 24px rgba(59, 42, 33, 0.3);
  }

  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 3px rgba(205, 185, 149, 0.55),
      0 10px 24px rgba(59, 42, 33, 0.3);
  }
}

/* Прокрутка к полю (Tab, подсказка браузера) — не под панель. */
html:has(.next) {
  scroll-padding-bottom: 8rem;
}

/* Итог выбора — карточка-«стекло»; заголовок — надпись в разрядку, как у групп. */
.summary {
  padding: 1.4rem 1.5rem 1.3rem;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid var(--glass-edge);
  border-radius: 22px;
  box-shadow: var(--glass-shadow);
}

.summary h2 {
  margin: 0 0 0.5rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.summary ul {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
}

.summary li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(166, 140, 110, 0.18);
}

.summary p {
  margin: 0.6rem 0 0;
  color: var(--mocha-soft);
  font-size: 0.9375rem;
}

.summary .total {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--ink);
}

/* Ссылки «изменить» под итогом — как «Mehr zum Laser» на сайте: без подчёркивания, бронзовая линия. */
.split-aside > p {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
}

.split-aside a {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
}

.empty {
  color: var(--muted);
}

/* Поля контактов — светлое «стекло», при вводе — бронзовая кайма. */
.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mocha-soft);
}

.field input {
  height: 3.25rem;
  padding: 0 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 6px 20px rgba(90, 64, 44, 0.06);
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  transition:
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}

.field input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(205, 185, 149, 0.35);
}

.invalid input {
  border-color: var(--danger);
}

/* Пометка у необязательного поля (D-141): тонко, рядом с названием. */
.field .optional {
  margin-left: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

/* Время визита строкой под заголовком шага «Контакты» (D-141). */
.split-head .when {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--ink);
}

/* Шаг «Проверка» (D-141): карточки-«стекло» — дата и время, зоны, контакты; «Изменить» справа. */
.review-card {
  margin: 0 0 1rem;
  padding: 1.25rem 1.5rem 1.3rem;
  background: var(--glass-fill);
  border: 1px solid var(--glass-edge);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
}

.review-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.review-head h3 {
  margin: 0;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.review-head .change {
  flex: none;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
}

.review-card .when {
  margin: 0;
  font-family: var(--display);
  font-size: 1.3rem;
  line-height: 1.35;
}

.review-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.review-lines li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(166, 140, 110, 0.18);
}

.review-card .muted {
  margin: 0.6rem 0 0;
  color: var(--mocha-soft);
  font-size: 0.9375rem;
}

.review-card .total {
  margin: 0.4rem 0 0;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
}

.review-contacts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 1.25rem;
  margin: 0;
}

.review-contacts dt {
  color: var(--mocha-soft);
  font-size: 0.9375rem;
}

.review-contacts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* «Подготовка к процедуре» (D-148): строка-кнопка раскрывает пункты, первый — главный; внизу «Сохранить». */
.prepare {
  margin: 0 0 1rem;
  padding: 1rem 1.5rem;
  background: var(--glass-fill);
  border: 1px solid var(--glass-edge);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
}

.prepare summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
}

.prepare summary::-webkit-details-marker {
  display: none;
}

.prepare summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid var(--pill-edge);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.1rem;
}

.prepare[open] summary::after {
  content: "−";
}

.prepare h3 {
  margin: 1rem 0 0.4rem;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 500;
}

.prepare-list {
  margin: 0 0 1.1rem;
  padding-left: 1.2rem;
}

.prepare-list li {
  margin: 0.4rem 0;
  line-height: 1.5;
}

.prepare-list .main {
  font-weight: 600;
}

.prepare-save {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.sms-note {
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.consent {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--mocha-soft);
}

.consent input {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.12rem;
  accent-color: var(--ink);
}

.consent.invalid {
  color: var(--danger);
}

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

/* Шаги впереди на «Зонах» приглушены, пока ничего не отмечено (D-122). */
.step-ahead:where(form[data-selection]:not(:has(input[name="items"]:checked)) *) > button {
  opacity: 0.45;
  pointer-events: none;
}

/* Шаги записи (D-113, D-122) — полоса-«стекло» с вкладками-таблетками, как меню сайта: текущий шаг —
   белая вкладка, пройденные нажимаются (назад и вперёд), недоступные — бледные. */
.steps {
  display: flex;
  justify-content: center;
  margin: 0 0 2.5rem;
}

.steps ol {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  background: rgba(255, 255, 255, 0.38);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--pill);
  box-shadow: 0 10px 30px rgba(74, 48, 30, 0.12);
}

.steps li > a,
.steps li > button,
.steps li > span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: auto;
  min-height: 2.75rem;
  margin: 0;
  padding: 0 1.1rem 0 0.5rem;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background-color 0.2s,
    color 0.2s,
    opacity 0.2s;
}

.steps .step-n {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid rgba(168, 143, 104, 0.45);
  border-radius: 50%;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
}

.steps .step-open > a,
.steps .step-open > button {
  cursor: pointer;
}

.steps .step-open > a:hover,
.steps .step-open > button:hover {
  background: rgba(255, 255, 255, 0.55);
}

.steps .step-open .step-n {
  background: rgba(255, 255, 255, 0.7);
}

.steps .step-current > span {
  background: rgba(255, 255, 255, 0.85);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 4px 14px rgba(90, 64, 44, 0.08);
}

.steps .step-current .step-n {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.steps .step-closed > span {
  color: var(--muted);
  opacity: 0.6;
}

@media (min-width: 560px) {
  .audiences,
  .items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Телефон: шаги — четыре равные вкладки, номер над названием; карточки компактнее. */
@media (max-width: 639.98px) {
  .steps {
    margin-bottom: 1.25rem;
  }

  .steps ol {
    display: grid;
    width: 100%;
    padding: 0.3rem;
    border-radius: 22px;
  }

  .steps ol {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .steps li > a,
  .steps li > button,
  .steps li > span {
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    width: 100%;
    min-height: 3.6rem;
    padding: 0.4rem 0.15rem;
    border-radius: 18px;
    font-size: 0.6875rem;
    white-space: normal;
    text-align: center;
    hyphens: auto;
    overflow-wrap: anywhere;
  }

  .steps .step-n {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.7rem;
  }

  .split-body > .lead {
    font-size: 1.25rem;
  }

  .choice {
    min-height: 4.5rem;
    padding: 1.1rem 1.25rem;
  }

  .item {
    padding: 1rem 1rem 1rem 1.2rem;
  }

  .item .name {
    font-size: 1.0625rem;
  }

  .next {
    padding: 0.55rem 0.55rem 0.55rem 1.1rem;
    border-radius: 26px;
  }

  .day summary {
    padding: 1rem 0;
  }
}

/* Очень узкий телефон: названия шагов мельче и переносятся, страница не шире экрана. */
@media (max-width: 359.98px) {
  .steps li > a,
  .steps li > button,
  .steps li > span {
    font-size: 0.6875rem;
    overflow-wrap: anywhere;
  }
}
