/* ==========================================================================
   КиноМомент — стили сайта (из прототипа docs/redesign + дополнения в конце файла). Токены → база → компоненты.
   Цвета: OKLCH-ramps пересчитаны в sRGB hex (контраст измерен, см. 07-redesign.md).
   Тема: по умолчанию системная; ручной выбор — атрибут data-theme на <html>.
   ========================================================================== */

/* ---------- 1. Примитивы (никогда не используются в компонентах) ---------- */
:root {
  /* Нейтраль «тёплый графит», hue 65, chroma ≈ 0.01 */
  --neutral-0: #ffffff;   /* oklch(1 0 0) */
  --neutral-25: #f9f6f3;  /* oklch(.975 .005 65) */
  --neutral-100: #efebe7; /* oklch(.94 .006 65) */
  --neutral-150: #e6e1dc; /* oklch(.91 .007 65) */
  --neutral-200: #dfdad5; /* oklch(.89 .008 65) */
  --neutral-500: #8b8580; /* oklch(.62 .01 65) */
  --neutral-550: #6e6862; /* oklch(.52 .012 65) */
  --neutral-600: #5a544e; /* oklch(.45 .012 65) */
  --neutral-900: #1f1a15; /* oklch(.22 .012 65) */

  --night-50: #f1eeea;  /* oklch(.95 .006 65) */
  --night-200: #b6b0ab; /* oklch(.76 .01 65) */
  --night-300: #97918c; /* oklch(.66 .01 65) */
  --night-500: #6d6863; /* oklch(.52 .01 65) */
  --night-700: #413c38; /* oklch(.36 .01 65) */
  --night-750: #312d29; /* oklch(.30 .01 65) */
  --night-800: #25211d; /* oklch(.25 .01 65) */
  --night-850: #1a1613; /* oklch(.205 .009 65) */
  --night-900: #120f0c; /* oklch(.17 .008 65) */

  /* Акцент «лампа проектора»: янтарь в тёмной теме, медь в светлой */
  --amber-300: #fcc270; /* oklch(.85 .12 75) */
  --amber-400: #f8b65d; /* oklch(.82 .13 72) */
  --amber-500: #f3ae51; /* oklch(.80 .135 72) */
  --amber-950: #1d140d; /* oklch(.20 .02 60) */
  --copper-600: #964d09; /* oklch(.50 .12 55) */
  --copper-650: #8f4700; /* oklch(.48 .12 55) */
  --copper-700: #80430c; /* oklch(.45 .105 55) */
  --copper-50: #fbefe4;  /* oklch(.96 .02 60) */
  --amber-900a: #3a2a17; /* oklch(.30 .04 70) */

  --red-500: #e5484d;
  --red-300: #ff8b8b;
}

/* ---------- 2. Семантика: светлая тема ---------- */
:root {
  color-scheme: light;
  --color-bg-page: var(--neutral-25);
  --color-bg-surface: var(--neutral-0);
  --color-bg-raised: var(--neutral-0);
  --color-bg-sunken: var(--neutral-100);
  --color-bg-hover: var(--neutral-150);
  --color-bg-scrim: rgb(10 8 6 / 0.62);
  --color-bg-media: #0b0907;

  --color-text-primary: var(--neutral-900);
  --color-text-secondary: var(--neutral-600);
  --color-text-tertiary: var(--neutral-550);
  --color-text-inverse: var(--neutral-0);
  --color-text-on-accent: var(--neutral-0);
  --color-text-on-media: #ffffff;

  --color-border-subtle: var(--neutral-150);
  --color-border: var(--neutral-200);
  --color-border-strong: var(--neutral-500);
  --color-separator: var(--neutral-200);
  --color-focus-ring: var(--copper-600);

  --color-accent-subtle: var(--copper-50);
  --color-accent-solid: var(--copper-600);
  --color-accent-solid-hover: var(--copper-700);
  --color-accent-text: var(--copper-650);

  --color-danger-text: #b4232a;
  --color-rating: var(--amber-500); /* звезда всегда на тёмной подложке или рядом с числом */

  --shadow-border:
    0 0 0 1px rgb(0 0 0 / 0.06),
    0 1px 2px -1px rgb(0 0 0 / 0.06),
    0 2px 4px 0 rgb(0 0 0 / 0.04);
  --shadow-border-hover:
    0 0 0 1px rgb(0 0 0 / 0.08),
    0 1px 2px -1px rgb(0 0 0 / 0.08),
    0 2px 4px 0 rgb(0 0 0 / 0.06);
  --shadow-overlay: 0 0 0 1px rgb(0 0 0 / 0.08), 0 16px 48px -8px rgb(0 0 0 / 0.25);
  --image-outline: rgb(0 0 0 / 0.1);
}

/* ---------- 2b. Семантика: тёмная тема («зал погас») ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-bg-page: var(--night-900);
    --color-bg-surface: var(--night-850);
    --color-bg-raised: var(--night-800);
    --color-bg-sunken: var(--night-900);
    --color-bg-hover: var(--night-750);
    --color-text-primary: var(--night-50);
    --color-text-secondary: var(--night-200);
    --color-text-tertiary: var(--night-300);
    --color-text-inverse: var(--night-900);
    --color-text-on-accent: var(--amber-950);
    --color-border-subtle: var(--night-800);
    --color-border: var(--night-700);
    --color-border-strong: var(--night-500);
    --color-separator: var(--night-700);
    --color-focus-ring: var(--amber-400);
    --color-accent-subtle: var(--amber-900a);
    --color-accent-solid: var(--amber-500);
    --color-accent-solid-hover: var(--amber-300);
    --color-accent-text: var(--amber-400);
    --color-danger-text: var(--red-300);
    --shadow-border: 0 0 0 1px rgb(255 255 255 / 0.08);
    --shadow-border-hover: 0 0 0 1px rgb(255 255 255 / 0.13);
    --shadow-overlay: 0 0 0 1px rgb(255 255 255 / 0.1), 0 24px 64px -12px rgb(0 0 0 / 0.7);
    --image-outline: rgb(255 255 255 / 0.1);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg-page: var(--night-900);
  --color-bg-surface: var(--night-850);
  --color-bg-raised: var(--night-800);
  --color-bg-sunken: var(--night-900);
  --color-bg-hover: var(--night-750);
  --color-text-primary: var(--night-50);
  --color-text-secondary: var(--night-200);
  --color-text-tertiary: var(--night-300);
  --color-text-inverse: var(--night-900);
  --color-text-on-accent: var(--amber-950);
  --color-border-subtle: var(--night-800);
  --color-border: var(--night-700);
  --color-border-strong: var(--night-500);
  --color-separator: var(--night-700);
  --color-focus-ring: var(--amber-400);
  --color-accent-subtle: var(--amber-900a);
  --color-accent-solid: var(--amber-500);
  --color-accent-solid-hover: var(--amber-300);
  --color-accent-text: var(--amber-400);
  --color-danger-text: var(--red-300);
  --shadow-border: 0 0 0 1px rgb(255 255 255 / 0.08);
  --shadow-border-hover: 0 0 0 1px rgb(255 255 255 / 0.13);
  --shadow-overlay: 0 0 0 1px rgb(255 255 255 / 0.1), 0 24px 64px -12px rgb(0 0 0 / 0.7);
  --image-outline: rgb(255 255 255 / 0.1);
}

/* ---------- 3. Типографика, отступы, форма, движение ---------- */
:root {
  --font-display: "Playfair Display", "Georgia", "Times New Roman", serif;
  --font-ui: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Шкала: в основном контенте ничего мельче 16px. 14px — только бейджи поверх кадров и клавиши. */
  --text-caption: 0.875rem;   /* 14 — бейджи на превью, kbd */
  --text-overline: 1rem;      /* 16 — надзаголовки (без капса) */
  --text-small: 1rem;         /* 16 — UI, кнопки, мета карточек */
  --text-body: 1.0625rem;     /* 17 — основной текст */
  --text-heading: 1.1875rem;  /* 19 — h3 */
  --text-title: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem);  /* 22–30 — h2 */
  --text-display: clamp(1.75rem, 1.2rem + 2.6vw, 3.25rem);  /* 28–52 — h1 */

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.5rem;  --space-6: 2rem;   --space-7: 3rem;    --space-8: 4rem; --space-9: 6rem;

  --radius-sm: 6px;   /* бейджи, kbd */
  --radius-md: 10px;  /* превью, инпуты, кнопки */
  --radius-lg: 14px;  /* постеры, панели */
  --radius-xl: 20px;  /* = 12 + 8: контейнер плеера с внутренним отступом */
  --radius-full: 999px;

  --container: 80rem;
  --gutter: clamp(1rem, 3.5vw, 2.5rem);
  --header-h: 3.5rem;
  --tap: 2.75rem;            /* 44px — минимальная тач-цель */
  --section-gap: clamp(2.5rem, 2rem + 2vw, 3rem);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  --ease-out: ease-out;
  --ease-emphasis: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 150ms;
  --dur-base: 300ms;
}

/* ---------- 4. База ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  scroll-padding-block-start: calc(var(--header-h) + var(--space-4));
}
body {
  margin: 0;
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: var(--text-body);
  line-height: 1.55;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-underline-position: from-font; text-decoration-thickness: from-font; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--color-accent-solid); color: var(--color-text-on-accent); }

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
@media (forced-colors: active) { :focus-visible { outline-color: Highlight; } }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: var(--space-4); inset-block-start: -100px; z-index: 100;
  background: var(--color-accent-solid); color: var(--color-text-on-accent);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-weight: 600; text-decoration: none;
}
.skip-link:focus { inset-block-start: var(--space-3); }

.no-transitions, .no-transitions * { transition: none !important; }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto;
  padding-inline: max(var(--gutter), var(--safe-l)) max(var(--gutter), var(--safe-r)); }
.stack > * + * { margin-block-start: var(--space-4); }
.section { padding-block: var(--section-gap); }
.section + .section { padding-block-start: 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-block-end: var(--space-5); flex-wrap: wrap; }
.section__title { font-family: var(--font-display); font-size: var(--text-title); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.section__lead { color: var(--color-text-secondary); max-width: 65ch; margin-block-start: var(--space-2); }

.overline { font-size: var(--text-overline); font-weight: 600; color: var(--color-accent-text); }
.muted { color: var(--color-text-secondary); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 5. Кнопки, ссылки, чипы ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--tap); padding-inline: 1.125rem; border-radius: var(--radius-md);
  border: 1px solid transparent; background: var(--color-bg-raised); color: var(--color-text-primary);
  box-shadow: var(--shadow-border);
  font-size: var(--text-small); font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition-property: background-color, box-shadow, scale; transition-duration: var(--dur-fast); transition-timing-function: var(--ease-out);
}
.btn--icon-start { padding-inline-start: 1rem; } /* на 2px меньше со стороны иконки */
.btn--icon-end { padding-inline-end: 1rem; }
.btn--primary { background: var(--color-accent-solid); color: var(--color-text-on-accent); box-shadow: none; }
.btn--ghost { background: transparent; box-shadow: none; }
.btn--on-media { background: rgb(255 255 255 / 0.14); color: var(--color-text-on-media); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.18); backdrop-filter: blur(8px); }
.btn--sm { padding-inline: 0.875rem; } /* тач-цель та же 44px, меньше только поля */
.btn--square { padding-inline: 0; width: var(--tap); }
@media (hover: hover) {
  .btn:hover { background: var(--color-bg-hover); box-shadow: var(--shadow-border-hover); }
  .btn--primary:hover { background: var(--color-accent-solid-hover); box-shadow: none; }
  .btn--ghost:hover { background: var(--color-bg-hover); box-shadow: none; }
  .btn--on-media:hover { background: rgb(255 255 255 / 0.22); }
}
@media (prefers-reduced-motion: no-preference) {
  .btn:not(:disabled):active { scale: 0.96; }
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

.link { color: var(--color-accent-text); font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--tap); }
.link:hover { text-decoration: underline; }

.chip {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap); padding-inline: 1rem;
  border-radius: var(--radius-full); border: 1px solid var(--color-border); background: var(--color-bg-surface);
  font-size: var(--text-small); font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition-property: background-color, border-color; transition-duration: var(--dur-fast);
}
@media (hover: hover) { .chip:hover { background: var(--color-bg-hover); } }
.chip[aria-pressed="true"], .chip:has(input:checked) {
  background: var(--color-accent-subtle); border-color: var(--color-accent-solid); color: var(--color-text-primary);
}
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:focus-visible) { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
.chip__check { display: none; }
.chip:has(input:checked) .chip__check { display: inline; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.badge {
  display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.125rem 0.5rem; border-radius: var(--radius-sm);
  font-size: var(--text-caption); font-weight: 600; line-height: 1.4; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.badge--media { background: rgb(0 0 0 / 0.72); color: #fff; }
.badge--outline { border: 1px solid var(--color-border-strong); color: var(--color-text-secondary); }

kbd {
  font-family: var(--font-ui); font-size: 0.75rem; font-weight: 600; min-width: 1.5rem; padding: 0.0625rem 0.375rem;
  border-radius: var(--radius-sm); border: 1px solid var(--color-border); background: var(--color-bg-sunken);
  color: var(--color-text-secondary); text-align: center;
}

/* ---------- 6. Шапка и навигация ----------
   Телефон (<48rem): логотип · поиск · меню. Планшет: + «Фильмы/Новые», случайный, тема. Десктоп (≥64rem): поле поиска с текстом. */
.site-header {
  position: sticky; top: 0; z-index: 50; padding-block-start: env(safe-area-inset-top, 0px);
  background: color-mix(in oklab, var(--color-bg-page) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-block-end: 1px solid var(--color-border-subtle);
}
@supports not (backdrop-filter: blur(1px)) { .site-header { background: var(--color-bg-page); } }
.site-header__row { display: flex; align-items: center; gap: var(--space-2); min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; white-space: nowrap; }
.logo__mark { width: 1.625rem; height: 1.625rem; color: var(--color-accent-solid); }
.logo__accent { color: var(--color-accent-text); }
.nav { display: none; gap: var(--space-1); margin-inline-start: var(--space-4); }
.nav a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: 0.75rem; border-radius: var(--radius-md); white-space: nowrap;
  text-decoration: none; font-size: var(--text-small); font-weight: 500; color: var(--color-text-secondary);
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
@media (hover: hover) { .nav a:hover { color: var(--color-text-primary); background: var(--color-bg-hover); } }
.nav a[aria-current="page"] { color: var(--color-text-primary); box-shadow: inset 0 -2px 0 var(--color-accent-solid); border-radius: 0; }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--space-1); }
.search-trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); width: var(--tap); height: var(--tap);
  border-radius: var(--radius-md); color: var(--color-text-primary); text-decoration: none; cursor: pointer;
}
.search-trigger__text { display: none; }
@media (hover: hover) { .search-trigger:hover { background: var(--color-bg-hover); } }
.theme-toggle .icon-sun, [data-theme-toggle] .icon-sun, .theme-label-light { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .icon-sun { display: block; }
:root[data-theme="dark"] [data-theme-toggle] .icon-moon { display: none; }
:root[data-theme="light"] .theme-label-dark { display: none; }
:root[data-theme="light"] .theme-label-light { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-theme-toggle] .icon-sun { display: block; }
  :root:not([data-theme="light"]) [data-theme-toggle] .icon-moon { display: none; }
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-label-dark { display: none; }
  :root:not([data-theme]) .theme-label-light { display: inline; }
}

/* Меню на телефоне: <details> без JS, закрывается по Esc и клику мимо (app.js) */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu .icon-close, .menu[open] .icon-menu { display: none; }
.menu[open] .icon-close { display: block; }
.menu__panel {
  position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + var(--space-2)); z-index: 60;
  min-width: 16rem; padding: var(--space-2); display: flex; flex-direction: column;
  background: var(--color-bg-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-overlay); border: 1px solid transparent;
}
.menu__panel a, .menu__panel button {
  display: flex; align-items: center; gap: var(--space-3); min-height: 3rem; padding-inline: var(--space-3); width: 100%;
  border: 0; border-radius: var(--radius-md); background: none; text-align: start; text-decoration: none; cursor: pointer;
  font-size: var(--text-body); font-weight: 500;
}
.menu__panel a[aria-current="page"] { color: var(--color-accent-text); font-weight: 600; }
@media (hover: hover) { .menu__panel a:hover, .menu__panel button:hover { background: var(--color-bg-hover); } }

@media (min-width: 48rem) {
  :root { --header-h: 4rem; }
  .nav { display: flex; }
}
@media (min-width: 64rem) {
  .search-trigger {
    width: clamp(14rem, 22vw, 20rem); justify-content: flex-start; padding-inline: 0.75rem;
    border: 1px solid var(--color-border); background: var(--color-bg-sunken); color: var(--color-text-secondary); font-size: var(--text-small);
  }
  .search-trigger__text { display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  @media (hover: hover) { .search-trigger:hover { background: var(--color-bg-sunken); border-color: var(--color-border-strong); } }
  .header-actions { gap: var(--space-2); }
}

/* Хлебные крошки */
.breadcrumbs { padding-block-start: var(--space-3); }
.breadcrumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); font-size: var(--text-small); color: var(--color-text-secondary); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; }
.breadcrumbs li + li::before { content: "/"; color: var(--color-text-tertiary); }
.breadcrumbs a { text-decoration: none; display: inline-flex; min-height: var(--tap); min-width: var(--tap); justify-content: center; align-items: center; }
.breadcrumbs a:hover { color: var(--color-text-primary); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--color-text-primary); max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* На телефоне из крошек остаётся одна ссылка «← на уровень выше» */
@media (max-width: 47.99rem) {
  .breadcrumbs li { display: none; }
  .breadcrumbs li.breadcrumbs__up { display: inline-flex; }
  .breadcrumbs li.breadcrumbs__up::before { content: none; }
  .breadcrumbs li.breadcrumbs__up a { gap: var(--space-2); min-width: var(--tap); }
  .breadcrumbs li.breadcrumbs__up a::before { content: "←"; color: var(--color-text-secondary); }
}

/* ---------- 7. Карточка момента ---------- */
/* 1 колонка на телефоне → 2 на планшете → 3 на 1024 → 4 на 1280+; считается от ширины самого блока */
.grid-moments { display: grid; gap: var(--space-5) var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr)); }
@media (min-width: 64rem) { .grid-moments { grid-template-columns: repeat(auto-fill, minmax(13.75rem, 1fr)); } }
.grid--fit { grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); }
@media (min-width: 64rem) { .grid--fit { grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr)); } }
.m-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.m-card__link { text-decoration: none; display: flex; flex-direction: column; gap: var(--space-3); border-radius: var(--radius-md); }
.m-card__thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-md); background: var(--color-bg-media);
}
.m-card__thumb img { width: 100%; height: 100%; object-fit: cover; outline: 1px solid var(--image-outline); outline-offset: -1px; border-radius: inherit; }
.m-card__play {
  position: absolute; inset: 0; display: grid; place-items: center; color: #fff; opacity: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.55), rgb(0 0 0 / 0.1));
  transition: opacity var(--dur-fast) var(--ease-out); pointer-events: none;
}
.m-card__play span { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: rgb(0 0 0 / 0.55); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.25); }
.m-card__play .icon { transform: translateX(2px); width: 1.25rem; height: 1.25rem; }
@media (hover: hover) { .m-card__link:hover .m-card__play { opacity: 1; } .m-card__link:hover .m-card__title { text-decoration: underline; text-decoration-color: var(--color-border-strong); } }
.m-card__link:focus-visible .m-card__play { opacity: 1; }
.m-card__dur { position: absolute; inset-block-end: var(--space-2); inset-inline-end: var(--space-2); }
.m-card__num { position: absolute; inset-block-start: var(--space-2); inset-inline-start: var(--space-2); }
/* Пометка озвучки (Гоблин / английский / субтитры): в правом верхнем углу превью, не перекрывает номер */
.m-card__voice { position: absolute; inset-block-start: var(--space-2); inset-inline-end: var(--space-2); display: block; max-width: calc(100% - 3.5rem); overflow: hidden; text-overflow: ellipsis; }
.m-card__title {
  font-size: var(--text-body); font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: break-word;
}
.m-card__meta { font-size: var(--text-small); color: var(--color-text-secondary); min-height: var(--tap); display: flex; align-items: center; }
.m-card__meta a { text-decoration: none; color: var(--color-text-secondary); min-height: var(--tap); min-width: var(--tap); display: inline-flex; align-items: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.m-card__meta a:hover { text-decoration: underline; }
.m-card[aria-current="true"] .m-card__thumb { box-shadow: 0 0 0 2px var(--color-accent-solid); }
.m-card.is-unavailable .m-card__thumb::after {
  content: "Видео недоступно"; position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--color-bg-sunken); color: var(--color-text-secondary); font-size: var(--text-small); font-weight: 600;
}

/* Горизонтальная лента с подсказкой «есть ещё» (следующая карточка выглядывает) */
/* Лента: на телефоне до краёв экрана, следующая карточка выглядывает на ~15% — это и есть подсказка прокрутки */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: var(--space-4);
  overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; padding-block-end: var(--space-3);
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 36rem) { .rail { grid-auto-columns: 44%; } }
@media (min-width: 64rem) { .rail { grid-auto-columns: 23%; margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; } }
.rail-wrap { position: relative; }
.rail-controls { display: flex; gap: var(--space-2); }
@media (hover: none) { .rail-controls { display: none; } } /* на тач-экранах ленту листают пальцем */
/* Мышью ленту можно тянуть (app.js); на время перетаскивания snap и плавная прокрутка выключены */
@media (hover: hover) and (pointer: fine) { .rail, .rail a { cursor: grab; } }
.rail img { -webkit-user-drag: none; user-select: none; }
.rail.is-dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.rail.is-dragging * { cursor: grabbing; pointer-events: none; }

/* ---------- 8. Карточка фильма ---------- */
/* Постеры: 2 в ряд на телефоне, 4–5 на планшете, 6–7 на десктопе */
.grid-movies { display: grid; gap: var(--space-5) var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(10rem, 40%), 1fr)); }
@media (max-width: 47.99rem) { .grid--trim > :nth-child(n+7) { display: none; } } /* на телефоне витрины короче */
.f-card { position: relative; display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.f-card__poster img { aspect-ratio: 2 / 3; }
.f-card__link { text-decoration: none; display: flex; flex-direction: column; gap: var(--space-3); border-radius: var(--radius-lg); }
.f-card__poster { position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius-lg); overflow: hidden; background: var(--color-bg-sunken); }
.f-card__poster img { width: 100%; height: 100%; object-fit: cover; outline: 1px solid var(--image-outline); outline-offset: -1px; border-radius: inherit;
  transition: scale var(--dur-base) var(--ease-emphasis); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .f-card__link:hover .f-card__poster img { scale: 1.03; } }
.f-card__rating { position: absolute; inset-block-start: var(--space-2); inset-inline-start: var(--space-2); }
.f-card__title { font-size: var(--text-body); font-weight: 600; line-height: 1.3; overflow-wrap: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.f-card__meta { font-size: var(--text-small); color: var(--color-text-secondary); }
.rating { display: inline-flex; align-items: center; gap: 0.25rem; font-variant-numeric: tabular-nums; }
.rating .icon { width: 0.875rem; height: 0.875rem; color: var(--color-rating); }

/* ---------- 9. Главная: герой «Момент дня» ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; color: var(--color-text-on-media); background: var(--color-bg-media); }
.hero__bg { position: absolute; inset: -40px; z-index: -2; background-size: cover; background-position: center; filter: blur(28px) saturate(1.2); opacity: 0.55; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgb(10 8 6 / 0.92) 0%, rgb(10 8 6 / 0.7) 45%, rgb(10 8 6 / 0.35) 100%),
  linear-gradient(0deg, var(--color-bg-media) 0%, transparent 30%); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: center; padding-block: var(--space-4) var(--space-6); }
.hero__media { order: -1; }
@media (min-width: 64rem) {
  .hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-7); padding-block: var(--space-8); }
  .hero__media { order: 0; }
}
.hero__title { font-family: var(--font-display); font-size: var(--text-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; margin-block: var(--space-2) var(--space-3); max-width: 22ch; }
.hero__meta { color: rgb(255 255 255 / 0.82); }
.hero__meta a { color: #fff; font-weight: 600; text-decoration: none; }
.hero__meta a:hover { text-decoration: underline; }
.hero__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-block-start: var(--space-5); }
.hero__actions > .btn { flex: 1 1 12rem; }
@media (min-width: 36rem) { .hero__actions > .btn { flex: 0 0 auto; } }
.hero__overline { color: var(--amber-300); font-weight: 600; }
.hero__stats { margin-block-start: var(--space-5); color: rgb(255 255 255 / 0.78); font-size: var(--text-small); max-width: 60ch; }

/* ---------- 10. Плеер (lite-YouTube) ---------- */
.player-frame { padding: var(--space-2); border-radius: var(--radius-xl); background: var(--color-bg-surface); box-shadow: var(--shadow-border); border: 1px solid transparent; }
/* Телефон: плеер страницы момента 16:9 во всю ширину экрана, без рамки */
@media (max-width: 39.99rem) {
  .watch .player-frame { margin-inline: calc(var(--gutter) * -1); padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
  .watch .player { border-radius: 0; }
}
/* Телефон в альбомной ориентации: плеер не выше экрана */
@media (orientation: landscape) and (max-height: 30rem) {
  .site-header { position: static; }
  .watch .player-frame:not(.player-frame--vertical) { max-width: calc((100svh - 1rem) * 16 / 9); margin-inline: auto; }
}
.player { display: block; position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--color-bg-media); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lite-yt {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; color: #fff;
  background-color: var(--color-bg-media); background-size: cover; background-position: center;
  display: grid; place-items: center;
}
.lite-yt::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / 0.6), transparent 50%); }
.lite-yt__btn {
  position: relative; width: clamp(3.5rem, 12vw, 4.5rem); height: clamp(3.5rem, 12vw, 4.5rem); border-radius: 50%; display: grid; place-items: center;
  background: var(--color-accent-solid); color: var(--color-text-on-accent); box-shadow: 0 8px 32px rgb(0 0 0 / 0.45);
  transition: scale var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.lite-yt__btn .icon { width: 1.75rem; height: 1.75rem; transform: translateX(2px); }
@media (hover: hover) { .lite-yt:hover .lite-yt__btn { background: var(--color-accent-solid-hover); } }
@media (prefers-reduced-motion: no-preference) { .lite-yt:active .lite-yt__btn { scale: 0.96; } }
.lite-yt__label { position: absolute; inset-inline-start: var(--space-3); inset-block-end: var(--space-3); display: flex; gap: var(--space-2); align-items: center; font-size: var(--text-small); font-weight: 600; }
.lite-yt:focus-visible { outline-offset: -4px; }

.player-overlay {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center; padding: var(--space-5);
  background: rgb(10 8 6 / 0.86); color: #fff;
}
.player-overlay[hidden] { display: none; }
.player-overlay__title { font-family: var(--font-display); font-size: clamp(1.125rem, 0.9rem + 1vw, 1.5rem); font-weight: 600; line-height: 1.25; margin-block: var(--space-2) var(--space-4); max-width: 36ch; margin-inline: auto; }
.player-overlay__actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }
.countdown { font-variant-numeric: tabular-nums; }

/* ---------- 11. Страница момента ----------
   Телефон (<48rem): плеер → название, мета, действия → лента моментов фильма (горизонтально) → о фильме → ещё.
   Планшет и десктоп: плеер, о фильме и «ещё» слева, список моментов справа (липкий, прокручен к текущему). */
.watch { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "list" "about" "more"; gap: var(--space-5);
  padding-block: var(--space-3) var(--section-gap); }
#watch-info { grid-area: main; min-width: 0; }
.watch__about { grid-area: about; min-width: 0; display: grid; gap: var(--space-5); align-content: start; }
.watch__about > * { margin-block: 0; }
.watch > .playlist { grid-area: list; min-width: 0; }
.watch__more { grid-area: more; min-width: 0; }
.watch__more .section { padding-block: 0; }
.watch__more .section + .section { margin-block-start: var(--section-gap); }
.watch--single { grid-template-areas: "main" "about" "more"; }
@media (min-width: 48rem) {
  .watch:not(.watch--single) { grid-template-columns: minmax(0, 1fr) minmax(15rem, 18rem); grid-template-areas: "main list" "about list" "more more";
    grid-template-rows: auto 1fr auto; align-items: start; column-gap: var(--space-5); }
}
@media (min-width: 64rem) {
  .watch:not(.watch--single) { grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem); grid-template-areas: "main list" "about list" "more list"; column-gap: var(--space-6); }
}
.watch__title { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin-block: var(--space-4) var(--space-2); max-width: 32ch; }
.watch__meta { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-2); row-gap: var(--space-1); color: var(--color-text-secondary); }
.watch__meta a { color: var(--color-text-primary); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); }
.watch__meta a:hover { text-decoration: underline; }
/* «Фильм», год · длительность [шортс] [перевод]: перенос строки — только после названия фильма */
.watch__facts { display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap; }
.watch__dot { color: var(--color-text-tertiary); }
.watch__fmt { display: inline-flex; align-items: center; color: var(--color-text-secondary); }
.watch__fmt .icon { width: 1.125rem; height: 1.125rem; }
.watch__voice { margin-inline-start: var(--space-1); }

/* Действия: телефон — «Следующий» во всю ширину, ниже «Предыдущий» · «Поделиться» · «⋯» («Ещё из этого фильма»,
   «Случайный»), автоплей отдельной строкой; от 40rem — одна строка, автоплей справа; от 48rem «⋯» не нужен —
   моменты фильма в списке сбоку */
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--tap); gap: var(--space-3); align-items: center; margin-block-start: var(--space-4); }
.toolbar__next, .toolbar__auto { grid-column: 1 / -1; }
.toolbar__next { min-height: 3.25rem; font-size: var(--text-body); }
.toolbar__auto { justify-self: start; }
.toolbar > .btn { min-width: 0; }
@media (max-width: 22.5rem) { .toolbar__prev .icon, .toolbar__share .icon { display: none; } .toolbar > .btn { padding-inline: var(--space-2); } }
@media (min-width: 40rem) {
  .toolbar { display: flex; flex-wrap: wrap; }
  .toolbar__next { min-height: var(--tap); font-size: var(--text-small); order: 2; }
  .toolbar__prev { order: 1; }
  .toolbar__share { order: 4; }
  .toolbar__more { order: 5; }
  .toolbar__auto { order: 6; margin-inline-start: auto; }
}
.toolbar__more { position: relative; }
.toolbar__more > summary { list-style: none; }
.toolbar__more > summary::-webkit-details-marker { display: none; }
.toolbar__menu { position: absolute; inset-inline-end: 0; inset-block-end: calc(100% + var(--space-2)); z-index: 5; min-width: 15rem; padding: var(--space-2);
  display: grid; background: var(--color-bg-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-overlay); }
.toolbar__menu a { display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap); padding-inline: var(--space-3); border-radius: var(--radius-md);
  text-decoration: none; font-weight: 500; white-space: nowrap; }
.toolbar__menu a:hover, .toolbar__menu a:focus-visible { background: var(--color-bg-hover); }
.toolbar__more[open] > summary { background: var(--color-bg-hover); }
/* Горячие клавиши — только там, где есть клавиатура и место */
.hotkeys { display: none; margin-block-start: var(--space-3); color: var(--color-text-tertiary); font-size: var(--text-small); }
.hotkeys kbd { margin-inline: var(--space-2) var(--space-1); }
.hotkeys kbd:first-child { margin-inline-start: 0; }
@media (min-width: 64rem) and (hover: hover) and (pointer: fine) { .hotkeys { display: block; } }

.switch { display: inline-flex; align-items: center; gap: var(--space-3); min-height: var(--tap); cursor: pointer; font-size: var(--text-small); font-weight: 500; }
.switch__track { position: relative; width: 2.5rem; height: 1.5rem; border-radius: var(--radius-full); background: var(--color-bg-sunken); border: 1px solid var(--color-border-strong); flex: none;
  transition: background-color var(--dur-fast) var(--ease-out); }
.switch__thumb { position: absolute; inset-block-start: 2px; inset-inline-start: 2px; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: var(--color-text-secondary);
  transition: translate var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); }
.switch[aria-checked="true"] .switch__track { background: var(--color-accent-solid); border-color: var(--color-accent-solid); }
.switch[aria-checked="true"] .switch__thumb { translate: 1rem 0; background: var(--color-text-on-accent); }
.switch { background: none; border: 0; padding: 0; color: inherit; }
.switch__state { color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }

/* «Смотреть на YouTube»: владелец запретил встраивание — кадр и крупная кнопка вместо плеера */
.player--external .ext-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-decoration: none; }
.ext-play::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgb(10 8 6 / 0.55); transition: background-color var(--dur-fast) var(--ease-out); }
.ext-play__body { position: relative; z-index: 2; display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-4); text-align: center; }
.btn--lg { min-height: 3.25rem; padding-inline: 1.5rem; font-size: var(--text-body); }
.ext-play__note { color: rgb(255 255 255 / 0.85); font-size: var(--text-small); max-width: 34ch; text-wrap: balance; }
@media (hover: hover) { .ext-play:hover::before { background: rgb(10 8 6 / 0.4); } .ext-play:hover .ext-play__btn { background: var(--color-accent-solid-hover); } }
.ext-play:focus-visible { outline-offset: -4px; }

/* Карточка фильма под моментом */
.film-card { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: var(--space-4); align-items: start; padding: var(--space-4);
  background: var(--color-bg-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-border); max-width: 48rem; }
@media (min-width: 40rem) { .film-card { grid-template-columns: 6.5rem minmax(0, 1fr); } }
.film-card__poster { display: block; aspect-ratio: 2 / 3; border-radius: var(--radius-md); overflow: hidden; background: var(--color-bg-sunken); }
.film-card__poster img { width: 100%; height: 100%; object-fit: cover; }
.film-card__body { display: grid; gap: var(--space-1); min-width: 0; }
.film-card__kind { color: var(--color-text-secondary); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); }
.film-card__title { font-family: var(--font-display); font-size: var(--text-heading); font-weight: 600; line-height: 1.25; }
.film-card__title a { text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); }
.film-card__title a:hover { text-decoration: underline; }
.film-card__desc { color: var(--color-text-secondary); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.film-card__all { justify-self: start; }
.grid--four { grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); }
@media (min-width: 64rem) { .grid--four { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); } }

/* Список моментов фильма. Телефон: горизонтальная лента (.rail: свайп, перетаскивание мышью).
   Планшет/десктоп: вертикальный список сбоку, прокручивается к текущему (app.js). */
.playlist { display: flex; flex-direction: column; min-width: 0; }
.playlist__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); padding-block-end: var(--space-3); }
.playlist__title { font-size: var(--text-heading); font-weight: 600; line-height: 1.3; }
.playlist__list { list-style: none; margin-block: 0; }
.playlist__list.rail { grid-auto-columns: min(70%, 15rem); gap: var(--space-3); }
.playlist__item { min-width: 0; }
.playlist__item a { display: flex; flex-direction: column; gap: var(--space-2); height: 100%; padding: var(--space-1); border-radius: var(--radius-md); text-decoration: none; color: inherit;
  -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-fast) var(--ease-out); }
@media (hover: hover) { .playlist__item a:hover { background: var(--color-bg-hover); } .playlist__item a:hover .playlist__t { text-decoration: underline; text-decoration-color: var(--color-border-strong); } }
.playlist__item a:focus-visible { outline-offset: 0; }
.playlist__item a[aria-current="page"] { background: var(--color-accent-subtle); box-shadow: inset 0 0 0 2px var(--color-accent-solid); }
.playlist__thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-bg-media); flex: none; }
.playlist__thumb img { width: 100%; height: 100%; object-fit: cover; outline: 1px solid var(--image-outline); outline-offset: -1px; }
.playlist__dur { position: absolute; inset-block-end: 0.25rem; inset-inline-end: 0.25rem; padding: 0 0.375rem; }
.playlist__now { position: absolute; inset-block-start: 0.25rem; inset-inline-start: 0.25rem; padding: 0 0.375rem; background: var(--color-accent-solid); color: var(--color-text-on-accent); }
.playlist__now .icon { width: 0.75rem; height: 0.75rem; }
.playlist__body { display: grid; gap: var(--space-1); min-width: 0; padding-inline: var(--space-1); }
.playlist__t { font-size: var(--text-small); line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  overflow-wrap: break-word; text-wrap: pretty; }
.playlist__item a[aria-current="page"] .playlist__t { font-weight: 600; }
.playlist__tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.playlist__tags .badge { padding-inline: 0.375rem; }
.playlist__tags .icon { width: 0.875rem; height: 0.875rem; }
/* Просмотрено (localStorage km-seen, app.js): галочка на превью, кадр чуть приглушён */
.playlist__item.is-seen:not(.is-current) .playlist__thumb img, .m-card.is-seen .m-card__thumb img { opacity: 0.6; }
.playlist__item.is-seen:not(.is-current) .playlist__thumb::after, .m-card.is-seen .m-card__thumb::before {
  content: "✓ Просмотрено"; position: absolute; inset-block-start: 0.25rem; inset-inline-start: 0.25rem; z-index: 1; padding: 0 0.375rem;
  border-radius: var(--radius-sm); background: rgb(0 0 0 / 0.72); color: #fff; font-size: var(--text-caption); font-weight: 600; line-height: 1.4; }
.m-card.is-seen .m-card__thumb::before { inset-block-start: var(--space-2); inset-inline-start: var(--space-2); }
@media (min-width: 48rem) {
  .playlist { position: sticky; top: calc(var(--header-h) + var(--space-3)); max-height: calc(100dvh - var(--header-h) - var(--space-5));
    background: var(--color-bg-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-border); }
  .playlist__head { padding: var(--space-3) var(--space-4); border-block-end: 1px solid var(--color-separator); }
  .playlist__list.rail { display: block; flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; margin: 0; padding: var(--space-2); scroll-snap-type: none; overscroll-behavior: contain; scrollbar-width: thin; }
  .playlist__list.rail, .playlist__list.rail a { cursor: pointer; }
  .playlist__item + .playlist__item { margin-block-start: 0.125rem; }
  .playlist__item a { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: start; gap: var(--space-3); padding: var(--space-2); min-height: var(--tap); }
  .playlist__body { padding-inline: 0; }
}
@media (min-width: 64rem) { .playlist__item a { grid-template-columns: 8rem minmax(0, 1fr); } }

/* ---------- 12. Страница фильма ---------- */
.film-hero { position: relative; isolation: isolate; overflow: hidden; }
.film-hero__bg { position: absolute; inset: -60px; z-index: -2; background-size: cover; background-position: center 25%; filter: blur(40px) saturate(1.3); opacity: 0.35; }
.film-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, transparent 0%, var(--color-bg-page) 92%); }
.film-hero__grid { display: grid; grid-template-columns: minmax(10rem, 17rem) minmax(0, 1fr); gap: clamp(var(--space-5), 4vw, var(--space-7)); padding-block: var(--space-5) var(--space-6); align-items: start; }
.film-hero__kind { color: var(--color-text-secondary); font-weight: 500; }
.film-hero__poster { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 2/3; box-shadow: var(--shadow-overlay); background: var(--color-bg-sunken); }
.film-hero__poster img { width: 100%; height: 100%; object-fit: cover; }
.film-hero__title { font-family: var(--font-display); font-size: var(--text-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin-block: var(--space-2) var(--space-1); }
.film-hero__orig { color: var(--color-text-secondary); font-size: var(--text-heading); font-style: italic; font-family: var(--font-display); }
.facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-block: var(--space-5); align-items: center; }
.fact { display: flex; flex-direction: column; gap: 0.125rem; }
.fact__label { font-size: var(--text-small); color: var(--color-text-secondary); }
.fact__value { margin: 0; }
.fact__value { font-size: var(--text-heading); font-weight: 600; font-variant-numeric: tabular-nums; display: inline-flex; gap: 0.375rem; align-items: center; }
.fact__value small { font-size: var(--text-small); color: var(--color-text-secondary); font-weight: 400; color: var(--color-text-tertiary); }
.desc { max-width: 68ch; color: var(--color-text-secondary); margin-block-start: var(--space-5); }
.desc[data-collapsed="true"] { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.desc-toggle { margin-block-start: var(--space-2); }
.film-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-block-start: var(--space-5); }
@media (max-width: 39.99rem) {
  .film-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .film-actions > .btn--primary { grid-column: 1 / -1; }
  .film-actions > .btn { padding-inline: var(--space-2); min-width: 0; }
  .film-actions > .btn, .toolbar > .btn { white-space: normal; line-height: 1.2; text-align: center; padding-block: var(--space-2); }
}
.cast { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-block-start: var(--space-4); }
@media (max-width: 40rem) {
  .film-hero__grid { grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--space-4); padding-block-end: var(--space-5); }
  .film-hero__body { display: contents; }
  .film-hero__head { align-self: end; }
  .film-hero__rest { grid-column: 1 / -1; }
  .film-hero__orig { font-size: var(--text-body); }
}

.filter-inline { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; width: 100%; }
.filter-inline__field { flex: 1 1 100%; }
@media (min-width: 40rem) { .filter-inline { width: auto; } .filter-inline__field { flex: 0 1 20rem; } }
.section--first { padding-block-start: var(--space-4); }
.page-head { padding-block-start: var(--space-4); }
.input {
  min-height: 2.75rem; width: 100%; padding-inline: 0.875rem; border-radius: var(--radius-md);
  border: 1px solid var(--color-border-strong); background: var(--color-bg-surface); color: var(--color-text-primary);
  font-size: 1rem; /* 16px: без автозума iOS */
}
.input::placeholder { color: var(--color-text-tertiary); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .icon { position: absolute; inset-inline-start: 0.75rem; color: var(--color-text-tertiary); pointer-events: none; }
.input-wrap .input { padding-inline-start: 2.5rem; }
select.input { padding-inline-end: 2rem; appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 1.1rem) 52%, calc(100% - 0.75rem) 52%; background-size: 0.35rem 0.35rem; background-repeat: no-repeat; }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field__label, .fieldset legend { font-size: var(--text-small); font-weight: 600; }
.fieldset { border: 0; padding: 0; margin: 0; }
.fieldset legend { margin-block-end: var(--space-2); padding: 0; }
.hint { font-size: var(--text-small); color: var(--color-text-secondary); line-height: 1.4; }

/* ---------- 13. Каталог ---------- */
.catalog { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: var(--space-6); padding-block: var(--space-5) var(--space-8); align-items: start; }
.filters { display: flex; flex-direction: column; gap: var(--space-5); position: sticky; top: calc(var(--header-h) + var(--space-4)); max-height: calc(100dvh - var(--header-h) - 2rem); overflow-y: auto; overscroll-behavior: contain; padding-inline-end: var(--space-2); }
.filters-toggle { display: none; }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-block-end: var(--space-4); min-height: 2.75rem; }
.active-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-block-end: var(--space-4); }
.active-filters:empty { display: none; }
.results-count { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 56rem) {
  .catalog { grid-template-columns: 1fr; }
  .filters-toggle { display: inline-flex; }
  .filters { position: static; max-height: none; overflow: visible; padding: var(--space-4); border-radius: var(--radius-lg); background: var(--color-bg-surface); box-shadow: var(--shadow-border); border: 1px solid transparent; }
  .filters[data-open="false"] { display: none; }
}

/* Подборки */
.grid-collections { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(22rem, 100%), 1fr)); }
.collection { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-4); align-items: center; padding: var(--space-4);
  border-radius: var(--radius-lg); background: var(--color-bg-surface); box-shadow: var(--shadow-border); border: 1px solid transparent; text-decoration: none;
  transition: box-shadow var(--dur-fast) var(--ease-out); }
@media (hover: hover) { .collection:hover { box-shadow: var(--shadow-border-hover); background: var(--color-bg-hover); } }
.collection__title, .collection__text, .collection__count { display: block; }
.collection__title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
.collection__text { font-size: var(--text-small); color: var(--color-text-secondary); margin-block-start: var(--space-1); line-height: 1.45; }
.collection__count { font-size: var(--text-small); color: var(--color-accent-text); font-weight: 600; margin-block-start: var(--space-2); }
.collection__stack { display: flex; }
.collection__stack img { width: 3.25rem; aspect-ratio: 2/3; object-fit: cover; border-radius: var(--radius-sm); outline: 2px solid var(--color-bg-surface); }
.collection__stack img + img { margin-inline-start: -1.25rem; }

/* Пустое состояние, скелетон */
.empty { text-align: center; padding: var(--space-8) var(--space-4); border: 1px dashed var(--color-border); border-radius: var(--radius-lg); }
.empty__title { font-size: var(--text-heading); font-weight: 600; }
.empty__text { color: var(--color-text-secondary); margin-block: var(--space-2) var(--space-5); max-width: 60ch; margin-inline: auto; }
.skeleton { background: var(--color-bg-sunken); border-radius: var(--radius-md); }
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: pulse 1.6s ease-in-out infinite both; }
  @keyframes pulse { 50% { opacity: 0.55; } }
}
.sk-card { display: flex; flex-direction: column; gap: var(--space-3); }
.sk-thumb { aspect-ratio: 16/9; }
.sk-line { height: 1rem; width: 80%; }
.sk-line--short { width: 45%; }

/* ---------- 14. Диалоги: поиск и шаринг ---------- */
dialog {
  border: 1px solid transparent; padding: 0; color: var(--color-text-primary); background: var(--color-bg-raised);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-overlay); width: min(40rem, calc(100% - 1rem)); max-height: min(36rem, calc(100dvh - 2rem));
  overscroll-behavior: contain;
}
dialog::backdrop { background: rgb(10 8 6 / 0.55); backdrop-filter: blur(2px); }
@media (prefers-reduced-motion: no-preference) {
  dialog[open] { animation: dialog-in 200ms var(--ease-out) both; }
  @keyframes dialog-in { from { opacity: 0; transform: translateY(8px); } }
}
@media (prefers-reduced-motion: reduce) {
  dialog[open] { animation: fade-in 150ms linear both; }
  @keyframes fade-in { from { opacity: 0; } }
}
.search-dialog { margin-block-start: max(var(--space-2), env(safe-area-inset-top, 0px), min(10vh, 6rem)); display: none; flex-direction: column; }
.search-dialog[open] { display: flex; }
.search-dialog__head { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4); border-block-end: 1px solid var(--color-separator); }
.search-dialog__head .icon { color: var(--color-text-tertiary); }
.search-dialog__input { flex: 1; min-height: 2.75rem; border: 0; background: transparent; font-size: 1.0625rem; outline: none; }
.search-dialog__body { overflow-y: auto; overscroll-behavior: contain; padding: var(--space-2); }
.search-group + .search-group { margin-block-start: var(--space-3); }
.search-group__label { font-size: var(--text-small); font-weight: 600; color: var(--color-text-secondary); padding: var(--space-2) var(--space-3); }
.search-list { list-style: none; margin: 0; padding: 0; }
.search-option { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); cursor: pointer; min-height: 3rem; }
.search-option[aria-selected="true"] { background: var(--color-accent-subtle); box-shadow: inset 3px 0 0 var(--color-accent-solid); }
.search-option img { width: 2.25rem; aspect-ratio: 2/3; object-fit: cover; border-radius: 4px; flex: none; }
.search-option img.is-wide { width: 4rem; aspect-ratio: 16/9; }
.search-option__text { min-width: 0; display: flex; flex-direction: column; }
.search-option__title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-option__meta { font-size: var(--text-small); color: var(--color-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
mark { background: transparent; color: var(--color-accent-text); font-weight: 700; }
@media (hover: none) { .search-dialog__foot { display: none !important; } }
.search-dialog__foot { display: flex; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-3) var(--space-4); border-block-start: 1px solid var(--color-separator); font-size: var(--text-caption); color: var(--color-text-secondary); }
.search-empty { padding: var(--space-6) var(--space-4); text-align: center; color: var(--color-text-secondary); }

.share-dialog { padding: var(--space-5); width: min(30rem, calc(100% - 2rem)); }
.share-dialog h2 { font-size: var(--text-title); font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin-block-end: var(--space-4); }
.share-row { display: flex; gap: var(--space-2); }
.share-row .input { flex: 1; min-width: 0; font-size: 1rem; }
.share-time { display: flex; align-items: center; gap: var(--space-3); margin-block: var(--space-4); flex-wrap: wrap; }
.share-time label { display: inline-flex; gap: var(--space-2); align-items: center; min-height: 2.75rem; cursor: pointer; }
.share-time input[type="checkbox"] { width: 1.25rem; height: 1.25rem; accent-color: var(--color-accent-solid); }
.share-time .input { width: 6rem; font-variant-numeric: tabular-nums; }
.share-targets { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-block-start: var(--space-4); }
.dialog-close { position: absolute; inset-block-start: var(--space-3); inset-inline-end: var(--space-3); }

.toast { position: fixed; inset-block-end: calc(var(--space-5) + var(--safe-b)); inset-inline-start: 50%; translate: -50% 0; z-index: 90;
  background: var(--color-text-primary); color: var(--color-text-inverse); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  font-size: var(--text-small); font-weight: 500; box-shadow: var(--shadow-overlay); }
.toast:empty { display: none; }

/* ---------- 15. Футер ---------- */
.site-footer { border-block-start: 1px solid var(--color-separator); background: var(--color-bg-surface); padding-block: var(--space-7) calc(var(--space-6) + var(--safe-b)); margin-block-start: var(--section-gap); font-size: var(--text-small); }
.footer-about { margin-block-start: var(--space-3); max-width: 40ch; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5) var(--space-6); }
.footer-grid > :first-child { grid-column: 1 / -1; }
@media (max-width: 47.99rem) { .footer-grid > nav[aria-labelledby="f-genres"] { display: none; } }
@media (min-width: 64rem) { .footer-grid { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); } .footer-grid > :first-child { grid-column: auto; } }
.footer-grid h2 { font-size: var(--text-small); font-weight: 600; margin-block-end: var(--space-3); }
.footer-grid ul { list-style: none; padding: 0; display: flex; flex-direction: column; }
.footer-grid a { color: var(--color-text-secondary); text-decoration: none; display: inline-flex; min-height: var(--tap); align-items: center; }
.footer-grid a:hover { color: var(--color-text-primary); text-decoration: underline; }
.footer-note { margin-block-start: var(--space-6); padding-block-start: var(--space-4); border-block-start: 1px solid var(--color-separator); color: var(--color-text-secondary); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }



/* Плавное появление героя один раз при загрузке */
@media (prefers-reduced-motion: no-preference) {
  .enter > * { animation: enter 300ms var(--ease-out) both; }
  .enter > :nth-child(2) { animation-delay: 100ms; }
  .enter > :nth-child(3) { animation-delay: 200ms; }
  .enter > :nth-child(4) { animation-delay: 300ms; }
  .enter > :nth-child(5) { animation-delay: 400ms; }
  @keyframes enter { from { opacity: 0; filter: blur(4px); transform: translateY(12px); } }
}


/* ==========================================================================
   Дополнения для статической версии (kinomoment build)
   ========================================================================== */
.lite-yt__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lite-yt__btn, .lite-yt__label { z-index: 1; }
.lite-yt::before { z-index: 1; }

/* Мёртвый ролик: заглушка вместо плеера */
.player--dead { display: grid; place-items: center; text-align: center; color: #fff;
  background: radial-gradient(ellipse at center, var(--night-800, #25211d), var(--color-bg-media)); }
.player-dead { padding: var(--space-5); max-width: 40rem; }
.player-dead .overline { color: var(--amber-400); }
.player-dead__reason { color: rgb(255 255 255 / 0.82); margin-block-end: var(--space-5); font-size: var(--text-small); max-width: 50ch; margin-inline: auto; }
@media (max-width: 40rem) { .player--dead { aspect-ratio: auto; min-height: 16rem; } }

/* Вертикальные ролики (YouTube Shorts): 9:16, на десктопе по центру с ограниченной высотой */
.player--vertical { aspect-ratio: 9 / 16; max-height: min(78vh, 46rem); margin-inline: auto; }
/* Ширина рамки задаётся явно: fit-content + процентная ширина плеера схлопывались в 0 */
.player-frame--vertical { --vw: calc(min(78vh, 46rem) * 9 / 16); width: min(100%, calc(var(--vw) + 2 * var(--space-2) + 2px)); margin-inline: auto; }
.player-frame--vertical .player--vertical { width: 100%; }
@media (max-width: 40rem) { .player-frame--vertical { width: min(100%, calc(80svh * 9 / 16)); } .player-frame--vertical .player--vertical { max-height: 80svh; } .watch .player-frame--vertical { margin-inline: auto; } }
.m-card--vertical .m-card__thumb { aspect-ratio: 9 / 16; }
.m-card__ext { position: absolute; inset-block-start: var(--space-2); inset-inline-start: var(--space-2); }
.m-card__ext .icon { width: 0.875rem; height: 0.875rem; }
.m-card__fmt { position: absolute; inset-block-start: var(--space-2); inset-inline-end: var(--space-2); display: inline-flex; gap: 0.25rem; align-items: center; }
.m-card__fmt .icon { width: 0.875rem; height: 0.875rem; }
.rail--shorts { grid-auto-columns: 46%; }
@media (min-width: 36rem) { .rail--shorts { grid-auto-columns: 28%; } }
@media (min-width: 64rem) { .rail--shorts { grid-auto-columns: 15%; } }

/* Описание сцены, уведомления */
/* Цитаты из сцены: 1–3 реплики под описанием */
.quotes { margin-block: var(--space-5); max-width: 70ch; }
.quotes__title { font-size: var(--text-small); font-weight: 600; color: var(--color-text-secondary); margin-block-end: var(--space-3); }
.quotes__list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.quote { margin: 0; padding: var(--space-3) var(--space-4); border-inline-start: 3px solid var(--color-accent-solid);
  border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--color-bg-surface); box-shadow: var(--shadow-border); }
.quote__text { margin: 0; font-family: var(--font-display); font-style: italic; font-size: var(--text-body); line-height: 1.45;
  color: var(--color-text-primary); white-space: pre-line; overflow-wrap: anywhere; }
.quote__text p::before { content: "«"; }
.quote__text p::after { content: "»"; }
.quote__by { margin-block-start: var(--space-1); font-size: var(--text-small); color: var(--color-text-secondary); }
.quote__by::before { content: "— "; }
.quotes__spoiler > summary { display: inline-flex; align-items: center; min-height: var(--tap); cursor: pointer;
  color: var(--color-accent-text); font-weight: 500; }
.quotes__spoiler[open] > summary { margin-block-end: var(--space-3); }
.m-card__quote { font-family: var(--font-display); font-style: italic; font-size: var(--text-small); color: var(--color-text-secondary); overflow-wrap: anywhere; }
.notice { margin-block-start: var(--space-5); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); max-width: 68ch;
  background: var(--color-bg-sunken); color: var(--color-text-secondary); font-size: var(--text-small); }
.film-hero__slogan { font-family: var(--font-display); font-style: italic; color: var(--color-text-secondary); margin-block-start: var(--space-4); }

/* Списки с пагинацией */
.list-reset { list-style: none; padding: 0; margin: 0; }
.catalog-title { font-size: var(--text-display); line-height: 1.1; }
.pagination { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; justify-content: center; padding-block: var(--section-gap) 0; }
.pagination ol { display: flex; gap: var(--space-2); list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }

/* Страница поиска */
.search-page__form { display: flex; gap: var(--space-2); margin-block: var(--space-4) var(--space-3); max-width: 40rem; }
.search-page__form .input-wrap { flex: 1; }
#search-page-results .section__title { margin-block-end: var(--space-4); }
#search-page-results .section:first-child { padding-block-start: var(--space-5); }
#search-page-results mark, .search-option mark { background: var(--color-accent-subtle); color: inherit; border-radius: 3px; }

/* ==========================================================================
   17. Адаптив: видимость по ширине, движение, общие правила (см. docs/research/10-responsive.md)
   Брейкпоинты: 36rem (576) · 40rem (640) · 48rem (768) · 64rem (1024). Mobile-first.
   ========================================================================== */
.only-phone { display: block; }
.only-tablet { display: none !important; }
.only-desktop { display: none !important; }
@media (min-width: 48rem) {
  .only-phone { display: none !important; }
  .only-tablet { display: revert !important; }
  .btn.only-tablet { display: inline-flex !important; }
}
@media (min-width: 64rem) { .only-desktop { display: inline !important; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Источники видео: заглушка-превью без картинки (VK без превью) и переключатель YouTube / VK Видео / Rutube */
.lite-yt__ph { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: var(--space-2);
  padding: var(--space-5) var(--space-5) calc(var(--space-5) + 4.5rem); text-align: center; color: var(--color-text-on-media);
  background: radial-gradient(ellipse at center, var(--night-800, #25211d), var(--color-bg-media)); }
.lite-yt__ph-title { font-family: var(--font-display); font-size: clamp(1rem, 0.85rem + 0.8vw, 1.375rem); font-weight: 600; line-height: 1.25; max-width: 32ch; }
.lite-yt__ph-sub { font-size: var(--text-small); color: rgb(255 255 255 / 0.75); }
.lite-yt__ph ~ .lite-yt__btn { position: absolute; inset-block-end: 22%; }
.source-switch { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-block-start: var(--space-3); font-size: var(--text-small); }
.source-switch__label { color: var(--color-text-secondary); }
.source-switch__btn { min-height: 2.25rem; padding: 0.25rem 0.875rem; border-radius: 999px; border: 1px solid var(--color-border);
  background: var(--color-bg-surface); color: var(--color-text-primary); font: inherit; font-weight: 600; cursor: pointer; }
@media (hover: hover) { .source-switch__btn:hover { background: var(--color-bg-hover); } }
.source-switch__btn[aria-pressed="true"] { background: var(--color-accent-solid); border-color: var(--color-accent-solid); color: var(--color-text-on-accent); }
.player-frame--vertical + .source-switch { justify-content: center; }

/* ---------- 18. Главная: поиск-герой, момент дня с цитатами, ленты подборок ---------- */
.home-search { padding-block: var(--space-6) var(--space-6); border-block-end: 1px solid var(--color-border-subtle); }
.home-search__inner { display: grid; justify-items: center; text-align: center; gap: var(--space-4); }
.home-search__title { font-family: var(--font-display); font-size: var(--text-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.home-search__lead { color: var(--color-text-secondary); max-width: 60ch; text-wrap: pretty; }
.home-search__form { display: flex; gap: var(--space-2); width: 100%; max-width: 42rem; }
.home-search__form .input-wrap { flex: 1; min-width: 0; }
.home-search__input { min-height: 3.25rem; font-size: 1.0625rem; border-radius: var(--radius-lg); }
.home-search__form .btn { min-height: 3.25rem; border-radius: var(--radius-lg); padding-inline: 1.25rem; }
.home-search__more { display: grid; justify-items: center; gap: var(--space-4); width: 100%; max-width: 52rem; }
.home-examples { justify-content: center; }
.home-examples .chip { color: var(--color-text-secondary); }
@media (min-width: 64rem) { .home-search { padding-block: var(--space-8) var(--space-7); } }
@media (max-width: 35.99rem) {
  .home-search { padding-block: var(--space-5); }
  .home-search__form .btn { padding-inline: 1rem; }
  .home-examples > :nth-child(n+7) { display: none; }   /* на телефоне — 6 примеров, без лишней высоты */
  .home-search__random { width: 100%; }
}
.hero__quotes { display: grid; gap: var(--space-2); margin-block-start: var(--space-4); max-width: 46ch; }
.quote--media { background: rgb(255 255 255 / 0.08); box-shadow: none; border-inline-start-color: var(--amber-400, #f0b03f); }
.quote--media .quote__text { color: var(--color-text-on-media); font-size: var(--text-small); }
.quote--media .quote__by { color: rgb(255 255 255 / 0.75); }
.section__tools { display: flex; align-items: center; gap: var(--space-3); }
.section__link { text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); }
.section__link:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.section--last { padding-block-end: var(--space-8); }
/* Чипы подборок на странице момента */
.moment-cols { margin-block: var(--space-5); }
.moment-cols__title { font-size: var(--text-small); font-weight: 600; color: var(--color-text-secondary); margin-block-end: var(--space-3); }

/* ---------- 19. Главная: формы подборок и блоки дня ----------
   Подборки чередуют формы (daily.SLOTS): «крупная + список», лента, топ-5, сетка 3×2.
   Между ними — цитата дня, «угадай фильм», фильм дня. */
.home-label { color: var(--color-accent-text); font-size: var(--text-overline); font-weight: 600; }

/* Строчная карточка: превью слева, название и фильм справа (списки, «крупная + 4», фильм дня) */
.row-cards { display: grid; gap: var(--space-4); }
.row-card { min-width: 0; }
.row-card__link { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: var(--space-3) var(--space-4); align-items: center;
  text-decoration: none; border-radius: var(--radius-md); min-height: var(--tap); }
.row-card__thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-md); background: var(--color-bg-media); }
.row-card__thumb img { width: 100%; height: 100%; object-fit: cover; outline: 1px solid var(--image-outline); outline-offset: -1px; border-radius: inherit; }
.row-card__body { display: grid; gap: var(--space-1); min-width: 0; }
.row-card__title { font-weight: 600; line-height: 1.35; overflow-wrap: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.row-card__meta { font-size: var(--text-small); color: var(--color-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .row-card__link:hover .row-card__title { text-decoration: underline; text-decoration-color: var(--color-border-strong); } }
.row-card__num { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; line-height: 1; color: var(--color-text-tertiary);
  text-align: center; font-variant-numeric: tabular-nums; }

/* «Крупная + 4»: большое превью 16:9 с названием поверх кадра, рядом (на телефоне — под ним) список */
.feature { display: grid; gap: var(--space-5); }
@media (min-width: 48rem) { .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-5); align-items: center; } }
@media (min-width: 64rem) { .feature { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-6); } }
.feature__main { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--color-bg-media); color: var(--color-text-on-media); text-decoration: none; }
.feature__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature__text { position: absolute; inset-inline: 0; inset-block-end: 0; display: grid; gap: var(--space-1);
  padding: var(--space-7) var(--space-4) var(--space-4); background: linear-gradient(to top, rgb(0 0 0 / 0.82), rgb(0 0 0 / 0.5) 55%, transparent); }
.feature__title { font-family: var(--font-display); font-size: clamp(1.1875rem, 1rem + 1vw, 1.75rem); font-weight: 600; line-height: 1.2;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-wrap: balance; }
.feature__meta { color: rgb(255 255 255 / 0.85); font-size: var(--text-small); }
@media (min-width: 48rem) { .feature__text { padding: var(--space-8) var(--space-5) var(--space-5); } }
@media (hover: hover) { .feature__main:hover .m-card__play { opacity: 1; } .feature__main:hover .feature__title { text-decoration: underline; text-decoration-thickness: 2px; } }
.feature__main:focus-visible .m-card__play { opacity: 1; }
@media (min-width: 48rem) and (max-width: 63.99rem) { .feature__side { gap: var(--space-3); } .feature__side .row-card__link { grid-template-columns: 6.5rem minmax(0, 1fr); } }
@media (min-width: 64rem) { .feature__side .row-card__link { grid-template-columns: 9.5rem minmax(0, 1fr); } }

/* Топ-5 как плейлист: на десктопе заголовок слева, нумерованный список справа */
.top-list { gap: 0; }
.top-list .row-card + .row-card { border-block-start: 1px solid var(--color-separator); }
.top-list .row-card__link { grid-template-columns: 2rem 7rem minmax(0, 1fr); padding-block: var(--space-3); }
@media (min-width: 36rem) { .top-list .row-card__link { grid-template-columns: 2.5rem 10rem minmax(0, 1fr); } }
@media (min-width: 64rem) {
  .home-col--list { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-7); align-items: start; }
  .home-col--list .section__head { flex-direction: column; align-items: flex-start; position: sticky; inset-block-start: calc(var(--header-h) + var(--space-5)); }
  .home-col--list .section__title { font-size: clamp(1.75rem, 1.2rem + 1.2vw, 2.25rem); }
  .home-col--list .top-list { margin-block-start: calc(var(--space-3) * -1); }
}

/* Сетка 3×2 без прокрутки (2 колонки на телефоне и планшете) */
.home-grid { display: grid; gap: var(--space-5) var(--space-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-grid .m-card__meta a { display: block; line-height: var(--tap); }
@media (min-width: 64rem) { .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6) var(--space-5); } }

/* Цитата дня: крупная типографика, без карточек */
.quote-day { text-align: center; }
.quote-day__box { max-width: 46rem; margin-inline: auto; padding-block: var(--space-6); border-block: 1px solid var(--color-border);
  display: grid; gap: var(--space-4); justify-items: center; }
.quote-day__fig { display: grid; gap: var(--space-3); justify-items: center; }
.quote-day__text p { font-family: var(--font-display); font-style: italic; font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem); line-height: 1.25;
  letter-spacing: -0.01em; text-wrap: balance; overflow-wrap: break-word; }
.quote-day__text p::before { content: "«"; }
.quote-day__text p::after { content: "»"; }
.quote-day__by { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: var(--space-4); color: var(--color-text-secondary); }

/* Фильм дня: постер, описание и три момента */
.film-day__card { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4);
  background: var(--color-bg-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-border); }
.film-day__poster { display: block; aspect-ratio: 2 / 3; border-radius: var(--radius-md); overflow: hidden; background: var(--color-bg-sunken); }
.film-day__poster img { width: 100%; height: 100%; object-fit: cover; outline: 1px solid var(--image-outline); outline-offset: -1px; border-radius: inherit; }
.film-day__info { display: contents; }
.film-day__head { align-self: center; display: grid; gap: var(--space-1); min-width: 0; }
.film-day__title { font-family: var(--font-display); font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2.25rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; overflow-wrap: break-word; }
.film-day__title a { text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); }
.film-day__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.film-day__meta { color: var(--color-text-secondary); }
.film-day__desc, .film-day__info > .link, .film-day__moments { grid-column: 1 / -1; }
.film-day__desc { max-width: 65ch; }
.film-day__info > .link { justify-self: start; margin-block: calc(var(--space-3) * -1) calc(var(--space-2) * -1); }
@media (min-width: 48rem) {
  .film-day__card { grid-template-columns: 11rem minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: var(--space-6); row-gap: var(--space-5); padding: var(--space-5); }
  .film-day__poster { grid-row: 1 / 3; align-self: start; }
  .film-day__info { display: grid; gap: var(--space-3); align-content: start; }
  .film-day__head { align-self: start; }
  .film-day__info > .link { margin: 0; }
  .film-day__moments { grid-column: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); align-self: end; }
  .film-day__moments .row-card__link { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (min-width: 64rem) { .film-day__card { grid-template-columns: 14rem minmax(0, 1fr); padding: var(--space-6); column-gap: var(--space-7); } }

/* Угадай фильм по кадру */
.guess__card { display: grid; gap: var(--space-5); padding: var(--space-4); background: var(--color-bg-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-border); }
@media (min-width: 48rem) { .guess__card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--space-6); padding: var(--space-5); } }
@media (min-width: 64rem) { .guess__card { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); padding: var(--space-6); gap: var(--space-7); } }
.guess__frame { aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-md); background: var(--color-bg-media); }
.guess__frame img { width: 100%; height: 100%; object-fit: cover; }
.guess__body { display: grid; gap: var(--space-3); align-content: center; min-width: 0; }
.guess__title { font-family: var(--font-display); font-size: var(--text-title); font-weight: 600; line-height: 1.2; }
.guess__opts { display: grid; gap: var(--space-2); margin-block-start: var(--space-2); }
@media (min-width: 36rem) and (max-width: 47.99rem) { .guess__opts { grid-template-columns: 1fr 1fr; } }
.guess__opt { width: 100%; justify-content: flex-start; text-align: start; white-space: normal; line-height: 1.3; padding-block: var(--space-2); }
.guess__opt[aria-disabled="true"] { cursor: default; opacity: 0.6; }
.guess__opt.is-right, .guess__opt.is-wrong { opacity: 1; }
.guess__opt.is-right { background: var(--color-accent-subtle); box-shadow: inset 0 0 0 2px var(--color-accent-solid); }
.guess__opt.is-wrong { box-shadow: inset 0 0 0 2px var(--color-danger-text); }
.guess__opt.is-right::before { content: "✓"; color: var(--color-accent-text); }
.guess__opt.is-wrong::before { content: "✕"; color: var(--color-danger-text); }
.guess__result { display: grid; gap: var(--space-1); margin-block-start: var(--space-2); }
.guess__verdict { font-size: var(--text-heading); font-weight: 600; }
.guess__result .link { align-items: center; }


/* Заглушка мёртвого ролика на широком экране — ниже, чем 16:9 (без плеера и списка ей не нужна вся высота) */
@media (min-width: 64rem) { .watch--single .player--dead:not(.player--vertical) { aspect-ratio: 21 / 9; } }
