:root {
  --bg: #0f1418;
  --surface: #172025;
  --surface-2: #1f2a30;
  --line: #263239;
  --text: #e9efef;
  --muted: #90a2a3;
  --accent: #6fc3b0;
  --accent-soft: #2c4a46;
  --warm: #e3b183;
  --danger: #e28a7a;

  --radius: 18px;
  --pad: 20px;
  --tabbar-h: 62px;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.view {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top) + 20px) var(--pad)
    calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 30px);
}

body.immersive .tabbar {
  display: none;
}

body.immersive .view {
  padding-bottom: calc(env(safe-area-inset-bottom) + 28px);
}

/* ------------------------------------------------------------------ */
/*  Типографика                                                       */
/* ------------------------------------------------------------------ */

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 6px;
}

h1 {
  font-size: clamp(25px, 7vw, 31px);
  line-height: 1.18;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.015em;
}

h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

p {
  margin: 0 0 14px;
}

.lead {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 8px 0 22px;
}

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

.small {
  font-size: 13px;
  line-height: 1.5;
}

.head {
  margin-bottom: 22px;
}

.toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dots {
  /* Цель нажатия — 44 px. Кегль, цвет и отступы не меняются: растёт
     только внешний размер, а «⋯» остаётся по центру, как и был. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  padding: 0 6px 6px;
  letter-spacing: 0.08em;
}

.dots:active {
  color: var(--text);
}

/* ------------------------------------------------------------------ */
/*  Кнопки                                                            */
/* ------------------------------------------------------------------ */

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
}

.hero {
  display: block;
  width: 100%;
  padding: 27px 22px;
  border-radius: 22px;
  background: linear-gradient(158deg, #22383c 0%, #192529 72%);
  border: 1px solid #2e4a47;
  box-shadow: 0 12px 34px -20px rgba(111, 195, 176, 0.85);
  margin-bottom: 16px;
  transition: transform 0.12s ease, border-color 0.2s;
}

.hero:active {
  transform: scale(0.985);
  border-color: var(--accent);
}

.hero__t {
  display: block;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero__s {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.quick__item {
  padding: 16px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.3;
}

.quick__item:active {
  background: var(--surface-2);
}

.quick__item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.btn {
  display: block;
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 10px;
}

.btn:active {
  filter: brightness(1.18);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0c1a18;
  font-weight: 600;
}

.btn--ghost {
  background: transparent;
}

.btn--danger {
  color: var(--danger);
}

/* Мелкая кнопка: явный фолбэк, а не второй большой путь. */
.btn--small {
  padding: 11px 14px;
  font-size: 15px;
  margin-top: 12px;
}

.back {
  /* Цель нажатия — 44 px; текст стоит там же, добавка уходит вниз. */
  display: inline-block;
  min-width: 44px;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  padding: 4px 0 16px;
}

.back:active {
  color: var(--text);
}

/* ------------------------------------------------------------------ */
/*  Списки и карточки                                                 */
/* ------------------------------------------------------------------ */

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

.grid__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 16px;
}

.grid__btn:active {
  background: var(--surface-2);
}

.grid__btn::after {
  content: '›';
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.card {
  display: block;
  width: 100%;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 10px;
}

.card:active {
  background: var(--surface-2);
}

.card__title {
  font-size: 16px;
  font-weight: 600;
}

.card__meta {
  color: var(--accent);
  font-size: 12px;
  margin-top: 2px;
}

.card__lead {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
  line-height: 1.45;
}

.note {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(227, 177, 131, 0.07);
  border: 1px solid rgba(227, 177, 131, 0.17);
  color: #dcc7b1;
  font-size: 14px;
  line-height: 1.55;
}

.caution {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(226, 138, 122, 0.09);
  border: 1px solid rgba(226, 138, 122, 0.24);
  color: #f0b7ad;
  font-size: 14px;
  line-height: 1.45;
}

.safety {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

/* ------------------------------------------------------------------ */
/*  Пошаговый навык                                                   */
/* ------------------------------------------------------------------ */

.stepper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 54vh;
}

.progress {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}

.progress i {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  transition: background 0.25s;
}

.progress i.on {
  background: var(--accent);
}

.step__num {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.step__text {
  font-size: 21px;
  line-height: 1.42;
  font-weight: 500;
  margin-bottom: 24px;
}

/* ------------------------------------------------------------------ */
/*  Дыхание                                                           */
/* ------------------------------------------------------------------ */

.breath {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - env(safe-area-inset-top) - 40px);
  text-align: center;
}

.breath-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(72vw, 290px);
  height: min(72vw, 290px);
  margin-bottom: 32px;
}

.breath-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 45%,
    rgba(111, 195, 176, 0.34) 0%,
    rgba(111, 195, 176, 0.14) 46%,
    rgba(111, 195, 176, 0.04) 72%
  );
  border: 1px solid rgba(111, 195, 176, 0.45);
  transform: scale(1);
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.37, 0, 0.63, 1);
  will-change: transform;
}

.breath-inner {
  position: absolute;
  inset: 27%;
  border-radius: 50%;
  border: 1px solid rgba(111, 195, 176, 0.13);
}

.breath-label {
  font-size: 20px;
  font-weight: 500;
  min-height: 30px;
}

.breath-count {
  font-size: 46px;
  font-weight: 300;
  line-height: 1.05;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin: 2px 0 8px;
}

.breath-meta {
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  min-height: 18px;
}

.breath-actions {
  margin-top: 26px;
  width: 100%;
  max-width: 330px;
}

/* ------------------------------------------------------------------ */
/*  Таймер                                                            */
/* ------------------------------------------------------------------ */

.timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 56vh;
  text-align: center;
}

.timer__num {
  font-size: 66px;
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.timer__hint {
  color: var(--muted);
  font-size: 14px;
  max-width: 280px;
  margin: 8px auto 0;
  line-height: 1.5;
}

.timer .btn {
  margin-top: 26px;
  max-width: 330px;
}

.timer .btn + .btn {
  margin-top: 6px;
}

/* ------------------------------------------------------------------ */
/*  Формы                                                             */
/* ------------------------------------------------------------------ */

.field {
  margin-bottom: 18px;
}

.field__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.field__hint {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 8px;
  line-height: 1.45;
}

textarea,
input[type='text'],
input[type='tel'],
input[type='password'] {
  width: 100%;
  padding: 13px 14px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
}

textarea {
  min-height: 96px;
}

#letter {
  min-height: 240px;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: #3d6a62;
  box-shadow: 0 0 0 3px rgba(111, 195, 176, 0.1);
}

textarea::placeholder,
input::placeholder {
  color: #5a6b6f;
}

.field-block {
  padding: 16px 17px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.field-block h2 {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 7px;
}

.field-block .val {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.55;
}

.field-block .val.empty {
  color: var(--muted);
  font-style: italic;
  font-size: 14px;
}

/* ------------------------------------------------------------------ */
/*  Контакты                                                          */
/* ------------------------------------------------------------------ */

/* Подзаголовок блока «детям и родителям» — не в ряду «позвони себе». */
.section {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin: 22px 0 10px;
}

.contact {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 17px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
}

.contact:active {
  background: var(--surface-2);
}

.contact__body {
  flex: 1;
  min-width: 0;
}

.contact__name {
  font-size: 15px;
  font-weight: 600;
}

.contact__note {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 3px;
  line-height: 1.4;
}

.contact__call {
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/*  Дневник                                                           */
/* ------------------------------------------------------------------ */

.mood {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}

.mood__btn {
  flex: 1;
  padding: 13px 3px 11px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.25;
  transition: border-color 0.15s, background 0.15s;
}

.mood__btn i {
  display: block;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  margin: 0 auto 7px;
  background: #2c3a3f;
}

.mood__btn[data-v='1'] i { background: #8a5a55; }
.mood__btn[data-v='2'] i { background: #a5726a; }
.mood__btn[data-v='3'] i { background: #8a8f7a; }
.mood__btn[data-v='4'] i { background: #6f9d8b; }
.mood__btn[data-v='5'] i { background: #6fc3b0; }

.mood__btn.on {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface-2);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tag {
  /* Высота 41 → 44: растёт область нажатия, ширина и вид прежние. */
  min-height: 44px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.tag.on {
  background: var(--accent-soft);
  border-color: #3d6a62;
  color: #cdeee5;
}

.entry {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 10px;
}

.entry__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 3px;
}

.entry__date {
  font-size: 12.5px;
  color: var(--muted);
}

.entry__mood {
  font-size: 13px;
  font-weight: 600;
}

.entry__tags {
  font-size: 12.5px;
  color: var(--accent);
  margin-top: 5px;
}

.entry__note {
  font-size: 14px;
  color: #cfdada;
  margin-top: 6px;
  white-space: pre-wrap;
}

.spark {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 5px;
  height: 58px;
  margin: 4px 0 22px;
}

.spark__d {
  flex: 1 1 0;
  max-width: 22px;
  border-radius: 3px 3px 2px 2px;
  background: var(--accent);
  min-height: 6px;
}

.empty {
  color: var(--muted);
  font-size: 14px;
  padding: 6px 0 22px;
}

/* Фильтр списка записей: это про просмотр, а не про новую запись. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 14px;
}

.chip {
  /* Высота 32 → 44: цель нажатия, вид и кегль не меняются. */
  min-height: 44px;
  padding: 7px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.chip.on {
  background: var(--accent-soft);
  border-color: #3d6a62;
  color: #cdeee5;
}

/* «Помогало» — факт из её записей, а не совет и не обещание. */
.helped {
  font-size: 14.5px;
  line-height: 1.45;
  color: #cfdada;
  margin: 0 0 10px;
}

.helped--past {
  color: var(--accent);
  margin: 14px 0 18px;
}

.helped--draft {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--muted);
}

.shown {
  color: var(--muted);
  font-size: 13px;
  margin: 2px 0 18px;
}

/* ------------------------------------------------------------------ */
/*  Нижняя навигация                                                  */
/* ------------------------------------------------------------------ */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(15, 20, 24, 0.93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  z-index: 40;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: #7a8f91;
  padding: 8px 2px;
  transition: color 0.15s;
}

.tab svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab.is-active {
  color: var(--accent);
}

/* ------------------------------------------------------------------ */
/*  Шторка установки                                                  */
/* ------------------------------------------------------------------ */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  background: rgba(6, 9, 11, 0.62);
  backdrop-filter: blur(3px);
}

.sheet__inner {
  width: 100%;
  padding: 24px var(--pad) calc(24px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  border-top: 1px solid var(--line);
  animation: sheet-up 0.22s ease;
}

@keyframes sheet-up {
  from {
    transform: translateY(26px);
    opacity: 0.5;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sheet h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

.sheet ol {
  margin: 0 0 18px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.75;
}

/* ------------------------------------------------------------------ */
/*  Сообщения близким                                                 */
/* ------------------------------------------------------------------ */

.msgs {
  margin: 24px 0 8px;
}

.msgs__title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.msgs__hint {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
  margin-bottom: 14px;
}

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

.msg {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 15px 17px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
}

.msg:active {
  background: var(--surface-2);
}

.msg__label {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.msg__text {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.4;
}

.msg__state {
  display: block;
  font-size: 17px;
  line-height: 1.4;
  color: var(--accent);
}

.msg__state:not(:empty) {
  margin-top: 6px;
}

/* ------------------------------------------------------------------ */
/*  Память о навыках: метка и вопрос                                  */
/* ------------------------------------------------------------------ */

.card__weak {
  margin-top: 8px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.35;
}

.ask {
  margin: 4px 0 20px;
  padding: 16px 17px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.ask__q {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 12px;
}

.ask__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ask__opt {
  flex: 1 1 88px;
  min-height: 52px;
  padding: 12px 6px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.3;
  text-align: center;
  color: var(--text);
}

.ask__opt:active {
  border-color: var(--accent);
}

/* ------------------------------------------------------------------ */
/*  Режим «просто побыть»                                             */
/* ------------------------------------------------------------------ */

.btn--calm {
  margin-top: 2px;
  margin-bottom: 18px;
  background: transparent;
  border-color: var(--accent-soft);
  color: var(--accent);
  font-size: 17px;
}

.calm {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - env(safe-area-inset-bottom) - 64px);
  text-align: center;
  overflow: hidden;
}

.calm__halo {
  position: absolute;
  width: min(86vw, 460px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 45%,
    rgba(111, 195, 176, 0.16) 0%,
    rgba(111, 195, 176, 0.06) 46%,
    rgba(111, 195, 176, 0.015) 72%
  );
  animation: calm-breathe 14s ease-in-out infinite;
  pointer-events: none;
}

@keyframes calm-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.07);
    opacity: 1;
  }
}

.calm__line {
  position: relative;
  font-size: 20px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.calm__time {
  position: relative;
  margin: 18px 0 44px;
  font-size: 58px;
  font-weight: 200;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.calm__exit {
  position: relative;
  max-width: 300px;
  font-size: 17px;
}

/* ------------------------------------------------------------------ */
/*  Копия и восстановление                                            */
/* ------------------------------------------------------------------ */

.hint {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
  margin: 12px 0 0;
}

/* Копия и восстановление: два блока на «Ещё», каждый со своими кнопками. */
.copy {
  margin: 26px 0 0;
  padding: 18px 17px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.copy__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.copy .btn {
  margin-top: 10px;
}

.copy .hint {
  margin: 10px 0 0;
  font-size: 15px;
}

.status {
  margin: 10px 0 0;
  font-size: 17px;
  line-height: 1.4;
  color: var(--accent);
}

/* Не записалось или хранилище повреждено: виднее любого экрана,
   но всё равно читаемо и без крика. */
.alert {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(226, 138, 122, 0.12);
  border: 1px solid rgba(226, 138, 122, 0.34);
}

.alert__title {
  font-size: 17px;
  font-weight: 600;
  color: #f0b7ad;
  margin-bottom: 6px;
}

.alert__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: #e9c9c2;
}

.alert .status {
  color: #f0b7ad;
}

/* Диагностика: включается пятью тапами по строке версии (или ?debug=1) */
.debug {
  margin: 10px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  word-break: break-word;
}

/* ------------------------------------------------------------------ */
/*  Мелочи интерфейса: строка версии и диагностика                     */
/* ------------------------------------------------------------------ */

/* Строка версии — обычный текст, не кнопка: её нет в обходе по Tab и в дереве
   доступности (иначе VoiceOver читает «…, кнопка»). Пять тапов по ней —
   служебный жест, а не действие для человека; он работает и на div. */
.safety.version {
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}

.restore {
  margin: 4px 0 18px;
  padding: 16px 17px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--accent-soft);
}

.restore__title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.restore__text {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.persist {
  margin: 20px 0 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.persist__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 17px;
  line-height: 1.4;
}

.persist__row #persist-state {
  color: var(--accent);
}

.persist .hint {
  margin-top: 6px;
}

/* ------------------------------------------------------------------ */
/*  Доступность и широкие экраны                                      */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (min-width: 560px) {
  .view {
    /* без width: 100% flex-элемент с margin: auto сжимается до содержимого,
       и экран с коротким текстом («побудь здесь») становится колонкой 124 px */
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
  }

  .tabbar {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}
