/* Gestalt.az — черновик. Палитра и типографика взяты с лендинга. */

:root {
  --ink: #0d1b2e;
  --ink-2: #3a5a72;
  --ink-3: #5a7a90;
  --ink-4: #8aabbd;
  --accent: #e91e8c;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-2: rgba(255, 255, 255, 0.5);
  --edge: rgba(255, 255, 255, 0.8);
  --hair: rgba(13, 27, 46, 0.07);
  --radius: 24px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);        /* сильный ease-out для UI */
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1); /* easeOutBack: лёгкий перелёт на отметке */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);     /* сильный ease-in-out для движения на экране */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* якорь не прилипает к верхней кромке */
section[id] { scroll-margin-top: 18px; }

body {
  margin: 0;
  min-height: 100%;
  font-family: Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #cfe6f2 0%, #e6f0f4 45%, #f3ecf2 100%);
  -webkit-font-smoothing: antialiased;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Каркас ---------- */

.top {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 16px 4px;
}

.langs { display: flex; gap: 8px; }

.lang {
  font: 700 11px/1 Nunito, sans-serif;
  letter-spacing: 0.14em;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.25);
  color: #4a7a96;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .lang:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.45); }
}
.lang:active { transform: scale(0.97); transition-duration: 100ms; }
.lang.is-on:active { transform: none; }
.lang.is-on {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.95);
  color: #0d3a55;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  cursor: default;
}
.lang.is-on:hover { transform: none; }

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 2px;
  max-width: 640px;
}
.nav a {
  font: 600 12px/1 Nunito, sans-serif;
  color: #4a7a96;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 999px;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}
.nav a:hover { background: rgba(255, 255, 255, 0.55); color: var(--ink); }

main {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 14px 10px 64px;
}

.card {
  width: 100%;
  max-width: 720px;
  padding: 26px 20px;
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(18px);
  border: 1px solid var(--edge);
}

@media (min-width: 640px) {
  .card { padding: 40px 52px; }
  main { padding: 18px 16px 80px; }
}

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

h1 {
  margin: 0 0 18px;
  text-align: center;
  font-size: clamp(34px, 10vw, 52px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1;
}

h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  margin: 26px 0 12px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.tagline {
  margin: 0 0 22px;
  text-align: center;
  font-style: italic;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
}

.lede {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-3);
}

.note {
  margin: 22px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(233, 30, 140, 0.06);
  border: 1px solid rgba(233, 30, 140, 0.14);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

hr { border: 0; border-top: 1px solid var(--hair); margin: 0 0 18px; }

.muted { display: block; font-size: 12px; color: var(--ink-4); margin-bottom: 14px; }

.fine { margin: 22px 0 0; font-size: 11.5px; color: var(--ink-4); }
.fine code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }

/* ---------- О проекте ---------- */

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

.about li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(13, 27, 46, 0.05);
}
.about li:last-child { border-bottom: 0; }

.about b {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
}
.about b::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}
.about p { margin: 0; padding-left: 14px; font-size: 14.5px; line-height: 1.65; color: var(--ink-3); }

/* ---------- Сетки ---------- */

.grid { display: grid; gap: 12px; }
@media (min-width: 620px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.tile {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--glass-2);
  border: 1px solid rgba(255, 255, 255, 0.65);
}
.tile h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.tile p { margin: 0; font-size: 14.5px; line-height: 1.62; color: var(--ink-3); }

/* ---------- Азбука ---------- */

.glossary { display: flex; flex-direction: column; }

details {
  border-bottom: 1px solid rgba(13, 27, 46, 0.06);
}
details:first-child { border-top: 1px solid rgba(13, 27, 46, 0.06); }

summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 2px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color 160ms var(--ease);
}
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--accent); }
summary::before {
  content: "+";
  width: 16px;
  font-weight: 400;
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
}
details[open] summary::before { content: "–"; }
@keyframes term-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

details[open] p { animation: term-in 200ms var(--ease-out) both; }

details p {
  margin: 0 0 14px;
  padding-left: 26px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-3);
}

/* ---------- Палитра и заметки об эмоциях ---------- */

.palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
}

.swatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.swatch i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.notes { display: flex; flex-direction: column; gap: 12px; }

.note-card {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--glass-2);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-left: 3px solid var(--tone, var(--accent));
}
.note-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--tone-ink, var(--ink));
}
.note-card dl { margin: 0; }
.note-card dt {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  margin-bottom: 2px;
}
.note-card dd {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--ink-3);
}
.note-card dd:last-child { margin-bottom: 0; }
.note-card .anchor { font-style: italic; }

/* ---------- Библиотека ---------- */

.books { list-style: none; margin: 0; padding: 0; counter-reset: b; }
.books li {
  padding: 12px 0 12px 30px;
  border-bottom: 1px solid rgba(13, 27, 46, 0.05);
  position: relative;
  counter-increment: b;
}
.books li:last-child { border-bottom: 0; }
.books li::before {
  content: counter(b);
  position: absolute;
  left: 0;
  top: 13px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-4);
}
.books .t { font-size: 15px; font-weight: 600; }
.books .a { font-size: 13.5px; color: var(--ink-2); }
.books .n { font-size: 14px; line-height: 1.6; color: var(--ink-3); margin-top: 3px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  font-family: Nunito, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  padding: 10px 22px;
  transition: transform 160ms var(--ease-out), opacity 160ms var(--ease-out),
              background 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
}
.btn:active { transform: translateY(0) scale(0.97); transition-duration: 100ms; }

.btn-ig {
  color: #fff;
  padding: 11px 28px;
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
.btn-ig:hover { opacity: 0.92; }

.btn-ghost {
  background: rgba(233, 30, 140, 0.1);
  color: var(--accent);
  border: 1px solid rgba(233, 30, 140, 0.25);
}
.btn-ghost:hover { background: rgba(233, 30, 140, 0.16); }

.btn-quiet {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-3);
  border: 1px solid rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 12px;
  padding: 8px 18px;
}

.btn-send {
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  padding: 9px 20px;
}
.btn-send[disabled] {
  background: rgba(13, 27, 46, 0.1);
  color: var(--ink-4);
  cursor: not-allowed;
  transform: none;
}

.cta {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cta p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* ---------- Лента сообщений ---------- */

.feed { display: flex; flex-direction: column; gap: 16px; }

.msg {
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--ink-4);
}
.msg-head .who { font-weight: 700; color: var(--ink-2); }
.msg-head .tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(13, 27, 46, 0.06);
  color: var(--ink-3);
}
.msg-head .dot { opacity: 0.5; }

.msg h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.msg p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--ink-2); }

/* Ввод эмоций */

.react {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
}

.react-label {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
}

/* Горизонтальная карта эмоций (на базе прототипа emotions_map_prototype) */

.padwrap {
  position: relative;
  margin: 4px 0 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.rowlabels {
  position: relative;
  height: 18px;
}

/* Чистый лист: букв не видно, пока по полосе не повели.
   Слово проявляется под курсором, соседние — вполсилы. */
.rowlabels span {
  position: absolute;
  left: 0;
  translate: -50% 0;
  scale: 0.94;
  opacity: 0;
  font: 600 10.5px/1 Nunito, sans-serif;
  white-space: nowrap;
  color: var(--tone, var(--ink-3));
  transition: opacity 200ms var(--ease-out), scale 200ms var(--ease-out);
}
.rowlabels.top span { bottom: 3px; }
.rowlabels.bottom span { top: 3px; }

.rowlabels span.is-near { opacity: 0.3; scale: 0.97; }
.rowlabels span.is-echo { opacity: 0.5; scale: 0.98; }
.rowlabels span.is-on {
  opacity: 1;
  scale: 1.14;
  font-weight: 700;
}

.pad {
  position: relative;
  height: 66px;
  border-radius: 18px;
  overflow: hidden;
  cursor: crosshair;

  /* none, а не pan-y: иначе палец на полосе уводит страницу вместе с жестом.
     Скроллить нужно мимо полосы — она невысокая, места вокруг хватает. */
  touch-action: none;
  overscroll-behavior: contain;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;

  /* В покое — почти без цвета. Насыщенность наливают слои .warm/.cold. */
  background: linear-gradient(90deg, #EFEDEA 0%, #F1F1F0 50%, #E9EDF1 100%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6), 0 4px 14px rgba(13, 27, 46, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Два слоя температуры. Ведёшь влево — наливается тёплый, вправо — холодный.
   Прозрачностью управляет app.js, состояние после отпускания сохраняется. */
.pad .warm,
.pad .cold {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms var(--ease-out);
}
.pad .warm { background: linear-gradient(90deg, #FF8A2B 0%, #FFB765 55%, #FFD9AE 100%); }
.pad .cold { background: linear-gradient(90deg, #BBD8EE 0%, #7FB3DC 45%, #3D7FBF 100%); }
.pad:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.pad canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Осевая линия — «нейтрально»: чем дальше от неё, тем сильнее чувство */
.pad .axis {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 1px;
  background: rgba(13, 27, 46, 0.14);
  pointer-events: none;
}

.pad .sectors {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  pointer-events: none;
}
.pad .sectors { opacity: 1; transition: opacity 180ms var(--ease-out); }
.pad.is-live .sectors { opacity: 0.35; }
.pad .axis { transition: opacity 180ms var(--ease-out), background 180ms var(--ease-out); }
.pad.is-live .axis { background: rgba(13, 27, 46, 0.22); }
.pad .sectors i { border-right: 1px solid rgba(255, 255, 255, 0.45); }
.pad .sectors i:last-child { border-right: 0; }

.pad .badge {
  position: absolute;
  left: 0;
  top: 0;
  /* положение выставляется в JS через translate — 1:1 с пальцем, без анимации;
     переход только у прозрачности и масштаба, иначе плашка отстаёт от курсора */
  translate: -50% -50%;
  scale: 0.94;
  padding: 6px 15px;
  border-radius: 999px;
  background: rgba(13, 27, 46, 0.82);
  color: #fff;
  font: 700 13px/1 Nunito, sans-serif;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms var(--ease-out), scale 180ms var(--ease-out),
              background 220ms var(--ease-out), color 220ms var(--ease-out);
  z-index: 3;
}
.pad .badge.is-on { opacity: 1; scale: 1; }

/* Покой: приглашение по центру полосы, без нажима */
.pad .badge.is-idle {
  opacity: 1;
  scale: 1;
  background: rgba(255, 255, 255, 0.66);
  color: #5f7d92;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pad .badge b { font-weight: 700; }
.pad .badge s { text-decoration: none; opacity: 0.7; font-weight: 600; }

.padhint {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-4);
}

/* Отмеченное */

.picked {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.picked:empty { display: none; }

@keyframes pick-in {
  from { opacity: 0; scale: 0.9; }
  to   { opacity: 1; scale: 1; }
}

/* уходит тем же путём, каким пришла, только быстрее: система отвечает, а не решает */
.pick.is-leaving {
  opacity: 0;
  scale: 0.9;
  transition: opacity 140ms var(--ease-out), scale 140ms var(--ease-out);
  pointer-events: none;
}

.pick {
  animation: pick-in 220ms var(--ease-out-back) both;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px 5px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--tone);
  background: var(--tone-soft);
  font: 700 12.5px/1 Nunito, sans-serif;
  color: var(--tone-ink);
}
.pick .pips { display: inline-flex; gap: 2px; }
.pick .pips i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
}
.pick .pips i.on { opacity: 1; }
.pick button {
  border: 0;
  background: none;
  padding: 0 2px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin: -3px -2px -3px 0;
  font: 400 16px/1 Nunito, sans-serif;
  color: currentColor;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 160ms ease, transform 100ms var(--ease-out);
}
.pick button:active { transform: scale(0.9); }
@media (hover: hover) and (pointer: fine) {
  .pick button:hover { opacity: 1; }
}

@media (max-width: 560px) {
  /* Основной текст крупнее: с телефона страницу читают с расстояния вытянутой руки */
  .lede, .msg p, .about p, .tile p, details p, .note-card dd, .why p, .books .n {
    font-size: 15.5px;
    line-height: 1.68;
  }
  .tagline { font-size: 16.5px; }
  .msg h3 { font-size: 19px; }
  h2 { font-size: 23px; }
  .about b, .tile h4, .why h4, summary, .books .t { font-size: 15.5px; }
  .swatch { font-size: 13.5px; }
  .crow { font-size: 13.5px; }
  .padhint { font-size: 13px; }
  .react-label { font-size: 12px; }

  .rowlabels span { font-size: 11px; }
  .pad { height: 84px; }
  .rowlabels { height: 22px; }
  /* соседние слова на узком экране не показываем — они бы наехали друг на друга,
     активное центрируем по полосе, чтобы не срезалось у краёв */
  .rowlabels span.is-near, .rowlabels span.is-echo { opacity: 0; }
  .rowlabels span.is-on {
    left: 50% !important;
    font-size: 15px;
    scale: 1;
  }
  /* палец крупнее курсора: цели под ним тоже */
  .pick { padding: 7px 8px 7px 14px; font-size: 13px; }
  .pick button { width: 24px; height: 24px; font-size: 17px; margin: -4px -2px -4px 0; }
  .own input { padding: 11px 16px; font-size: 16px; } /* 16px — иначе iOS зумит поле */
  .btn-send { padding: 11px 22px; }
}

.own {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.own input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(13, 27, 46, 0.1);
  background: rgba(255, 255, 255, 0.7);
  font: 400 13px/1.2 Nunito, sans-serif;
  color: var(--ink);
  transition: border-color 180ms var(--ease);
}
.own input:focus { outline: 0; border-color: var(--accent); }
.own input::placeholder { color: var(--ink-4); }

/* Карта эмоций после отправки */

.map { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hair); }

.map-bar {
  display: flex;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(13, 27, 46, 0.06);
}
.map-bar span { display: block; }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-3);
}
.map-legend b { color: var(--ink-2); font-weight: 700; }
.map-legend .mine {
  color: var(--accent);
  font-weight: 700;
}

.map-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-4);
}
.map-foot button {
  border: 0;
  background: none;
  padding: 0;
  font: 700 12px Nunito, sans-serif;
  color: var(--accent);
  cursor: pointer;
  transition: transform 100ms var(--ease-out);
}
.map-foot button:active { transform: scale(0.95); }

.words { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.word {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed rgba(13, 27, 46, 0.15);
  font-size: 11.5px;
  color: var(--ink-3);
}

/* ---------- Фон сегодня / коллективная эмоция ---------- */

.mood {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 20px;
  font-size: 12px;
  color: var(--ink-3);
}
.mood-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
}
.mood-bar {
  display: flex;
  width: 120px;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(13, 27, 46, 0.06);
}
.mood-bar span { display: block; }
.mood-words b { font-weight: 700; color: var(--ink-2); }

.collective { display: flex; flex-direction: column; gap: 8px; }

.crow {
  display: grid;
  grid-template-columns: 104px 1fr 42px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.crow .track {
  height: 8px;
  border-radius: 999px;
  background: rgba(13, 27, 46, 0.06);
  overflow: hidden;
}
.crow .fill {
  height: 100%;
  border-radius: 999px;
}
.crow .num { text-align: right; font-size: 11.5px; color: var(--ink-4); }

.collective-words { display: flex; flex-wrap: wrap; gap: 5px; margin: 16px 0 18px; }

/* Смена ввода на карту — единственный сюжетный переход в блоке,
   поэтому он длиннее обычного UI: 240мс на движение высоты. */

.swap { transition: height 240ms var(--ease-in-out); overflow: hidden; }

.swap-out {
  opacity: 0;
  filter: blur(2px);              /* размытие склеивает два состояния в одно движение */
  transform: scale(0.99);
  transition: opacity 160ms var(--ease-out), filter 160ms var(--ease-out),
              transform 160ms var(--ease-out);
}

.swap-in {
  opacity: 0;
  transform: translateY(6px);
}
.swap-in.is-settled {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms var(--ease-out) 40ms, transform 220ms var(--ease-out) 40ms;
}

/* ---------- Почему это цепляет ---------- */

.why { list-style: none; margin: 0; padding: 0; counter-reset: w; display: grid; gap: 14px; }

.why li {
  counter-increment: w;
  position: relative;
  padding: 16px 18px 16px 52px;
  border-radius: 16px;
  background: var(--glass-2);
  border: 1px solid rgba(255, 255, 255, 0.65);
}
.why li::before {
  content: counter(w);
  position: absolute;
  left: 18px;
  top: 15px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(233, 30, 140, 0.12);
  color: var(--accent);
  font: 700 12px/22px Nunito, sans-serif;
  text-align: center;
}
.why h4 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.why p { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--ink-3); }

/* ---------- Тост ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 40;
  transform: translate(-50%, 14px);
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(13, 27, 46, 0.9);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Доступность ---------- */

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  /* движение убираем, проявление подписей оставляем: это прозрачность, она помогает понять */
  .card, .msg, .pick, .btn, .lang, .nav a { animation-duration: 0.01ms !important; }
  .pick { animation: none; }
  .pick.is-leaving { scale: 1; transition: opacity 100ms ease; }
  html { scroll-behavior: auto; }
  details[open] p { animation: none; }
  .swap { transition: none; }
  .swap-out { filter: none; transform: none; transition: opacity 120ms ease; }
  .swap-in { transform: none; }
  .swap-in.is-settled { transform: none; transition: opacity 160ms ease; }
  .rowlabels span, .rowlabels span.is-on, .rowlabels span.is-near, .rowlabels span.is-echo,
  .pad .badge, .pad .badge.is-on { scale: 1; }
  .btn:hover, .lang:hover { transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .card { background: rgba(255, 255, 255, 0.96); backdrop-filter: none; }
  .lang { backdrop-filter: none; }
}
