/**
 * Дополнения к style.css (грузится следом, поэтому переопределяет базовые правила).
 */

/* ---------- Доступность ---------- */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 999;
  width: auto; height: auto;
  clip: auto;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.muted { color: var(--text-muted); }

/* ---------- Тёмная тема без мигания ---------- */
html.lfs-dark body,
body.dark-mode {
  --bg-card: #1c1c1e;
  --text-main: #f0f0f0;
  --text-muted: #a0a0a0;
  --border: #333;
}
html.lfs-dark .search-box,
html.lfs-dark .theme-toggle,
html.lfs-dark .stat-btn,
html.lfs-dark .season-tab,
html.lfs-dark .player-tab,
html.lfs-dark .reaction-btn,
html.lfs-dark .expand-btn { background: #2a2a2a; color: #f0f0f0; border-color: #333; }
html.lfs-dark .search-box input { color: #f0f0f0; }
html.lfs-dark .theme-toggle button.active { background: #3a3a3a; }
html.lfs-dark .score-circle::before { background: #1c1c1e; }
html.lfs-dark .episode-card { background: #252525; border-color: #333; color: #f0f0f0; }
html.lfs-dark .episode-card:hover { background: #2f2230; }
html.lfs-dark .rating-badge.imdb,
html.lfs-dark .rating-badge.kp { color: #f0f0f0; }
html.lfs-dark .resume-btn { background: #2a2a2a; border-color: #333; color: #f0f0f0; }

/* ---------- Постер ---------- */
.poster-img { position: relative; }
.poster-empty {
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 2 / 3;
  background: #ddd; color: #999; font-size: .85rem; border-radius: 12px;
}
.poster-quality {
  position: absolute; left: 8px; top: 8px;
  background: rgba(0,0,0,.7); color: #fff;
  font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 6px;
}

/* ---------- Кнопка «Смотреть» ---------- */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  padding: 11px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  transition: background .15s, transform .15s;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.hero-cta { margin-top: 16px; }

/* ---------- Серии ---------- */
.episode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--text-main);
}
.episode-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.ep-seen {
  position: absolute;
  top: 6px; right: 8px;
  font-size: .75rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity .15s;
}
.episode-card.seen .ep-seen { opacity: 1; }
.episode-card.seen .ep-num { opacity: .6; }

.resume-btn {
  background: #f5f5f5;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: .85rem;
  cursor: pointer;
  color: var(--text-main);
}
.resume-btn:hover { border-color: var(--accent); color: var(--accent); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.now-playing { color: var(--text-muted); font-size: .85rem; }

/* ---------- Плеер: превью вместо тяжёлого iframe ---------- */
.player-facade {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}
.player-facade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.45) blur(2px);
  transform: scale(1.06);
}
.facade-play {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, background .15s;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.facade-play:hover { transform: scale(1.04); background: var(--accent-hover); }
.facade-icon { font-size: .9rem; }
.player-placeholder .ph-icon { font-size: 48px; opacity: .3; }

/* ---------- Реакции ---------- */
.reaction-btn.reacted,
.stat-btn.reacted {
  border-color: var(--accent);
  color: var(--accent);
}
.reaction-btn { font: inherit; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 60px 20px; }
.not-found h1 { font-size: 1.6rem; margin-bottom: 12px; }
.not-found p { color: var(--text-muted); margin-bottom: 18px; }

/* ---------- Уважение к настройкам системы ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 500px) {
  .facade-play { padding: 12px 20px; font-size: .9rem; }
  .section-head { align-items: flex-start; }
}

/* ============ v2.1 ============ */

/* ---------- Логотип ---------- */
.logo-icon {
  width: 30px;
  height: 30px;
  background: none;
  border-radius: 0;
  color: var(--accent);
  display: block;
  flex-shrink: 0;
}
.logo-icon svg { display: block; }
.logo { gap: 10px; }
.logo-text { line-height: 1; }

/* ---------- Одна кнопка темы ---------- */
.header-right { gap: 10px; }
.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #f5f5f5;
  color: var(--text-main);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-icon { display: flex; align-items: center; }
html.lfs-dark .theme-btn { background: #2a2a2a; border-color: #333; color: #f0f0f0; }
html.lfs-dark .theme-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Типографика ---------- */
body {
  font-family: var(--font);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  font-synthesis-weight: none;
}
h1, h2, .section-title {
  letter-spacing: -.02em;
  text-wrap: balance;
}
.info-col h1 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.25; }
.section-title { font-size: clamp(1.05rem, 1.8vw, 1.2rem); }
.short-desc, .about-text { font-size: .95rem; line-height: 1.7; }
.meta-label { font-variant-numeric: tabular-nums; }
.rating-badge, .ep-num, .reaction-count { font-variant-numeric: tabular-nums; }

/* ---------- Реакции: активный голос ---------- */
.reaction-btn.reacted,
.stat-btn.reacted {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.stat-btn { transition: border-color .15s, color .15s, background .15s; }

@media (max-width: 500px) {
  .comment-list ol.children { margin-left: 12px; }
}

/* ============ v2.2 — оценки, реакции, кнопка темы ============ */

/* ---------- Кнопка темы: одна иконка, солнце ↔ луна ---------- */
.theme-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  gap: 0;
  border: none;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  justify-content: center;
}
.theme-btn:hover { background: var(--accent-hover); color: #fff; }
html.lfs-dark .theme-btn,
html.lfs-dark .theme-btn:hover { background: var(--accent); border: none; color: #fff; }
html.lfs-dark .theme-btn:hover { background: var(--accent-hover); }
.theme-btn .theme-icon svg { width: 20px; height: 20px; }

/* ---------- Реакции: тёмная полоса, эмодзи в полном цвете ---------- */

.reaction-btn {
  flex-direction: column;
  gap: 5px;
  min-width: 58px;
  padding: 6px 10px;
  background: none;
  border: none;
  border-radius: 8px;
  color: #fff;
  transition: background .15s, transform .15s;
}
.reaction-btn:hover,
html.lfs-dark .reaction-btn:hover { background: rgba(255,255,255,.09); transform: translateY(-2px); }
html.lfs-dark .reaction-btn { background: none; border: none; }
.reaction-emoji {
  font-size: 26px;
  line-height: 1;
  transition: transform .15s;
}
.reaction-btn:hover .reaction-emoji { transform: scale(1.12); }
.reaction-btn .reaction-count {
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  min-height: 1.1em;
  font-variant-numeric: tabular-nums;
}
html.lfs-dark .reaction-btn .reaction-count { color: #fff; }
/* Выбранная реакция: одна на посетителя */
.reaction-btn.reacted,
html.lfs-dark .reaction-btn.reacted {
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 -2px 0 var(--accent);
  color: #fff;
}
.reaction-btn.reacted .reaction-count { color: #fff; }

@media (max-width: 500px) {
  .reaction-btn { min-width: 48px; padding: 5px 6px; }
  .reaction-emoji { font-size: 22px; }
  .stat-btn .reaction-count { padding: 0 8px; }
}

/* ============ v2.3 — исправления ============ */

/* ---------- Иконка темы: строго одна ----------
   Раньше .theme-icon svg (вес 0,1,1) перебивал .icon-sun (0,1,0),
   и обе иконки оставались видимыми. Селекторы уравнены по весу. */
.theme-btn .theme-icon { position: relative; display: flex; align-items: center; }
.theme-btn .icon-sun,
.theme-btn .icon-moon { width: 20px; height: 20px; }
.theme-btn .icon-moon { display: block; }
.theme-btn .icon-sun { display: none; }
html.lfs-dark .theme-btn .icon-moon { display: none; }
html.lfs-dark .theme-btn .icon-sun { display: block; }

/* ---------- Панель оценок под постером ---------- */
:root { --stats-bg: #f1f1f3; --stats-text: #1a1a1a; }
html.lfs-dark { --stats-bg: #17171a; --stats-text: #f0f0f0; }

.poster-stats {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 0;
  padding: 12px 12px;
  background: var(--stats-bg);
  border-radius: 0 0 12px 12px;
  transition: background .2s;
}

/* Оценка приподнята и врезается в постер, обводка цветом панели */
.score-circle {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -52%);
  width: 58px;
  height: 58px;
  border: 4px solid var(--stats-bg);
  box-shadow: 0 3px 12px rgba(0,0,0,.3);
  transition: background .2s, border-color .2s;
}
.score-circle::before { inset: 5px; background: var(--stats-bg); }
html.lfs-dark .score-circle::before { background: var(--stats-bg); }
.score-value {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--stats-text);
}
html.lfs-dark .score-value { color: var(--stats-text); }

/* ---------- Лайк и дизлайк ---------- */
.stat-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 700;
  color: var(--stats-text);
  transition: transform .15s;
}
.stat-btn:hover,
html.lfs-dark .stat-btn:hover { background: none; transform: translateY(-1px); }
html.lfs-dark .stat-btn { background: none; color: var(--stats-text); }
.stat-btn.like, .stat-btn.dislike { flex-direction: row; color: var(--stats-text); }
html.lfs-dark .stat-btn.like,
html.lfs-dark .stat-btn.dislike { color: var(--stats-text); }

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #fff;
  flex-shrink: 0;
  transition: box-shadow .15s, transform .15s;
}
.stat-btn.like .stat-icon { background: #22c55e; }
.stat-btn.dislike .stat-icon { background: #ef4444; }
.stat-btn:hover .stat-icon { transform: scale(1.05); }
.stat-btn .reaction-count {
  padding: 0;
  font-size: .95rem;
  font-weight: 700;
  color: var(--stats-text);
  font-variant-numeric: tabular-nums;
}
html.lfs-dark .stat-btn .reaction-count { color: var(--stats-text); }
.stat-btn.like.reacted .stat-icon { box-shadow: 0 0 0 3px rgba(34,197,94,.4); }
.stat-btn.dislike.reacted .stat-icon { box-shadow: 0 0 0 3px rgba(239,68,68,.4); }
.stat-btn.reacted,
html.lfs-dark .stat-btn.reacted { background: none; color: var(--stats-text); }

/* ---------- Реакции: фон по теме, эмодзи в цвете ---------- */
.reactions-list {
  justify-content: space-around;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 8px;
  background: var(--stats-bg);
  border-radius: 10px;
  transition: background .2s;
}
.reaction-btn,
/* Раскладку задаём один раз, без дубля под тёмную тему:
   селектор с html.lfs-dark весит больше и гасил мобильные правила,
   из-за чего в тёмной теме реакции переносились на второй ряд. */
html.lfs-dark .reaction-btn { color: var(--stats-text); }
.reaction-btn:hover { background: rgba(127,127,127,.16); transform: translateY(-2px); }
html.lfs-dark .reaction-btn:hover { background: rgba(255,255,255,.09); }
.reaction-btn .reaction-count,
html.lfs-dark .reaction-btn .reaction-count {
  font-size: .85rem;
  font-weight: 700;
  color: var(--stats-text);
  min-height: 1.1em;
  font-variant-numeric: tabular-nums;
}
.reaction-btn.reacted,
html.lfs-dark .reaction-btn.reacted {
  background: rgba(127,127,127,.2);
  box-shadow: inset 0 -2px 0 var(--accent);
  color: var(--stats-text);
}
html.lfs-dark .reaction-btn.reacted { background: rgba(255,255,255,.14); }
.reaction-btn.reacted .reaction-count { color: var(--stats-text); }

/* Постер и панель оценок — единый блок */
.poster-img { border-radius: 12px 12px 0 0; overflow: hidden; }

/* ============ v2.4 ============ */

/* ---------- Мета-строки: значение не уезжает на новую строку ----------
   Раньше .meta-row был flex с переносом, поэтому длинные значения
   («Перевод», «Актёры») целиком переходили под подпись. */
.meta-row {
  display: block;
  gap: 0;
}
.meta-label {
  display: inline;
  margin-right: 6px;
  white-space: normal;
}
.meta-value {
  display: inline;
}

/* ---------- Лайк и дизлайк: без анимации, только подсветка ---------- */
.stat-btn,
.stat-btn:hover,
.stat-btn.reacted,
html.lfs-dark .stat-btn:hover {
  transform: none;
  background: none;
}
.stat-icon {
  transition: filter .15s, box-shadow .15s;
  transform: none;
}
.stat-btn:hover .stat-icon {
  transform: none;
  filter: brightness(1.12);
}
.stat-btn:active .stat-icon { filter: brightness(.95); }

/* ---------- Реакции: без фона и без анимаций ---------- */
.reactions-list {
  background: none;
  padding: 6px 0;
  gap: 4px;
}
.reaction-btn,
html.lfs-dark .reaction-btn {
  background: none;
  box-shadow: none;
  transition: none;
}
.reaction-btn:hover,
html.lfs-dark .reaction-btn:hover {
  background: none;
  transform: none;
}
.reaction-emoji {
  transition: transform .12s ease-out;
  transform: scale(1);
}
.reaction-btn:hover .reaction-emoji { transform: scale(1.18); }
/* Выбранная реакция: только акцентный счётчик и подчёркивание, без заливки */
.reaction-btn.reacted,
html.lfs-dark .reaction-btn.reacted {
  background: none;
  box-shadow: inset 0 -2px 0 var(--accent);
}
.reaction-btn.reacted .reaction-count,
html.lfs-dark .reaction-btn.reacted .reaction-count { color: var(--accent); }

/* ============ v2.5 ============ */

/* ---------- Описание на всю ширину ---------- */
.short-desc,
.about-text,
.about-text p {
  max-width: none;
  width: 100%;
}

/* ---------- Подписи в характеристиках ---------- */
.meta-label {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--text-main);
}
html.lfs-dark .meta-label { color: #f0f0f0; }

/* ============ v2.6 — комментарии ============ */

/* ---------- Реакции: подсвечиваем только цифру ---------- */
.reaction-btn.reacted,
html.lfs-dark .reaction-btn.reacted {
  background: none;
  box-shadow: none;
}
.reaction-btn.reacted .reaction-count,
html.lfs-dark .reaction-btn.reacted .reaction-count {
  color: var(--accent);
}

/* ---------- Раскладка: список слева, форма справа ---------- */
.comments-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}
.comments-title,
.comment-reply-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 18px;
  color: var(--text-main);
}
html.lfs-dark .comments-title,
html.lfs-dark .comment-reply-title { color: #f0f0f0; }
.comments-empty { color: var(--text-muted); font-size: .92rem; }

/* ---------- Список ---------- */
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list ol.children { list-style: none; margin: 0 0 0 34px; padding: 0; }
.comment-list li { margin-bottom: 14px; }

.c-item { display: flex; gap: 12px; align-items: flex-start; }
.c-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
}
.c-body {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
html.lfs-dark .c-body { background: #232325; border-color: #35353a; }

.c-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
html.lfs-dark .c-head { border-color: #35353a; }
.c-author { font-weight: 700; font-size: .95rem; color: var(--text-main); }
html.lfs-dark .c-author { color: #f0f0f0; }
.c-date { font-size: .82rem; color: var(--text-muted); white-space: nowrap; }

.c-text { padding: 12px 16px 13px; font-size: .93rem; color: var(--text-main); }
html.lfs-dark .c-text { color: #e6e6e6; }
.c-text p { margin: 0 0 8px; }
.c-text p:last-child { margin-bottom: 0; }
.c-moderation { padding: 10px 16px 0; font-size: .82rem; color: var(--accent); }


.comment-navigation { display: flex; gap: 14px; font-size: .85rem; margin-top: 6px; }

/* ---------- Форма ---------- */
.comments-side { position: sticky; top: 18px; }
.comment-form { display: block; }
.comment-form p { margin: 0 0 16px; }
.comment-form label {
  display: block;
  margin-bottom: 7px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-main);
}
html.lfs-dark .comment-form label { color: #f0f0f0; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text-main);
  font: inherit;
  font-size: .92rem;
}
html.lfs-dark .comment-form input[type="text"],
html.lfs-dark .comment-form input[type="email"],
html.lfs-dark .comment-form textarea {
  background: #232325;
  border-color: #35353a;
  color: #f0f0f0;
}
.comment-form textarea { resize: vertical; min-height: 110px; }
.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--accent); }

.comment-form .form-submit { margin: 0; }
.comment-form input[type="submit"] {
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.comment-form input[type="submit"]:hover { background: var(--accent-hover); }

.logged-in-as, .comment-notes { font-size: .82rem; color: var(--text-muted); }
.logged-in-as a { color: var(--accent); }
#cancel-comment-reply-link { font-size: .82rem; font-weight: 500; color: var(--accent); }

@media (max-width: 900px) {
  .comments-area { grid-template-columns: 1fr; gap: 26px; }
  .comments-side { position: static; }
}
@media (max-width: 500px) {
  .comment-list ol.children { margin-left: 14px; }
  .c-head { flex-direction: column; gap: 2px; }
  .c-avatar { width: 36px; height: 36px; }
}

/* ============ v2.8 — комментарии ============ */

/* ---------- Прилипание формы ----------
   .main-card имеет overflow: hidden, а он отключает position: sticky
   у всех потомков. Меняем на clip — обрезка та же, sticky работает. */
.main-card { overflow: clip; }
@supports not (overflow: clip) {
  .main-card { overflow: visible; }
}
.comments-side {
  position: sticky;
  top: 16px;
  align-self: start;
}

/* ---------- Ответ формы ---------- */
.comment-status {
  margin: 12px 0 0;
  padding: 10px 13px;
  border-radius: 6px;
  background: rgba(34,197,94,.12);
  color: #15803d;
  font-size: .86rem;
  line-height: 1.45;
}
.comment-status.is-error {
  background: rgba(239,68,68,.12);
  color: #b91c1c;
}
html.lfs-dark .comment-status { color: #86efac; }
html.lfs-dark .comment-status.is-error { color: #fca5a5; }

/* Только что добавленный комментарий */
.comment-list .is-new .c-body {
  border-color: var(--accent);
  animation: lfs-new-comment 1.6s ease-out;
}
@keyframes lfs-new-comment {
  from { background: rgba(127,127,127,.14); }
  to { background: transparent; }
}
html.lfs-dark .comment-list .is-new .c-body { background: #232325; }

/* ---------- Постраничность ---------- */
.comments-area .comment-navigation,
.comments-area .comments-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.comments-area .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .88rem;
  color: var(--text-main);
}
.comments-area .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.comments-area .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.comments-area .screen-reader-text { position: absolute !important; }
html.lfs-dark .comments-area .page-numbers { border-color: #35353a; color: #f0f0f0; }

/* ============ v2.9 ============ */

.comments-title { display: flex; align-items: center; gap: 9px; }
.comments-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: .76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Комментарий на модерации виден только своему автору */
.comment-list li.comment.pending .c-body,
.c-moderation + .c-text { opacity: 1; }
.c-moderation {
  padding: 10px 16px 0;
  font-size: .8rem;
  color: var(--accent);
  font-weight: 600;
}

/* ============ v2.10 ============ */

/* Постраничность по центру блока комментариев */
.comments-area .comments-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
}
.comments-area .comments-pagination .page-numbers.dots {
  border-color: transparent;
  min-width: 20px;
  padding: 0 2px;
}


/* ============ v2.11 ============ */

/* Заголовок секции не меняет высоту, когда JS показывает кнопку «Продолжить» */
.section-head { min-height: 40px; }

/* Плавная прокрутка включается только из JS — см. пояснение в style.css */
html { scroll-behavior: auto; }

/* ============ v3.0 — фон, плеер с панелью серий, подвал ============ */

/* ---------- Фон сайта: текстура вместо постера ---------- */
body {
  background-color: #eceded;
  background-image: url(../images/bg.png);
  background-repeat: repeat;
  background-attachment: fixed;
}
html.lfs-dark body {
  background-color: #191919;
  background-blend-mode: multiply;
}
.page-backdrop { display: none; }

/* ---------- Характеристики: без подчёркивания и лишнего отступа ---------- */
.meta-label {
  font-weight: 700;
  text-decoration: none;
  margin-right: 0;
  color: var(--text-main);
}
html.lfs-dark .meta-label { color: #f0f0f0; }

/* ---------- Плеер и выбор серий ---------- */
.watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 0;
  align-items: stretch;
  border-radius: 10px;
  overflow: hidden;
}
.watch-grid.no-episodes { grid-template-columns: minmax(0, 1fr); }
.watch-main { min-width: 0; display: flex; flex-direction: column; }
.watch-main .player-tabs { margin-bottom: 0; gap: 2px; }
.watch-main .player-tab { border-radius: 4px 4px 0 0; }
.watch-main .player-box { border-radius: 0; flex: 1; }

/* Панель серий */
.episodes-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #1c1c1e;
  color: #fff;
}
.episodes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  font-size: .9rem;
  font-weight: 600;
  background: #fff;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
}
html.lfs-dark .episodes-head { background: #202022; color: #f0f0f0; border-color: #303035; }

.episodes-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  max-height: 420px;
  scrollbar-width: thin;
  scrollbar-color: #4a4a52 transparent;
  overscroll-behavior: contain;
}
.episodes-scroll::-webkit-scrollbar { width: 8px; }
.episodes-scroll::-webkit-scrollbar-track { background: transparent; }
.episodes-scroll::-webkit-scrollbar-thumb { background: #4a4a52; border-radius: 4px; }
.episodes-scroll::-webkit-scrollbar-thumb:hover { background: #5e5e68; }

.season-block + .season-block { margin-top: 18px; }
.season-name {
  margin: 0 0 9px;
  font-size: .82rem;
  font-weight: 600;
  color: #8b8b93;
  letter-spacing: .01em;
}
.episodes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
/* Последний в ряду растягивается, если ряд неполный — как в референсе */
.episodes-grid > .episode-card:last-child:nth-child(3n + 1) { grid-column: span 3; }
.episodes-grid > .episode-card:last-child:nth-child(3n + 2) { grid-column: span 2; }

.episode-card,
html.lfs-dark .episode-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 8px;
  background: #2c2c30;
  border: none;
  border-radius: 6px;
  color: #e9e9ee;
  font-size: .86rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.episode-card:hover,
html.lfs-dark .episode-card:hover { background: #3a3a40; color: #fff; }
.episode-card.active,
html.lfs-dark .episode-card.active {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}
.episode-card .ep-num { font-size: .86rem; }
.episode-card .ep-seen {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: .68rem;
  color: #9ad5a4;
  opacity: 0;
}
.episode-card.seen .ep-seen { opacity: 1; }
.episode-card.active .ep-seen { color: #fff; }

.episodes-head .resume-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: none;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}
.episodes-head .resume-btn:hover { border-color: var(--accent); }

@media (max-width: 900px) {
  .watch-grid { grid-template-columns: minmax(0, 1fr); }
  .episodes-scroll { max-height: 300px; }
}

/* ---------- Подвал ---------- */
html.lfs-dark .site-footer { background: var(--bg-card); border-color: #303035; }
.footer-disclaimer p {
  margin: 0 0 10px;
  font-size: .86rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.footer-disclaimer p:last-child { margin-bottom: 0; }
.footer-feedback {
  margin: 12px 0 0;
  font-size: .88rem;
  font-weight: 700;
}
.footer-feedback a { color: var(--text-main); }
.footer-feedback a:hover { color: var(--accent); }
html.lfs-dark .footer-feedback a,
html.lfs-dark .footer-feedback strong { color: #f0f0f0; }
.footer-copy {
  margin: 10px 0 0;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ============ v3.1 — плеер во всю ширину, шапка на мобильных ============ */

/* ---------- Общая обёртка ---------- */
/* Тень убрана в самом объявлении .main-card */

/* ---------- Шапка на узких экранах ----------
   В базовых стилях у .header-right стояло width: 100% — правило осталось
   от строки поиска, которую убрали, и кнопка темы съезжала на вторую строку. */
.card-header { flex-wrap: nowrap; }
.header-right { width: auto; justify-content: flex-end; flex-shrink: 0; }
.logo { min-width: 0; }
.logo-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Секция просмотра во всю ширину карточки ---------- */
.watch-section { padding: 0; }
.watch-section .watch-head {
  margin: 0;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
html.lfs-dark .watch-section .watch-head { border-color: #303035; }

.watch-grid { border-radius: 0; }
.watch-main .player-box { border-radius: 0; }

/* Ряд вкладок и подпись «Выбор серий:» — одна линия, одна высота */
.watch-main .player-tabs,
.episodes-head {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
html.lfs-dark .watch-main .player-tabs,
html.lfs-dark .episodes-head { background: var(--bg-card); border-color: #303035; }

.watch-main .player-tab,
.watch-main .season-tab {
  align-self: stretch;
  border-radius: 0;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
}
.episodes-head {
  padding: 0 16px;
  justify-content: space-between;
  gap: 10px;
}

/* Панель серий вровень с плеером по высоте */
.episodes-scroll { max-height: none; padding: 14px 16px; }
.watch-grid { align-items: stretch; }
.episodes-panel { min-height: 0; }

@media (min-width: 901px) {
  .episodes-panel { position: relative; }
  .episodes-scroll {
    position: absolute;
    inset: 44px 0 0;
    overflow-y: auto;
  }
}

@media (max-width: 900px) {
  .episodes-scroll { max-height: 320px; position: static; }
  .watch-section .watch-head { padding: 14px 16px; }
}

@media (max-width: 500px) {
  .watch-section .watch-head { padding: 13px 14px; }
  .watch-main .player-tab { padding: 0 15px; font-size: .82rem; }
  .card-header { padding: 12px 14px; }
  .logo { font-size: 1.1rem; }
}

/* ============ v3.2 ============ */

/* ---------- Логотип вровень с кнопкой темы ---------- */
.logo-icon { width: 38px; height: 38px; }
.logo-icon svg { width: 38px; height: 38px; }

/* ---------- Активная вкладка плеера в тёмной теме ----------
   Правило html.lfs-dark .player-tab красит серым все вкладки и весит больше,
   чем .player-tab.active, поэтому активная теряла подсветку. */
html.lfs-dark .player-tab.active,
html.lfs-dark .player-tab[aria-selected="true"],
html.lfs-dark .season-tab.active,
html.lfs-dark .season-tab[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
html.lfs-dark .player-tab:hover,
html.lfs-dark .season-tab:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Реакции без заголовка ---------- */
#reactions { padding-top: 18px; padding-bottom: 18px; }

/* ============ v3.3 ============ */

/* ---------- Вкладки плееров жирным ---------- */
.player-tab,
.season-tab,
.watch-main .player-tab {
  font-weight: 700;
}

/* ---------- Номера серий: цвет от кнопки, а не от темы ----------
   В базовых стилях .ep-num был жёстко привязан к цвету текста темы
   и в светлой теме получался почти чёрным на тёмной кнопке. */
.episode-card .ep-num,
html.lfs-dark .episode-card .ep-num { color: inherit; }
.episode-card,
html.lfs-dark .episode-card { color: #f2f2f5; }
.episode-card:hover,
html.lfs-dark .episode-card:hover { color: #fff; }
.episode-card.active,
html.lfs-dark .episode-card.active { color: #fff; }

/* ---------- Мобильная версия ---------- */
@media (max-width: 800px) {
  .short-desc { text-align: left; }
  .ratings-row { justify-content: flex-start; }
  .hero-cta { display: flex; justify-content: center; }
}

@media (max-width: 700px) {
  .main-card { border-radius: 0; }
}

/* ============ v3.4 ============ */

/* ---------- Части фильма ---------- */
.parts-list { display: flex; flex-direction: column; gap: 8px; }
/* Вес селектора поднят: html.lfs-dark .episode-card задаёт display: flex,
   и номер части вставал над названием вместо колонки слева. */
html.lfs-dark .parts-list .part-card,
.parts-list .part-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  min-height: 56px;
  padding: 0;
  overflow: hidden;
  text-align: left;
}
.part-index {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .07);
  font-size: .95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.parts-list .part-card .ep-num {
  display: flex;
  align-items: center;
  padding: 10px 13px;
  font-size: .86rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
}
.parts-list .part-card.active .part-index { background: rgba(0, 0, 0, .22); }
.parts-list .part-card .ep-seen { top: 5px; right: 7px; }

/* ---------- Панель «Поделиться» ---------- */
@media (max-width: 1210px) {
  .social-sidebar { display: none; }
}

/* ---------- Скругления убираем раньше ---------- */
@media (max-width: 1100px) {
  .main-card { border-radius: 0; }
}

/* ---------- Реакции в одну строку вплоть до 320 ---------- */
.reactions-list { flex-wrap: nowrap; }
@media (max-width: 560px) {
  .reactions-list { gap: 0; padding: 10px 2px; }
  .reaction-btn { min-width: 0; flex: 1 1 0; padding: 6px 2px; }
  .reaction-emoji { font-size: 22px; }
  .reaction-btn .reaction-count { font-size: .78rem; }
}
@media (max-width: 400px) {
  .reaction-emoji { font-size: 19px; }
  .reaction-btn { padding: 5px 0; }
  .reaction-btn .reaction-count { font-size: .72rem; }
}
@media (max-width: 340px) {
  .reaction-emoji { font-size: 17px; }
}

/* ============ v3.6 ============ */

/* Галочки просмотра скрыты, когда функция выключена или это фильм */
.seen-marks-off .ep-seen { display: none; }

/* Длинное название не выталкивает подпись «Выбор серий:» */
.episodes-head { min-width: 0; }
.episodes-head > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.episodes-head .resume-btn {
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============ v3.14 ============ */

/* Ловушка для ботов: убрана из вида, но остаётся в разметке.
   display:none не подходит — часть ботов такие поля пропускает. */
.lfs-hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
