/* ============================================================
   KinoGo — дизайн-система
   Правила: НИ ОДНОЙ обводки (border / outline) во всём проекте.
   Разделение блоков — только фоном и мягкой тенью.
   ============================================================ */

/* ---------- reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: 0 none;
  outline: 0 none;
  -webkit-tap-highlight-color: transparent;
}
*:focus,
*:focus-visible,
*:active {
  outline: 0 none;
}
input,
button,
select,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
ul,
ol {
  list-style: none;
}
button {
  cursor: pointer;
}

/* ---------- токены ---------- */
:root {
  /* фон и поверхности */
  --bg: #0a0a0c;
  --surface: #121214;
  --surface-2: #17171a;
  --surface-3: #1d1d21;
  --surface-4: #26262b;
  --overlay: rgba(0, 0, 0, 0.55);

  /* текст */
  --text: #ededf1;
  --text-2: #b6b6bf;
  --muted: #8e8e98;
  --dim: #6a6a73;

  /* акценты */
  --accent: #f5c451;
  --accent-2: #ffd77a;
  --accent-ink: #1b1505;
  --accent-soft: rgba(245, 196, 81, 0.14);
  --red: #ff5f5f;
  --red-soft: rgba(255, 95, 95, 0.14);
  --violet: #8d7bf7;
  --green: #4fd18b;

  /* радиусы — единые на весь проект */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* сетка */
  --gap: 18px;
  --pad: 22px;
  /* боковой отступ .wrap — по нему выровнены все блоки страницы.
     Полоса меню в шапке выходит за него на эту же величину, чтобы
     прокручиваться до самого края экрана. */
  --wrap-pad: 24px;
  /* Соотношение сторон обложки. Ровно то, в котором картинки лежат на
     сервере (300×450), — поэтому постер нигде не подрезается и выглядит
     одинаково в каталоге, на карточке, в закладках и в карусели. */
  --pst-ar: 2 / 3;
  --side-w: 322px;
  --max: 1440px;
  --head-h: 66px;

  /* тени (мягкие, не имитируют обводку) */
  --sh-1: 0 8px 24px rgba(0, 0, 0, 0.35);
  --sh-2: 0 16px 44px rgba(0, 0, 0, 0.5);
}

html {
  /* тёмная тема для всего, что рисует сам браузер: выпадающие списки,
     полоса прокрутки, календарь в поле даты, автозаполнение */
  color-scheme: dark;
  scroll-behavior: smooth;
  /* место под полосу прокрутки резервируется всегда — иначе на коротких
     страницах полоса пропадает и вся вёрстка прыгает по горизонтали */
  scrollbar-gutter: stable;
}
@supports not (scrollbar-gutter: stable) {
  html {
    overflow-y: scroll;
  }
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* скроллбар */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-4);
  border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
  background: #33333a;
}

/* ---------- утилиты ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--wrap-pad);
}
.ic {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic--fill {
  fill: currentColor;
  stroke: none;
}
.spacer {
  flex: 1 1 auto;
}
.serif {
  font-family: "Playfair Display", "Times New Roman", Georgia, serif;
}
.hidden {
  display: none !important;
}

/* ============================================================
   ШАПКА
   ============================================================ */
.header {
  /* шапка стоит на своём месте и за страницей не едет */
  position: relative;
  z-index: 60;
  background: var(--bg);
}
.header__in {
  height: var(--head-h);
  display: flex;
  align-items: center;
  gap: 26px;
}
.logo {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.4px;
  flex: none;
}
.logo b {
  color: var(--accent);
  font-weight: 800;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  position: relative;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.18s, background 0.18s;
}
.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}
.nav a.is-active {
  color: var(--text);
  font-weight: 600;
}
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.search {
  position: relative;
  flex: 1 1 auto;
  /* чтобы в шапке с длинным меню поле не сжималось до пары букв */
  min-width: 220px;
  max-width: 430px;
  margin-left: auto;
}
.search > .ic {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 42px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  transition: background 0.18s;
}
.search input::placeholder {
  color: var(--dim);
}
.search input:focus {
  background: var(--surface-3);
}
.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-2);
  flex: none;
  transition: background 0.18s, color 0.18s;
}
.icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}
.icon-btn.is-active {
  color: var(--accent);
}
.burger {
  display: none;
}

/* ============================================================
   КНОПКИ
   ============================================================ */
.btn {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, transform 0.12s, opacity 0.18s;
}
.btn:active {
  filter: brightness(0.94);
}
.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--accent:hover {
  background: var(--accent-2);
}
.btn--ghost {
  background: var(--surface-3);
  color: var(--text);
}
.btn--ghost:hover {
  background: var(--surface-4);
}
.btn--soft {
  background: var(--surface-2);
  color: var(--text-2);
}
.btn--soft:hover {
  background: var(--surface-3);
  color: var(--text);
}
.btn--glass {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(8px);
}
.btn--glass:hover {
  background: rgba(255, 255, 255, 0.2);
}
.btn--sm {
  height: 34px;
  padding: 0 13px;
  font-size: 13px;
  border-radius: var(--r-xs);
}
.btn--lg {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
  border-radius: var(--r-sm);
}
.btn--block {
  width: 100%;
}
.btn--danger {
  background: var(--red-soft);
  color: var(--red);
}
.btn--danger:hover {
  background: rgba(255, 95, 95, 0.22);
}
.btn.is-on {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ============================================================
   ПАНЕЛИ / КАРТОЧКИ
   ============================================================ */
.panel {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--pad);
}
.panel--flush {
  padding: 0;
  overflow: hidden;
}
.card {
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.sec-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.sec-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.badge--new {
  background: rgba(255, 95, 95, 0.16);
  color: var(--red);
}
.badge--series {
  background: rgba(141, 123, 247, 0.16);
  color: var(--violet);
}
.badge--accent {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- рейтинги ---------- */
.rates {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.rate__label {
  font-size: 11.5px;
  color: var(--dim);
  margin-bottom: 3px;
  letter-spacing: 0.1px;
}
.rate__val {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 700;
}
.rate__val .ic {
  width: 16px;
  height: 16px;
}
.rate__of {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dim);
}
.rate__sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--dim);
}
.rate__score {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.rate--kg .ic {
  color: var(--accent);
}
.rate--kp .ic {
  color: #ff6b4a;
}
.rate--imdb .ic {
  color: #f0c419;
}

/* ============================================================
   ПОСТЕРЫ (генеративные градиенты вместо картинок)
   ============================================================ */
.pst {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background-color: #14171d;
  background-image: radial-gradient(
      120% 85% at 50% 108%,
      var(--g3, rgba(245, 196, 81, 0.35)),
      transparent 62%
    ),
    linear-gradient(165deg, var(--g1, #33404f), var(--g2, #0d1118));
  flex: none;
}
.pst::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      55% 40% at 68% 28%,
      rgba(255, 255, 255, 0.14),
      transparent 70%
    ),
    radial-gradient(40% 55% at 22% 72%, rgba(0, 0, 0, 0.45), transparent 70%);
}
.pst::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82),
    rgba(0, 0, 0, 0.12) 52%,
    transparent 78%
  );
}
.pst__cap {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 2;
  padding: 0 10px;
  text-align: center;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 13px;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}
.pst--lg .pst__cap {
  font-size: 22px;
  letter-spacing: 3px;
  bottom: 22px;
}

/* палитры */
.g-north {
  --g1: #4a5a6e;
  --g2: #0c1017;
  --g3: rgba(247, 196, 120, 0.42);
}
.g-reality {
  --g1: #4c6076;
  --g2: #0e131b;
  --g3: rgba(240, 160, 78, 0.5);
}
.g-letters {
  --g1: #8a6a44;
  --g2: #1a1109;
  --g3: rgba(255, 196, 108, 0.55);
}
.g-shadow {
  --g1: #39424f;
  --g2: #0a0d12;
  --g3: rgba(150, 175, 205, 0.3);
}
.g-red {
  --g1: #6d2b34;
  --g2: #120608;
  --g3: rgba(255, 70, 70, 0.55);
}
.g-broken {
  --g1: #2f5a63;
  --g2: #070f12;
  --g3: rgba(96, 222, 234, 0.4);
}
.g-sky {
  --g1: #5b7590;
  --g2: #0d141b;
  --g3: rgba(200, 224, 255, 0.4);
}
.g-second {
  --g1: #6b5566;
  --g2: #100b10;
  --g3: rgba(255, 170, 190, 0.32);
}
.g-mirror {
  --g1: #4a4270;
  --g2: #0b0913;
  --g3: rgba(150, 130, 255, 0.4);
}
.g-dune {
  --g1: #a8683a;
  --g2: #1d0e06;
  --g3: rgba(255, 176, 92, 0.6);
}
.g-inter {
  --g1: #2b3c5a;
  --g2: #05070c;
  --g3: rgba(120, 170, 255, 0.35);
}
.g-blade {
  --g1: #8a3d55;
  --g2: #0f0710;
  --g3: rgba(255, 120, 90, 0.5);
}
.g-rogue {
  --g1: #4b5a68;
  --g2: #0a0d11;
  --g3: rgba(190, 210, 230, 0.32);
}
.g-body {
  --g1: #35604f;
  --g2: #070e0b;
  --g3: rgba(110, 230, 170, 0.34);
}
.g-detective {
  --g1: #5c4b3a;
  --g2: #0f0b07;
  --g3: rgba(255, 190, 120, 0.42);
}
.g-oppen {
  --g1: #8d5a2c;
  --g2: #170c04;
  --g3: rgba(255, 170, 70, 0.6);
}
.g-shogun {
  --g1: #7a4b34;
  --g2: #140a06;
  --g3: rgba(255, 160, 100, 0.5);
}
.g-forest {
  --g1: #4b6a4a;
  --g2: #0a0f0a;
  --g3: rgba(180, 230, 150, 0.35);
}
.g-neon {
  --g1: #5a3a77;
  --g2: #0c0714;
  --g3: rgba(210, 110, 255, 0.45);
}
.g-space {
  --g1: #2e3f63;
  --g2: #06080f;
  --g3: rgba(130, 160, 255, 0.4);
}
.g-family {
  --g1: #9a7440;
  --g2: #181008;
  --g3: rgba(255, 205, 120, 0.55);
}
.g-drama {
  --g1: #6f5a4b;
  --g2: #120d0a;
  --g3: rgba(255, 200, 160, 0.38);
}
.g-hidden {
  --g1: #4a4a5c;
  --g2: #0a0a0f;
  --g3: rgba(190, 180, 230, 0.32);
}
.g-thriller {
  --g1: #3d4a55;
  --g2: #080b0e;
  --g3: rgba(150, 190, 220, 0.3);
}
.g-weekend {
  --g1: #7d6a55;
  --g2: #14100c;
  --g3: rgba(255, 210, 160, 0.42);
}
.g-avatar {
  --g1: #2f6b6b;
  --g2: #06110f;
  --g3: rgba(110, 230, 220, 0.4);
}
.g-jurassic {
  --g1: #5b6b3a;
  --g2: #0c1007;
  --g3: rgba(200, 230, 120, 0.35);
}
.g-four {
  --g1: #3a5c7c;
  --g2: #070d13;
  --g3: rgba(130, 200, 255, 0.4);
}
.g-dawn {
  --g1: #8a6550;
  --g2: #150e0a;
  --g3: rgba(255, 190, 150, 0.45);
}
.g-city {
  --g1: #414a58;
  --g2: #090c10;
  --g3: rgba(160, 185, 215, 0.3);
}
.g-robot {
  --g1: #55666f;
  --g2: #0a0e10;
  --g3: rgba(180, 220, 235, 0.35);
}
.g-user {
  --g1: #55606f;
  --g2: #0b0e12;
  --g3: rgba(210, 225, 245, 0.35);
}

/* ============================================================
   САЙДБАР
   ============================================================ */
.sidebar {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 20px 18px;
  align-self: start;
}
.side-block + .side-block {
  margin-top: 24px;
}
.side-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.1px;
}
.side-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-xs);
  font-size: 13.5px;
  color: var(--text-2);
  transition: background 0.16s, color 0.16s;
}
.side-list a:hover {
  background: var(--surface-2);
  color: var(--text);
}
.side-list a.is-active {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.side-list a.is-active .side-year {
  color: var(--accent-ink);
  opacity: 0.7;
}
.side-year {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--dim);
}
.side-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px 6px;
}
.side-media a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 8px;
  border-radius: var(--r-xs);
  transition: background 0.16s;
}
.side-media a:hover {
  background: var(--surface-2);
}
.side-media a > span + span {
  display: block;
  min-width: 0;
}
.side-media .pst {
  width: 46px;
  height: 34px;
  border-radius: var(--r-xs);
}
.side-media .pst--sq {
  width: 38px;
  height: 38px;
}
.side-media__t {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
}
.side-media__s {
  display: block;
  font-size: 11.5px;
  color: var(--dim);
  line-height: 1.35;
  margin-top: 2px;
}

/* ============================================================
   СЕТКА СТРАНИЦЫ
   ============================================================ */
.page {
  flex: 1 1 auto;
}
.layout {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
  padding: 18px 0 44px;
}
.layout--wide {
  grid-template-columns: minmax(0, 1fr);
}
.layout--seo {
  padding-bottom: 0;
}
.seo--wide {
  margin: var(--gap) 0 44px;
}
.content {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 13px;
  color: var(--dim);
  flex-wrap: wrap;
}
.crumbs > * {
  display: inline-flex;
  align-items: center;
}
.crumbs > * + *::before {
  content: "›";
  margin: 0 10px;
  font-size: 15px;
  line-height: 1;
  color: var(--surface-4);
}
.crumbs a:hover {
  color: var(--accent);
}
.crumbs span {
  color: var(--muted);
}

/* ============================================================
   ГЛАВНЫЙ СЛАЙДЕР
   ============================================================ */
.hero {
  position: relative;
  height: 400px;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 4px;
}
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
}
.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
      90% 120% at 78% 35%,
      var(--g3),
      transparent 60%
    ),
    linear-gradient(115deg, var(--g2) 12%, var(--g1) 68%, var(--g2) 100%);
  transform: scale(1.02);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      100deg,
      rgba(10, 10, 12, 0.96) 6%,
      rgba(10, 10, 12, 0.8) 34%,
      rgba(10, 10, 12, 0.12) 68%,
      rgba(10, 10, 12, 0.5) 100%
    ),
    linear-gradient(to top, rgba(10, 10, 12, 0.8), transparent 45%);
}
.hero__in {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 520px;
  padding: 0 44px;
}
.hero__kicker {
  font-size: 11.5px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.hero__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 50px;
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}
.hero__text {
  font-size: 14.5px;
  color: var(--text-2);
  max-width: 400px;
  margin-bottom: 22px;
}
.hero__btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hero__nav {
  position: absolute;
  right: 26px;
  bottom: 26px;
  z-index: 3;
  display: flex;
  gap: 8px;
}
.hero__dots {
  position: absolute;
  left: 44px;
  bottom: 30px;
  z-index: 3;
  display: flex;
  gap: 7px;
}
.hero__dot {
  width: 22px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.24);
  transition: background 0.2s, width 0.2s;
}
.hero__dot.is-active {
  background: var(--accent);
  width: 34px;
}

/* ---------- лента постеров ---------- */
.strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.tile > a:first-child {
  display: block;
}
.tile .pst {
  aspect-ratio: var(--pst-ar);
  width: 100%;
  transition: filter 0.22s;
}
.tile:hover .pst {
  filter: brightness(1.16);
}
.btn__t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile .btn {
  height: 32px;
  font-size: 12px;
  border-radius: var(--r-xs);
  padding: 0 6px;
  gap: 6px;
  overflow: hidden;
}

/* ============================================================
   ФИЛЬТРЫ
   ============================================================ */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.dd {
  position: relative;
}
.dd__btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
}
.dd__btn:hover {
  background: var(--surface-3);
  color: var(--text);
}
.dd.is-open .dd__btn {
  background: var(--surface-3);
  color: var(--text);
}
.dd.is-open .dd__btn .ic {
  transform: rotate(180deg);
}
.dd__btn .ic {
  width: 15px;
  height: 15px;
  transition: transform 0.2s;
  color: var(--dim);
}
.dd__menu {
  display: none;
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 40;
  min-width: 220px;
  max-width: calc(100vw - 24px);
  max-height: 290px;
  overflow: auto;
  padding: 6px;
  border-radius: var(--r-md);
  background: var(--surface-3);
  box-shadow: var(--sh-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
}
.dd--right .dd__menu {
  left: auto;
  right: 0;
}
.dd.is-open .dd__menu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: none;
  animation: ddIn 0.16s ease;
}
@keyframes ddIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.dd__menu button,
.dd__menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--r-xs);
  font-size: 13.5px;
  color: var(--text-2);
  text-align: left;
  transition: background 0.14s, color 0.14s;
}
.dd__menu button:hover,
.dd__menu a:hover {
  background: var(--surface-4);
  color: var(--text);
}
.dd__menu button.is-sel,
.dd__menu a.is-sel {
  color: var(--accent);
  font-weight: 600;
}
.counter {
  font-size: 13px;
  color: var(--dim);
}

/* ============================================================
   СПИСОК ФИЛЬМОВ
   ============================================================ */
.mlist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mrow {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  transition: background 0.2s;
}
.mrow:hover {
  background: var(--surface-3);
}
.mrow__side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.mrow__poster {
  display: block;
}
.mrow__side .btn {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}
.mrow__side .btn--soft {
  background: var(--surface-3);
  color: var(--text-2);
}
.mrow__side .btn--soft:hover {
  background: var(--surface-4);
  color: var(--text);
}
.mrow:hover .mrow__side .btn--soft {
  background: var(--surface-4);
}
.mrow__side .btn--soft.is-on {
  background: var(--accent);
  color: var(--accent-ink);
}
.mrow .pst {
  aspect-ratio: var(--pst-ar);
  width: 100%;
}
.mrow__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 4px 4px 2px 0;
}
.mrow__title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.mrow__title a:hover {
  color: var(--accent);
}
.meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 9px;
  font-size: 13px;
  color: var(--muted);
}
.mrow__desc {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--text-2);
  max-width: 760px;
}
.mrow__foot {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  /* оценки прижаты к низу: строка заканчивается ровно там же, где кнопка
     «В закладки», и под текстом не остаётся пустого места */
  margin-top: auto;
  padding-top: 18px;
}

/* ---------- пагинация ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 0 2px;
  flex-wrap: wrap;
}
.pager button,
.pager a {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.16s, color 0.16s;
}
.pager button:hover,
.pager a:hover {
  background: var(--surface-3);
  color: var(--text);
}
.pager button.is-active,
.pager a.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}
.pager span {
  color: var(--dim);
  padding: 0 4px;
}

/* ---------- SEO-текст ---------- */
.seo h2 {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}
.seo p {
  font-size: 14px;
  color: var(--text-2);
  max-width: 900px;
}
.seo p + p {
  margin-top: 12px;
}

/* ============================================================
   ПОДБОРКИ
   ============================================================ */
.cbanner {
  position: relative;
  height: 320px;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cbanner .hero__in {
  max-width: 560px;
  padding: 0 40px;
}
.cgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}
.ccard {
  position: relative;
  min-height: 250px;
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
}
.ccard__bg {
  transition: filter 0.22s;
}
.ccard:hover .ccard__bg {
  filter: brightness(1.18);
}
.ccard__bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(90% 90% at 70% 25%, var(--g3), transparent 62%),
    linear-gradient(160deg, var(--g1), var(--g2));
}
.ccard__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 8, 10, 0.94) 22%,
    rgba(8, 8, 10, 0.55) 58%,
    rgba(8, 8, 10, 0.1)
  );
}
.ccard__in {
  position: relative;
  z-index: 2;
}
.ccard h3 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.ccard p {
  font-size: 13.5px;
  color: var(--text-2);
  max-width: 330px;
}
.ccard__foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}
.ccard__count {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

/* ============================================================
   СТРАНИЦА ЖАНРА
   ============================================================ */
.ghero {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  padding: 40px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ghero__in {
  position: relative;
  z-index: 2;
  max-width: 620px;
}
.ghero h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
}
.ghero p {
  font-size: 14.5px;
  color: var(--text-2);
}
.gstats {
  display: flex;
  gap: 34px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.gstat {
  display: flex;
  align-items: center;
  gap: 11px;
}
.gstat .ic {
  width: 24px;
  height: 24px;
  color: var(--accent);
}
.gstat b {
  display: block;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
}
.gstat span {
  font-size: 12.5px;
  color: var(--muted);
}

/* ============================================================
   СТРАНИЦА ФИЛЬМА
   ============================================================ */
.film {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 26px;
}
.film__poster .pst {
  width: 100%;
  aspect-ratio: var(--pst-ar);
  border-radius: var(--r-md);
}
.film h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.9px;
  line-height: 1.08;
}
.film__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
.film__meta i {
  font-style: normal;
  color: var(--surface-4);
}
.film__rates {
  display: flex;
  align-items: flex-start;
  gap: 34px;
  flex-wrap: wrap;
  margin-top: 22px;
}
/* Звёзды оценки. Размер тянется за шириной экрана: на телефоне по ним
   нужно попадать пальцем, на большом экране они не должны выглядеть
   мелочью рядом с крупным числом рейтинга. */
.stars {
  display: flex;
  gap: clamp(4px, 1.1vw, 9px);
}
.stars button {
  color: var(--surface-4);
  transition: color 0.14s, transform 0.14s;
  /* область нажатия больше самой звезды — удобно попадать пальцем */
  padding: 4px 2px;
  line-height: 0;
}
.stars button:hover {
  transform: scale(1.08);
}
.stars button.is-on {
  color: var(--accent);
}
/* Селектор нарочно длиннее, чем у значка рядом с числом рейтинга:
   иначе мелкая звёздочка у цифры перебивала размер этих звёзд. */
.stars .ic,
.rate__val .stars .ic,
.rate-row .stars .ic {
  width: clamp(26px, 3.2vw, 34px);
  height: clamp(26px, 3.2vw, 34px);
}
.film__acts {
  display: flex;
  gap: 11px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.film__note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 640px;
}
.film__note .ic {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--accent);
}
.film__desc {
  margin-top: 20px;
  font-size: 14.5px;
  color: var(--text-2);
  max-width: 760px;
}
/* Таблица с данными о фильме.

   Колонок становится две только тогда, когда каждая получает не меньше
   420px. Иначе на значение оставалось меньше полутора сотен пикселей, и
   имена актёров переносились по одному слову в строку. Ширина подписи
   тоже подвижная — ужимается прежде, чем начнёт страдать значение. */
.film__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 22px 26px;
  margin-top: 24px;
}
.facts {
  display: grid;
  grid-template-columns: minmax(96px, 150px) minmax(0, 1fr);
  gap: 9px 14px;
  font-size: 13.5px;
  align-content: start;
}
/* совсем узко — подпись встаёт над значением, строка не ломается */
@media (max-width: 520px) {
  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .facts dt {
    margin-top: 8px;
    font-size: 12.5px;
  }
  .facts dt:first-child {
    margin-top: 0;
  }
}
.facts dt {
  color: var(--dim);
}
.facts dd {
  color: var(--text);
}
.facts a {
  color: var(--accent);
}
.facts a:hover {
  text-decoration: underline;
}

/* ---------- табы ---------- */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 42px;
  padding: 0 20px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.18s, color 0.18s;
}
.tabs button:hover {
  background: var(--surface-3);
  color: var(--text);
}
.tabs button.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}
.tabs--grow button {
  flex: 1 1 0;
}
.tab-pane {
  display: none;
}
.tab-pane.is-active {
  display: block;
}

/* ---------- плеер ---------- */
.player {
  position: relative;
  aspect-ratio: 16 / 7.6;
  border-radius: var(--r-md);
  overflow: hidden;
  background-image: radial-gradient(80% 90% at 65% 30%, var(--g3), transparent 62%),
    linear-gradient(150deg, var(--g1), var(--g2));
}
.player::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 55%);
}
.player__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  color: #fff;
  transition: background 0.2s;
}
.player__play:hover {
  background: rgba(255, 255, 255, 0.28);
}
.player__play .ic {
  width: 26px;
  height: 26px;
  margin-left: 3px;
}
.player__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}
.player__track {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}
.player__fill {
  height: 100%;
  width: 30%;
  border-radius: 4px;
  background: var(--accent);
}
.player__time {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
}
.player__bar button {
  color: rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-xs);
  transition: background 0.16s, color 0.16s;
}
.player__bar button:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* ---------- статусы просмотра ---------- */
.status-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

/* ---------- похожие ---------- */
.similar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

/* ---------- франшиза ---------- */
.franchise {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fr-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  transition: background 0.18s;
}
.fr-item:hover {
  background: var(--surface-3);
}
.fr-item__n {
  width: 22px;
  font-size: 14px;
  color: var(--dim);
  font-weight: 600;
}
.fr-item .pst {
  width: 44px;
  height: 62px;
  border-radius: var(--r-xs);
}
.fr-item__t {
  font-size: 15px;
  font-weight: 600;
}
.fr-item__t a:hover {
  color: var(--accent);
}
.fr-item__s {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.fr-item__s b {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- комментарии ---------- */
.comments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cmt {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.cmt .pst {
  width: 42px;
  height: 42px;
  border-radius: var(--r-xs);
}
.cmt__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cmt__name {
  font-size: 14px;
  font-weight: 600;
}
.cmt__date {
  font-size: 12px;
  color: var(--dim);
}
.cmt__text {
  margin-top: 5px;
  font-size: 13.5px;
  color: var(--text-2);
}
.cmt__reply {
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--muted);
  background: none;
  padding: 0;
}
.cmt__reply:hover {
  color: var(--accent);
}
.cmt__side {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-xs);
  background: var(--surface-3);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.16s, color 0.16s;
}
.like:hover {
  background: var(--surface-4);
  color: var(--text);
}
.like.is-on {
  background: var(--accent-soft);
  color: var(--accent);
}
.cmt-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.cmt-form textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 13px 15px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--text);
  font-size: 14px;
}
.cmt-form .field {
  background: var(--surface-3);
}
.cmt-form .field:focus {
  background: #232328;
}
.cmt-form textarea::placeholder {
  color: var(--dim);
}

/* ============================================================
   ЛИЧНЫЙ КАБИНЕТ
   ============================================================ */
.profile {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
}
.profile__bg {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 46%;
  background-image: radial-gradient(70% 80% at 70% 30%, var(--g3), transparent 65%),
    linear-gradient(160deg, var(--g1), var(--g2));
  opacity: 0.55;
}
.profile__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--surface-2) 0%,
    rgba(23, 23, 26, 0.7) 32%,
    rgba(23, 23, 26, 0.25) 100%
  );
}
.profile__main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 22px;
}
/* аватар — как все карточки, не круглый */
.avatar {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: var(--r-md);
  overflow: hidden;
  background-image: radial-gradient(70% 70% at 60% 30%, var(--g3), transparent 65%),
    linear-gradient(160deg, var(--g1), var(--g2));
}
.avatar__cam {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--r-xs);
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(6px);
  color: #fff;
}
.avatar__cam:hover {
  background: var(--accent);
  color: var(--accent-ink);
}
.avatar--sm {
  width: 42px;
  height: 42px;
  border-radius: var(--r-xs);
}
.profile__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.profile__name .ic {
  width: 20px;
  height: 20px;
  color: var(--accent);
}
.profile__handle {
  font-size: 13.5px;
  color: var(--accent);
  margin-top: 2px;
}
.profile__reg {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}
.profile__bio {
  font-size: 13.5px;
  color: var(--text-2);
  margin-top: 8px;
  max-width: 420px;
}
.profile__side {
  position: relative;
  z-index: 2;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-xs);
  background: var(--surface-3);
  font-size: 13px;
  color: var(--text-2);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.stat {
  padding: 13px 14px;
  border-radius: var(--r-md);
  background: rgba(18, 18, 20, 0.72);
  backdrop-filter: blur(4px);
}
.stat__top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 700;
}
.stat__top .ic {
  width: 17px;
  height: 17px;
  color: var(--accent);
}
.stat__lbl {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* закладки */
.bm-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.bm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bm > a:first-child {
  display: block;
}
.bm .pst {
  width: 100%;
  aspect-ratio: var(--pst-ar);
}
.bm__t {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
}
.bm__m {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.bm__m .ic {
  width: 13px;
  height: 13px;
  color: var(--accent);
}
.bm__m b {
  color: var(--text);
  font-weight: 700;
}
.bm .btn {
  height: 32px;
  font-size: 12.5px;
  border-radius: var(--r-xs);
  margin-top: auto;
}

/* история просмотров */
.hist-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.hist__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  overflow: hidden;
  background-image: radial-gradient(80% 80% at 62% 32%, var(--g3), transparent 62%),
    linear-gradient(155deg, var(--g1), var(--g2));
  display: grid;
  place-items: center;
}
.hist__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 60%);
}
.hist__play {
  position: relative;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  color: #fff;
  transition: background 0.2s, color 0.2s;
}
.hist__play:hover {
  background: var(--accent);
  color: var(--accent-ink);
}
.hist__play .ic {
  width: 17px;
  height: 17px;
  margin-left: 2px;
}
.hist__t {
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
}
.hist__m {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.prog {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.prog__track {
  flex: 1 1 auto;
  height: 4px;
  border-radius: 4px;
  background: var(--surface-4);
  overflow: hidden;
}
.prog__fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
}
.prog__val {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.hist__state {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 8px;
}

/* оценки */
.rate-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rate-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  transition: background 0.18s;
}
.rate-row:hover {
  background: var(--surface-3);
}
.rate-row .pst {
  width: 52px;
  height: 40px;
  border-radius: var(--r-xs);
}
.rate-row__t {
  font-size: 14px;
  font-weight: 600;
}
.rate-row__y {
  font-size: 12.5px;
  color: var(--muted);
}
.rate-row__score {
  font-size: 13.5px;
  font-weight: 700;
  min-width: 46px;
  text-align: right;
}

/* настройки */
.set-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.set-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  background: transparent;
  transition: background 0.16s;
}
.set-row:hover {
  background: var(--surface-2);
}
.set-row__l {
  font-size: 13.5px;
  color: var(--text-2);
}
.set-row__v {
  margin-left: auto;
  font-size: 13.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.set-row__v .ic {
  color: var(--dim);
  width: 16px;
  height: 16px;
}
.sw {
  margin-left: auto;
  width: 42px;
  height: 24px;
  border-radius: 20px;
  background: var(--surface-4);
  position: relative;
  transition: background 0.2s;
  flex: none;
}
.sw::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.sw.is-on {
  background: var(--accent);
}
.sw.is-on::after {
  transform: translateX(18px);
}

/* ============================================================
   ФУТЕР
   ============================================================ */
.footer {
  margin-top: auto;
  background: var(--surface);
}
.footer__in {
  display: flex;
  align-items: center;
  gap: 18px 26px;
  flex-wrap: wrap;
  padding-top: 26px;
  padding-bottom: 26px;
}
.footer__copy {
  flex: 1 1 280px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--dim);
  max-width: 520px;
  line-height: 1.6;
}
.footer__links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.footer__links a:hover {
  color: var(--accent);
}

/* ============================================================
   КАРУСЕЛЬ
   ============================================================ */
.crsl {
  margin-top: 18px;
}
.crsl__body {
  position: relative;
  background: var(--surface-2);
  border-radius: var(--r-lg);
  padding: 20px 20px 16px;
}
.crsl__head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.crsl__title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.crsl__title b {
  color: var(--accent);
  font-weight: 700;
}
.crsl__all {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px;
  border-radius: var(--r-xs);
  background: var(--surface-3);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: background 0.16s, color 0.16s;
}
.crsl__all:hover {
  background: var(--surface-4);
  color: var(--text);
}
.crsl__all .ic {
  width: 15px;
  height: 15px;
}
.crsl__stage {
  position: relative;
}
.crsl__view {
  overflow: hidden;
}
.crsl__track {
  --per: 8;
  --crsl-gap: 14px;
  display: flex;
  gap: var(--crsl-gap);
  transition: transform 0.45s cubic-bezier(0.4, 0.1, 0.2, 1);
}
.pcard {
  position: relative;
  display: block;
  flex: 0 0 calc((100% - (var(--per) - 1) * var(--crsl-gap)) / var(--per));
  aspect-ratio: var(--pst-ar);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-3);
}
.pcard .pst {
  transition: filter 0.22s;
}
.pcard:hover .pst {
  filter: brightness(1.16);
}
.pcard .pst {
  position: absolute;
  inset: 0;
  border-radius: 0;
}
.pcard .pst::after {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.94) 26%,
    rgba(0, 0, 0, 0.6) 46%,
    transparent 72%
  );
}
.pcard__in {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: block;
  padding: 0 12px 13px;
}
.pcard__t {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.28;
  color: #fff;
}
.pcard__m {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--muted);
}
.pcard__r {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: var(--text);
}
.pcard__r .ic {
  width: 13px;
  height: 13px;
  color: var(--accent);
}
.crsl__nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: rgba(12, 12, 14, 0.82);
  backdrop-filter: blur(8px);
  color: #fff;
  opacity: 0;
  transition: background 0.18s, opacity 0.18s;
}
.crsl__body:hover .crsl__nav {
  opacity: 1;
}
.crsl.is-static .crsl__nav,
.crsl.is-static .crsl__dots {
  display: none;
}
.crsl__nav:hover {
  background: var(--accent);
  color: var(--accent-ink);
}
.crsl__nav--prev {
  left: 6px;
}
.crsl__nav--next {
  right: 6px;
}
.crsl__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
}
.crsl__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-4);
  transition: background 0.2s, width 0.2s, border-radius 0.2s;
}
.crsl__dot:hover {
  background: #3a3a42;
}
.crsl__dot.is-active {
  width: 18px;
  border-radius: 5px;
  background: var(--accent);
}

/* ============================================================
   САЙДБАР — БЛОЧНОЕ ОФОРМЛЕНИЕ
   ============================================================ */
.sidebar {
  background: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sb-box {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.sb-box__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    rgba(245, 196, 81, 0.72) 42%,
    rgba(245, 196, 81, 0.1) 100%
  );
}
.sb-box__link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.82;
  transition: opacity 0.16s;
}
.sb-box__link:hover {
  opacity: 1;
}
.sb-box__link .ic {
  width: 15px;
  height: 15px;
}
.sb-box__body {
  padding: 8px;
}

/* ---------- франшизы ---------- */
.collage {
  display: flex;
  gap: 2px;
  flex: none;
  border-radius: var(--r-xs);
  overflow: hidden;
}
.collage .pst {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 0;
}
.collage .pst::after {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 60%);
}
.fr-side {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 8px;
  border-radius: var(--r-md);
  transition: background 0.16s;
}
.fr-side:hover {
  background: var(--surface-2);
}
.fr-side .collage {
  width: 70px;
  height: 50px;
}
.fr-side__t {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.32;
  color: var(--text-2);
}
.fr-side:hover .fr-side__t {
  color: var(--text);
}
.flist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.frow {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  transition: background 0.2s;
}
.frow:hover {
  background: var(--surface-3);
}
.frow > a {
  display: block;
}
.frow .collage {
  width: 100%;
  aspect-ratio: 16 / 10.5;
  border-radius: var(--r-sm);
}
.frow__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 4px 4px 2px 0;
}
.frow__t {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.25;
}
.frow__t a:hover {
  color: var(--accent);
}
.frow__x {
  margin-top: 9px;
  font-size: 13.5px;
  color: var(--text-2);
  max-width: 720px;
}
.frow__foot {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 16px;
}
.frow__count {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.frow__count .ic {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.fsearch {
  position: relative;
  margin-top: 14px;
}
.fsearch .ic {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  pointer-events: none;
}
.fsearch input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 44px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  transition: background 0.18s;
}
.fsearch input::placeholder {
  color: var(--dim);
}
.fsearch input:focus {
  background: var(--surface-3);
}
.navp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  padding: 6px 8px 10px;
}
.navp__group + .navp__group {
  margin-top: 20px;
}
.navp__group h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.1px;
}
.navp__group h3 a {
  display: inline;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  background: none;
  border-radius: 0;
  transition: color 0.16s;
}
.navp__group h3 a:hover {
  background: none;
}
.navp__group h3 a:hover {
  color: var(--accent);
}
.navp__tv {
  color: var(--accent) !important;
}
.navp__tv:hover {
  color: var(--accent-2) !important;
}
.navp a {
  display: block;
  padding: 5px 6px;
  border-radius: var(--r-xs);
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--text-2);
  transition: background 0.14s, color 0.14s;
}
.navp a:hover {
  background: var(--surface-2);
  color: var(--text);
}
.navp a.is-sub {
  color: var(--muted);
}
.navp a.is-active {
  color: var(--accent);
  font-weight: 600;
}
.sb-rand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-2);
  transition: background 0.18s, color 0.18s;
}
.sb-rand:hover {
  background: var(--surface-2);
  color: var(--text);
}
.sb-rand .ic {
  width: 21px;
  height: 21px;
  color: var(--accent);
}
.upd {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px 8px;
  border-radius: var(--r-md);
  transition: background 0.16s;
}
.upd:hover {
  background: var(--surface-2);
}
.upd__poster {
  position: relative;
  width: 60px;
  aspect-ratio: var(--pst-ar);
  border-radius: var(--r-xs);
}
.upd--sm .upd__poster {
  aspect-ratio: 2 / 1.5;
}
.upd__season {
  position: absolute;
  left: 4px;
  bottom: 4px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(8, 8, 10, 0.82);
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.2px;
}
.upd__mid {
  display: block;
  min-width: 0;
}
.upd__t {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  overflow-wrap: break-word;
  hyphens: auto;
}
.upd__s {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--muted);
}
.upd__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  text-align: right;
}
.upd__date {
  font-size: 11.5px;
  color: var(--dim);
  white-space: nowrap;
}
.badge--gold {
  background: var(--accent);
  color: var(--accent-ink);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 10.5px;
}
.talk {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 6px 12px;
  padding: 12px 8px;
  border-radius: var(--r-md);
  transition: background 0.16s;
}
.talk:hover {
  background: var(--surface-2);
}
.talk__av {
  width: 44px;
  height: 44px;
  border-radius: var(--r-xs);
}
.talk__head {
  display: block;
  min-width: 0;
}
.talk__n {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.talk__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}
.talk__d {
  font-size: 12px;
  color: var(--dim);
}
.talk__go {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
}
.talk__x {
  grid-column: 1 / -1;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}
.talk__x b {
  color: var(--text);
  font-weight: 700;
}

/* ============================================================
   SEO-БЛОК
   ============================================================ */
.seo h2 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.2px;
}
.seo p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-2);
  max-width: none;
}
.seo p + p {
  margin-top: 16px;
}
.seo p b {
  color: var(--text);
  font-weight: 600;
}
.seo a {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.16s;
}
.seo a:hover {
  color: var(--accent);
}

/* ============================================================
   ТЕКСТОВЫЕ СТРАНИЦЫ И ФОРМЫ
   ============================================================ */
.doc__head {
  margin-bottom: 20px;
}
.doc__head h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.15;
}
.doc__date {
  margin-top: 8px;
  font-size: 13px;
  color: var(--dim);
}
.doc__lead {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 900px;
}
.doc h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin: 30px 0 12px;
}
.doc h2:first-child {
  margin-top: 0;
}
.doc h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin: 22px 0 9px;
}
.doc p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-2);
}
.doc p + p {
  margin-top: 12px;
}
.doc a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.doc ul,
.doc ol {
  display: grid;
  gap: 9px;
  margin: 13px 0;
}
.doc li {
  position: relative;
  padding-left: 24px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-2);
}
.doc li b {
  color: var(--text);
  font-weight: 600;
}
.doc ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
}
.doc ol {
  counter-reset: docnum;
}
.doc ol li {
  counter-increment: docnum;
}
.doc ol li::before {
  content: counter(docnum) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.75;
  color: var(--accent);
}
.doc__note {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}
.doc__note b {
  color: var(--text);
}

/* ---------- сетка карточек-фактов ---------- */
.infogrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.infocard {
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.infocard .ic {
  width: 22px;
  height: 22px;
  color: var(--accent);
  margin-bottom: 12px;
}
.infocard h3,
.infocard__t {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.infocard p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.infocard a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- форма ---------- */
.form {
  display: grid;
  gap: 14px;
  max-width: 760px;
}
.form__two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.form__row {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.form__label {
  font-size: 13px;
  color: var(--muted);
}
.form__label i {
  font-style: normal;
  color: var(--red);
}
.field {
  width: 100%;
  height: 46px;
  padding: 0 15px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  transition: background 0.18s;
}
.field::placeholder {
  color: var(--dim);
}
.field:focus {
  background: var(--surface-3);
}
.field.is-bad {
  background: rgba(255, 95, 95, 0.12);
}
/* выпадающий список: стрелка своя, раскрытый список — в цветах сайта */
select.field,
select.field:focus {
  appearance: none;
  padding-right: 38px;
  cursor: pointer;
  color-scheme: dark;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 16px 16px;
}
select.field option,
select.field optgroup {
  background: #141417;
  color: #ededf1;
  padding: 8px 10px;
}
select.field option:checked,
select.field option:hover {
  background: var(--accent);
  color: var(--accent-ink);
}
select.field:disabled { opacity: 0.6; cursor: default; }
/* поля, внешний вид которых задаёт сам браузер */
.field[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.75);
  cursor: pointer;
}
.field[type="number"] { appearance: textfield; }
.field[type="search"]::-webkit-search-cancel-button { filter: invert(0.7); cursor: pointer; }
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
  cursor: pointer;
}
.field:-webkit-autofill,
.field:-webkit-autofill:hover,
.field:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface-3) inset;
  caret-color: var(--text);
}
textarea.field {
  height: auto;
  min-height: 160px;
  padding: 13px 15px;
  resize: vertical;
  line-height: 1.6;
}
.select {
  position: relative;
}
.select .ic {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--dim);
  pointer-events: none;
}
.select .field {
  padding-right: 40px;
  cursor: pointer;
}
.form__foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.form__note {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--dim);
  max-width: 420px;
}
.form__note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.form__counter {
  font-size: 12.5px;
  color: var(--dim);
  text-align: right;
}
.form__ok {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: rgba(79, 209, 139, 0.12);
  color: var(--green);
  font-size: 13.5px;
  font-weight: 600;
}
.form__ok.is-on {
  display: flex;
}
.form__ok .ic {
  width: 18px;
  height: 18px;
}

@media (max-width: 900px) {
  .infogrid {
    grid-template-columns: minmax(0, 1fr);
  }
  .doc__head h1 {
    font-size: 25px;
  }
}
@media (max-width: 560px) {
  .form__two {
    grid-template-columns: minmax(0, 1fr);
  }
  .doc__head h1 {
    font-size: 22px;
  }
  .doc h2 {
    font-size: 17px;
  }
  .form__foot .btn {
    width: 100%;
  }
}

/* ============================================================
   ПЛЕЕР: ПЕРЕКЛЮЧАТЕЛЬ И ПЛАШКА ЗАГРУЗКИ
   ============================================================ */
.pswitch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.pswitch button {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 26px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.18s, color 0.18s;
}
.pswitch button:hover {
  background: var(--surface-3);
  color: var(--text);
}
.pswitch button.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}
.notice {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
}
.notice .ic {
  width: 22px;
  height: 22px;
  color: var(--accent);
  margin-top: 1px;
}
.notice p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.notice p + p {
  margin-top: 6px;
}
.notice b {
  color: var(--accent);
  font-weight: 600;
}
.notice--flat {
  background: var(--surface-2);
}
.notice--flat .ic {
  color: var(--muted);
}

/* ============================================================
   ФРАНШИЗА: СПИСОК ЧАСТЕЙ
   ============================================================ */
.frn {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.frn__row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 58px 50px;
  align-items: center;
  gap: 16px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  transition: background 0.16s;
}
.frn__row:hover {
  background: var(--surface-3);
}
.frn__row.is-current {
  background: rgba(245, 196, 81, 0.11);
}
.frn__n {
  display: grid;
  place-items: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dim);
}
.frn__n .ic {
  width: 15px;
  height: 15px;
  color: var(--accent);
}
.frn__t {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.frn__row:hover .frn__t {
  color: var(--accent);
}
.frn__row.is-current .frn__t {
  color: var(--accent);
}
.frn__type,
.frn__year {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.frn__year {
  text-align: right;
}
.frn__r {
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  background: var(--surface-4);
  color: var(--text-2);
}
.frn__r--hi {
  background: rgba(79, 209, 139, 0.18);
  color: var(--green);
}
.frn__more {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
.frn__saga {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px;
  border-radius: var(--r-xs);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: background 0.16s, color 0.16s;
}
.frn__saga:hover {
  background: var(--surface-3);
  color: var(--accent);
}
.frn__saga span {
  font-weight: 400;
  color: var(--dim);
}
.frn__saga .ic {
  width: 15px;
  height: 15px;
  color: var(--dim);
}
.frn__saga:hover .ic {
  color: var(--accent);
}
.frn__row--more {
  display: none;
}
.frn.is-open .frn__row--more {
  display: grid;
}
.frn__left {
  color: var(--dim);
  font-weight: 500;
}

/* ---------- постеры без кнопок ---------- */
.pgrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.ptile {
  display: block;
}
.ptile .pst {
  width: 100%;
  aspect-ratio: var(--pst-ar);
  transition: filter 0.22s;
}
.ptile:hover .pst {
  filter: brightness(1.16);
}

@media (max-width: 900px) {
  .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .frn__row { grid-template-columns: 30px minmax(0, 1fr) 50px 46px; gap: 12px; padding: 10px 12px; }
  .frn__type { display: none; }
}
@media (max-width: 560px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .frn__row { grid-template-columns: 26px minmax(0, 1fr) 44px; gap: 10px; }
  .frn__year { display: none; }
  .frn__t { font-size: 13.5px; }
  .notice { gap: 11px; padding: 12px 13px; }
}

/* ============================================================
   КОММЕНТАРИИ: ФОРМА, ПОДГРУЗКА, ПУСТОЕ СОСТОЯНИЕ
   ============================================================ */
.cmt-form {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.cmt-form.is-open {
  display: flex;
}
.cmt-form__row {
  display: grid;
  gap: 7px;
  max-width: 360px;
}
.cmt-form__label {
  font-size: 12.5px;
  color: var(--muted);
}
.cmt-form textarea {
  width: 100%;
  min-height: 96px;
  max-height: 420px;
  overflow-y: auto;
  resize: none;
  padding: 13px 15px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  transition: background 0.18s;
}
.cmt-form .field {
  background: var(--surface-3);
}
.cmt-form .field:focus {
  background: #232328;
}
.cmt-form textarea::placeholder {
  color: var(--dim);
}
.cmt-form textarea:focus {
  background: #232328;
}
.cmt-form textarea.is-bad,
.cmt-form .field.is-bad {
  background: rgba(255, 95, 95, 0.12);
}
.cmt-form__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cmt-form__hint {
  font-size: 12.5px;
  color: var(--dim);
  max-width: 420px;
}

/* дизлайк */
.like--down.is-on {
  background: rgba(255, 95, 95, 0.16);
  color: var(--red);
}

/* подгрузка */
.cmt-more {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}
.cmt-more .btn.is-loading {
  pointer-events: none;
  color: transparent;
}
.cmt-more .btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, var(--text));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 0);
  animation: spin 0.7s linear infinite;
}
.cmt-more .btn {
  position: relative;
}
@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

/* пусто */
/* Пусто — но без простыни: одна строка, значок и кнопка в ряд. */
.cmt-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.cmt-empty__ic {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
}
.cmt-empty__ic .ic {
  width: 19px;
  height: 19px;
  color: var(--accent);
}
.cmt-empty p {
  flex: 1 1 auto;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}
.cmt-empty .btn { flex: 0 0 auto; }
/* В закладках этот же блок остаётся большим: там он единственный на странице. */
.bm-empty.cmt-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  padding: 44px 24px;
}
.bm-empty.cmt-empty .cmt-empty__ic { width: 60px; height: 60px; margin-bottom: 8px; }
.bm-empty.cmt-empty .cmt-empty__ic .ic { width: 26px; height: 26px; }
.bm-empty.cmt-empty h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.2px; }
.bm-empty.cmt-empty p { max-width: 460px; }
.bm-empty.cmt-empty .btn { margin-top: 12px; }

/* активная кнопка не должна теряться на наведении */
.btn.is-on:hover,
.btn--ghost.is-on:hover,
.btn--soft.is-on:hover {
  background: var(--accent-2);
  color: var(--accent-ink);
}
.mrow:hover .mrow__side .btn--soft.is-on,
.mrow__side .btn--soft.is-on:hover {
  background: var(--accent-2);
  color: var(--accent-ink);
}

/* ============================================================
   ВЫПАДАЮЩИЙ ПОИСК
   ============================================================ */
.search input {
  padding-right: 42px;
}
.search__clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: none;
  place-items: center;
  border-radius: var(--r-xs);
  color: var(--dim);
  transition: background 0.16s, color 0.16s;
}
.search.has-text .search__clear {
  display: grid;
}
.search__clear:hover {
  background: var(--surface-4);
  color: var(--text);
}
.search__clear .ic {
  position: static;
  transform: none;
  width: 15px;
  height: 15px;
  color: inherit;
}
.search__drop {
  position: absolute;
  top: calc(100% + 8px);
  /* Ширину списка не привязываем к полю: в шапке поле сжимается, и
     подсказки превращались в столбик из обрывков слов. Список шире поля
     и прижат к его правому краю, чтобы не вылезать за экран. */
  left: auto;
  right: 0;
  width: 420px;
  max-width: calc(100vw - 24px);
  z-index: 70;
  display: none;
  max-height: min(620px, 78vh);
  overflow-y: auto;
  border-radius: var(--r-md);
  background: var(--surface-2);
  box-shadow: var(--sh-2);
  overscroll-behavior: contain;
}
.search.is-open .search__drop {
  display: block;
}

.sdrop__all {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface-3);
  transition: background 0.16s;
}
.sdrop__all:hover {
  background: var(--surface-4);
}
.sdrop__all .ic {
  width: 16px;
  height: 16px;
}

.sdrop__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
}
.sres {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px;
  border-radius: var(--r-sm);
  transition: background 0.16s;
}
.sres:hover {
  background: var(--surface-3);
}
.sres__pst {
  width: 54px;
  height: 78px;
  border-radius: var(--r-xs);
}
.sres__body {
  display: block;
  min-width: 0;
}
.sres__t {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.sres__t i {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
}
.sres__t b {
  color: var(--accent);
  font-weight: 700;
}
.sres__orig {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
}
.sres__eps {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}
.sres__cat {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
}
.sres__cat b {
  color: var(--text-2);
  font-weight: 600;
}
.sres__rates {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  text-align: right;
}
.sres__kp,
.sres__imdb {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.sres__kp {
  background: #e0794a;
  color: #190c05;
}
.sres__imdb {
  background: var(--accent);
  color: var(--accent-ink);
}
.sres__stars {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}
.sres__stars .ic {
  position: static;
  transform: none;
  width: 14px;
  height: 14px;
  color: var(--accent);
}
.sres__stars b {
  color: var(--text);
  font-weight: 700;
}
.sres__stars em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--dim);
}

.sdrop__cats {
  padding: 8px 6px 10px;
  background: var(--surface);
}
.sdrop__cats-t {
  padding: 6px 10px 8px;
  font-size: 12.5px;
  color: var(--dim);
}
.sdrop__cat {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  color: var(--text-2);
  transition: background 0.16s, color 0.16s;
}
.sdrop__cat:hover {
  background: var(--surface-2);
  color: var(--text);
}
.sdrop__cat b {
  color: var(--text);
  font-weight: 700;
}
.sdrop__cat .ic {
  position: static;
  transform: none;
  width: 15px;
  height: 15px;
  color: var(--dim);
  flex: none;
}

.sdrop__none {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  padding: 36px 24px;
}
.sdrop__none .ic {
  position: static;
  transform: none;
  width: 26px;
  height: 26px;
  color: var(--dim);
  margin-bottom: 6px;
}
.sdrop__none p {
  font-size: 14px;
  color: var(--text);
}
.sdrop__none p b {
  color: var(--accent);
}
.sdrop__none span {
  font-size: 13px;
  color: var(--muted);
  max-width: 320px;
}

@media (max-width: 1100px) {
  .search__drop {
    max-height: min(520px, 68vh);
  }
}
/* с этой ширины поле занимает всю строку шапки — список повторяет его */
@media (max-width: 1100px) {
  .search__drop {
    left: 0;
    right: auto;
    width: min(760px, 100%);
    max-width: none;
  }
}
@media (max-width: 560px) {
  .sres {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
  }
  .sres__pst {
    width: 46px;
    height: 66px;
  }
  .sres__rates {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 6px;
  }
  .sres__stars em {
    display: none;
  }
}

/* ============================================================
   РЕАЛЬНЫЕ ДАННЫЕ: обложки, плеер, служебные состояния
   (дописано к макету, адаптив ниже остаётся последним)
   ============================================================ */

/* обложка картинкой вместо градиента */
.pst img,
.pst > picture img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.pst--img::before { display: none; }
.pst--img::after { z-index: 1; }
.pst--img .pst__cap { display: none; }

/* фон баннеров и профиля картинкой */
.hero__bg img,
.profile__bg img,
.ccard__bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

/* аватар пользователя */
.avatar img,
.cmt > .pst img,
.talk__av img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.avatar--default,
.cmt .pst--default,
.talk__av--default {
  background-image: none;
  background-color: #1b1f27;
}
.avatar--default::before,
.avatar--default::after,
.cmt .pst--default::before,
.cmt .pst--default::after,
.talk__av--default::before,
.talk__av--default::after { display: none; }

/* плеер: реальный проигрыватель во всю область */
.player iframe,
.player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.player--empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.player__msg {
  position: relative;
  z-index: 3;
  max-width: 440px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
}
.player__msg b {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
  color: #fff;
}
.player__cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(8, 10, 14, 0.42);
}
.player__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.55;
}

/* выбор сезона и серии */
.eps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.eps a,
.eps button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-xs);
  background: var(--soft, rgba(255, 255, 255, 0.06));
  color: var(--ink, #e8ecf3);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.eps a.is-active,
.eps button.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}
.eps__t {
  width: 100%;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* сообщения форм */
.msg {
  margin-bottom: 16px;
  padding: 13px 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink, #e8ecf3);
}
.msg--ok {
  background: rgba(86, 199, 123, 0.14);
  color: #9be3b2;
}
.msg--err {
  background: rgba(230, 86, 86, 0.14);
  color: #f0a3a3;
}

/* ссылки вместо кнопок: в фильтрах и пагинации */
.pager a,
.dd__menu a { text-decoration: none; }

/* ============================================================
   СТРАНИЦА 404
   ============================================================ */
.e404 {
  text-align: center;
  padding-top: 38px;
  padding-bottom: 38px;
}
.e404__code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 104px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--surface-4);
}
.e404__o {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.e404__o .ic {
  width: 46px;
  height: 46px;
  color: var(--accent);
}
.e404__t {
  margin-bottom: 12px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text);
}
.e404__x {
  max-width: 580px;
  margin: 0 auto 26px;
  font-size: 15px;
  color: var(--text-2);
}
.e404__search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto 22px;
  padding: 7px 7px 7px 46px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.e404__search > .ic {
  position: absolute;
  left: 16px;
  width: 19px;
  height: 19px;
  color: var(--muted);
}
.e404__search input {
  flex: 1;
  min-width: 0;
  height: 40px;
  background: none;
  color: var(--text);
  font: 400 15px/1 inherit;
}
.e404__search input::placeholder { color: var(--dim); }
.e404__search .btn { flex: none; height: 40px; }
.e404__acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 26px;
}
.e404__kinds {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.e404__kinds a {
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.e404__kinds a:hover { background: var(--surface-3); color: var(--text); }

/* ============================================================
   ЕДИНАЯ ШАПКА СТРАНИЦЫ
   Один и тот же баннер с заголовком открывает каждую страницу:
   разделы, жанры, подборки, франшизы, актёров, служебные страницы.
   Благодаря этому верх любой страницы выглядит одинаково.
   ============================================================ */
.ghero--plain {
  min-height: 160px;
  padding: 32px 40px;
}

/* ---------- Биография персоны ---------- */
.pbio__h {
  margin-top: 18px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.pbio {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.pbio p { margin-bottom: 10px; }
.pbio p:last-child { margin-bottom: 0; }
.pbio h3 {
  margin: 18px 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.pbio ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
  margin-bottom: 4px;
}
.pbio li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text-2);
}
.ghero--plain .ghero__in {
  max-width: 760px;
}
.ghero__date {
  margin-top: 10px;
  font-size: 13px;
  color: var(--dim);
}
/* правый блок шапки — кнопка выхода, счётчик и т. п. */
.ghero__row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.ghero__row > .ghero__in {
  flex: 1 1 420px;
}
.ghero__side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============================================================
   ВЫПАДАЮЩИЙ СПИСОК
   Системный список оформить нельзя, поэтому поверх настоящего
   <select> работает свой — в палитре сайта и одинаковый везде.
   ============================================================ */
/* каталог в момент обновления */
[data-catalog].is-loading { opacity: 0.55; transition: opacity 0.12s; pointer-events: none; }

.xsel { position: relative; display: block; }
.xsel__native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
}
.xsel__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.xsel__btn > span {
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.xsel__btn > .ic {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.16s;
}
.xsel.is-open .xsel__btn > .ic { transform: rotate(180deg); }
.xsel.is-open .xsel__btn { background: var(--surface-3); }
.xsel__list {
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  box-shadow: var(--sh-2);
}
.xsel.is-up .xsel__list { top: auto; bottom: calc(100% + 6px); }
.xsel__o {
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.xsel__o:hover { background: var(--surface-3); color: var(--text); }
.xsel__o.is-on {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.xsel__o.is-off { opacity: 0.45; cursor: default; }
.xsel__o.is-off:hover { background: none; color: var(--text-2); }
/* в админке список чуть плотнее */
.xsel--adm .xsel__o { padding: 8px 11px; font-size: 13.5px; }

/* ============================================================
   МОДАЛЬНОЕ ОКНО
   Гость, нажавший «В закладки» или оценку, остаётся на странице:
   объяснение показывается здесь же, а не на странице входа.
   ============================================================ */
.mdl {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 6, 8, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.18s;
}
.mdl.is-on { opacity: 1; }
.mdl__box {
  position: relative;
  width: min(440px, 100%);
  padding: 30px 28px 26px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-2);
  text-align: center;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.18s;
}
.mdl.is-on .mdl__box { transform: none; }
.mdl__x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--muted);
  background: transparent;
  transition: background 0.15s, color 0.15s;
}
.mdl__x:hover { background: var(--surface-3); color: var(--text); }
.mdl__ic {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--accent-soft);
}
.mdl__ic .ic { width: 25px; height: 25px; color: var(--accent); }
.mdl__box h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.mdl__box p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}
.mdl__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.mdl__acts .btn { flex: 1 1 auto; justify-content: center; }

/* ============================================================
   АДАПТИВ
   Точки: 1280 / 1100 (сайдбар в бургер) / 900 / 680 / 560 / 400
   ============================================================ */

/* ---------- ≤ 1280 ---------- */
@media (max-width: 1280px) {
  /* Меню занимает всю строку, и поле поиска сжималось до пары букв.
     С этой ширины отправляем его на свою строку во всю ширину. */
  .header__in {
    flex-wrap: wrap;
    height: auto;
    /* только по вертикали: боковые отступы задаёт .wrap, и шапка должна
       стоять по той же линии, что и остальные блоки страницы */
    padding-top: 12px;
    padding-bottom: 12px;
    row-gap: 12px;
  }
  .search {
    order: 5;
    flex: 1 1 100%;
    max-width: none;
    margin-left: 0;
  }
  /* поиск ушёл на свою строку — свободное место верхней строки забирает
     меню, и кнопки встают ровно у правого края */
  .nav { flex: 1 1 auto; }
  .search__drop {
    left: 0;
    right: auto;
    /* шире поля не нужно: на широком экране подсказки растянулись бы на
       всю строку и оценки ушли бы далеко от названия */
    width: min(760px, 100%);
    max-width: none;
  }
  .crsl__track { --per: 6; }
  .strip,
  .similar { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .bm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero__title { font-size: 42px; }
  .film { grid-template-columns: 250px minmax(0, 1fr); }
}

/* ---------- ≤ 1100: сайдбар уезжает в бургер ---------- */
@media (max-width: 1100px) {
  :root {
    --side-w: 0px;
    --pad: 18px;
  }
  .burger { display: grid; }
  .header { padding: 14px 0 10px; }
  .header__in {
    flex-wrap: wrap;
    height: auto;
    padding-top: 0;
    padding-bottom: 0;
    gap: 14px;
  }
  /* карусель идёт сразу за шапкой — отступ даёт сама шапка */
  .crsl { margin-top: 0; }
  /* поиск остаётся в одной строке с логотипом: шапка не растёт вниз.
     Ограничения по ширине здесь нет намеренно — поиск забирает всё
     свободное место, и кнопки встают ровно у правого края, а не
     сбиваются в кучу слева с пустотой справа. */
  .search {
    order: 0;
    flex: 1 1 auto;
    min-width: 170px;
    max-width: none;
    margin-left: 0;
  }
  /* пункты меню — одна строка с прокруткой вбок.
     Раскладка в несколько рядов уводила шапку на пол-экрана. */
  .nav {
    order: 6;
    flex: 1 1 100%;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-padding-left: var(--wrap-pad);
    /* полоса идёт до края экрана: последний пункт виден срезанным и
       сразу понятно, что строка прокручивается */
    margin-left: calc(var(--wrap-pad) * -1);
    margin-right: calc(var(--wrap-pad) * -1);
    padding-left: var(--wrap-pad);
    padding-right: var(--wrap-pad);
    /* полосу прокрутки прячем — она здесь только мешает */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    scroll-snap-align: start;
    white-space: nowrap;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 500;
  }
  .nav a:hover { background: var(--surface-3); }
  .nav a.is-active {
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
  }
  .nav a.is-active::after { display: none; }

  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .sidebar.is-open { display: flex; }

  .crsl__track { --per: 5; }
  .strip,
  .similar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile { grid-template-columns: minmax(0, 1fr); }
  .profile__bg { width: 100%; opacity: 0.22; }
  .film { grid-template-columns: 220px minmax(0, 1fr); gap: 22px; }
  .status-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- ≤ 900: планшет и телефон ---------- */
@media (max-width: 900px) {
  :root { --gap: 14px; --pad: 16px; --wrap-pad: 16px; }


  .crsl__track { --per: 3; }
  .crsl__body { padding: 16px 14px 12px; }
  .crsl__title { font-size: 17px; }

  .cgrid { grid-template-columns: minmax(0, 1fr); }
  .strip,
  .similar,
  .bm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .hero { height: 340px; }
  .hero__in { padding: 0 24px; max-width: none; }
  .hero__title { font-size: 32px; }

  .ghero,
  .ghero--plain { padding: 24px 20px; min-height: 0; }
  .ghero h1,
  .e404__t { font-size: 27px; }
  .ghero p { font-size: 14px; }
  .gstats { gap: 16px 24px; margin-top: 18px; }

  /* карточка фильма: заголовок сверху, постер по центру */
  .film {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .film__info { display: contents; }
  .film h1 { order: 1; font-size: 26px; text-align: center; }
  .film__meta {
    order: 2;
    justify-content: center;
    margin-top: 10px;
    gap: 8px 12px;
    font-size: 12.5px;
    text-align: center;
  }
  .film__meta i { display: none; }
  .film__poster {
    order: 3;
    align-self: center;
    width: 200px;
    max-width: 62%;
    margin: 20px 0 4px;
  }
  .film__poster .pst { width: 100%; max-width: none; }
  /* Рейтинги и оценка на телефоне: цифры крупнее, звёзды — с запасом
     под палец (меньше 44px по касанию попадать неудобно). */
  .film__rates { order: 4; justify-content: center; gap: 18px 26px; margin-top: 20px; }
  .rate { text-align: center; }
  .rate__label { font-size: 13px; margin-bottom: 5px; }
  .rate__val { justify-content: center; font-size: 20px; }
  .rate__val .ic { width: 20px; height: 20px; }
  .stars { gap: 2px; }
  .stars button {
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
  }
  /* размер звёзд задан общим правилом выше, здесь не фиксируем */
  .rate__score { font-size: 15px; }
  .mdl__box { padding: 26px 20px 22px; }
  .mdl__acts .btn { flex: 1 1 100%; }
  /* пустой блок комментариев: текст на всю ширину, кнопка под ним */
  .cmt-empty:not(.bm-empty) { flex-wrap: wrap; gap: 10px 12px; }
  .cmt-empty:not(.bm-empty) p { flex: 1 1 calc(100% - 50px); }
  .cmt-empty:not(.bm-empty) .btn { flex: 1 1 100%; justify-content: center; }
  .film__acts { order: 5; }
  .film__desc { order: 6; }
  .film__facts { order: 7; }
  .film__note { order: 8; justify-content: center; }
  .film__facts { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  /* ширина подписи задана общим правилом — здесь не фиксируем */

  /* 16px у полей ввода — iOS не приближает экран при фокусе */
  input,
  textarea,
  select,
  .field,
  .search input,
  .fsearch input,
  .cmt-form textarea {
    font-size: 16px;
  }
  .search input { height: 46px; }
  .fsearch input { height: 48px; }
  .field { height: 48px; }
  .cmt-form textarea { min-height: 104px; }
  textarea.field { resize: none; min-height: 150px; }

  .sec-title { font-size: 19px; }
  .rate-row { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .rate-row .stars,
  .rate-row__y { display: none; }
  .seo h2 { font-size: 17px; }
  .seo p { font-size: 14px; line-height: 1.7; }
  .doc__head h1 { font-size: 25px; }
}

/* ---------- ≤ 680 ---------- */
@media (max-width: 680px) {
  /* на телефоне рядом с логотипом и кнопками поиску уже тесно —
     отдаём ему отдельную строку */
  .search {
    order: 5;
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }
  /* поиск ушёл вниз, и в верхней строке остались логотип и кнопки.
     Без распорки они сбивались в кучу слева, а справа висела пустота. */
  .logo { margin-right: auto; }

  .e404 { padding-top: 26px; padding-bottom: 26px; }
  .e404__code { font-size: 72px; }
  .e404__o { width: 64px; height: 64px; }
  .e404__o .ic { width: 32px; height: 32px; }
  /* поле поиска переносится на две строки: значок убираем, он только мешает */
  .e404__search { flex-wrap: wrap; padding: 10px; }
  .e404__search > .ic { display: none; }
  .e404__search input { flex: 1 1 100%; padding: 0 6px; }
  .e404__search .btn { flex: 1 1 100%; }
  .e404__acts .btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    height: auto;
    min-height: 46px;
    padding-top: 10px;
    padding-bottom: 10px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }
  .logo { font-size: 21px; }
  .header__in { gap: 10px; }
  .btn__label { display: none; }
  .header .btn--ghost { width: 42px; padding: 0; }
  .btn__x { display: none; }

  .crsl__track { --per: 2; }
  .crsl__nav { opacity: 1; }

  .strip,
  .similar,
  .bm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hist-grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .status-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile { padding: 18px; }
  .profile__main { grid-template-columns: minmax(0, 1fr); }
  .tabs--grow button { flex: 1 1 42%; }

  /* каталог: постер и текст сверху, кнопки во всю ширину снизу */
  .mrow {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
  }
  .mrow__side { display: contents; }
  .mrow__poster { grid-column: 1; grid-row: 1; }
  .mrow__body { grid-column: 2; grid-row: 1; }
  .mrow__side .btn--accent {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 2px;
  }
  .mrow__side .btn--soft {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  .mrow__side .btn { height: 40px; font-size: 13.5px; }
  .mrow__title { font-size: 17px; }
  .mrow__desc {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 10px;
    font-size: 13.5px;
    line-height: 1.55;
  }
  .meta { gap: 5px 12px; margin-top: 7px; font-size: 12.5px; }
  /* на телефоне кнопки уходят под текст, тянуть оценки вниз больше не нужно */
  .mrow__foot { margin-top: 12px; padding-top: 0; }
  .rates { gap: 14px; }
  .rate__label { font-size: 10.5px; margin-bottom: 2px; }
  .rate__val { font-size: 14px; gap: 5px; }
  .rate__val .ic { width: 14px; height: 14px; }

  .film__acts { display: grid; grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: 124px minmax(0, 1fr); font-size: 13px; }

  .pswitch button { flex: 1 1 0; padding: 0 12px; font-size: 13px; gap: 7px; }
  .pswitch button .ic { width: 16px; height: 16px; }

  /* фильтры — две ровные колонки, сброс во всю ширину */
  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .filters .dd { width: 100%; }
  .filters .dd__btn {
    width: 100%;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 13px;
  }
  .filters .dd__menu {
    left: 0;
    right: 0;
    min-width: 0;
    max-width: none;
  }
  .filters > .btn {
    grid-column: 1 / -1;
    margin-left: 0 !important;
    width: 100%;
  }

  .frow { grid-template-columns: 130px minmax(0, 1fr); gap: 13px; padding: 12px; }
  .frow__t { font-size: 16px; overflow-wrap: anywhere; }
  .frow__x { display: none; }
  .frow__foot { padding-top: 12px; width: 100%; gap: 10px; }
  .frow__foot .btn { flex: 1 1 auto; }

  .cmt { grid-template-columns: 42px minmax(0, 1fr); }
  .cmt__side { grid-column: 2; }

  .footer { padding: 6px 0 10px; }
  .footer__in { gap: 16px; }
  .footer__copy { flex: 1 1 100%; max-width: none; }
  .footer__links {
    margin-left: 0;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .hero__dots { left: 24px; }
  .hero__nav { right: 16px; }
  .pager button, .pager a { min-width: 36px; height: 36px; padding: 0 9px; font-size: 13px; }

  .navp { grid-template-columns: minmax(0, 1fr); }
  .navp > div + div .navp__group:first-child { margin-top: 20px; }
}

/* ---------- ≤ 560: телефоны ---------- */
@media (max-width: 560px) {
  /* на узких экранах кнопки 404 идут по одной в строку */
  .e404__acts .btn { flex: 1 1 100%; }
  .e404__kinds a { font-size: 12.5px; padding: 7px 12px; }

  :root { --gap: 12px; --pad: 16px; --wrap-pad: 15px; }

  .btn { height: 42px; padding: 0 14px; }
  .btn--lg { height: 46px; padding: 0 18px; font-size: 14px; }

  .crsl__body { padding: 14px 12px 10px; }
  .crsl__head { margin-bottom: 12px; }
  .crsl__nav { width: 32px; height: 32px; }
  .crsl__nav--prev { left: 3px; }
  .crsl__nav--next { right: 3px; }
  .mrow .pst__cap,
  .film__poster .pst__cap { font-size: 9px; letter-spacing: 0.5px; }

  .mrow { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; }
  .mrow__title { font-size: 16px; }
  .mrow__desc { -webkit-line-clamp: 3; font-size: 13px; }
  .meta span:nth-child(n + 4) { display: none; }

  .film__poster { width: 176px; max-width: 66%; }
  .film h1 { font-size: 22px; }
  .film__rates { gap: 14px 20px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .facts dt { margin-top: 8px; }
  .facts dd { margin-bottom: 2px; }
  .film__note { font-size: 12.5px; }

  .status-row { grid-template-columns: minmax(0, 1fr); }
  .tabs--grow button { flex: 1 1 100%; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .strip,
  .similar,
  .bm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

  .sec-title { font-size: 18px; }
  .sec-head { gap: 10px 12px; }
  .profile__name { font-size: 22px; }
  .avatar { width: 108px; height: 108px; }
  .ghero h1,
  .e404__t { font-size: 23px; }
  .hero { height: 300px; }
  .hero__title { font-size: 27px; }
  .hero__text { font-size: 13.5px; }

  .set-row { min-height: 44px; padding: 8px 10px; }
  .set-row__l,
  .set-row__v { font-size: 13px; }
  .talk__x { font-size: 12.5px; }
  .notice { gap: 11px; padding: 12px 13px; }
  .cmt-empty { padding: 34px 18px; }

  .frow { grid-template-columns: minmax(0, 1fr); }
  .frow .collage { aspect-ratio: 16 / 7; }
  .frow__t { font-size: 17px; }
  .fsearch input { height: 44px; }
}

/* ---------- ≤ 400: узкие телефоны ---------- */
@media (max-width: 400px) {
  .mrow { grid-template-columns: 92px minmax(0, 1fr); gap: 11px; }
  .mrow__desc { -webkit-line-clamp: 2; }
  .rates { gap: 11px; }
  .rate__label { font-size: 10px; }
  .film__poster { width: 156px; }
  .film h1 { font-size: 20px; }
  .nav { gap: 6px; }
  .nav a { padding: 10px 6px; font-size: 13px; }
  .crsl__title { font-size: 16px; }
  .logo { font-size: 20px; }
}
