/* ============================================================
   KinoMagic — «тёплый тёмный кинозал»
   Дизайн-система: База знаний 05-Дизайн-люксовые-авто.md
   ============================================================ */

:root {
  /* Поверхности */
  --bg: #141417;
  --card: #1c1c21;
  --elevated: #26262d;
  --hairline: #2e2e35;
  --hairline-strong: #3a3a42;

  /* Текст */
  --text: #f4f1ea;
  --text-2: #a8a49c;
  --text-3: #6f6c66;

  /* Акцент (редкий, как у Ferrari) */
  --accent: #e8b45a;
  --accent-dark: #b8863e;
  --accent-soft: rgba(232, 180, 90, 0.12);

  /* Типографика */
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-ui: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Ритм — 8px сетка */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-6: 48px;
  --sp-8: 64px;
  --sp-12: 96px;

  --container: 1200px;
  --radius-chip: 9999px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg); /* тёмная база — на html, чтобы не закрывала слой радуги */
}

body {
  background: transparent;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* 03.11: overflow-x:hidden убран (прятал переполнение 375px: scrollWidth 379 вместо 496 —
     «0 переполнения» было ложкой). Кольцо 3D обрезаем точечно: .mood-scene { overflow:hidden }. */
}

/* Радужный фон — отдельный слой под всем (чтобы его можно было «приглушить») */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 750px at 12% -8%, rgba(255, 72, 96, 0.32), transparent 62%),
    radial-gradient(1000px 700px at 42% -12%, rgba(255, 168, 64, 0.28), transparent 60%),
    radial-gradient(950px 650px at 72% -8%, rgba(120, 210, 90, 0.22), transparent 58%),
    radial-gradient(1100px 750px at 96% 6%, rgba(80, 140, 255, 0.30), transparent 62%),
    radial-gradient(900px 650px at 104% 55%, rgba(150, 90, 255, 0.26), transparent 60%),
    radial-gradient(900px 650px at -6% 60%, rgba(255, 90, 200, 0.24), transparent 58%),
    radial-gradient(1000px 700px at 45% 112%, rgba(60, 210, 220, 0.22), transparent 60%);
  transition: filter 0.6s ease;
}

/* «В зале гаснет свет»: открыт фильм — радуга засыпает, живой остаётся экран */
body.hall-dim::before {
  filter: saturate(0.3) brightness(0.5);
}

/* Медленное «дыхание» радуги — один wow-момент фона */
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: bg-breathe 24s ease-in-out infinite alternate; }
  @keyframes bg-breathe {
    from { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
    to   { background-position: 4% 6%, -5% 4%, 6% 5%, -4% 7%, 5% -5%, -6% -4%, 4% -6%; }
  }
}

::selection { background: var(--accent); color: #141417; }

/* ── Плёночное зерно (единственная текстура) ── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Навигация + панель чувств: плоские, прозрачные, липкие ── */
.topwrap {
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-3);
  background: rgba(20, 20, 23, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.feelbar {
  display: flex;
  gap: 6px;
  padding: 8px var(--sp-3) 10px;
  background: rgba(20, 20, 23, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.feelcell {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 4px;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: 10px;
}
.feelcell__icon { font-size: 16px; line-height: 1; }
.feelcell__label { font-size: 10px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.feelcell__count { font-size: 9px; color: var(--text-3); }
.feelcell:hover { border-color: var(--text-2); color: var(--text); }
.feelcell.is-active, .feelcell.is-open { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }

/* 26.10 UX: подсказки для путей в панели чувств */
.feelbar-hint {
  min-height: 16px;
  margin: 2px var(--sp-3) 0;
  font-size: 11px;
  line-height: 1.2;
  color: var(--text-2);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feelbar-hint[hidden] { display: none; }

@media (hover: hover) and (pointer: fine) {
  .feelcell { position: relative; }
  .feelcell::after {
    content: attr(data-tip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 6px;
    background: #17171b;
    color: var(--text);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 10px;
    line-height: 1.35;
    white-space: normal;
    width: max-content;
    max-width: 190px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
    z-index: 400;
  }
  .feelcell:hover::after,
  .feelcell:focus-visible::after { opacity: 1; }
  /* 29.10: подсказка у ПРАВОГО КРАЯ панели не должна выталкивать страницу вправо
     (скрытый opacity:0-тултип всё равно считался в scrollWidth → 390px → 429px). */
  .feelbar > .feelcell:last-child::after { left: auto; right: 0; transform: none; }
}

#feelbar-sheet { position: fixed; inset: 0; z-index: 300; }
#feelbar-sheet[hidden] { display: none; }
.sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.sheet-overlay.is-open { opacity: 1; }
.sheet {
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--hairline-strong);
  padding: 14px var(--sp-3) calc(14px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.2s ease;
}
.sheet-overlay.is-open .sheet { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .sheet-overlay, .sheet { transition: none; }
}
.sheet__all {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.sheet__group { margin-bottom: 12px; }
.sheet__group-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin: 0 0 6px; }
.sheet__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet__chip { height: 34px; padding: 0 14px; font-size: 12.5px; }

.nav__brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}
.nav__brand span { color: var(--accent); }

.nav__links { display: flex; gap: var(--sp-3); }
.nav__links a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav__links a:hover { color: var(--text); border-color: var(--accent); }
/* «Наверх / На главную» (29.10, просьба Бориса): домик-эмодзи был «точкой» и плохо
   читался слабовидящим — теперь слово, стилистика как у остальных ссылок навигации.
   31.10: слово на главной стало «← На главную» (просьба Бориса) — длиннее «НАВЕРХ»,
   в 390px не влезало (переполнение 406px) → на моб. сжимаем letter-spacing (0.1em→0.02em)
   и gap (12px→8px): при 390px запас, 375px тоже влезает,
   слово остаётся читаемым (10px/600). */

/* Мобильный: навигация в одну строку (без переноса «НА ГЛАВНУЮ») */
@media (max-width: 560px) {
  /* 27.11 v137 (Борис): две строки —.brand сверху, строка «Лента/Барабан + Каталог + На главную»
     снизу: подписи переключателя ВИДНЫ и тап-таргет ≥ 44px (одна строка с подписями
     не влезала: переполнение 468px на 390). */
  .nav { flex-wrap: wrap; row-gap: 6px; padding: 10px 16px; }
  .nav__links { flex: 1 1 100%; justify-content: space-between; gap: 8px; }
  .nav__brand { font-size: 16px; }
  .nav__links a { font-size: 10px; letter-spacing: 0.02em; white-space: nowrap; }
  /* 05.11 (Задача 2): прячем самый длинный и наименее критичный пункт «Как это работает»
     (in-page якорь на #how, секция видна по скроллу). */
  .nav__links a[href="#how"] { display: none; }
  /* 27.11 v137 (Борис): «Лента/Барабан» на мобиле — подписи ВИДНЫ (короткие слова влезают)
     + тап-таргет ≥ 44px. Старое правило 08.11 (спрятать подписи) отменено для ≥380px:
     на ≤379px возврат к иконкам, но с увеличенным padding. */
  .styletoggle__btn { padding: 9px 10px; min-height: 44px; font-size: 12px; }
  .styletoggle__btn .stl-ico { font-size: 16px; }
  .styletoggle__btn .stl-label { display: inline; }
}

@media (max-width: 379px) {
  .styletoggle__btn .stl-label { display: none; }
  .styletoggle__btn { padding: 10px 11px; }
}

/* ── Кнопки ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 var(--sp-4);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn--primary {
  background: var(--accent);
  color: #141417;
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #141417; }
.btn--ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--hairline-strong);
}
.btn--ghost:hover { color: var(--text); border-color: var(--text-2); }
.btn[disabled] { opacity: 0.35; pointer-events: none; }

/* ── HERO ── */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* 07.11: верх сжат — кольцо должно попасть в первый экран без скролла */
  padding: var(--sp-4) var(--sp-3) var(--sp-4);
  max-width: 1100px;
  margin: 0 auto;
}
.hero__kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
  /* 26.10 U2: ряд «текст + таблетка скина» (переключатель в hero) */
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-3);
}
.hero__title em { font-style: italic; color: var(--accent); }
.hero__sub {
  font-size: 18px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: var(--sp-4);
}
.hero__stats {
  display: flex;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--hairline);
}
.hero__stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
}
.hero__stat span { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }

/* 31.10 (Борис: «должен быть главный 1й титульник»): главная открывается ТИТУЛЬНИКОМ
   (название + суть + цифры); подбор («Как вы сейчас?» + мордочки) — блоком ниже. */
.hero__title span { color: var(--accent); }
.hero.hero--ask { min-height: 0; justify-content: flex-start; padding: var(--sp-2) var(--sp-3) var(--sp-8); }
.ask__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-1);
}
.ask__sub { font-size: 16px; color: var(--text-2); margin-bottom: var(--sp-2); }
.ask__pills {
  position: relative; /* якорь для поповера скинов (.skinpop right:0) */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--sp-4);
}

/* ── HERO: сетка мордочек (решение 25.10 ВЕЧЕР; пилот — 6 фото + 5 плейсхолдеров) ── */
.faces {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-2);
  margin-top: var(--sp-6);
}
@media (max-width: 900px) { .faces { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .faces { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
.face {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: var(--tint);
  isolation: isolate;
}
.face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.92) contrast(1.03);
  transition: transform .35s ease;
}
.face:hover img { transform: scale(1.06); transition: transform .2s ease; }
.face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,9,11,.86) 8%, rgba(8,9,11,.28) 42%, rgba(8,9,11,0) 68%);
  z-index: 1;
  pointer-events: none;
}
.face__cap {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  z-index: 2;
  font-family: var(--font-ui);
  font-size: 11.5px;
  line-height: 1.22;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
/* 12.11 (ГигаЧат v2): бейдж «Персонаж дня» */
.face__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  background: rgba(255, 193, 7, .92);
  color: #1a1a2e;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.face--ph {
  background: linear-gradient(150deg, var(--tint), #0e0f12 92%);
}
.face--ph .face__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 30px;
  opacity: .55;
}
.face.is-on { box-shadow: 0 0 0 2px var(--accent); }
.face:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── 3D-кольцо «тарелка» (01.11, по опорнику) — цилиндр, вид сверху (perspective + rotateX) ── */
/* Позиция кадров задаётся JS (layout): track = translateZ(-R) rotateX(-22°) rotateY(α),
   каждая карточка = rotateY(i·360/N) translateZ(R). CSS — статика: сцена, карточки, навигация. */
.mood-scene {
  position: relative;
  height: 472px;
  width: 100%;
  margin: -34px auto 4px;
  perspective: 1500px;
  perspective-origin: 50% 43%;
  touch-action: pan-y; /* 01.11: вертикаль — браузер нативно; горизонт — JS (pointer events) */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden; /* 03.11: бока 3D-кольца (R ~423px) шире вьюпорта 375/390 — обрезаем, а не давим scrollWidth */
}
.mood-scene.is-dragging, .mood-scene.is-dragging .face { cursor: grabbing; }
.mood-track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.mood-scene .face {
  position: absolute;
  top: 50%; left: 50%;
  width: 200px; height: 250px;
  margin: -125px 0 0 -100px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 19px;
  overflow: hidden;
  background: #252529;
  opacity: 1;
  backface-visibility: visible; /* 01.11 (Hermes): как у опорника — дальняя дуга видна, и есть эффект «тарелки» */
  -webkit-backface-visibility: visible;
  transform-style: flat;
  transition: filter .25s, border-color .25s;
  filter: brightness(.65);
  box-shadow: 0 14px 28px rgba(0,0,0,.5);
  cursor: grab;
}
.mood-scene .face.is-current {
  filter: brightness(1);
  border-color: color-mix(in srgb, var(--mood-accent, #d9ef9a) 60%, transparent);
  box-shadow: 0 20px 48px rgba(0,0,0,.5);
}
/* 10.11 (ГигаЧат v1): hover на мордочках — деликатный glow, transform не трогаем (3D-позиция inline) */
.mood-scene .face:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--mood-accent, #d9ef9a) 45%, transparent), 0 20px 44px rgba(0,0,0,.55);
}
.ask__tried {
  margin-top: 6px;
  font-size: 12.5px;
  letter-spacing: .01em;
  color: var(--muted, #9a9aa4);
  text-align: center;
}
.ask__portrait {
  margin-top: 4px;
  font-size: 12.5px;
  letter-spacing: .01em;
  color: var(--muted, #9a9aa4);
  text-align: center;
}
.ask__viewed {
  margin-top: 4px;
  font-size: 12.5px;
  letter-spacing: .01em;
  color: var(--muted, #9a9aa4);
  text-align: center;
}
/* 04.11 (Задача 1в): стиль персонажа под настроение — мягкие CSS-фильтры на img по neg/valence/arousal.
   Деликатные значения, чтобы не «кислотило» в тёмной теме; фон/карточку не трогаем. */
.mood-scene .face[data-mood-cat="sad"] img       { filter: saturate(.55) brightness(1.04) hue-rotate(-8deg) contrast(.94); }
.mood-scene .face[data-mood-cat="tense"] img     { filter: saturate(.82) contrast(1.1) hue-rotate(12deg); }
.mood-scene .face[data-mood-cat="angry"] img     { filter: saturate(1.3) contrast(1.08) hue-rotate(-15deg); }
.mood-scene .face[data-mood-cat="flat"] img      { filter: saturate(.55) contrast(.92); }
.mood-scene .face[data-mood-cat="warm"] img      { filter: saturate(1.08) brightness(1.06); }
.mood-scene .face[data-mood-cat="energetic"] img { filter: saturate(1.28) brightness(1.08) contrast(1.05); }
/* 05.11 (Задача 1а): «зацепилось» — выбранный кадр вспыхивает и «вылетает вперёд».
   Glow цветом эмоции (--tint), scale 1.05, 200ms ease-out вперёд + плавный возврат.
   reduced-motion: только подсветка (без scale). */
.mood-scene .face.is-picking {
  border-color: var(--tint, #d9ef9a);
  animation: kmPickGlow .5s cubic-bezier(.2,.75,.2,1);
}
.mood-scene .face.is-picking img { animation: kmPickScale .5s cubic-bezier(.2,.75,.2,1); }
@keyframes kmPickGlow {
  0%   { box-shadow: 0 14px 28px rgba(0,0,0,.5); filter: brightness(1); }
  40%  { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tint, #d9ef9a) 50%, transparent), 0 18px 44px rgba(0,0,0,.55); filter: brightness(1.12); }
  100% { box-shadow: 0 20px 48px rgba(0,0,0,.5); filter: brightness(1); }
}
@keyframes kmPickScale {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .mood-scene .face.is-picking img { animation: none; }
}
.mood-scene .face img {
  /* 01.11: absolute (как в опорнике) — в обычном потоке img с transform на задней грани
     не композитится (тонет под непространственным фоном карточки). */
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  z-index: 1;
}
.mood-scene .face .face__cap {
  position: absolute;
  left: 10px; right: 10px; bottom: 18px;
  z-index: 2;
  font-size: 17px;
  line-height: 1.2;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,.8);
}
.mood-scene .face.face--ph {
  display: grid;
  place-items: center;
  font-size: 90px;
}
/* 01.11 (по опорнику): обе стороны кольца видны (вид сверху открывает дальнюю дугу);
   задняя половина — is-rear: img/подпись зеркалятся, чтобы текст читался. */
.mood-scene .face { backface-visibility: visible; -webkit-backface-visibility: visible; }
.mood-scene .face.is-rear img { transform: scaleX(-1); }
.mood-scene .face.is-rear .face__cap { transform: scaleX(-1); }
.mood-scene .face.is-rear .face__badge { transform: scaleX(-1); }
.mood-scene:after {
  /* мягкая «тень тарелки» под кольцом */
  content: '';
  position: absolute;
  width: 65%; height: 38px;
  left: 17.5%; bottom: 5px;
  background: rgba(0,0,0,.45);
  border-radius: 50%;
  filter: blur(18px);
  pointer-events: none;
  z-index: -1;
}
/* Навигация: стрелки + счётчик */
.mood-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin: 2px 0 14px;
}
.mood-arrow {
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  width: 44px; height: 44px;
  color: #eee;
  font-size: 20px;
  cursor: pointer;
}
.mood-arrow:disabled { opacity: .25; cursor: default; }
.mood-counter {
  color: #aeadb5;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .15em;
}
.mood-confirm-wrap { display: flex; justify-content: center; margin-top: 2px; } /* 03.11: CTA по центру (было смещено влево) */
.mood-hint {
  color: #b9b8c0;
  min-height: 24px;
  margin: 0 22px 18px;
  font-size: 14px;
  text-align: center;
}
/* 01.11: выбор состояния — кнопкой (тап по карточке = только доворот) */
.mood-confirm {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  padding: 16px 30px;
  border: 0;
  border-radius: 100px;
  background: var(--mood-accent, #d9ef9a);
  color: #20251a;
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
}
.mood-confirm:hover { filter: brightness(1.08); }
/* 24.11 (задача 13): подсветка «Это про меня» после тапа по карточке кольца — ведём на следующий шаг */
@keyframes mood-confirm-pulse { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 14px rgba(217, 239, 154, 0.4); } }
.mood-confirm.is-attention { animation: mood-confirm-pulse 1.3s ease-in-out 2; }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  @keyframes mood-confirm-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
    50% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--mood-accent, #d9ef9a) 45%, transparent); }
  }
}
.mood-footnote {
  font-size: 12px;
  color: #777680;
  margin: 14px 20px 0;
  text-align: center;
}
.mood-scene .face:focus-visible, .mood-arrow:focus-visible, .mood-confirm:focus-visible {
  outline: 3px solid var(--mood-accent, #d9ef9a);
  outline-offset: 4px;
}
/* Акцент по фации персонажа: добрые — салатовый, антагонисты — фиолетовый */
body[data-character-tone="antagonist"] { --mood-accent: #e0b7fa; }
body[data-character-tone="antagonist"] .mood-scene .face { background: #302139; }
body[data-character-tone="antagonist"] .mood-scene .face.is-current { border-color: rgba(224,183,250,.7); }
body[data-character-tone="mixed"] { --mood-accent: #d9ef9a; }

/* Панели персонажей по бокам кольца (десктоп) */
.character-stage {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr) 138px;
  grid-template-areas: 'positive ring antagonist';
  align-items: center;
  gap: 20px;
  width: calc(100% - 48px);
  max-width: 1440px;
  margin: 20px auto 0;
}
.character-stage #faces { grid-area: ring; max-width: none; min-width: 0; }
/* 01.11 (Hermes): старый .faces = grid 6 колонок — сжимал .mood-scene до ~1/6 ширины; в кольце — блок */
.character-stage #faces { display: block; margin-top: 0; }
.character-panel--positive { grid-area: positive; }
.character-panel--antagonist { grid-area: antagonist; }
.character-panel {
  align-self: start;
  margin-top: 125px;
}
.character-panel__title {
  color: var(--mood-accent, #d9ef9a);
  text-transform: uppercase;
  letter-spacing: .13em;
  font: 600 10px/1.5 var(--font-ui, system-ui);
  margin: 0 0 13px;
}
.character-panel--antagonist .character-panel__title { color: #ddbaef; }
.character-panel .character-choices {
  display: grid;
  grid-template-columns: repeat(2, 56px);
  gap: 7px;
  justify-content: center;
  width: auto;
  max-width: none;
  padding: 8px;
  border-radius: 26px;
  background: rgba(18,19,23,.6);
}
.character-panel .character-choice {
  width: 56px; height: 56px;
  box-sizing: border-box;
  justify-content: center;
  padding: 6px;
  gap: 0;
  border-radius: 50%;
}
.character-panel .character-thumb { width: 42px; height: 42px; }

/* Выбор персонажа (общее): круглая карточка с превью */
.character-choices {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 36px;
  background: rgba(20,20,23,.5);
}
.character-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 50%;
  padding: 4px;
  cursor: pointer;
}
.character-choice[aria-pressed="true"] {
  background: rgba(217,239,154,.1);
  border-color: rgba(217,239,154,.35);
}
.character-panel--antagonist .character-choice[aria-pressed="true"] {
  background: rgba(211,163,238,.15);
  border-color: rgba(211,163,238,.6);
}
.character-thumb {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Мобайл: панели — рядами над кольцом */
@media (max-width: 860px) {
  .character-stage {
    grid-template-columns: 1fr;
    /* 04.11: кольцо первым в первом экране, панели персонажей — под ним */
    grid-template-areas: 'ring' 'positive' 'antagonist';
    gap: 14px;
  }
  .character-panel { margin-top: 0; }
  /* 03.11: фикс repeat(6,48px)=313px ломал мин-контент grid-колонки на 375px (переполнение 4px);
     flex-wrap — ряд ужимается/переносится, колонка возвращается к 1fr, кольца влезает. */
  .character-panel .character-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    width: 100%;
  }
  .character-panel .character-choice { width: 48px; height: 48px; flex: none; }
  .character-panel .character-thumb { width: 36px; height: 36px; }
  .character-panel__title { text-align: center; margin-bottom: 8px; }
}
/* 20.11 (Борис: «на телефоне Лента очень БОЛЬШАЯ, телефоны бывают разные, портрет и горизонталь»):
   размер карточки — proportional к экрану: --face-w = min(30vw, 30dvh) в пределах 104–190px.
   В портрете лимитирует ширина (30vw), в ландшафте — высота (30dvh); радиус кольца
   пересчитывает сам JS по фактической ширине карточки (layout()).
   Блок срабатывает и на коротких окнах (max-height) — лента не превышает видимую высоту. */
@media (max-width: 860px), (max-height: 520px) {
  /* 08.11/20.11: заголовки скрыты — кольцо видно сразу (портрет + короткий горизонт) */
  .hero__title, .hero__sub, .ask__sub { display: none; }
  .hero--ask { padding-top: var(--sp-2); }
  .ask__title { font-size: 28px; margin-bottom: 8px; }
  .mood-scene {
    --face-w: clamp(104px, min(30vw, 30dvh), 190px);
    height: calc(var(--face-w) * 2.58);
    perspective: calc(var(--face-w) * 6.05);
    margin-top: -14px;
  }
  /* 08.11: мягкое затухание по краям — 3D-кольцо «уходит» за левый/правый край, а не режется жёстко */
  .mood-scene::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      linear-gradient(to right, rgba(24,18,30,.9) 0%, rgba(24,18,30,0) 13%),
      linear-gradient(to left,  rgba(24,18,30,.9) 0%, rgba(24,18,30,0) 13%);
    pointer-events: none;
    z-index: 8;
  }
  .mood-scene .face {
    width: var(--face-w);
    height: calc(var(--face-w) * 1.2895);
    margin: calc(var(--face-w) * -0.64475) 0 0 calc(var(--face-w) * -0.5);
    border-radius: 15px;
  }
  .mood-scene .face .face__cap { font-size: clamp(13px, 3.6vw, 15px); bottom: 10px; left: 6px; right: 6px; }
  .mood-scene .face.face--ph { font-size: calc(var(--face-w) * 0.45); }
}
/* 20.11: телефон в ландшафте (короткое окно) — компактный стек, чтобы Лента видна на первом экране:
   титульный блок и подсказка «Как вы сейчас?»/пилюли — за ленту (портрет не тронут);
   feelbar без счётчиков; кольцо чуть меньше (26dvh). */
@media (max-height: 520px) {
  .hero:not(.hero--ask) { display: none; }
  .ask__title, .ask__pills { display: none; }
  .feelbar { padding: 5px var(--sp-3) 6px; }
  .feelcell { padding: 4px; }
  .feelcell__count { display: none; }
  .mood-scene { --face-w: clamp(104px, min(30vw, 26dvh), 190px); }
}
@media (prefers-reduced-motion: reduce) {
  .mood-scene { cursor: default; }
  .mood-scene .face { transition: none; }
}

/* ── Секции ── */
.finder, .results, .how, .catalog {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-3);
}
@media (min-width: 768px) {
  .finder, .results, .how, .catalog { padding-top: var(--sp-12); padding-bottom: var(--sp-12); }
}

/* 16.11 (волна «МОЁ»): лента «Просто включить» — знакомые фильмы (флаг rewatch) */
.rewatch {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-3) var(--sp-2);
}
.rewatch[hidden] { display: none; }
.rewatch__head {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 var(--sp-1);
}
.rewatch__sub {
  font-size: 14px;
  color: var(--text-2);
  margin: 0 0 var(--sp-2);
}
.rewatch__row {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding-bottom: var(--sp-1);
  scrollbar-width: thin;
  scrollbar-color: var(--hairline-strong) transparent;
}
.rewatch__card {
  flex: 0 0 132px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-1);
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  text-align: left;
  transition: border-color .15s ease, transform .15s ease;
}
.rewatch__card:hover { border-color: var(--accent); transform: translateY(-2px); }
.rewatch__card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rewatch__poster {
  display: block;
  width: 112px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a20;
}
.rewatch__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rewatch__poster .poster-fallback { width: 100%; height: 100%; }
.rewatch__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rewatch__meta { font-size: 11px; color: var(--text-3); }
@media (max-width: 560px) {
  .rewatch__card { flex-basis: 116px; padding: 8px; }
  .rewatch__poster { width: 100px; }
}

/* ── Шаги подбора ── */
.step {
  border: 1px solid var(--hairline);
  background: var(--card);
  padding: var(--sp-4);
  margin-bottom: var(--sp-2);
  scroll-margin-top: 120px; /* 26.10: липкая шапка (nav+feelbar) не закрывает заголовок шага при авто-скролле */
  transition: opacity 0.3s, border-color 0.3s;
}
.step--hidden { display: none; }
.step__head { display: flex; gap: var(--sp-2); align-items: flex-start; margin-bottom: var(--sp-3); }
.step__num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  padding-top: 4px;
}
.step__title { font-size: 20px; font-weight: 600; }
.step__title small { font-size: 12px; font-weight: 500; color: var(--text-3); text-transform: none; letter-spacing: 0; }
.step__sub { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.step__actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  flex-wrap: wrap;
}

/* ── Чипы-выбора ── */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 var(--sp-2);
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-chip);
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.chip:hover { border-color: var(--text-2); color: var(--text); }
.chip.is-active { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }

/* 27.11: «Удиви меня» — кнопка «🎲 Ещё» в модалке (акцент: игровое действие, не фильтр) */
.modal__section--surprise { margin-top: 14px; }
#btn-surprise-again { cursor: pointer; background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
#btn-surprise-again:hover { background: var(--accent); border-color: var(--accent); color: #1a1408; }
.chip__emoji { font-size: 16px; line-height: 1; }
.chip__hint { display: block; font-size: 11px; color: var(--text-3); font-weight: 400; }

.chips--goals .chip { height: auto; min-height: 56px; padding: 10px var(--sp-2); flex-direction: column; align-items: flex-start; border-radius: 0; }
.chips--goals .chip__label { font-size: 14px; }
.chips--goals .chip__goalsub { font-size: 11px; color: var(--text-3); font-weight: 400; }

.chips--small .chip { height: 38px; font-size: 13px; }

.context-row { margin-bottom: var(--sp-2); }

/* 26.10 U3: фильтр доверия «без потери близких и без жестокости» (v17: height auto — на 390 подпись в 2 строки без подрезки) */
.trigcheck {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: auto;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-chip);
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.trigcheck:hover { border-color: var(--text-2); color: var(--text); }
.trigcheck:has(input:checked) { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.trigcheck input { accent-color: var(--accent); margin: 0; width: 16px; height: 16px; }
.trigcheck__hint { display: block; font-size: 11px; color: var(--text-3); margin-top: 4px; }
/* 27.10 Единица 4: подпись, что время подставлено по часам телефона */
.timehint { display: block; font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* Подсветка «заполните этот шаг» */
.step--flash { animation: step-flash 0.9s ease; }
@keyframes step-flash {
  0%, 100% { border-color: var(--hairline); }
  30%, 60% { border-color: var(--accent); }
}

/* ── Ветки ── */
.branches { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
@media (max-width: 560px) { .branches { grid-template-columns: 1fr; } }
.branch {
  text-align: left;
  padding: var(--sp-3);
  background: var(--elevated);
  border: 1px solid var(--hairline);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.branch:hover { border-color: var(--text-2); }
.branch.is-active { border-color: var(--accent); background: var(--accent-soft); }
.branch__emoji { font-size: 24px; display: block; margin-bottom: var(--sp-1); }
.branch__label { font-size: 16px; font-weight: 600; margin-bottom: 4px; display: block; } /* 27.10: блок — label и desc не склеивались в одну строку («отдохнутьГолова») */
.branch__desc { font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* ── Результаты ── */
.results { border-top: 1px solid var(--hairline); }
.results__head { margin-bottom: var(--sp-4); }
.results__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  margin-bottom: var(--sp-1);
}
.results__path {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.results__path b { color: var(--accent); font-weight: 600; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s, opacity 0.25s;
  opacity: 0;
  transform: translateY(10px);
  animation: card-in 0.4s forwards;
}
.card:hover { border-color: var(--accent); }
.card:hover .card__title { color: var(--accent); }

@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

.card__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  /* U7-1 (27.10, е): мягкая заглушка под постер — первый кадр каталога не пустые
     прямоугольники, а тёплый тёмный градиент (палитра как у .poster-fallback).
     Фон рисуется под <img>: картинка загрузилась — заглушка закрыта. */
  background:
    radial-gradient(120% 90% at 80% 10%, rgba(232, 180, 90, 0.08) 0%, transparent 55%),
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(244, 241, 234, 0.02) 14px 15px),
    linear-gradient(160deg, #232329 0%, #17171b 100%);
}
.card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s, filter 0.8s;
  filter: grayscale(100%) brightness(0.92);
}
.card:hover .card__poster img { filter: grayscale(0%) brightness(1); transform: scale(1.03); }
.card--develop .card__poster img { animation: develop 0.7s ease-out forwards; }
@keyframes develop {
  from { filter: grayscale(100%) brightness(0.9); }
  to { filter: grayscale(0%) brightness(1); }
}

/* Типографический постер (нет изображения) */
.poster-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-3);
  background:
    radial-gradient(120% 90% at 80% 10%, rgba(232, 180, 90, 0.10) 0%, transparent 55%),
    linear-gradient(160deg, #232329 0%, #17171b 100%);
}
.poster-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(244, 241, 234, 0.025) 14px 15px);
}
.poster-fallback__year {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-3);
  text-transform: uppercase;
}
.poster-fallback__title {
  position: relative;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}

.card__rating {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  z-index: 2;
  min-width: 34px;
  height: 24px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 23, 0.82);
  border: 1px solid var(--hairline-strong);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.card__body { padding: var(--sp-2) var(--sp-2) var(--sp-3); }
.card__title { font-size: 16px; font-weight: 600; line-height: 1.3; transition: color 0.2s; }
.card__meta { font-size: 12px; color: var(--text-3); margin: 4px 0 var(--sp-1); letter-spacing: 0.02em; }
.card__why { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.card__why b { color: var(--accent); font-weight: 600; }
.card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-1); }
/* 27.11 v134 (юнит C): «Не показывай» — кнопка на карточке результата и в модалке */
.card__no-row { margin-top: var(--sp-2); }
.card__no {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-chip);
  padding: 4px 11px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.card__no:hover {
  color: var(--text);
  border-color: var(--hairline-strong);
}
.tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-chip);
  padding: 3px 9px;
}

.results__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  flex-wrap: wrap;
}
.results__count { font-size: 13px; color: var(--accent); font-weight: 500; }
.results__note { font-size: 13px; color: var(--text-3); }
.results__viewed { font-size: 13px; color: var(--text-3); }
.card__watched {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-3, #8b8b96);
  border: 1px solid color-mix(in srgb, var(--text-3, #8b8b96) 40%, transparent);
  border-radius: 999px;
  vertical-align: middle;
}

/* ── Aftermath ── */
.aftermath {
  margin-top: var(--sp-6);
  padding: var(--sp-4);
  border: 1px solid var(--hairline);
  background: var(--card);
}
.aftermath__q { font-family: var(--font-display); font-size: 20px; font-weight: 500; margin-bottom: var(--sp-2); }
.aftermath__chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.aftermath__thanks { margin-top: var(--sp-2); font-size: 13px; color: var(--accent); }

/* ── How ── */
.how { border-top: 1px solid var(--hairline); }
.how__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  margin-bottom: var(--sp-6);
}
.how__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
@media (max-width: 760px) { .how__grid { grid-template-columns: 1fr; } }
.how__card {
  border: 1px solid var(--hairline);
  background: var(--card);
  padding: var(--sp-4);
}
.how__num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.how__card h3 { font-size: 18px; font-weight: 600; margin: var(--sp-1) 0; }
.how__card p { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.how__card b { color: var(--text); font-weight: 600; }

/* ── Каталог ── */
.catalog { border-top: 1px solid var(--hairline); }
.catalog--page { border-top: none; }
.catalog__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.catalog__title { font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); font-weight: 500; }
.catalog__filter { display: flex; flex-wrap: wrap; gap: 6px; max-width: 640px; }
.catalog__search { width: 100%; max-width: 440px; margin: 0 0 var(--sp-3); padding: 10px 14px; font-family: var(--font-ui); font-size: 14px; color: var(--text); background: var(--card); border: 1px solid var(--hairline); border-radius: 10px; outline: none; transition: border-color .2s ease; }
.catalog__search:focus { border-color: var(--accent); }
.catalog__search::placeholder { color: var(--text-3); }
.catalog__search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.catalog__count { font-size: 13px; color: var(--text-3); margin-bottom: var(--sp-3); }
.catalog__empty { grid-column: 1 / -1; padding: var(--sp-6) 0; text-align: center; color: var(--text-3); font-size: 14px; }
.catalog__empty-reset { margin-left: var(--sp-1); background: none; border: none; color: var(--accent); font: inherit; cursor: pointer; }
.catalog__empty-reset:hover { text-decoration: underline; }
.catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--sp-2);
}
.catalog__item { cursor: pointer; border: 1px solid var(--hairline); background: var(--card); transition: border-color 0.2s; }
.catalog__item:hover { border-color: var(--accent); }
.catalog__item:hover .card__poster img { filter: grayscale(0%) brightness(1); transform: scale(1.03); }
.catalog__item .card__poster { border-radius: 0; }
.catalog__item .card__body { padding: var(--sp-1) var(--sp-1) var(--sp-2); }
.catalog__item .card__title { font-size: 13px; }
.catalog__item .card__meta { margin-bottom: 0; }

/* ── Футер (26.10): компактный — бренд + строка + контакт + сворачиваемые блоки ── */
.footer { border-top: 1px solid var(--hairline); padding: var(--sp-3) var(--sp-3) var(--sp-4); }
.footer__inner { max-width: var(--container); margin: 0 auto; display: flex; flex-direction: column; gap: var(--sp-1); }
.footer__brand { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.footer__brand span { color: var(--accent); }
.footer__note { font-size: 12px; color: var(--text-3); line-height: 1.45; }
.footer__contact { font-size: .74rem; color: var(--text-3); line-height: 1.4; }
.footer__contact a { color: var(--text-2); }
.footer__contact a:hover { color: var(--accent); }
/* v104 (18.11): «Аналитика: изменить выбор» (вердикт Гермес 1.3) */
.footer__analytics { font-size: .74rem; color: var(--text-3); line-height: 1.4; }
.footer__analytics a { color: var(--text-2); }
.footer__analytics a:hover { color: var(--accent); }
/* Сворачиваемые блоки: «Юридическая информация» / «Источники фото» */
.footer__acc { display: flex; flex-direction: column; gap: var(--sp-1); margin-top: var(--sp-1); }
.footer__acc-item { border: 1px solid var(--hairline); border-radius: 10px; }
.footer__acc-item summary {
  cursor: pointer; list-style: none; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  padding: 8px 12px; font-size: 12px; color: var(--text-2);
}
.footer__acc-item summary::-webkit-details-marker { display: none; }
.footer__acc-item summary::after { content: '⌄'; font-size: 15px; line-height: 1; color: var(--text-3); transition: transform .15s ease; }
.footer__acc-item[open] summary { border-bottom: 1px solid var(--hairline); }
.footer__acc-item[open] summary::after { transform: rotate(180deg); }
.footer__acc-body { padding: 8px 12px 10px; }
.footer__acc-body p { margin: 3px 0; font-size: 11.5px; color: var(--text-3); line-height: 1.45; }
.footer__acc-body p.footer__credits-group { margin-top: 8px; font-weight: 600; color: var(--text-2); }
.footer__credits a { color: var(--text-2); white-space: nowrap; }
.footer__credits a:hover { color: var(--accent); }
@media (min-width: 640px) {
  .footer__acc { flex-direction: row; align-items: stretch; }
  .footer__acc-item { flex: 1; }
}

/* ── Модалка ── */
.modal { position: fixed; inset: 0; z-index: 300; display: flex; padding: var(--sp-2); overflow-y: auto; }
.modal[hidden] { display: none; }
.modal__backdrop { position: fixed; inset: 0; background: rgba(8, 8, 10, 0.72); }
.modal__panel {
  position: relative;
  display: grid;
  grid-template-columns: 300px 1fr;
  width: min(860px, 100%);
  margin: auto;
  background: var(--card);
  border: 1px solid var(--hairline-strong);
  overflow: hidden;
  animation: modal-in 0.25s ease-out;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .modal__panel { grid-template-columns: 1fr; grid-template-rows: 240px 1fr; overflow-y: auto; }
}
.modal__close {
  position: absolute;
  top: 0; right: 0;
  z-index: 5;
  width: 44px; height: 44px;
  background: var(--elevated);
  border: none;
  border-left: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  color: var(--text-2);
  font-size: 22px;
  cursor: pointer;
  transition: color 0.2s;
}
.modal__close:hover { color: var(--text); }
.modal__poster { position: relative; min-height: 300px; background:
  radial-gradient(120% 90% at 80% 10%, rgba(232, 180, 90, 0.08) 0%, transparent 55%),
  repeating-linear-gradient(135deg, transparent 0 14px, rgba(244, 241, 234, 0.02) 14px 15px),
  linear-gradient(160deg, #232329 0%, #17171b 100%); } /* U7-1 (е): та же мягкая заглушка */
.modal__poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* v141: весь постер без обрезки — cover вырезал «фатальный кусок» (десктоп 300x1494: 28% ширины; моб. 61% высоты). Фон .modal__poster (мягкая заглушка) = letterbox */
  object-position: center top;
  filter: grayscale(100%) brightness(0.92);
  animation: develop 0.8s ease-out 0.2s forwards; /* экран «проявляется» в цвете */
}
.modal__body { padding: var(--sp-4); }
.modal__meta { font-size: 12px; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: var(--sp-1); }
.modal__title { font-family: var(--font-display); font-size: 28px; font-weight: 500; line-height: 1.15; margin-bottom: var(--sp-1); }
.modal__orig { font-size: 13px; color: var(--text-3); font-style: italic; margin-bottom: var(--sp-2); }
.modal__specs { display: flex; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-2) 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); margin-bottom: var(--sp-3); }
.modal__spec b { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.modal__spec span { font-size: 14px; }
.modal__section { margin-bottom: var(--sp-3); }
.modal__label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.modal__text { font-size: 15px; color: var(--text-2); line-height: 1.65; }
.modal__text b { color: var(--text); font-weight: 600; }

/* «Где смотреть» — прямая ссылка + чипы платформ */
.stream-direct-row { margin-bottom: var(--sp-2); }
.stream-direct {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 var(--sp-3);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-chip);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.2s;
}
.stream-direct:hover { filter: brightness(1.05); color: var(--text); }
.stream-chips { gap: var(--sp-1); }
.stream-chips .chip { height: 38px; font-size: 13px; padding: 0 12px; } /* 23.11: вердикт Гермес — ≤1 ряда чипов на десктопе */
.stream-chip { text-decoration: none; }
.stream-chip:hover { border-color: var(--text-2); color: var(--text); }
.stream-note { font-size: 11px; color: var(--text-3); margin-top: var(--sp-1); }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .card { opacity: 1; transform: none; }
  .face img { transition: none; }
}

/* ── Мелочи ── */
@media (max-width: 640px) {
  .br-desktop { display: none; }
  /* 04.11 (Борис: «название и текст сверху, остальное ниже — надо картинками завлечь»):
     делаем hero компактным, чтобы 3D-кольцо попало в первый экран на мобиле. */
  .hero { padding: var(--sp-3) var(--sp-3) var(--sp-3); }
  .hero__kicker { margin-bottom: var(--sp-1); font-size: 11px; }
  .hero__title { font-size: 30px; margin-bottom: var(--sp-2); }
  .hero__sub { font-size: 15px; margin-bottom: var(--sp-2); }
  .hero__stat b { font-size: 22px; }
  .hero__stats { gap: var(--sp-3); margin-top: var(--sp-2); padding-top: var(--sp-2); }
}

/* Ссылки на каталог (14.10: главная = титульник, каталог — по клику) */
.how__link {
  margin-top: var(--sp-2);
  font-size: 15px;
  color: var(--text-2);
}
.results__catalog {
  margin-top: var(--sp-3);
  text-align: center;
  font-size: 15px;
  color: var(--text-3);
}
.how__link a,
.results__catalog a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline-strong);
  transition: border-color 0.2s ease;
}
.how__link a:hover,
.results__catalog a:hover {
  border-color: var(--accent);
}

/* ── Возрастной бейдж (модалка) ── */
.age-badge {
  display: inline-block;
  min-width: 2.2em;
  text-align: center;
  padding: 1px 7px;
  margin-right: 6px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  vertical-align: 1px;
}
.age-0 { color: #7fd6a0; background: rgba(127, 214, 160, .12); border: 1px solid rgba(127, 214, 160, .35); }
.age-6 { color: #a3d977; background: rgba(163, 217, 119, .12); border: 1px solid rgba(163, 217, 119, .35); }
.age-12 { color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(232, 180, 90, .4); }
.age-16 { color: #f08c4b; background: rgba(240, 140, 75, .12); border: 1px solid rgba(240, 140, 75, .4); }
.age-18 { color: #e5636a; background: rgba(229, 99, 106, .12); border: 1px solid rgba(229, 99, 106, .45); }
.age-none { color: var(--text-3); background: transparent; border: 1px dashed var(--hairline-strong); }

/* ── Обратная связь в модалке ── */
.feedback-chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-1); }
.feedback-chip { cursor: pointer; }
/* 27.11 v135: чипы-кнопки (button) — без нативной обвязки */
button.chip { appearance: none; -webkit-appearance: none; }
.feedback__note { margin-top: var(--sp-1); font-size: .72rem; color: var(--text-3); }

/* ── 26.10 U2: переключатель скинов мордочек (таблетка в hero-kicker + поповер) ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skinswitch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline-strong);
  border-radius: 9999px;
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.skinswitch:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.skinswitch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 26.10 «Нас двое»: состояние включённой пиллюли (только .skinswitch, не .skinopt!) */
.skinswitch.is-on {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.hero__duo-status {
  margin: 0;
  padding-top: var(--sp-1);
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-2);
  text-align: center;
}
.skinswitch__icon { font-size: 14px; line-height: 1; }
.skinswitch__chev { font-size: 10px; color: var(--text-3); }
.skinpop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 196px;
  padding: 6px;
  background: var(--elevated);
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}
.skinopt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.skinopt:hover { background: rgba(255, 255, 255, 0.06); }
.skinopt:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.skinopt.is-on { color: var(--accent); }
.skinopt__face { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: #26262d; flex: none; }
.skinopt__icon { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #26262d; font-size: 14px; line-height: 1; flex: none; }
.skinopt__label { flex: 1; }
.skinopt__label em { font-style: normal; font-size: 11px; color: var(--text-3); }
.skinopt--soon { opacity: 0.45; cursor: default; }
.skinopt--soon:hover { background: transparent; }
.skinopt__check { color: var(--accent); }
/* Скин «Смайлы»: SVG-мордочка на фоне tint плитки — без фильтров фото, чтобы чертёж не мутнел */
[data-skin="glyphs"] .face img { filter: none; }

/* Единица 6 (27.10): плашка «Добавить на экран» — перехват beforeinstallprompt */
.km-install {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 9000; display: flex; align-items: center; gap: 10px;
  max-width: min(92vw, 520px); background: var(--bg-2, #1d1d22); color: var(--text-1, #fff);
  padding: 10px 10px 10px 14px; border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45); font-size: 14px; line-height: 1.3;
}
.km-install__ico { font-size: 20px; }
.km-install__txt { flex: 1; }
.km-install__btn {
  border: 0; border-radius: 8px; background: var(--accent); color: #141417;
  font-weight: 700; padding: 8px 14px; cursor: pointer; font-size: 13px; white-space: nowrap;
}
.km-install__btn:hover { background: var(--accent-dark); color: #fff; }
.km-install__x {
  border: 0; background: transparent; color: var(--text-3, #bbb); font-size: 20px;
  line-height: 1; cursor: pointer; padding: 0 2px;
}
.km-install__x:hover { color: var(--text-1, #fff); }
/* 31.10: плашка прячется, пока она перекрывает кнопку «Подобрать»
   (пересечение замеряется числами в js/app.js по scroll); возвращается, когда человек уходит от кнопки */
.km-install--hidden { visibility: hidden; }
/* U7-1 (27.10, д): плашка не накрывает сетку карточек — пока она открыта,
   внизу страницы зарезервирован её запас (последний ряд можно проскроллить выше плашки) */
body.km-install-on { padding-bottom: 88px; }

/* Единица 7 (27.10): Сортировка каталога */
.catalog__sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-2);
}
.catalog__sort-select {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--font-ui);
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}
.catalog__sort-select:focus {
  border-color: var(--accent);
}

/* 05.11 (Task 2): ViewStyle Toggle & First-Visit Picker.
   08.11 (Борис: «плохо видно, а если человек плохо видит? лучше в начало»):
   переключатель → контрастный двухпозиционный сегмент «Лента/Барабан» с текстом,
   в НАЧАЛЕ навбара; активная позиция подсвечена золотом (aria-pressed для скринридеров). */
.styletoggle {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--hairline-strong);
  border-radius: 9999px;
  overflow: hidden;
  background: rgba(255,255,255,.03);
}
.styletoggle__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: transparent;
  border: 0;
  color: var(--text-2);
  font: 600 14px/1 var(--font-ui);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.styletoggle__btn + .styletoggle__btn { border-left: 1px solid var(--hairline-strong); }
.styletoggle__btn .stl-ico { font-size: 16px; line-height: 1; }
.styletoggle__btn:hover { color: var(--text); background: rgba(255,255,255,.05); }
.styletoggle__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.styletoggle__btn.is-active {
  background: var(--accent);
  color: #1a1408;
  text-shadow: none;
}
.styletoggle__btn.is-active:hover { background: #f0c476; }

/* 18.11 (бэклог 14.11): геофильтр каталога «Все | Русские | Зарубежные».
   Подписи всегда видимы (3 коротких слова влезают на 375px — для слабовидящих). */
.catalog__geo { margin-top: 14px; }
.catalog__geo .stl-label { display: inline; }
@media (max-width: 560px) {
  .catalog__geo .styletoggle__btn { padding: 7px 10px; }
  .catalog__geo .stl-ico { font-size: 16px; }
}

/* 29.11 (v143): фильтр поколений (Все | Миллениалы | Зумеры | Альфа) — та же капсула, что гео. */
.catalog__gen { margin-top: 10px; flex-wrap: wrap; row-gap: 0; }
.catalog__gen .stl-label { display: inline; }
@media (max-width: 560px) {
  .catalog__gen .styletoggle__btn { padding: 7px 10px; font-size: 13px; }
}

/* 29.11 (v143): фильтр жанров — чипы из данных каталога.
   Клик по чипу = «показать этот жанр» (is-sel, золото); ✕ = «не показывать» (is-out, зачёркнут). */
.catalog__genres { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.gchip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 7px 8px 7px 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--hairline-strong);
  border-radius: 9999px;
  color: var(--text-2);
  font: 600 13px/1 var(--font-ui);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, opacity .2s;
}
.gchip:hover { color: var(--text); background: rgba(255,255,255,.07); }
.gchip:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gchip__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  font-size: 11px;
  opacity: .5;
  transition: background .2s, opacity .2s;
}
.gchip__x:hover { opacity: 1; background: rgba(255,255,255,.18); }
.gchip__x:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; opacity: 1; }
.gchip.is-sel {
  background: var(--accent);
  color: #1a1408;
  border-color: var(--accent);
}
.gchip.is-sel:hover { background: #f0c476; }
.gchip.is-sel .gchip__x { opacity: .7; }
.gchip.is-out { opacity: .45; text-decoration: line-through; }
.gchip.is-out:hover { opacity: .8; }
@media (max-width: 560px) {
  .gchip { padding: 6px 7px 6px 10px; font-size: 12px; }
}

/* 23.11 очередь 6-b: фильтр по длительности (index, шаг 4) — 4 позиции влезает на 375px */
.runtime-toggle { margin-top: 14px; }
.runtime-toggle .styletoggle__btn { padding: 7px 12px; font-size: 13px; }
@media (max-width: 560px) {
  .runtime-toggle .styletoggle__btn { padding: 7px 8px; font-size: 12px; }
}

.viewstyle-pick {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}
.viewstyle-pick[hidden] { display: none; }

.viewstyle-pick__overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 2rem;
}
.viewstyle-pick__title {
  font-size: 1.8rem;
  color: var(--text);
  margin: 0 0 10px 0;
  text-align: center;
}
.viewstyle-pick__sub {
  color: var(--text-2);
  margin-bottom: 20px;
}
.viewstyle-pick__options {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.viewstyle-pick__card {
  background: var(--elevated);
  border: 2px solid var(--hairline);
  border-radius: 12px;
  padding: 20px;
  width: 160px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s, border-color 0.2s;
}
.viewstyle-pick__card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}
.viewstyle-pick__icon {
  font-size: 3rem;
}
.viewstyle-pick__card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.2rem;
}
.viewstyle-pick__card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-2);
  text-align: center;
}

/* 07.11 (Task 2 redo v2): Барабан — 3D-цилиндры 3x3 (по референсу) */
.viewstyle-hidden { display: none !important; }
.drum-view {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 18px 24px;
}
.drum-view[hidden] { display: none; }
.drum-view__inner {
  max-width: 640px;
  margin: 0 auto;
}
.drum-machine {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 18px 16px 14px;
  background: linear-gradient(170deg, #2a2235 0%, #1a1525 40%, #120e1a 100%);
  border: 2px solid #8b7355;
  border-radius: 18px;
  box-shadow:
    inset 0 2px 8px rgba(0,0,0,.6),
    inset 0 -1px 0 rgba(255,255,255,.05),
    0 12px 32px rgba(0,0,0,.5);
}
.drum-machine::before {
  content: '';
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
  opacity: .7;
  pointer-events: none;
}
.drum-col {
  position: relative;
  flex: 1;
  max-width: 180px;
  min-width: 0;
  text-align: center;
}
/* 07.11 (Борис): рычаг слот-машины справа — крутит все барабаны разом */
.drum-lever {
  position: relative;
  flex: 0 0 54px;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: 0;
  padding: 8px 4px;
  cursor: pointer;
}
.drum-lever:focus-visible { outline: 2px solid #ffd700; border-radius: 10px; }
.drum-lever:disabled { cursor: not-allowed; opacity: .65; }
.drum-lever__track {
  position: relative;
  width: 10px;
  height: 150px;
  border-radius: 6px;
  background: linear-gradient(90deg, #2b2b33, #6b6b78 45%, #2b2b33);
  box-shadow: inset 0 0 5px rgba(0,0,0,.6);
}
.drum-lever__ball {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 30px; height: 30px;
  margin-left: -15px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb3c0, #e0295b 55%, #7c0e28);
  box-shadow: 0 4px 10px rgba(0,0,0,.5);
  transition: top .16s ease-in;
}
.drum-lever.is-pulled .drum-lever__ball, .drum-lever:active .drum-lever__ball { top: 118px; }
.drum-lever__base {
  width: 30px; height: 12px;
  border-radius: 4px;
  background: linear-gradient(180deg, #7a7a86, #2b2b33);
}
.drum-lever__label {
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}
.drum-window {
  position: relative;
  height: 294px;
  overflow: hidden;
  perspective: 650px;
  border: 6px solid #b4894c;
  border-radius: 22px;
  background: #13100d;
  box-shadow: 0 0 0 3px #39291a, inset 0 0 15px rgba(0,0,0,.8), 2px 4px 12px rgba(0,0,0,.8);
  cursor: grab;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
  outline-offset: 5px;
}
.drum-window:after {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#000b, transparent 28%, transparent 73%, #000c),
    linear-gradient(90deg, #0007, transparent 15%, transparent 85%, #0007);
  border-radius: 14px;
  z-index: 3;
}
.drum-window:before {
  content: '';
  position: absolute;
  z-index: 4;
  left: 0; right: 0;
  top: 50%;
  height: 154px;
  transform: translateY(-50%);
  border-top: 1px solid rgba(255,226,163,.3);
  border-bottom: 1px solid rgba(255,226,163,.3);
  pointer-events: none;
}
.drum-window.dragging { cursor: grabbing; }
.drum-window:focus-visible { outline: 2px solid #ffd700; }
.drum-cylinder {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.drum-card {
  position: absolute;
  top: calc(50% - 75px);
  left: 2%;
  width: 96%;
  height: 150px;
  border: 1px solid rgba(203,184,145,.53);
  border-radius: 9px;
  background: var(--tint, #2a2233);
  overflow: hidden;
  box-shadow: 0 3px 5px rgba(0,0,0,.5);
  transition: transform .32s ease, opacity .2s;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-origin: center;
  cursor: pointer;
}
.drum-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.drum-card__ph {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 56px;
}
.drum-card__caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 3px;
  color: #291f19;
  background: rgba(243,226,196,.92);
  font: 600 12px/1.15 Georgia, serif;
  z-index: 2;
}
.drum-card.is-on {
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255,215,0,.5), 0 3px 5px rgba(0,0,0,.5);
}
.drum-value {
  font-size: 11px;
  min-height: 30px;
  margin: 7px 0 0;
  color: #d3c5a9;
  line-height: 1.35;
}
.drum-view__result {
  margin: 10px 0 0;
  text-align: center;
  font-size: .88rem;
  color: rgba(255,255,255,.8);
  min-height: 1.4em;
}
@media (max-width: 650px) {
  .drum-machine { padding: 14px 10px 12px; gap: 8px; border-radius: 14px; }
  .drum-lever { flex-basis: 44px; }
  .drum-lever__track { width: 8px; height: 100px; }
  .drum-lever__ball { width: 24px; height: 24px; margin-left: -12px; }
  .drum-lever.is-pulled .drum-lever__ball, .drum-lever:active .drum-lever__ball { top: 72px; }
  .drum-lever__base { width: 24px; height: 10px; }
  .drum-lever__label { display: none; }
  .drum-window { height: 242px; border-width: 4px; border-radius: 14px; }
  .drum-card { height: 145px; top: calc(50% - 72.5px); }
  .drum-card__ph { font-size: 46px; }
  .drum-card__caption { font-size: 10px; min-height: 30px; }
  .drum-value { font-size: 10px; min-height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .drum-card { transition: none !important; }
}

/* 07.11 (Борис: «захожу — снова название и текст, надо читать и спускаться»):
   первый экран = мордочки, а не лекция. Титульник сжат, статистика — только на высоких экранах,
   «Как вы сейчас?» — компактнее. Кольцо должно зацепить БЕЗ скролла. */
.hero__title { font-size: clamp(30px, 4.5vw, 46px); margin-bottom: var(--sp-2); }
.hero__sub { font-size: 16px; margin-bottom: var(--sp-3); }
.hero__stats { margin-top: var(--sp-3); }
.hero.hero--ask { padding-top: var(--sp-3); }
.ask__title { font-size: clamp(24px, 3.4vw, 34px); }
.ask__sub { font-size: 14px; margin-bottom: var(--sp-2); }
@media (max-height: 980px) { .hero__stats { display: none; } }
@media (max-width: 650px) {
  .hero__sub { font-size: 14px; }
}

/* 16.11 (Magic): консент-баннер аналитики (152-ФЗ) — низ экрана, один раз.
   Показывает js/metrics.js только если счётчик включён (KM_METRICS.yandex > 0) и согласия ещё нет. */
.km-consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.km-consent__box {
  pointer-events: auto;
  background: var(--elevated);
  border: 1px solid var(--hairline-strong);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  max-width: 640px;
  width: 100%;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  transform: translateY(120%);
  transition: transform 0.35s ease;
}
.km-consent--in .km-consent__box { transform: translateY(0); }
.km-consent__text {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-2);
  flex: 1 1 320px;
}
.km-consent__text a { color: var(--accent); text-decoration: underline; }
.km-consent__btns { display: flex; gap: 8px; flex: 0 0 auto; }
.km-consent__btn {
  font-family: var(--font-ui);
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 9999px;
  border: 1px solid var(--hairline-strong);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.km-consent__btn:hover { background: var(--bg); border-color: var(--text-3); }
.km-consent__btn--ok { background: var(--accent); border-color: var(--accent); color: #1a1206; font-weight: 600; }
.km-consent__btn--ok:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
@media (max-width: 560px) {
  .km-consent__box { flex-direction: column; align-items: stretch; text-align: center; }
  .km-consent__btns { justify-content: center; }
}

/* ── «Похожие фильмы» в модалке (v105, 19.11) ─────────────────────────── */
.similar-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.similar-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 6px; border: 0; border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer; text-align: left; font-family: inherit;
  transition: background 0.15s ease, transform 0.15s ease;
}
.similar-card:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.similar-card__poster {
  display: block; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden;
  background: #17171c;
}
.similar-card__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.similar-card__poster .poster-fallback { width: 100%; height: 100%; }
.similar-card__title {
  font-size: 12.5px; line-height: 1.25; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.similar-card__meta { font-size: 11px; color: var(--text-3); }
@media (max-width: 640px) {
  .similar-row { gap: 6px; }
  .similar-card { padding: 4px; }
  .similar-card__title { font-size: 11px; }
  .similar-card__meta { display: none; }
}
