/* ============================================================
   Animei — стили лендинга
   Тёмная тема, градиент сакура→фиолет, стеклянные карточки
   ============================================================ */

:root {
  --bg: #0b0d12;
  --bg-soft: #10131b;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text: #eef0f6;
  --text-muted: #9aa2b5;
  --text-dim: #6b7387;
  --pink: #7c8cf8;
  --violet: #4f46e5;
  --grad: linear-gradient(120deg, var(--pink), var(--violet));
  --radius: 20px;
  --radius-sm: 12px;
  --font: "Inter", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  --font-jp: "Noto Sans JP", "Inter", sans-serif;
  --shadow-card: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --shadow-pink: 0 12px 40px -10px rgba(124, 140, 248, 0.45);
}

/* --- База --- */

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

html {
  scroll-behavior: smooth;
  /* якоря не прячутся под фиксированной шапкой (высота ~66px + небольшой отступ) */
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Японский шрифт нужен только вкраплениям японского текста
   (декоративные иероглифы, субтитры в мокапе плеера) —
   целиком на японском страница больше не бывает */
[lang="ja"] {
  font-family: var(--font-jp);
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p, ul, ol, figure, blockquote {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

.container {
  width: min(1160px, 100% - 48px);
  margin-inline: auto;
}

/* Градиентный текст */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Стеклянная карточка */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
}

.glass--strong {
  background: var(--surface-strong);
}

/* Клавиша-хоткей */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--border-hover);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  vertical-align: middle;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-pink);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px -10px rgba(124, 140, 248, 0.55);
}

.btn--ghost {
  border-color: var(--border-hover);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.btn--outline {
  border-color: rgba(79, 70, 229, 0.6);
  color: var(--text);
}

.btn--outline:hover {
  background: rgba(79, 70, 229, 0.14);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 9px 18px;
  font-size: 14px;
}

.btn--lg {
  padding: 15px 32px;
  font-size: 16px;
}

.btn--block {
  width: 100%;
  margin-top: auto;
}

/* --- Шапка --- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 14px 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.header.is-scrolled {
  padding: 8px 0;
  background: rgba(11, 13, 18, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.logo__kanji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: var(--shadow-pink);
}

.logo__accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
}

/* Пункт JP News с бейджем «NEW» — маленькая метка в правом верхнем углу слова */
.nav__link--news {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.nav__new {
  position: absolute;
  top: -0.7em;
  right: -1.35em;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  color: #fff;
  background: var(--grad);
  padding: 2px 3px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(124, 140, 248, 0.5);
  animation: newPulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes newPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav__link:hover {
  color: var(--text);
}

.nav__link:hover::after {
  transform: scaleX(1);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Подпись кнопки в шапке: на совсем узких экранах длинная («Открыть Animei»)
   не помещается рядом с логотипом и бургером — показываем короткую («Начать») */
.hcta-short {
  display: none;
}

@media (max-width: 430px) {
  .hcta-full {
    display: none;
  }

  .hcta-short {
    display: inline;
  }
}

/* --- Переключатель языка --- */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lang-switch__btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.lang-switch__btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.lang-switch__btn.is-active {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 6px 18px -6px rgba(124, 140, 248, 0.55);
}

/* Копия переключателя внутри мобильного меню — на десктопе спрятана */
.lang-switch--nav {
  display: none;
}

/* Бургер — виден только на мобильных */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  opacity: 0;
}

.burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Декоративные иероглифы на фоне --- */

.bg-kanji {
  position: absolute;
  z-index: 0;
  font-family: var(--font-jp);
  /* Лёгкий вес и мягкая заливка-акварель: жирные глифы (900) при гигантском
     кегле читались как случайные тёмные блоки. Глиф должен быть виден целиком
     и растворяться по краям. */
  font-weight: 400;
  color: rgba(139, 150, 248, 0.05);
  user-select: none;
  pointer-events: none;
  line-height: 1.1;
  white-space: nowrap;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 40%, transparent 85%);
  mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 40%, transparent 85%);
}

/* Позиции подобраны так, чтобы иероглифы были видны целиком в «воздухе»
   секций: обрезанный краем глиф читается как случайный обрывок рамки. */
.bg-kanji--hero {
  /* В hero и так плеер, свечения и плашки — декоративный глиф там лишний шум */
  display: none;
}

.bg-kanji--right {
  top: 28px;
  right: 36px;
  font-size: clamp(120px, 14vw, 190px);
}

.bg-kanji--left {
  top: 28px;
  left: 36px;
  font-size: clamp(120px, 14vw, 190px);
}

/* В секции установки левый верх занят заголовком — уводим глиф в свободный
   правый низ, за телефон */
.section--install .bg-kanji--left {
  top: auto;
  left: auto;
  bottom: 48px;
  right: 36px;
}

.bg-kanji--center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(220px, 30vw, 420px);
  color: rgba(139, 150, 248, 0.04);
}

/* На узких экранах контент занимает всю ширину — «воздуха» под глифы нет,
   они попадают под текст и превращаются в шум */
@media (max-width: 768px) {
  .bg-kanji {
    display: none;
  }
}

/* --- Hero --- */

.hero {
  position: relative;
  padding: 150px 0 100px;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
}

.hero__glow--pink {
  width: 520px;
  height: 520px;
  top: -180px;
  left: -140px;
  /* Тёплый оттенок сакуры: разбавляет монохромный индиго, даёт «живое» свечение */
  background: rgba(233, 140, 184, 0.12);
}

.hero__glow--violet {
  width: 620px;
  height: 620px;
  bottom: -260px;
  right: -180px;
  background: rgba(79, 70, 229, 0.15);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero__title {
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}


.hero__subtitle {
  font-size: 16.5px;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 28px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

/* Короткое снятие тревоги под кнопками: «работает везде, прогресс не пропадёт» */
.hero__note {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 28px;
}

.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
}

.hero__points li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.hero__points svg {
  width: 16px;
  height: 16px;
  color: var(--pink);
  flex-shrink: 0;
}

/* --- Мокап плеера --- */

.hero__mockup {
  position: relative;
}

/* Призыв над демо-плеером: аккуратная «живая» плашка — пульсирующая точка +
   короткий текст. Даёт понять, что плеер настоящий, им можно пользоваться. */
.hero__try {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 16px;
  padding: 8px 16px 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-hover);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero__try-live {
  position: relative;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
}

/* Мягкий пульс-ореол вокруг точки — сигнал «в эфире» */
.hero__try-live::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--pink);
  animation: tryLivePulse 1.8s ease-out infinite;
}

@keyframes tryLivePulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(3.2); opacity: 0; }
}

@media (max-width: 560px) {
  .hero__try {
    font-size: 12.5px;
    padding: 7px 14px 7px 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__try-live::before { animation: none; }
}

.player {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #12151d;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 0 80px -30px rgba(79, 70, 229, 0.35);
  overflow: hidden;
  transform: rotate(1.2deg);
  transition: transform 0.4s ease;
}

.hero__mockup:hover .player {
  transform: rotate(0deg) translateY(-4px);
}

.player__topbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.player__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.player__dot:first-child {
  background: rgba(124, 140, 248, 0.7);
}

.player__title {
  margin-left: 10px;
  font-size: 12px;
  color: var(--text-dim);
}

.player__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d0f16;
}

/* Само видео — фрагмент аниме */
.player__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.player__vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

/* Большая кнопка запуска поверх постера */
.player__bigplay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0;
  border: 0;
  /* Заметное затемнение: в постере теперь «UI» (карточка, реплика), и без него
     кнопка Play и подпись «Смотреть фрагмент» терялись на пёстром фоне */
  background: linear-gradient(180deg, rgba(13, 15, 22, 0.66), rgba(13, 15, 22, 0.88));
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.player__bigplay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.player__bigplay-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 18px 44px -10px rgba(79, 70, 229, 0.65);
  transition: transform 0.2s ease;
}

.player__bigplay:hover .player__bigplay-circle {
  transform: scale(1.08);
}

.player__bigplay-circle svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
}

.player__bigplay-note {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-hover);
  background: rgba(17, 20, 29, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Строка субтитров: поверх видео, чуть выше вшитого русского перевода */
.player__subs {
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  bottom: 14%;
  margin: 0;
  text-align: center;
  font-size: clamp(16px, 1.8vw, 21px);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 3px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.03em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.player__subs.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Слово — настоящая кнопка, но выглядит как текст субтитров */
.player__word {
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-shadow: inherit;
  border-radius: 6px;
  padding: 1px 2px;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.player__word:hover {
  background: rgba(255, 255, 255, 0.14);
}

.player__word--active {
  background: linear-gradient(120deg, rgba(124, 140, 248, 0.35), rgba(79, 70, 229, 0.35));
  box-shadow: 0 0 0 1px rgba(124, 140, 248, 0.55);
  color: #ffd7e6;
}

/* Словарная карточка над словом: hero-player.js ставит left в пикселях
   так, чтобы хвостик указывал на слово, по которому кликнули */
.dict-card {
  --shift: 0px;
  position: absolute;
  /* Выше большой кнопки Play (.player__bigplay, z-index:4) и панели разбора
     (.ai-panel, z-index:5): иначе, когда оверлей Play показан (например, после
     перемотки к реплике без запуска), он перекрывал карточку и её крестик — клик
     по «×» попадал в оверлей и не закрывал карточку. */
  z-index: 6;
  left: 50%;
  bottom: 28%;
  transform: translateX(var(--shift));
  /* ширина подстраивается под слово, чтобы длинное 見えてきた не ломалось на две строки */
  width: max-content;
  min-width: 210px;
  max-width: 250px;
  padding: 14px 16px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-hover);
  background: rgba(17, 20, 29, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.8);
  animation: dictFloat 4.5s ease-in-out infinite;
  transition: left 0.3s ease;
}

.dict-card[hidden] {
  display: none;
}

@keyframes dictFloat {
  0%, 100% { transform: translateX(var(--shift)) translateY(0); }
  50% { transform: translateX(var(--shift)) translateY(-6px); }
}

/* Смена слова в карточке: текст мягко появляется снизу */
.dict-card.is-swap .dict-card__head,
.dict-card.is-swap .dict-card__meaning {
  animation: dictSwap 0.28s ease;
}

@keyframes dictSwap {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

/* Закрыть карточку: маленький круглый × в правом верхнем углу */
.dict-card__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.dict-card__close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
}

.dict-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  /* оставляем место справа под кнопку закрытия, чтобы «сущ./noun» не наезжал */
  padding-right: 26px;
  margin-bottom: 4px;
}

.dict-card__word {
  white-space: nowrap;
  font-size: 24px;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.dict-card__reading {
  font-size: 13px;
  color: var(--text-muted);
}

.dict-card__pos {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--violet);
  border: 1px solid rgba(79, 70, 229, 0.45);
  border-radius: 6px;
  padding: 2px 6px;
}

.dict-card__meaning {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.dict-card__add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  justify-content: center;
  padding: 8px 12px;
  border: none;
  border-radius: 9px;
  background: var(--grad);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.dict-card__add:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

/* Слово уже добавлено в коллекцию */
.dict-card__add.is-added {
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.4);
  cursor: default;
}

.dict-card__add.is-added:hover {
  filter: none;
  transform: none;
}

.dict-card__add.is-added svg {
  display: none;
}

.dict-card__add svg {
  width: 13px;
  height: 13px;
}

/* Хвостик карточки — указывает на слово */
.dict-card__arrow {
  position: absolute;
  left: 78%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
  background: rgba(17, 20, 29, 0.92);
  border-right: 1px solid var(--border-hover);
  border-bottom: 1px solid var(--border-hover);
  transition: left 0.3s ease;
}

/* Кнопка «Разбор от ИИ» в словарной карточке — вторичная, под кнопкой «в коллекцию» */
.dict-card__ai {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(79, 70, 229, 0.45);
  border-radius: 9px;
  background: rgba(79, 70, 229, 0.12);
  color: #e2c9ff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.dict-card__ai[hidden] {
  display: none;
}

.dict-card__ai:hover {
  background: rgba(79, 70, 229, 0.22);
  border-color: rgba(79, 70, 229, 0.7);
  transform: translateY(-1px);
}

.dict-card__ai:disabled {
  cursor: default;
  opacity: 0.75;
  transform: none;
}

.dict-card__ai svg {
  width: 14px;
  height: 14px;
}

.dict-card__ai.is-busy svg {
  animation: aiSpin 1s linear infinite;
}

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

/* Панель разбора реплики от ИИ — стеклянная, поверх экрана плеера */
.ai-panel {
  position: absolute;
  z-index: 5;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-height: 82%;
  overflow-y: auto;
  padding: 16px 16px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-hover);
  background: rgba(13, 16, 23, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.85);
  animation: aiPanelIn 0.28s ease;
}

.ai-panel[hidden] {
  display: none;
}

/* Красивый скролл разбора: тонкая градиентная «капсула», парящая в жёлобе
   (обычный хромовский скролл выбивался из стеклянного стиля панели).
   Важно: НЕ задаём scrollbar-color/width на самой .ai-panel — иначе Chrome
   переключится на стандартный скролл и проигнорирует ::-webkit-scrollbar.
   Пока их нет — работают webkit-псевдоэлементы. Для Firefox стиль задаём ниже
   отдельно, под @supports (Chrome в этот блок не заходит). */
.ai-panel::-webkit-scrollbar {
  width: 10px;
}

.ai-panel::-webkit-scrollbar-button {
  display: none;
  height: 0;
  width: 0;
}

.ai-panel::-webkit-scrollbar-track {
  background: transparent;
  margin: 10px 0;
}

.ai-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 3px solid transparent;
  background: linear-gradient(180deg, var(--pink), var(--violet)) padding-box;
}

.ai-panel::-webkit-scrollbar-thumb:hover {
  border-width: 2px;
}

/* Firefox не знает ::-webkit-scrollbar — только там даём стандартный тонкий
   фирменный скролл. Chrome поддерживает селектор ::-webkit-scrollbar, поэтому
   в этот блок не заходит и сохраняет градиентную «капсулу» выше. */
@supports not selector(::-webkit-scrollbar) {
  .ai-panel {
    scrollbar-width: thin;
    scrollbar-color: var(--violet) transparent;
  }
}

@keyframes aiPanelIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.ai-panel__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.ai-panel__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.ai-panel__close svg {
  width: 15px;
  height: 15px;
}

.ai-panel__sentence {
  margin: 0 30px 12px 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

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

/* Секция панели: перевод / разбор / грамматика */
.ai-sec__title {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--violet);
}

.ai-sec__translation {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.ai-part {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.ai-part:first-child {
  border-top: 0;
}

.ai-part__surface {
  font-weight: 700;
  color: #fff;
}

.ai-part__reading {
  font-size: 12px;
  color: var(--text-dim);
}

.ai-part__meaning {
  flex: 1 1 100%;
  color: var(--text-muted);
}

.ai-grammar {
  padding: 6px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.ai-grammar:first-child {
  border-top: 0;
}

.ai-grammar__point {
  display: block;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.ai-grammar__text {
  color: var(--text-muted);
  line-height: 1.5;
}

.ai-panel__msg {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.ai-panel__msg--error {
  color: #fca5a5;
}

/* Активный тумблер зацикливания реплики */
.player__btn--loop.is-on {
  color: #fff;
  background: var(--grad);
}

/* Подсказка «кликни по слову» — исчезает после первого клика */
.player__hint {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-hover);
  background: rgba(17, 20, 29, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
  animation: hintPulse 2.4s ease-in-out infinite;
  transition: opacity 0.3s ease;
}

.player__hint.is-hidden {
  opacity: 0;
  animation: none;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

/* Контролы плеера */
.player__controls {
  padding: 12px 16px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border);
}

.player__progress {
  position: relative;
  height: 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
  cursor: pointer;
  touch-action: none;
}

/* Невидимая зона побольше, чтобы в полоску было легко попасть */
.player__progress::after {
  content: "";
  position: absolute;
  inset: -7px 0;
}

.player__progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 4px;
  background: var(--grad);
}

.player__progress-knob {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(124, 140, 248, 0.8);
  pointer-events: none;
}

.player__buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player__buttons-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Кнопки управления (пуск, звук) */
.player__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.player__btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.player__btn svg {
  width: 19px;
  height: 19px;
}

/* Атрибут hidden не действует на svg через стили браузера — прячем сами */
.player__btn svg[hidden] {
  display: none;
}

.player__time {
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

.player__hotkeys {
  display: flex;
  gap: 6px;
}

/* Горячие клавиши A/S/D — рабочие кнопки */
.kbd--btn {
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.kbd--btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

/* Включённый режим авто-паузы (S) */
.kbd--btn.is-on {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}

/* Плашка под плеером */
.hero__floating-chip {
  position: absolute;
  bottom: -22px;
  left: 26px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-hover);
  background: rgba(17, 20, 29, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.7);
}

.hero__floating-chip svg {
  width: 16px;
  height: 16px;
  color: var(--pink);
}

/* Плашка подпрыгивает, когда добавили слово */
.hero__floating-chip.is-pop {
  animation: chipPop 0.4s ease;
}

@keyframes chipPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Кнопка «Повторить это слово» — появляется после первого сохранённого слова.
   Своя строка НИЖЕ плашки счётчика (bottom: -22px), чтобы они не сталкивались
   на узких плеерах и при длинных подписях. */
.hero__to-learning {
  position: absolute;
  bottom: -72px;
  right: 26px;
  animation: toLearningIn 0.4s ease;
}

.hero__to-learning[hidden] {
  display: none;
}

.hero__to-learning svg {
  width: 16px;
  height: 16px;
}

@keyframes toLearningIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* --- Секции --- */

.section {
  position: relative;
  padding: 72px 0;
  overflow: hidden;
  /* Секции ниже первого экрана не размечаем и не рисуем, пока они не близко:
     меньше работы основного потока на старте (DOM, раскладка, long task).
     content-visibility запоминает реальную высоту после первой отрисовки. */
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

.section__head {
  max-width: 680px;
  margin-bottom: 44px;
  position: relative;
  z-index: 1;
}

.section__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 14px;
}

.section__title {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section__lead {
  margin-top: 16px;
  font-size: 17px;
  color: var(--text-muted);
}

/* --- Шаги --- */

.steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px 24px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.step:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
}

.step__num {
  position: absolute;
  top: 20px;
  right: 22px;
  font-size: 30px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.06);
  line-height: 1;
}

.step__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 140, 248, 0.16), rgba(79, 70, 229, 0.16));
  border: 1px solid rgba(124, 140, 248, 0.25);
  margin-bottom: 18px;
}

.step__icon svg {
  width: 22px;
  height: 22px;
  color: var(--pink);
}

.step__title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step__text {
  font-size: 14px;
  color: var(--text-muted);
}

/* --- Возможности --- */

.features {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  padding: 30px 26px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
  transform: translateY(-6px);
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: 0 24px 60px -22px rgba(79, 70, 229, 0.35);
}

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 140, 248, 0.14), rgba(79, 70, 229, 0.18));
  border: 1px solid rgba(79, 70, 229, 0.3);
  margin-bottom: 20px;
}

.feature__icon svg {
  width: 23px;
  height: 23px;
  color: #c98cff;
}

.feature__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature__text {
  font-size: 14.5px;
  color: var(--text-muted);
}

/* Ряд из двух карточек-дифференциаторов под шагами «Как это работает».
   Горизонтальная раскладка (иконка слева): текста мало, и вертикальные
   карточки выглядели полупустыми. */
.features--duo {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 20px;
}

.features--duo .feature {
  display: grid;
  grid-template-columns: 50px 1fr;
  column-gap: 20px;
  align-items: start;
  padding: 26px 28px;
}

.features--duo .feature__icon {
  margin-bottom: 0;
  grid-row: 1 / 3;
}

.features--duo .feature__title {
  margin-bottom: 6px;
  align-self: center;
}

/* --- Companion --- */

#versions .section__head {
  margin-bottom: 40px;
  /* Заголовок по центру — под ним центрированная широкая карточка */
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.versions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

/* Одна карточка (Companion): широкая горизонтальная, по центру — узкая карточка
   слева оставляла пустой правую половину секции и рушила баланс. */
.versions--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 980px;
  margin-inline: auto;
}

@media (min-width: 861px) {
  .versions--single .version {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-rows: auto auto auto 1fr;
    column-gap: 52px;
    align-items: start;
    padding: 40px 46px;
  }

  .versions--single .version__icon { grid-column: 1; grid-row: 1; }
  .versions--single .version__tag { grid-column: 1; grid-row: 2; }
  .versions--single .version__title { grid-column: 1; grid-row: 3; }

  .versions--single .version__text {
    grid-column: 1;
    grid-row: 4;
    margin-bottom: 0;
  }

  .versions--single .version__list {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    margin-bottom: 0;
  }

  .versions--single .version .btn {
    grid-column: 2;
    grid-row: 4;
    align-self: end;
    margin-top: 16px;
  }
}

.version {
  display: flex;
  flex-direction: column;
  padding: 30px 28px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.version:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
}

/* Кнопка карточки версии всегда прижата к низу (карточки выровнены по кнопке),
   и компактнее общей — чтобы карточка целиком помещалась в кадр. */
.version .btn {
  margin-top: auto;
  padding: 13px 20px;
  font-size: 15px;
}

.version__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--grad);
  box-shadow: var(--shadow-pink);
  margin-bottom: 16px;
}

.version__icon svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

.version__tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pink);
  border: 1px solid rgba(124, 140, 248, 0.4);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 10px;
}

.version__tag--alt {
  color: #c98cff;
  border-color: rgba(79, 70, 229, 0.45);
}

.version__title {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.version__text {
  font-size: 15.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.version__list {
  display: grid;
  gap: 9px;
  margin-bottom: 22px;
}

.version__list li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  color: var(--text-muted);
}

.version__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--pink);
  border-bottom: 2px solid var(--pink);
  transform: rotate(-45deg) scale(0.8);
}

/* --- Финальный CTA --- */

.section--cta {
  padding-top: 30px;
}

.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 72px 40px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 70% 120% at 50% -20%, rgba(79, 70, 229, 0.22), transparent 65%),
    radial-gradient(ellipse 60% 100% at 50% 120%, rgba(233, 140, 184, 0.1), transparent 60%),
    var(--bg-soft);
}

.cta__title {
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 640px;
  margin: 0 auto 16px;
}

.cta__text {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* --- Футер --- */

.footer {
  border-top: 1px solid var(--border);
  padding: 44px 0;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo--footer {
  font-size: 19px;
}

.logo--footer .logo__kanji {
  width: 32px;
  height: 32px;
  font-size: 16px;
  box-shadow: none;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.footer__nav a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer__nav a:hover {
  color: var(--text);
}

.footer__copy {
  width: 100%;
  font-size: 13px;
  color: var(--text-dim);
}

/* --- Появление при скролле --- */

/* Прячем блоки только когда JS точно работает (html.js ставит инлайн-скрипт в
   <head>): если скрипты не загрузились/упали, контент остаётся видимым. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.reveal--delay-1 { transition-delay: 0.12s; }
.reveal--delay-2 { transition-delay: 0.24s; }
.reveal--delay-3 { transition-delay: 0.36s; }

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Если анимации отключены в системе — показываем всё сразу */
/* ---------- JP News: намеренно другой вид (не ещё одна центрированная карточка) ---------- */

.news-promo {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
  padding: 44px 46px;
  overflow: hidden;
}

/* Мягкое градиентное свечение — отличает блок от простых стеклянных карточек */
.news-promo::before {
  content: "";
  position: absolute;
  top: -45%;
  right: -12%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.16), transparent 68%);
  pointer-events: none;
}

.news-promo__body,
.news-promo__preview {
  position: relative;
  z-index: 1;
}

.news-promo__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}

.news-promo__badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--grad);
}

.news-promo__title {
  font-size: clamp(24px, 2.8vw, 33px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.news-promo__text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.news-promo__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.news-promo__tags li {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
}

/* Мок новостной карточки — показывает фуригану и уровень JLPT */
.news-card {
  position: relative;
  padding: 42px 22px 20px;
  border-radius: 18px;
  border: 1px solid var(--border-hover);
  background: rgba(17, 20, 29, 0.72);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
  transform: rotate(1.6deg);
  transition: transform 0.3s ease;
}

.news-promo:hover .news-card {
  transform: rotate(0);
}

.news-card__level {
  position: absolute;
  top: 14px;
  left: 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--grad);
}

.news-card__source {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-jp);
  font-size: 11px;
  color: var(--text-dim);
}

.news-card__jp {
  font-family: var(--font-jp);
  font-size: 19px;
  line-height: 2.2;
  color: var(--text);
  margin: 4px 0 14px;
}

.news-card__jp ruby rt {
  font-size: 0.5em;
  color: var(--pink);
  font-weight: 500;
}

.news-card__ru {
  font-size: 13.5px;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .news-promo {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 32px 26px;
  }

  /* На телефоне мок-карточку показываем сверху как визуальный акцент */
  .news-promo__preview {
    order: -1;
  }

  .news-card {
    transform: none;
    max-width: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .dict-card {
    animation: none;
  }
  .player__hint {
    animation: none;
  }
}

/* --- Адаптивность --- */

@media (max-width: 1024px) {
  /* Одна колонка, но демо-плеер поднимаем ВЫШЕ списка преимуществ: на телефоне
     главное доказательство продукта должно быть видно как можно раньше.
     display:contents «распаковывает» hero__content, а order задаёт порядок:
     бейдж → заголовок → подзаголовок → CTA → плеер → пункты. */
  .hero__inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .hero {
    padding-top: 120px;
  }

  .hero__content {
    display: contents;
  }

  /* В колонке плашка и кнопка обучения встают в поток ПОД плеером (не absolute):
     так они физически не могут налезть друг на друга или на пункты преимуществ.
     Отрицательный отступ у плашки сохраняет фирменное «свисание» с плеера. */
  .hero__floating-chip {
    position: relative;
    bottom: auto;
    left: 0;
    width: max-content;
    margin: -18px 0 0 16px;
    z-index: 2;
  }

  .hero__to-learning {
    position: static;
    margin: 16px 0 0;
  }

  .hero__title { order: 2; max-width: 620px; }
  .hero__subtitle { order: 3; max-width: 540px; }
  .hero__cta { order: 4; }
  .hero__note { order: 5; margin-bottom: 26px; }
  .hero__mockup { order: 6; }

  /* На телефоне «пич + кнопки» и живой демо-плеер шли одним тёмным потоком и
     визуально сливались. Отделяем плеер мягкой затухающей линией-разделителем —
     сразу читается как отдельный блок «вот живое демо». */
  .hero__mockup::before {
    content: "";
    display: block;
    height: 1px;
    margin: 0 4px 28px;
    background: linear-gradient(90deg, transparent, var(--border-hover) 18%, var(--border-hover) 82%, transparent);
  }

  .hero__points {
    order: 7;
    margin-top: 26px;
    gap: 8px 18px;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Узкий десктоп: шапке тесно с переключателем — ужимаем расстояния */
@media (max-width: 920px) and (min-width: 769px) {
  .nav {
    gap: 18px;
  }

  .header__inner {
    gap: 16px;
  }

  .lang-switch__btn {
    padding: 6px 8px;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 66px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(13, 16, 23, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

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

  .nav__link::after {
    display: none;
  }

  .nav__link:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  /* В вертикальном меню-бургере пункты во всю ширину, поэтому бейдж «NEW» с
     абсолютным right улетал к правому краю. Ставим его в поток — сразу за текстом. */
  .nav__link--news {
    justify-content: flex-start;
  }
  .nav__new {
    position: static;
    top: auto;
    right: auto;
    margin-left: 8px;
    font-size: 9px;
    padding: 2px 5px;
  }

  .burger {
    display: flex;
  }

  /* Кнопка в шапке компактнее: на телефоне она соседствует с бургером,
     и полноразмерная выталкивала его за край на узких экранах.
     min-height 40px — комфортная тач-зона. */
  .header__actions {
    gap: 10px;
  }

  .header__actions .btn--sm {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 40px;
  }

  /* Полупрозрачная шапка на телефоне «просвечивала» проезжающий контент
     и читалась как каша — фон почти плотный */
  .header.is-scrolled {
    background: rgba(11, 13, 18, 0.96);
  }

  /* На мобильных переключатель языка переезжает из шапки в меню-бургер */
  .header__actions .lang-switch {
    display: none;
  }

  .lang-switch--nav {
    display: inline-flex;
    align-self: flex-start;
    margin: 8px 6px 4px;
  }

  .versions {
    grid-template-columns: 1fr;
  }

  /* Меньше «воздуха» по вертикали — на планшете секции поджимаем ещё.
     content-visibility выключаем: на длинной мобильной странице ленивая
     отрисовка секций даёт скачки высоты при докрутке (резерв 520px меньше реальных). */
  .section {
    padding: 60px 0;
    content-visibility: visible;
    contain-intrinsic-size: auto;
  }

  .section__head {
    margin-bottom: 38px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(1160px, 100% - 32px);
  }

  .hero {
    padding: 92px 0 48px;
  }

  .section {
    padding: 44px 0;
  }

  .section__head {
    margin-bottom: 22px;
  }

  .steps,
  .features {
    grid-template-columns: 1fr;
  }

  /* Заголовок героя подстраивается под ширину телефона */
  .hero__title {
    font-size: clamp(29px, 7.8vw, 38px);
    margin-bottom: 14px;
  }

  .hero__subtitle {
    font-size: 15.5px;
    margin-bottom: 24px;
  }

  .hero__cta {
    gap: 10px;
    margin-bottom: 26px;
  }

  .hero__cta .btn {
    width: 100%;
  }

  /* Вторичный CTA легче основного, но остаётся явной кнопкой: контурная
     пилюля чуть ниже залитой (голый текст выглядел некликабельным) */
  .hero__cta .btn--ghost {
    padding: 13px 24px;
    font-size: 15px;
  }

  /* Подпись под кнопками и чек-пункты повторяют trust-полосу и шаги ниже —
     на телефоне это лишние экраны текста */
  .hero__note,
  .hero__points {
    display: none;
  }

  /* Без декоративного наклона: на телефоне плеер — рабочий интерфейс,
     а не картинка сбоку */
  .player {
    transform: none;
  }

  .section__lead {
    font-size: 15.5px;
    margin-top: 12px;
  }

  /* Шаги — компактные горизонтальные карточки: иконка слева, текст справа.
     Вертикальные (иконка, заголовок, текст в столбик) растягивали ленту
     на два экрана однообразных блоков. */
  .steps {
    gap: 12px;
  }

  .step {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 14px;
    padding: 18px 16px;
  }

  .step__icon {
    grid-row: 1 / 3;
    width: 44px;
    height: 44px;
    margin: 0;
  }

  .step__title {
    align-self: center;
    margin-bottom: 4px;
  }

  .step__num {
    top: 14px;
    right: 16px;
    font-size: 22px;
  }

  .features {
    gap: 12px;
  }

  .feature {
    padding: 24px 22px;
  }

  /* Горячие клавиши — desktop-фича: A/S/D на таче бессмысленны.
     Селектор с .features--duo — перебить его же display:grid. */
  .features--duo .feature--hotkeys {
    display: none;
  }

  .dict-card {
    min-width: 180px;
    max-width: 210px;
  }

  .player__hotkeys {
    display: none;
  }

  .hero__floating-chip {
    left: 16px;
  }

  /* На телефоне поджимаем ещё сильнее, чтобы кнопка «Открыть приложение» была
     над сгибом — цель CTA «Начать»: прячем иконку, а список преимуществ
     переносим ПОД кнопки (карточка — flex-колонка, порядок меняем через order). */
  #versions {
    padding-top: 30px;
  }

  #versions .section__head {
    margin-bottom: 18px;
  }

  .version {
    padding: 14px 16px;
  }

  .version__icon {
    display: none;
  }

  .version__title {
    font-size: 18px;
    margin-bottom: 5px;
  }

  .version__text {
    font-size: 13.5px;
    margin-bottom: 10px;
  }

  .version .btn {
    padding: 10px 16px;
    font-size: 13.5px;
  }

  /* Кнопку — обратно ВНИЗ карточки: список над кнопкой (убрали order:10),
     а сама кнопка прижата книзу через .version .btn { margin-top:auto }. */
  .version__list {
    order: 0;
    margin: 12px 0 16px;
    gap: 6px;
  }

  .version__tag {
    margin-bottom: 8px;
  }

  /* Установка на телефон: карточки плотнее, CTA во всю ширину */
  .install {
    gap: 32px;
  }

  .install__cards {
    gap: 12px;
    margin: 22px 0 18px;
  }

  .install__content .btn--lg {
    width: 100%;
  }

  /* Аккордеон платформ (landing.js добавляет is-collapsible/is-open):
     инструкция «чужой» платформы свёрнута до заголовка — минус пол-экрана.
     «+» повторяет маркер FAQ, чтобы паттерн читался одинаково. */
  .install-card.is-collapsible .install-card__head {
    margin-bottom: 0;
    cursor: pointer;
  }

  .install-card.is-collapsible .install-card__head::after {
    content: "+";
    margin-left: auto;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-hover);
    color: var(--text-muted);
    font-size: 15px;
    transition: transform 0.25s ease;
  }

  .install-card.is-collapsible.is-open .install-card__head::after {
    transform: rotate(45deg);
  }

  .install-card.is-collapsible .install-steps {
    display: none;
    margin-top: 14px;
  }

  .install-card.is-collapsible.is-open .install-steps {
    display: grid;
  }

  /* JP News: меньше пустоты в мок-карточке, кнопка во всю ширину */
  .news-promo {
    padding: 24px 18px;
  }

  .news-card {
    max-width: none;
  }

  .news-card__jp {
    font-size: 17px;
    line-height: 1.9;
  }

  .news-promo__tags {
    gap: 6px;
    margin-bottom: 22px;
  }

  .news-promo__body .btn {
    width: 100%;
  }

  /* Финальный CTA и футер компактнее: страница уже длинная, финалу
     не нужен целый экран */
  .section--cta {
    padding-top: 12px;
  }

  .cta {
    padding: 40px 20px;
    border-radius: 22px;
  }

  .cta__text {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .cta .btn {
    width: 100%;
  }

  .footer {
    padding: 32px 0;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* ============================================================
   Внутренние страницы: webapp / companion / support / privacy
   ============================================================ */

/* --- Компактный hero внутренней страницы --- */

.page-hero {
  position: relative;
  padding: 160px 0 70px;
  overflow: hidden;
}

.page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 26px;
  transition: color 0.2s ease;
}

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

.back-link svg {
  width: 15px;
  height: 15px;
}

/* Внутренние страницы: «На главную» — отдельная «таблетка» на своей строке, с
   заметным отступом до кикера-заголовка (раньше они жались в одну строку и это
   выглядело костыльно). Всё скоупим под .page-hero — index.html не задет. */
.page-hero .back-link {
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 28px;
}

.page-hero .back-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* «Веб-приложение» и т.п. — самостоятельный кикер-заголовок на СВОЕЙ строке,
   крупнее обычного эйбрау и отодвинут от кнопки «назад». */
.page-hero__inner .section__eyebrow {
  display: block;
  font-size: 16px;
  letter-spacing: 0.16em;
  margin-bottom: 14px;
}

.page-hero__title {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.page-hero__lead {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 32px;
}

.page-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* --- Гид со скриншотами: текст + скрин, ряды чередуются --- */

.guide {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 72px;
}

.guide-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 52px;
  align-items: center;
}

.guide-row--flip .guide-row__media {
  order: -1;
}

.guide-row__num {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 12px;
}

.guide-row__title {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.guide-row__text {
  font-size: 15.5px;
  color: var(--text-muted);
}

.guide-row__text .kbd {
  margin: 0 2px;
}

/* Рамка вокруг скриншота */
.shot {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #12151d;
  padding: 10px;
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, 0.8), 0 0 60px -30px rgba(79, 70, 229, 0.3);
}

.shot img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 8px);
}

/* Широкая карточка без скриншота (например про повторение) */
.guide-note {
  padding: 30px 34px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.guide-note__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 140, 248, 0.16), rgba(79, 70, 229, 0.16));
  border: 1px solid rgba(124, 140, 248, 0.25);
}

.guide-note__icon svg {
  width: 22px;
  height: 22px;
  color: var(--pink);
}

.guide-note__title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.guide-note__text {
  font-size: 14.5px;
  color: var(--text-muted);
}

/* --- Установка на телефон / установка расширения: карточки с шагами --- */

.platforms {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.platform {
  padding: 32px 30px;
}

.platform__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.platform__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 140, 248, 0.14), rgba(79, 70, 229, 0.18));
  border: 1px solid rgba(79, 70, 229, 0.3);
}

.platform__icon svg {
  width: 22px;
  height: 22px;
  color: #c98cff;
}

.platform__title {
  font-size: 18px;
  font-weight: 700;
}

.steps-list {
  display: grid;
  gap: 14px;
  counter-reset: sl;
}

.steps-list li {
  position: relative;
  counter-increment: sl;
  padding-left: 40px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.steps-list li::before {
  content: counter(sl);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 140, 248, 0.2), rgba(79, 70, 229, 0.2));
  border: 1px solid rgba(124, 140, 248, 0.35);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.steps-list b {
  color: var(--text);
  font-weight: 600;
}

/* Примечание под карточками (например «работает офлайн») */
.section-note {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  font-size: 14px;
  color: var(--text-dim);
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.section-note svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--pink);
}

/* --- FAQ (страница поддержки) --- */

.faq {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  max-width: 820px;
}

.faq-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.faq-item summary:hover {
  color: #fff;
}

.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
  transform: rotate(-135deg);
}

.faq-item__body {
  padding: 0 24px 22px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.faq-item__body a {
  color: var(--pink);
  font-weight: 500;
}

.faq-item__body a:hover {
  text-decoration: underline;
}

/* Карточка «напиши нам» */
.contact-card {
  position: relative;
  z-index: 1;
  max-width: 820px;
  padding: 40px 36px;
  text-align: center;
}

.contact-card__title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.contact-card__text {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 24px;
}

/* --- Текстовые страницы (конфиденциальность) --- */

.prose {
  position: relative;
  z-index: 1;
  max-width: 760px;
  font-size: 15.5px;
  color: var(--text-muted);
}

.prose h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 42px 0 12px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  margin-bottom: 14px;
}

.prose ul {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.prose ul li {
  position: relative;
  padding-left: 24px;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad);
}

.prose a {
  color: var(--pink);
  font-weight: 500;
}

.prose a:hover {
  text-decoration: underline;
}

.prose__updated {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 34px;
}

/* --- Адаптивность внутренних страниц --- */

@media (max-width: 900px) {
  .guide-row {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  /* На одной колонке скрин всегда под текстом */
  .guide-row--flip .guide-row__media {
    order: 0;
  }

  .guide {
    gap: 56px;
  }
}

@media (max-width: 768px) {
  .platforms {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page-hero {
    padding: 130px 0 56px;
  }

  .page-hero__cta .btn {
    width: 100%;
  }

  .guide-note {
    flex-direction: column;
    padding: 26px 24px;
  }

  .contact-card {
    padding: 32px 22px;
  }
}

/* ================= Установка на телефон ================= */

.install {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.install__content .section__eyebrow,
.install__content .section__title,
.install__content .section__lead {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.install__content .section__title { margin-top: 6px; }
.install__content .section__lead { margin: 16px 0 0; max-width: 560px; }

.install__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0 22px;
}

.install-card {
  padding: 20px;
  border-radius: var(--radius-sm);
}

.install-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.install-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  flex-shrink: 0;
}
.install-card__badge svg { width: 18px; height: 18px; }

.install-card__title { font-weight: 700; font-size: 15px; }

.install-steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 12px;
}

.install-steps li {
  counter-increment: step;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.45;
}

.install-steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 140, 248, 0.9), rgba(79, 70, 229, 0.9));
}

.install__note {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 24px;
  max-width: 560px;
  line-height: 1.5;
}

/* --- Мокап телефона с иконкой Animei на домашнем экране --- */
.install__visual { display: flex; justify-content: center; }

.phone {
  position: relative;
  width: 260px;
  height: 520px;
  border-radius: 42px;
  padding: 12px;
  background: linear-gradient(160deg, #23283a, #12141d);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}

.phone__notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 26px;
  background: #0c0e15;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.phone__screen {
  position: relative;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  padding: 46px 20px 24px;
  background:
    radial-gradient(120% 80% at 25% 0%, rgba(79, 70, 229, 0.38), transparent 60%),
    radial-gradient(120% 80% at 85% 100%, rgba(124, 140, 248, 0.32), transparent 55%),
    linear-gradient(180deg, #171a24, #0d0f16);
}

.phone__time {
  display: block;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  margin-bottom: 28px;
}

.phone__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 14px;
}

.phone__app {
  aspect-ratio: 1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
}

.phone__app--animei {
  position: relative;
  background: none;
  overflow: visible;
  animation: appPulse 2.6s ease-in-out infinite;
}

.phone__app--animei img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  display: block;
  box-shadow: 0 10px 22px -6px rgba(79, 70, 229, 0.75), 0 0 0 3px rgba(255, 255, 255, 0.16);
}

.phone__app--animei em {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

@keyframes appPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@media (max-width: 900px) {
  /* Телефон-макет — крупная декорация. Когда секция схлопывается в одну колонку,
     он висит здоровенной «картинкой телефона» посреди лендинга — на узких экранах
     убираем, оставляем только текст и карточки установки (iPhone/Android). */
  .install { grid-template-columns: 1fr; gap: 40px; }
  .install__visual { display: none; }
}

@media (max-width: 560px) {
  .install__cards { grid-template-columns: 1fr; }
  .phone { width: 220px; height: 448px; }
}

/* ---------- Полоса доверия под хиро ---------- */

.trust {
  padding: 26px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

.trust__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 38px;
}

.trust__list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.trust__list svg {
  width: 16px;
  height: 16px;
  color: var(--pink);
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .trust {
    padding: 20px 0;
  }

  /* Центрированный flex-перенос давал случайную «россыпь» (2+1+1) —
     на телефоне аккуратный список с левым краем */
  .trust__list {
    display: grid;
    justify-content: start;
    gap: 10px;
  }

  .trust__list li {
    font-size: 14px;
    align-items: flex-start;
  }

  /* Галочка держится за первую строку, а не центр двухстрочного пункта */
  .trust__list svg {
    margin-top: 2px;
  }
}

/* ---------- FAQ ---------- */

/* Заголовок по центру над списком — список тоже центрирован (max-width ниже) */
.section--faq .section__head {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.faq {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq__item {
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

/* Открытый вопрос заметно выделяется: рамка, лёгкий градиентный фон и glow */
.faq__item[open] {
  border-color: rgba(124, 140, 248, 0.45);
  background: linear-gradient(180deg, rgba(124, 140, 248, 0.07), rgba(79, 70, 229, 0.03));
  box-shadow: 0 18px 50px -20px rgba(79, 70, 229, 0.45);
}

.faq__q {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 19px 22px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

/* Градиентный порядковый номер вопроса */
.faq__num {
  flex-shrink: 0;
  width: 30px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  opacity: 0.8;
}

/* убираем родной маркер details и рисуем свой «+» */
.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q::after {
  content: "+";
  flex-shrink: 0;
  margin-left: auto;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-hover);
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 500;
  transition: transform 0.25s ease, color 0.2s ease, background 0.2s ease;
}

.faq__item[open] .faq__q::after {
  transform: rotate(45deg);
  background: var(--grad);
  border-color: transparent;
  color: #fff;
}

/* Ответ выровнен под текстом вопроса, слева — градиентная черта на месте номера */
.faq__a {
  position: relative;
  padding: 0 22px 20px 70px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 640px;
}

.faq__a::before {
  content: "";
  position: absolute;
  left: 36px;
  top: 4px;
  bottom: 22px;
  width: 2px;
  border-radius: 2px;
  background: var(--grad);
  opacity: 0.6;
}

@media (max-width: 560px) {
  .faq__q {
    font-size: 15px;
    padding: 16px 18px;
    gap: 14px;
  }

  .faq__num {
    width: 24px;
    font-size: 13px;
  }

  .faq__a {
    padding: 0 18px 18px 56px;
    font-size: 14px;
  }

  .faq__a::before {
    left: 27px;
  }
}

/* ---------- Скрин плеера на первом экране webapp.html ---------- */

.page-hero__media {
  margin-top: 44px;
}

.page-hero__media .shot {
  max-width: 900px;
  margin: 0 auto;
}

.page-hero__media img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 560px) {
  .page-hero__media {
    margin-top: 30px;
  }
}
