/* ═══════════════════════════════════════════════════════════════════════════
   Подтверждение участия в семинаре — «В помощь проповеднику», Казань.

   Палитра, шрифт и пластика намеренно повторяют основной сайт (дизайн-токены
   Kerith: база paper, акцент sapphire, шрифт Rubik) — страница должна читаться
   как его часть, а не как посторонняя форма. Тема всегда светлая, независимо
   от настроек устройства.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* База «paper» — ровно та, что стоит по умолчанию в кабинете. */
  --bg: #f4f5f6;
  --surf: #ffffff;
  --ink: #211c15;
  --ink2: #5b5347;
  --ink3: #8b8173;
  --l1: #e6e8ea;
  --l2: #d6d9dd;

  /* Акцент «sapphire». */
  --accf: #2e6be6;
  --accb: #1e52c4;
  --onacc: #f2f6ff;
  --acc: #1e52c4;
  --acct: #eaf0fe;
  --accd: #123a8c;

  --ok: #0f6e56;
  --ok-tint: #e4f2ed;
  --warn: #a9781f;
  --err: #b3261e;

  --radius: 12px;
  --radius-lg: 22px;
  /* Тени короткие и прозрачные: карточка лишь чуть отделяется от фона, без облака под ней. */
  --shadow-card: 0 1px 2px rgba(20, 18, 15, 0.04), 0 6px 20px -10px rgba(20, 18, 15, 0.1);
  --shadow-lift: 0 6px 16px -8px rgba(20, 18, 15, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  color-scheme: light;
}

/* ───────────────────────────── база ───────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Rubik', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: 'rlig' 1, 'calt' 1;
  display: flex;
  flex-direction: column;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(24px, 6vh, 56px) 20px calc(32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

/* ───────────────────────────── шапка ───────────────────────────── */

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.brand {
  height: 30px;
  width: auto;
  user-select: none;
}

.masthead-meta {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink3);
}

/* ───────────────────────────── карточка ───────────────────────────── */

.card {
  position: relative;
  background: var(--surf);
  border: 1px solid var(--l1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(22px, 5vw, 34px);
  overflow: hidden;
}

.progress {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--l1);
}

.progress-bar {
  display: block;
  height: 100%;
  width: 33%;
  background: linear-gradient(90deg, var(--accf), color-mix(in oklab, var(--accf) 55%, var(--acc)));
  border-radius: 0 3px 3px 0;
  transition: width 0.55s var(--ease);
}

/* Шаги переключаются с лёгким сдвигом — движение объясняет, что это один поток. */
.step {
  animation: step-in 0.42s var(--ease) both;
}

.step[hidden] {
  display: none;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.step-back {
  animation: step-in-back 0.42s var(--ease) both;
}

@keyframes step-in-back {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ───────────────────────────── типографика ───────────────────────────── */

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--acc);
  text-wrap: balance;
}

.eyebrow-dates {
  white-space: nowrap;
}

.title {
  margin: 0;
  font-size: clamp(25px, 6vw, 30px);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.lede {
  margin: 10px 0 0;
  font-size: 14.5px;
  color: var(--ink2);
  max-width: 42ch;
  /* Без «висящих» слов вроде одинокого «2026.» на последней строке. */
  text-wrap: pretty;
}

.step-done .lede {
  text-wrap: balance;
}

/* ───────────────────────────── поля ───────────────────────────── */

form,
.step-choice-body {
  margin-top: 22px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink2);
}

.optional {
  color: var(--ink3);
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  /* Не меньше 16px: иначе Safari на iPhone при фокусе приближает всю страницу. */
  font-size: 16px;
  background: color-mix(in oklab, var(--bg) 55%, var(--surf));
  border: 1px solid var(--l2);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: color-mix(in oklab, var(--ink3) 75%, transparent);
}

.field input:focus,
.field textarea:focus {
  background: var(--surf);
  border-color: var(--accf);
  box-shadow: 0 0 0 3.5px color-mix(in oklab, var(--accf) 18%, transparent);
}

.field input[aria-invalid='true'] {
  border-color: var(--err);
}

.field textarea {
  resize: vertical;
  min-height: 64px;
}

.field-error,
.form-error {
  margin: 7px 0 0;
  font-size: 12.5px;
  color: var(--err);
}

.form-error {
  text-align: center;
}

.counter {
  margin: 6px 0 0;
  text-align: right;
  font-size: 11.5px;
  color: var(--ink3);
  font-variant-numeric: tabular-nums;
}

#submit-btn {
  margin-top: 12px;
}

.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 12px;
}

.step-top .back {
  margin: 0 0 0 -8px;
}

.step-top .eyebrow {
  margin: 0;
  text-align: right;
}

.add-comment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0 -8px;
  padding: 6px 8px;
  background: none;
  border: 0;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--acc);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.add-comment[hidden] {
  display: none;
}

.add-comment svg {
  width: 15px;
  height: 15px;
  transition: transform 0.3s var(--spring);
}

.add-comment:hover {
  background: var(--acct);
}

.add-comment:hover svg {
  transform: rotate(90deg);
}

.field-comment {
  margin: 14px 0 0;
  animation: step-in 0.34s var(--ease) both;
}

/* ───────────────────────────── кнопки ───────────────────────────── */

.btn {
  position: relative;
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s ease, opacity 0.2s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.32s var(--spring);
}

.btn-primary {
  margin-top: 6px;
  background: var(--accf);
  color: var(--onacc);
  box-shadow: 0 1px 2px rgba(20, 18, 15, 0.12);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
  filter: brightness(1.05);
}

.btn-primary:hover:not(:disabled) svg {
  transform: translateX(3px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn:focus-visible {
  outline: 2px solid var(--accf);
  outline-offset: 3px;
}

.btn-quiet {
  margin-top: 16px;
  background: transparent;
  color: var(--ink2);
  border: 1px solid var(--l2);
}

.btn-quiet:hover {
  background: var(--l1);
  color: var(--ink);
}

/* Состояние отправки: подпись и стрелка уходят, появляется спиннер. */
.btn.is-sending .btn-label,
.btn.is-sending .btn-icon {
  opacity: 0;
}

.spinner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid color-mix(in oklab, var(--onacc) 35%, transparent);
  border-top-color: var(--onacc);
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.7s linear infinite;
}

.btn.is-sending .spinner {
  opacity: 1;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 16px -6px;
  padding: 5px 8px;
  background: none;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink3);
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.back svg {
  width: 15px;
  height: 15px;
  transition: transform 0.28s var(--spring);
}

.back:hover {
  color: var(--ink);
  background: var(--l1);
}

.back:hover svg {
  transform: translateX(-2px);
}

/* ───────────────────────── лента дней семинара ─────────────────────────
   Дни сгруппированы по месяцам, над группой — название месяца и тонкая скобка.
   Каждый день — кнопка: нажатие снимает или возвращает его. Отмеченные дни
   горят акцентом, снятые — пунктир с зачёркнутым числом. */

.days {
  display: flex;
  gap: 14px;
  margin: 18px 0 20px;
}

.month {
  /* Ширина группы пропорциональна числу дней — плитки во всех месяцах равные. */
  flex: var(--n) 1 0;
  min-width: 0;
}

.month-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink3);
  white-space: nowrap;
  transition: color 0.4s var(--ease), opacity 0.4s var(--ease);
}

.month-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--l2);
  transition: background-color 0.5s var(--ease);
}

.month.has-on .month-label {
  color: var(--acc);
}

.month.has-on .month-label::after {
  background: color-mix(in oklab, var(--accf) 45%, transparent);
}

.month-days {
  display: grid;
  grid-template-columns: repeat(min(var(--n), 7), minmax(0, 1fr));
  gap: 7px;
}

.day {
  position: relative;
  width: 100%;
  padding: 10px 2px 9px;
  text-align: center;
  background: color-mix(in oklab, var(--bg) 60%, var(--surf));
  border: 1px solid var(--l1);
  border-radius: 11px;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.4s var(--spring),
    box-shadow 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* Каскад только при массовом переключении («Буду» / «Не смогу»);
   нажатие на отдельный день откликается сразу. */
.days.is-cascade .day {
  transition-delay: calc(var(--i) * 45ms);
}

.day:hover {
  border-color: color-mix(in oklab, var(--accf) 40%, var(--l2));
}

.day:active {
  transform: scale(0.94);
}

.day:focus-visible {
  outline: 2px solid var(--accf);
  outline-offset: 2px;
}

.day-num {
  position: relative;
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s var(--ease);
}

/* Зачёркивание рисуется линией, а не text-decoration — чтобы его можно было анимировать. */
.day-num::after {
  content: '';
  position: absolute;
  left: 18%;
  right: 18%;
  top: 52%;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 0.28s var(--ease);
}

.day-wd {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink3);
  transition: color 0.3s var(--ease);
}

.day.is-on {
  background: var(--acct);
  border-color: color-mix(in oklab, var(--accf) 45%, transparent);
  transform: translateY(-3px);
  box-shadow: 0 6px 14px -8px color-mix(in oklab, var(--accf) 60%, transparent);
}

.day.is-on:active {
  transform: translateY(-3px) scale(0.94);
}

.day.is-on .day-num {
  color: var(--accd);
}

.day.is-on .day-wd {
  color: color-mix(in oklab, var(--accd) 70%, transparent);
}

.day.is-off {
  background: transparent;
  border-style: dashed;
  border-color: var(--l2);
}

.day.is-off .day-num,
.day.is-off .day-wd {
  color: var(--ink3);
  opacity: 0.7;
}

.day.is-off .day-num::after {
  transform: scaleX(1);
}

.days.is-declined .day,
.days.is-declined .month-label {
  opacity: 0.45;
}

/* Дни, которых нет в выбранном отдельном семинаре: тихо уходят в тень и не нажимаются.
   Это не «снятый» день (пунктир с зачёркиванием), а просто «не про этот семинар». */
.day.is-outside {
  opacity: 0.32;
  background: transparent;
  border-color: var(--l1);
  box-shadow: none;
  transform: scale(0.94);
  cursor: default;
}

.day.is-outside:hover {
  border-color: var(--l1);
}

.month.is-outside .month-label {
  opacity: 0.4;
}

.days.is-declined .day:hover {
  opacity: 0.75;
}

/* ───────────────────────── настройки участия ─────────────────────────
   Одна группа, как настройки в iOS: отдельный семинар и ночлег. Включённая
   строка подсвечивается, иконка окрашивается в акцент. */

.options {
  margin-top: 10px;
  border: 1px solid var(--l1);
  border-radius: 14px;
  background: color-mix(in oklab, var(--bg) 45%, var(--surf));
  overflow: hidden;
  animation: step-in 0.34s var(--ease) both;
}

.options[hidden] {
  display: none;
}

.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.option[hidden] {
  display: none;
}

/* Разделитель между строками — с отступом под иконку, как в системных настройках. */
.option + .option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 55px;
  right: 0;
  height: 1px;
  background: var(--l1);
}

.option:hover {
  background: color-mix(in oklab, var(--l1) 45%, transparent);
}

.option:has(input:checked) {
  background: var(--acct);
}

.option-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--surf);
  color: var(--ink2);
  transition: color 0.25s ease, transform 0.4s var(--spring);
}

.option:has(input:checked) .option-icon {
  color: var(--accf);
  transform: scale(1.06);
}

.option-icon svg {
  width: 19px;
  height: 19px;
}

.option-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.option-text b {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.3;
}

.option-text small {
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.3;
}

.option:has(input:checked) .option-text small {
  color: color-mix(in oklab, var(--accd) 75%, transparent);
}

/* Переключатель в духе кабинета: нативный чекбокс для доступности, свой рисунок. */
.option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.switch {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 25px;
  border-radius: 999px;
  background: var(--l2);
  transition: background-color 0.25s var(--ease);
}

.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 18, 15, 0.25);
  transition: transform 0.35s var(--spring);
}

.option input:checked + .switch {
  background: var(--accf);
}

.option input:checked + .switch::after {
  transform: translateX(17px);
}

.option input:focus-visible + .switch {
  outline: 2px solid var(--accf);
  outline-offset: 2px;
}

/* ───────────────────────── выбор «буду / не буду» ───────────────────────── */

.choices {
  display: grid;
  gap: 10px;
}

.choice {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  text-align: left;
  background: var(--surf);
  border: 1.5px solid var(--l2);
  border-radius: 15px;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.35s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease),
    transform 0.35s var(--spring), opacity 0.3s var(--ease);
}

/* Отклик в два слоя: карточка ровно окрашивается, а из точки нажатия расходится
   и гаснет волна — выбор ощущается физическим, без рваных краёв градиента. */
.choice::before {
  content: '';
  position: absolute;
  left: var(--mx);
  top: var(--my);
  width: 240%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--hue) 22%, transparent) 0%, transparent 62%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
}

.choice[aria-checked='true']::before {
  animation: ripple 0.75s var(--ease) both;
}

@keyframes ripple {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}

.choice-yes {
  --tint: color-mix(in oklab, var(--accf) 15%, transparent);
  --hue: var(--accf);
  --hue-deep: var(--accd);
}

.choice-no {
  --tint: color-mix(in oklab, var(--ink3) 14%, transparent);
  --hue: var(--ink3);
  --hue-deep: var(--ink2);
}

.choice:hover {
  border-color: color-mix(in oklab, var(--hue) 45%, var(--l2));
}

.choice:focus-visible {
  outline: 2px solid var(--accf);
  outline-offset: 2px;
}

.choice:active {
  transform: scale(0.99);
}

.choice[aria-checked='true'] {
  background: color-mix(in oklab, var(--tint) 100%, var(--surf));
  border-color: var(--hue);
  box-shadow: 0 0 0 3.5px color-mix(in oklab, var(--hue) 16%, transparent), var(--shadow-lift);
}

/* Когда выбор сделан, второй вариант отступает на второй план, но остаётся
   читаемым и кликабельным — передумать можно в один тап. */
.choices.has-choice .choice[aria-checked='false'] {
  opacity: 0.5;
  transform: scale(0.985);
}

.choices.has-choice .choice[aria-checked='false']:hover {
  opacity: 0.8;
}

.choice-mark {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in oklab, var(--hue) 12%, transparent);
  color: var(--hue-deep);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), transform 0.45s var(--spring);
}

.choice[aria-checked='true'] .choice-mark {
  background: var(--hue);
  color: var(--onacc);
  transform: scale(1.06);
}

.choice-no[aria-checked='true'] .choice-mark {
  color: var(--surf);
}

.choice-mark svg {
  width: 26px;
  height: 26px;
}

/* Галочка/крестик рисуются штрихом в момент выбора. */
.choice-mark .draw {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  transition: stroke-dashoffset 0.45s var(--ease);
}

.choice[aria-checked='true'] .choice-mark .draw {
  stroke-dashoffset: 0;
}

.choice[aria-checked='true'] .choice-mark .draw-2 {
  transition-delay: 0.12s;
}

.choice-text {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.choice-text b {
  font-size: 15.5px;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.choice-text small {
  font-size: 12.5px;
  color: var(--ink3);
}

/* ───────────────────────────── экран «готово» ───────────────────────────── */

.step-done {
  text-align: center;
}

.seal {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  color: var(--ok);
}

.seal.is-declined {
  color: var(--ink3);
}

.seal svg {
  width: 100%;
  height: 100%;
}

.seal-ring {
  opacity: 0.35;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  animation: draw-ring 0.85s var(--ease) 0.1s forwards;
}

.seal-mark {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw-mark 0.5s var(--ease) 0.5s forwards;
}

@keyframes draw-ring {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes draw-mark {
  to {
    stroke-dashoffset: 0;
  }
}

.step-done .lede {
  margin-left: auto;
  margin-right: auto;
}

.summary {
  margin: 20px 0 0;
  padding: 4px 0 0;
  border-top: 1px solid var(--l1);
  text-align: left;
}

.summary > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--l1);
}

.summary > div[hidden] {
  display: none;
}

.summary dt {
  font-size: 12.5px;
  color: var(--ink3);
  flex-shrink: 0;
}

.summary dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}

.sum-comment dd {
  font-weight: 400;
  color: var(--ink2);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.badge-yes {
  background: var(--ok-tint);
  color: var(--ok);
}

.badge-no {
  background: var(--l1);
  color: var(--ink2);
}

/* Статус доставки: спокойное «получено» или честное «ждёт связи». */
.delivery {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 18px 0 0;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.45;
  background: var(--ok-tint);
  color: var(--ok);
  text-align: left;
}

.delivery[hidden] {
  display: none;
}

.delivery::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: currentColor;
}

.delivery.is-pending {
  background: color-mix(in oklab, var(--acct) 80%, var(--surf));
  color: var(--accd);
}

/* Ожидание связи — точка мягко пульсирует: процесс идёт, ничего не зависло. */
.delivery.is-pending::before {
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.3;
    transform: scale(0.7);
  }
}

/* ───────────────────────────── прочее ───────────────────────────── */

.footnote {
  margin-top: auto;
  padding-top: 8px;
  text-align: center;
}

.footnote p {
  margin: 0;
  font-size: 12px;
  color: var(--ink3);
}

.noscript {
  max-width: 520px;
  margin: 24px auto;
  padding: 16px 18px;
  border: 1px solid var(--l2);
  border-radius: var(--radius);
  background: var(--surf);
  font-size: 14px;
}

/* Телефон: карточка занимает ширину, но дышит по краям; шапка компактнее,
   чтобы каждый шаг целиком помещался в экран без прокрутки. */
@media (max-width: 420px) {
  .shell {
    padding: 16px 14px calc(14px + env(safe-area-inset-bottom));
    gap: 14px;
  }

  .masthead {
    gap: 4px;
  }

  /* На узком экране даты — отдельной целой строкой, без разрыва на тире. */
  .eyebrow-sep {
    display: none;
  }

  .eyebrow-dates {
    display: block;
    margin-top: 2px;
  }

  .brand {
    height: 25px;
  }

  .masthead-meta {
    font-size: 11px;
  }

  .card {
    padding: 22px 20px 20px;
  }

  .title {
    font-size: 24px;
  }

  .lede {
    font-size: 14px;
  }

  form {
    margin-top: 18px;
  }

  .field {
    margin-bottom: 11px;
  }

  .field label {
    margin-bottom: 5px;
  }

  .field input {
    padding: 10px 13px;
  }

  .choice {
    padding: 12px 14px;
    gap: 12px;
    border-radius: 14px;
  }

  .choices {
    gap: 8px;
  }

  .choice-text b {
    font-size: 15px;
  }

  .choice-mark {
    width: 38px;
    height: 38px;
  }

  .days {
    gap: 10px;
  }

  .month-days {
    gap: 5px;
  }

  .day {
    padding: 9px 1px 8px;
    border-radius: 10px;
  }

  .day-num {
    font-size: 16px;
  }

  .day-wd {
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .month-label {
    font-size: 11.5px;
    gap: 6px;
  }

  /* На телефоне иконки в настройках убираем: заголовку «Только «История проповеди»»
     нужна вся ширина строки, иначе он переносится и шаг перестаёт влезать в экран. */
  .option {
    padding: 9px 12px 9px 14px;
    gap: 10px;
    min-height: 44px;
  }

  .option-icon {
    display: none;
  }

  .option + .option::before {
    left: 14px;
  }

  .option-text b {
    font-size: 14px;
  }

  .option-text small {
    font-size: 11.5px;
  }
}

/* Низкие экраны (iPhone SE и подобные): прячем подпись в подвале и сжимаем
   вертикальные отступы — шаг по-прежнему целиком в одном экране. */
@media (max-height: 700px) {
  .footnote {
    display: none;
  }

  .shell {
    padding-top: 12px;
  }

  .lede {
    margin-top: 6px;
  }

  .days {
    margin: 12px 0 12px;
  }

  .shell {
    gap: 10px;
  }

  .options {
    margin-top: 8px;
  }

  .add-comment {
    margin-top: 4px;
  }

  #submit-btn {
    margin-top: 8px;
  }

  .day {
    padding-top: 7px;
    padding-bottom: 6px;
  }

  .choice-text small {
    font-size: 12px;
  }

  .choice {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .choice-mark {
    width: 34px;
    height: 34px;
  }

  .choice-mark svg {
    width: 22px;
    height: 22px;
  }

  .step-top {
    margin-bottom: 8px;
  }

  .seal {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
  }

  .summary > div {
    padding: 8px 0;
  }
}

/* Уважаем системную настройку «меньше движения»: всё появляется, но не едет. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .seal-ring,
  .seal-mark {
    stroke-dashoffset: 0;
  }

  .choice-mark .draw {
    stroke-dashoffset: 0;
  }

  .choice[aria-checked='true']::before {
    animation: none;
  }
}
