/* ============================================================
   Дизайн-токены публичной части. Тёмное полотно #212121,
   оранжевый акцент, плоские карточки без теней и скруглений.
   Панель управления переопределяет эти же переменные на светлые
   в конце admin.css — там своя палитра.
   ============================================================ */
:root {
    /* фон страницы и рабочее полотно */
    --page:          #111111;
    --canvas:        #212121;
    --header-bg:     #242526;
    --footer-bg:     #242526;

    /* поверхности */
    --panel:         #272727;
    --panel-2:       #2b2b2b;
    --band-soft:     #292929;
    --band-mid:      #252525;
    --band-dark:     #222222;
    --chip:          #363638;

    /* совместимость с общими компонентами (их же использует админка) */
    --bg:            #212121;
    --bg-deep:       #1c1c1d;
    --surface:       #272727;
    --surface-2:     #2b2b2d;
    --surface-3:     #333335;

    /* текст */
    --text:          #f2f2f3;
    --text-2:        #c7c7ca;
    --muted:         #a7a7aa;
    --muted-2:       #77777b;

    /* линии */
    --line:          #3a3a3c;
    --line-soft:     #303030;
    --border:        #3a3a3c;
    --border-strong: #4b4b4e;

    /* акценты */
    --accent:        #ff6533;
    --accent-hover:  #ff7d52;
    --accent-2:      #f0443d;
    --accent-ink:    #ffffff;
    --accent-soft:   rgba(255, 101, 51, .15);
    --accent-line:   rgba(255, 101, 51, .45);
    --coral:         #ff4e4e;
    --coral-soft:    rgba(255, 78, 78, .16);
    --gold:          #ffb02e;
    --gold-soft:     rgba(255, 176, 46, .16);
    --green:         #4cc38a;
    --green-soft:    rgba(76, 195, 138, .14);
    --star:          #ff4c4c;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .22);
    --shadow:    0 6px 18px rgba(0, 0, 0, .38);
    --shadow-lg: 0 14px 34px rgba(0, 0, 0, .53);

    /* макет плоский: радиусы минимальные */
    --radius:      4px;
    --radius-sm:   3px;
    --radius-lg:   5px;
    --radius-pill: 999px;

    --container: 1180px;
    --gutter:    16px;
    --header-h:  70px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
    --font-num: var(--font);

    /* типографика макета */
    --step--1: 13px;
    --step-0:  15px;
    --step-1:  17px;
    --step-2:  19px;
    --step-3:  25px;
    --step-4:  34px;

    --ease: ease;

    color-scheme: dark;
}
/* ------------------------------------------------------- БАЗА */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.58;
    letter-spacing: .005em;
    -webkit-font-smoothing: antialiased;
}

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

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
table { border-collapse: collapse; width: 100%; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.visually-hidden {
    position: absolute; 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; left: -9999px; top: 0; z-index: 1000;
    background: var(--accent); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 0; }

.is-hidden, .hidden { display: none !important; }
.min-w-0 { min-width: 0; }

/* Иконки макета: тонкий контур, заливка по требованию */
.ui-icon {
    width: 1em; height: 1em; display: inline-block; vertical-align: -.14em;
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto;
}
.ui-icon.fill { fill: currentColor; stroke: none; }

/* Заглушка изображения */
.no-image-svg { display: block; width: 100%; height: 100%; object-fit: cover; background: #242526; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
/* ---------------------------------------------------- КАРКАС */
.layout { display: flex; flex-direction: column; min-height: 100vh; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 22px var(--gutter) 54px;
    background: var(--canvas);
    box-shadow: 0 0 0 1px #1b1b1b;
}
.wrap { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }

.main { flex: 1 0 auto; background: var(--page); }

/* ---------------------------------------------------- ШАПКА */
.site-header {
    position: sticky; top: 0; z-index: 100;
    height: var(--header-h);
    background: var(--header-bg);
    border-bottom: 1px solid #111;
}
.header-inner {
    max-width: var(--container); height: 100%; margin: 0 auto;
    display: flex; align-items: center; gap: 26px; padding: 0 var(--gutter);
}

.logo {
    display: flex; align-items: center; gap: 8px;
    font-size: 24px; font-weight: 800; letter-spacing: -.4px; white-space: nowrap;
}
.logo-mark {
    width: 25px; height: 25px; background: var(--accent); border-radius: 50%;
    display: grid; place-items: center; font-size: 0; color: #fff; flex: none;
}
.logo-mark .ui-icon { width: 13px; height: 13px; color: #fff; vertical-align: 0; }
.logo .red { color: #ff4f4f; }
.logo img { max-height: 34px; width: auto; }

.main-nav {
    display: flex; gap: 24px; text-transform: uppercase;
    font-size: 12px; color: #b9b9bc; letter-spacing: .35px; white-space: nowrap;
    align-self: stretch; align-items: stretch;
}
.main-nav a { display: inline-flex; align-items: center; gap: 5px; }
.main-nav a:hover, .main-nav a.is-active { color: #fff; }
.main-nav .ui-icon { width: 13px; height: 13px; }
/* Пункт меню занимает всю высоту шапки — панель раскрывается ровно под ней */
.nav-item { display: flex; align-items: center; }
.nav-item__caret { display: inline-flex; transition: transform .18s ease; }
.nav-item__caret .ui-icon { width: 11px; height: 11px; }
.nav-item--mega:hover .nav-item__caret { transform: rotate(180deg); }
.nav-item--mega:hover > a { color: #fff; }

/* ------------------------------- ВЫПАДАЮЩИЙ КАТАЛОГ
   Панель позиционируется от самой шапки (она sticky), а не от пункта меню,
   поэтому её левый край всегда совпадает с левым краем контента. */
.mega {
    position: absolute; top: 100%; z-index: 110;
    left: max(var(--gutter), calc(50% - var(--container) / 2 + var(--gutter)));
    width: min(880px, calc(100vw - var(--gutter) * 2));
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 0 0 6px 6px; box-shadow: var(--shadow-lg);
    text-transform: none; letter-spacing: 0; white-space: normal;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.nav-item--mega:hover .mega,
.nav-item--mega:focus-within .mega { opacity: 1; visibility: visible; transform: translateY(0); }
.mega__inner { padding: 18px; }

.mega__tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
/* селекторы с .mega — чтобы перебить общее правило .main-nav a */
.mega .mega-tile {
    display: flex; align-items: center; gap: 14px;
    background: var(--panel-2); border: 1px solid var(--line-soft);
    border-radius: 6px; padding: 13px 15px;
}
.mega .mega-tile:hover { border-color: var(--accent-line); background: #303032; }
.mega-tile__icon {
    width: 42px; height: 42px; flex: none; border-radius: 8px;
    background: var(--accent); color: #fff; display: grid; place-items: center;
}
.mega-tile__icon .ui-icon { width: 21px; height: 21px; }
.mega-tile__text { display: block; min-width: 0; }
.mega-tile__text b { display: block; font-size: 16px; font-weight: 600; color: var(--text); }
.mega-tile__text i { display: block; font-style: normal; font-size: 13px; color: var(--muted-2); margin-top: 3px; }

.mega__cols {
    display: grid; grid-template-columns: 0.85fr 1.3fr 1fr; gap: 10px 26px;
    margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft);
}
.mega__col { min-width: 0; }
.mega__title {
    display: block; font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: var(--accent); padding-bottom: 8px; margin-bottom: 12px;
    border-bottom: 2px solid var(--accent); width: fit-content;
}
.mega__list { display: grid; gap: 9px 18px; }
.mega__list--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mega .mega__list a {
    display: block; font-size: 15px; line-height: 1.25; color: var(--text-2);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mega .mega__list a:hover { color: var(--accent); }
.mega .mega__all {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 14px; font-size: 13px; color: var(--muted-2);
}
.mega .mega__all:hover { color: var(--accent); }
.mega__all .ui-icon { width: 12px; height: 12px; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.search-open {
    width: 290px; height: 38px; padding: 0 14px;
    border: 1px solid #343437; background: #242526; color: #777;
    border-radius: 5px; display: flex; align-items: center; justify-content: space-between;
}
.search-open b { font-size: 13px; color: var(--accent); font-weight: 700; display: inline-flex; align-items: center; gap: 7px; }
.search-open .ui-icon { width: 16px; height: 16px; }

.burger {
    display: none; width: 38px; height: 38px; flex: none;
    border: 1px solid #343437; background: #161617; border-radius: 5px;
    place-items: center;
}
.burger__bar { display: block; width: 16px; height: 2px; background: #d7d7d8; border-radius: 2px; position: relative; }
.burger__bar::before, .burger__bar::after {
    content: ''; position: absolute; left: 0; width: 16px; height: 2px; background: #d7d7d8; border-radius: 2px;
}
.burger__bar::before { top: -5px; }
.burger__bar::after  { top: 5px; }

.mobile-menu {
    display: none; position: fixed; inset: var(--header-h) 0 0; z-index: 95;
    background: var(--header-bg); padding: 12px var(--gutter) 40px; overflow-y: auto;
}
.mobile-menu.is-open { display: block; }
.mobile-menu__link {
    display: block; padding: 14px 2px; font-size: 16px; color: #e3e3e5;
    border-bottom: 1px solid #333335;
}

/* -------------------------------------------------- ПОДВАЛ */
.site-footer { background: var(--footer-bg); border-top: 1px solid #303032; margin-top: auto; }
.footer-inner {
    max-width: var(--container); margin: 0 auto;
    padding: 34px var(--gutter);
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    color: #929297; font-size: 15px;
}
.footer-inner b { color: #ddd; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--accent); }
.footer-note { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter) 26px; color: #75757a; font-size: 13px; }
.socials { display: flex; gap: 8px; }
.social {
    width: 35px; height: 35px; border: 1px solid #3c3c40; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #bbb; font-size: 12px;
}
.social:hover { color: var(--accent); border-color: #55555a; }
.social .ui-icon { width: 17px; height: 17px; }

/* ------------------------------------------------ НАВЕРХ */
.back-to-top {
    position: fixed; right: 24px; bottom: 24px; width: 48px; height: 48px;
    border: 1px solid #4b4b4e; background: #252526; color: var(--accent);
    display: grid; place-items: center; border-radius: 4px;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background .2s ease;
    z-index: 120;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: #303032; }
.back-to-top svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* -------------------------------------------- СЕКЦИИ И СЕТКИ */
.section { margin-top: 32px; }
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.section-title { font-size: 25px; line-height: 1.25; font-weight: 500; letter-spacing: -.25px; margin: 0; }
.section-tabs { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

.hero-title {
    font-size: 34px; line-height: 1.18; font-weight: 700;
    letter-spacing: -.45px; margin: 34px 0 30px; text-align: center;
}

.air-grid     { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 14px; }
.row-strip    { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.poster-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.people-row   { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.frame-row    { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.collection-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.episodes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 14px; }

/* Полосы главной во всю ширину полотна */
.home-shell { background: var(--canvas); padding-top: 22px; }
.home-shell .home-band {
    margin-left: calc(var(--gutter) * -1);
    margin-right: calc(var(--gutter) * -1);
    margin-top: 0;
    padding: 27px var(--gutter) 30px;
}
.home-shell .band-soft { background: var(--band-soft); }
.home-shell .band-mid  { background: var(--band-mid); }
.home-shell .band-dark { background: var(--band-dark); }
.home-shell .home-band + .home-band { border-top: 1px solid var(--line-soft); }
.home-shell .home-band .section-head { margin-bottom: 18px; }

.content-panel { background: var(--panel); border: 1px solid #2d2e30; padding: 28px 30px; border-radius: 3px; }
.show-shell .content-panel,
.episode-shell .content-panel { padding: 0; border: 0; border-radius: 0; background: transparent; }

.breadcrumbs { font-size: 15px; line-height: 1.45; color: #7f7f83; margin: 7px 0 22px; }
.breadcrumbs span, .breadcrumbs a:hover { color: #bbb; }
.breadcrumbs__sep { color: #5c5c60; }
/* ============================================================
   КАРТОЧКИ КАТАЛОГА
   ============================================================ */

/* Метки поверх изображения */
.tags { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.mini-tag {
    display: inline-flex; align-items: center; min-height: 27px; padding: 4px 11px;
    border: 1px solid #66666b; border-radius: 4px; background: #29292b; color: #e2e2e5;
    font-size: 13px; line-height: 1; font-weight: 500; letter-spacing: .05px;
    white-space: nowrap; box-shadow: 0 1px 2px rgba(0, 0, 0, .22);
}
.air-img .mini-tag, .episode-thumb .mini-tag, .strip-img .mini-tag { background: #28282acc; }

/* Свежие серии: широкий кадр 16:9 */
.air-card { display: block; transition: transform .16s ease, filter .16s ease; }
.air-card:hover { transform: translateY(-2px); filter: brightness(1.04); }
.air-img { height: 150px; position: relative; overflow: hidden; background: #242526; border-radius: 3px; }
.air-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.9); }
.air-name {
    text-align: center; margin-top: 11px; font-size: 19px; line-height: 1.25;
    font-weight: 400; letter-spacing: -.15px; color: #e5e5e7;
}
.air-ep { text-align: center; margin-top: 7px; font-size: 16px; line-height: 1.25; color: #aaaab0; }

/* Горизонтальная лента */
.strip-card { display: block; min-width: 0; transition: transform .16s ease, filter .16s ease; }
.strip-card:hover { filter: brightness(1.04); }
.strip-img { height: 126px; overflow: hidden; border-radius: 3px; background: #242526; position: relative; }
.strip-img img { width: 100%; height: 100%; object-fit: cover; }
.strip-title {
    margin-top: 10px; font-size: 17px; line-height: 1.32; font-weight: 400; color: #dedee1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.strip-sub { margin-top: 5px; font-size: 14px; line-height: 1.3; color: #9a9aa0; }

/* Постер 2:3 */
.poster-card { display: block; position: relative; min-width: 0; overflow: visible; transition: transform .16s ease, filter .16s ease; }
.poster-card:hover { transform: translateY(-3px); filter: brightness(1.04); }
.poster { aspect-ratio: 2 / 3; background: #242526; overflow: hidden; border-radius: 3px; }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster-title {
    margin-top: 11px; font-size: 17px; line-height: 1.32; font-weight: 400;
    color: #dedee1; text-align: center;
}
.poster-sub { text-align: center; font-size: 14px; line-height: 1.25; color: #9a9aa0; margin-top: 5px; }

/* Значок «i» и всплывающая карточка */
.poster-badge {
    position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; z-index: 12;
    border-radius: 50%; display: grid; place-items: center; font-size: 0;
    border: 2px solid #f14c43; background: #f7f7f7; color: #ef413d; cursor: help;
}
.poster-badge .ui-icon { width: 16px; height: 16px; stroke-width: 2.2; }
/* Подсказка грузится по AJAX и живёт одним узлом в конце body */
.poster-info-pop {
    position: absolute; z-index: 300; width: 330px; padding: 18px 18px 16px;
    background: var(--panel); color: var(--text);
    border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-lg);
    display: none;
}
.poster-info-pop.is-open { display: block; }
.poster-info-pop h4 { margin: 0 0 9px; color: var(--text); font-size: 19px; line-height: 1.25; font-weight: 500; }
.poster-info-pop p { margin: 0 0 13px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.poster-info-loading { font-size: 14px; color: var(--muted); }
.poster-info-meta {
    border-top: 1px solid var(--line); padding-top: 11px;
    display: grid; grid-template-columns: 110px 1fr; gap: 7px 10px; font-size: 13px; color: var(--text-2);
}
.poster-info-meta b { color: var(--muted-2); font-weight: 400; }
.poster-info-actions { display: grid; gap: 10px; margin-top: 14px; }
.poster-info-actions a {
    background: var(--accent); color: #fff; text-align: center;
    padding: 9px 8px; border-radius: 6px; font-size: 14px;
}
.poster-info-actions a:hover { background: var(--accent-hover); color: #fff; }

/* Подборка */
.collection-card {
    display: block; height: 245px; position: relative; overflow: hidden;
    border-radius: 5px; background: #1c1c1c; border: 1px solid #303030;
}
.collection-card img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); }
/* Счётчик — полукруг, свисающий с верхнего края карточки */
.collection-card .count {
    position: absolute; left: 50%; top: 0; transform: translateX(-50%);
    width: 68px; height: 52px; background: #171717; border-radius: 0 0 34px 34px;
    display: grid; place-items: center; color: #ff6a35; font-size: 21px; font-weight: 700;
    padding-bottom: 4px; border-bottom: 3px solid #3b3b3b;
}
/* Название — поверх картинки, на полупрозрачной подложке, в нижней части карточки */
.collection-card .collection-title {
    position: absolute; left: 10px; right: 10px; top: auto; bottom: 18px; transform: none;
    max-width: none; background: #191919b3;
    padding: 11px 14px; border-radius: 6px;
    color: #f0f0f0; font-size: 17px; font-weight: 600;
    text-align: center; line-height: 1.35;
}
.collection-card:hover { border-color: #555; }
.collection-card:hover img { filter: brightness(.9); }

/* Актёр */
.person { display: block; }
.person img { width: 100%; aspect-ratio: 1 / 1.05; object-fit: cover; border-radius: 3px; }
.person-name { font-size: 15px; line-height: 1.35; margin-top: 10px; color: #d8d8da; text-align: center; }
.person-rating { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: #ff574d; margin-left: 5px; }
.person-rating .ui-icon { width: 11px; height: 11px; fill: currentColor; stroke: none; }

/* Карточка серии */
.episode-card { display: block; }
.episode-thumb { height: 126px; overflow: hidden; border-radius: 3px; position: relative; background: #242526; }
.episode-thumb img { width: 100%; height: 100%; object-fit: cover; }
.episode-num { text-align: center; font-size: 19px; line-height: 1.25; margin-top: 10px; color: #e8e8e9; font-weight: 400; }
.episode-card.is-viewed .episode-num { color: var(--muted-2); }
.episode-card.is-viewed .episode-thumb { opacity: .65; }

/* ============================================================
   УПРАВЛЯЮЩИЕ ЭЛЕМЕНТЫ
   ============================================================ */
.tab {
    border: 1px solid #3f3f42; background: #2b2b2d; color: #d7d7d8;
    padding: 7px 14px; border-radius: 4px; font-size: 11px; text-transform: uppercase;
}
.tab:hover { color: #fff; }
.tab.active, .tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.more-button {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin: 18px 0 0; width: 100%; height: 44px;
    border: 1px solid var(--accent); border-radius: 4px; background: #232425; color: #fff;
    text-transform: uppercase; font-size: 11px; font-weight: 700;
}
.more-button:hover { background: #2a2b2c; }
.more-button .ui-icon { width: 15px; height: 15px; }

.voice-row { display: flex; gap: 11px; margin: 13px 0 22px; flex-wrap: wrap; }
.voice {
    padding: 10px 17px; border-radius: 3px; background: #39393c; color: #d6d6d8;
    font-size: 15px; border: 0; display: inline-flex; align-items: center; gap: 8px;
}
.voice:hover { background: #454549; color: #fff; }
.voice.active { background: var(--accent); color: #fff; }

.pager { display: flex; gap: 8px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.page-dot {
    width: 31px; height: 31px; border-radius: 6px; display: grid; place-items: center;
    background: #292a2b; border: 1px solid #3d3d40; color: #bdbdc0; font-size: 14px;
}
.page-dot:hover { color: #fff; border-color: #56565a; }
.page-dot.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-dot--wide { width: auto; padding: 0 12px; }

.status {
    display: inline-flex; align-items: center; background: var(--accent-2);
    padding: 5px 10px; border-radius: 4px; font-size: 10px; text-transform: uppercase; color: #fff;
}
.watch-small {
    height: 36px; width: 100%; margin-top: 8px;
    border: 1px solid #424246; background: #1f2021; color: #ff7650; border-radius: 4px;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.watch-small:hover { background: #262728; color: #ff8c68; }
.watch-small .ui-icon { width: 16px; height: 16px; }

.stars, .rating-stars { display: inline-flex; align-items: center; gap: 2px; vertical-align: middle; }
.stars .ui-icon, .rating-stars .ui-icon { width: 17px; height: 17px; color: var(--star); fill: currentColor; stroke: none; }

.brand-ratings { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.rating-brand { display: inline-flex; align-items: center; gap: 7px; color: #cfcfd2; font-weight: 600; }
.rating-brand svg { display: block; flex: 0 0 auto; }
.rating-brand.kp svg { width: 25px; height: 25px; color: #8d8d92; fill: #8d8d92; }
.rating-brand.kp b { font-size: 13px; letter-spacing: .02em; color: #9b9ba0; }
.rating-brand.imdb svg { width: 48px; height: 20px; }
.rating-brand.imdb svg rect { fill: #8f8f93; stroke: none; }
.rating-brand.imdb svg text { font: 700 10px Arial, sans-serif; fill: #212121; }

/* Таблица характеристик */
.meta { display: grid; grid-template-columns: 180px 1fr; gap: 12px 18px; font-size: 15px; line-height: 1.48; }
.meta dt { color: #838389; }
.meta dd { margin: 0; color: #d0d0d3; }

/* ============================================================
   ФОРМЫ И ОБЩИЕ КОМПОНЕНТЫ (используются и в админке)
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0 16px; height: 40px; border: 1px solid transparent; border-radius: var(--radius);
    font-size: 15px; font-weight: 600; text-align: center;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--ghost { background: #29292b; border-color: #444447; color: var(--text-2); }
.btn--ghost:hover { background: #303033; border-color: #56565a; color: #fff; }
.btn--soft { background: var(--surface-2); color: var(--text-2); }
.btn--soft:hover { background: var(--surface-3); color: #fff; }
.btn--danger { background: var(--coral); color: #fff; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }

.btn-flat { height: 38px; border: 1px solid #454548; background: #28282a; color: #ccc; border-radius: 4px; }
.btn-flat:hover { background: #313133; color: #fff; }
.btn-accent { height: 38px; border: 0; background: var(--accent); color: #fff; border-radius: 4px; font-weight: 700; }
.btn-accent:hover { background: var(--accent-hover); }

.field { display: flex; flex-direction: column; gap: 5px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field__hint { font-size: 13px; color: var(--muted); }
.field__error { font-size: 13px; color: var(--coral); }

.input, .select, .textarea {
    width: 100%; height: 43px; padding: 0 12px;
    background: #1d1e1f; border: 1px solid #37373a; border-radius: 4px;
    color: var(--text); font-size: 15px;
    transition: border-color .15s ease;
}
.textarea { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); }
.input::placeholder, .textarea::placeholder { color: #6f6f74; }
.select {
    appearance: none; padding-right: 32px; text-transform: uppercase; font-size: 11px; color: #ff7a52;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ff7a52' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--accent); }

.alert { padding: 12px 14px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; }
.alert--success { border-color: var(--green); background: rgba(76, 195, 138, .12); }
.alert--error { border-color: var(--coral); background: rgba(255, 78, 78, .12); }

.panel { background: var(--panel); border: 1px solid #2d2e30; border-radius: 3px; padding: 18px; }
.panel--flush { padding: 0; overflow: hidden; }
.panel__head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.panel__head--flush { padding: 0 0 10px; border-bottom: 0; }
.panel__title { margin: 0; font-size: 19px; font-weight: 600; }

.badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px;
    border-radius: 3px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap;
    background: var(--chip); color: var(--text-2);
}
.badge--new { background: var(--accent); color: #fff; }
.badge--quality { background: #1d1d1fcc; color: #fff; }
.badge--ongoing { background: var(--green-soft); color: var(--green); }
.badge--completed { background: var(--chip); color: var(--text-2); }
.badge--announced { background: var(--accent-soft); color: var(--accent); }
.badge--paused { background: var(--gold-soft); color: var(--gold); }
.badge--cancelled { background: var(--coral-soft); color: var(--coral); }
.badge--voice { background: var(--chip); color: var(--text-2); }
.badge--muted { background: var(--surface-2); color: var(--muted); }

/* Базовая геометрия: цвета и размеры задаёт единый формат кнопок в pages.css */
.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
    border-radius: 4px; background: #2b2b2d; border: 1px solid #3f3f42;
    color: #d7d7d8; font-size: 13px;
}
.chip:hover { color: #fff; }
.chip--active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs .tab { border-radius: 4px 4px 0 0; }

.stat { background: var(--panel); border: 1px solid #2d2e30; border-radius: 3px; padding: 14px 16px; }
.stat__value { font-size: 25px; font-weight: 700; }
.stat__label { font-size: 13px; color: var(--muted); margin-top: 2px; }

.state { padding: 40px 20px; text-align: center; color: var(--muted); }
.state__title { font-size: 19px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 24px; }
.pagination__item {
    min-width: 36px; height: 36px; padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #3d3d40; border-radius: 4px; background: #292a2b;
    color: #bdbdc0; font-size: 15px;
}
.pagination__item:hover { color: #fff; border-color: #56565a; }
.pagination__item--active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination__gap { min-width: 24px; display: grid; place-items: center; color: var(--muted-2); }

.skeleton-grid { display: grid; gap: 26px 14px; grid-template-columns: repeat(5, 1fr); }
.skeleton { border-radius: 3px; background: #262628; animation: shimmer 1.3s linear infinite; background-size: 250% 100%;
    background-image: linear-gradient(100deg, #242426 30%, #303032 50%, #242426 70%); }
.skeleton--poster { aspect-ratio: 2 / 3; }
.skeleton--line { height: 12px; margin-top: 8px; }
.skeleton--line-sm { height: 10px; width: 60%; margin-top: 6px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -50% 0; } }

.spinner {
    width: 18px; height: 18px; border-radius: 50%; flex: none;
    border: 2px solid rgba(255, 255, 255, .3); border-top-color: currentColor;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toasts { position: fixed; right: 16px; bottom: 80px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 32px)); }
.toast {
    display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 4px;
    background: #2c2c2e; color: var(--text); border: 1px solid #45454a; box-shadow: var(--shadow-lg); font-size: 15px;
}
.toast--success { border-color: var(--green); }
.toast--error { border-color: var(--coral); }
.toast__close { margin-left: auto; background: none; border: 0; color: inherit; opacity: .7; padding: 0; }

.modal { position: fixed; inset: 0; z-index: 150; display: none; }
.modal.is-open { display: block; }
.modal__overlay { position: absolute; inset: 0; background: #000c; }
.modal__dialog {
    position: relative; margin: min(8vh, 60px) auto 0; max-width: 560px; width: calc(100% - 32px);
    background: var(--panel); border: 1px solid #3a3a3d; border-radius: 5px;
    max-height: 84vh; display: flex; flex-direction: column;
}
.modal__head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal__title { margin: 0; font-size: 19px; }
.modal__close { margin-left: auto; width: 32px; height: 32px; border: 0; background: #2f2f31; border-radius: 50%; display: grid; place-items: center; color: #ddd; }
.modal__body { padding: 18px; overflow-y: auto; }
.modal__footer { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.modal--lightbox .modal__dialog { max-width: 1100px; background: none; border: 0; }
.modal--lightbox img { width: 100%; border-radius: 3px; }
body.is-locked { overflow: hidden; }

/* ============================================================
   ПОИСК: оверлей макета + наши живые подсказки
   ============================================================ */
.search-overlay { position: fixed; inset: 0; background: #000c; z-index: 300; display: none; padding-top: 10px; }
.search-overlay.open { display: block; }
.search-modal {
    width: min(1180px, calc(100% - 30px)); margin: 0 auto;
    background: #151516; border: 1px solid #3a3a3d; border-radius: 5px;
    max-height: calc(100vh - 30px); overflow: hidden;
}
.search-top { height: 62px; display: flex; align-items: center; border-bottom: 1px solid #343438; padding: 0 18px; gap: 12px; }
.close-search { font-size: 0; color: #bbb; border: 0; background: none; display: inline-flex; align-items: center; }
.close-search .ui-icon { width: 23px; height: 23px; }
.search-top input, .search__input { flex: 1; border: 0; outline: 0; background: transparent; color: #fff; font-size: 20px; }
.search-submit { color: var(--accent); font-size: 18px; border: 0; background: none; display: inline-flex; align-items: center; gap: 7px; }
.search-submit .ui-icon { width: 16px; height: 16px; }
.search__clear { display: none; border: 0; background: none; color: #888; font-size: 22px; padding: 0 6px; }
.search__clear.is-visible { display: block; }
.search-results { max-height: 70vh; overflow: auto; padding: 20px; }
.search-result {
    display: grid; grid-template-columns: 170px 1fr 140px; gap: 22px;
    padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid #37373a;
}
.search-result img { width: 170px; height: 250px; object-fit: cover; border-radius: 3px; }
.search-result h3 { font-size: 25px; margin: 0 0 3px; }
.search-result .sub { font-size: 18px; color: #97979b; }
.search-meta { display: grid; grid-template-columns: 1fr 1fr 1fr; background: #353537; margin: 10px 0 12px; color: #a7a7aa; }
.search-meta span { padding: 8px 12px; }
.search-result p { font-size: 16px; color: #bcbcc0; line-height: 1.55; }
.search-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.search-buttons a, .search-buttons button {
    height: 46px; border: 1px solid #57575b; background: #171718; color: var(--accent); border-radius: 4px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.search-result .state { align-self: start; border: 1px solid #57575b; border-radius: 4px; padding: 6px 10px; text-align: center; color: #999; }
.all-results {
    height: 58px; background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 18px; font-weight: 700;
}
.search-empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.search-hint { padding: 30px 20px; text-align: center; color: var(--muted-2); }

/* Карточки собраны на <a> со span-ами внутри: возвращаем блочное поведение */
.air-img, .strip-img, .episode-thumb, .poster, .actor-photo,
.air-name, .air-ep, .strip-title, .strip-sub,
.poster-title, .poster-sub, .episode-num, .person-name,
.collection-card .collection-title { display: block; }
.poster { position: relative; }
.air-img, .strip-img, .episode-thumb { position: relative; }

/* Выдача живого поиска внутри оверлея */
.search-group-title {
    padding: 4px 0 12px; font-size: 13px; text-transform: uppercase;
    letter-spacing: .06em; color: var(--muted-2);
}
.search-result { color: inherit; }
.search-result:hover h3, .search-result.is-active h3 { color: var(--accent); }
.search-result__body { min-width: 0; }
.search-result p { margin: 8px 0 0; }
/* ============================================================
   КАТАЛОГ (главная и разделы-списки)
   ============================================================ */
.catalog { margin-top: 34px; }
.catalog-head {
    height: 58px; display: flex; align-items: center; justify-content: space-between;
    gap: 16px; border-bottom: 1px solid #363638;
}
.catalog-head h3 { font-size: 22px; font-weight: 500; letter-spacing: -.2px; margin: 0; }
.catalog-tools { font-size: 12px; color: #bcbcc0; display: inline-flex; align-items: center; gap: 7px; }
.catalog-tools .ui-icon { width: 21px; height: 21px; color: var(--accent); }

.filters { padding: 18px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.filters .field { gap: 0; }
.selectish {
    height: 43px; background: #1d1e1f; border: 1px solid #37373a; border-radius: 4px;
    color: #ff7a52; padding: 0 12px; display: flex; align-items: center; justify-content: space-between;
    text-transform: uppercase; font-size: 11px; width: 100%;
}
.selectish .ui-icon { width: 15px; height: 15px; }
.filter-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 160px 1fr; gap: 14px; margin-top: 4px; }

.catalog-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 25px 16px; margin-top: 22px; }
.catalog-grid .poster-title { font-size: 17px; }

/* Каталог на главной — полоса во всю ширину полотна */
.home-shell .catalog { margin: 0 calc(var(--gutter) * -1); border: 0; border-radius: 0; overflow: visible; background: var(--band-mid); }
.home-shell .catalog-head {
    height: 72px; padding: 0 var(--gutter); background: #242424; border: 0;
    border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.home-shell .catalog-head h3 { font-size: 24px; font-weight: 500; }
.home-shell .catalog-tools { font-size: 14px; }
.home-shell .filters { padding: 28px var(--gutter) 30px; border: 0; border-bottom: 1px solid var(--line-soft); background: var(--band-soft); }
.home-shell .catalog-grid { padding: 24px var(--gutter) 34px; background: var(--band-mid); }

/* ============================================================
   СТРАНИЦА СЕРИАЛА
   ============================================================ */
.detail-head {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    border-bottom: 1px solid #433034; padding-bottom: 17px; margin-bottom: 16px; flex-wrap: wrap;
}
.detail-head h1 { font-size: 33px; line-height: 1.2; margin: 0; font-weight: 650; letter-spacing: -.45px; }
.detail-head h1 .ui-icon { width: 22px; height: 22px; color: var(--accent); vertical-align: -.1em; }
.detail-links { display: flex; gap: 16px; font-size: 14px; color: #c0c0c1; flex-wrap: wrap; }
.detail-links a:hover { color: var(--accent); }

.about { display: grid; grid-template-columns: 245px 1fr; gap: 40px; margin-top: 54px; padding-top: 34px; border-top: 1px solid #3b3b3e; align-items: start; }
.about-poster { position: relative; }
.poster-wrap { position: relative; }
.poster-wrap img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.poster-status { position: absolute; left: 10px; top: 10px; z-index: 2; margin: 0; box-shadow: 0 4px 14px rgba(0, 0, 0, .24); }
.about h2 { font-size: 27px; line-height: 1.25; font-weight: 500; margin: 2px 0 22px; }
.about-copy { min-width: 0; position: relative; }
.about-scroll { position: relative; max-height: 515px; overflow-y: auto; padding: 0 18px 48px 0; scrollbar-width: thin; scrollbar-color: #4a4a4e #29292b; }
.about-scroll::-webkit-scrollbar { width: 9px; }
.about-scroll::-webkit-scrollbar-track { background: #29292b; border-radius: 8px; }
.about-scroll::-webkit-scrollbar-thumb { background: #4a4a4e; border-radius: 8px; border: 2px solid #29292b; }
.about-copy::after {
    content: ""; position: absolute; left: 0; right: 10px; bottom: 0; height: 88px;
    pointer-events: none; background: linear-gradient(to bottom, rgba(33, 33, 33, 0), var(--canvas) 86%); z-index: 2;
}

.frames h2, .actors h2, .similar h2, .picks h2, .description h2 {
    font-size: 25px; line-height: 1.25; font-weight: 500; margin: 38px 0 17px; letter-spacing: -.2px;
}
.frame-row img { width: 100%; height: 145px; object-fit: cover; border-radius: 3px; }
.description p { font-size: 17px; line-height: 1.75; color: #c0c0c4; margin: 16px 0; }
.description > img { width: 100%; max-height: 500px; object-fit: cover; border-radius: 2px; }
.show-description { margin-top: 48px; }
.show-shell .picks { margin-top: 38px; }
.show-shell .show-collections { margin-top: 16px; }

/* ============================================================
   СТРАНИЦА СЕРИИ
   ============================================================ */
.episode-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.player { position: relative; }
.player__frame { position: relative; aspect-ratio: 16 / 9; background: #171726; border: 1px solid #29293b; overflow: hidden; }
.player__frame iframe, .player__frame video, .player__iframe, .player__video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__empty, .player-empty {
    min-height: 420px; background: #171726; border: 1px solid #29293b;
    display: grid; place-items: center; color: #ff4e4e; font-size: 18px; text-align: center; padding: 30px;
}
.player-symbol { font-size: 0; margin-bottom: 18px; }
.player-symbol .ui-icon { width: 76px; height: 76px; color: #ff593c; stroke-width: 1.45; }
.player.is-loading .player__frame::after { content: ''; position: absolute; inset: 0; background: rgba(12, 12, 18, .6); }

.rating-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 10px 0 14px; color: #86868b; flex-wrap: wrap; }
.rating-line__votes { font-size: 11px; color: #777; }
.viewed-toggle { border: 0; background: none; color: #86868b; display: inline-flex; align-items: center; gap: 7px; font-size: 14px; padding: 0; }
.viewed-toggle .ui-icon { width: 17px; height: 17px; }
.viewed-toggle:hover, .viewed-toggle.is-active { color: var(--accent); }

.episode-nav, .actor-nav {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: center;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin-top: 14px;
}
.episode-nav a, .episode-nav button, .actor-nav a, .actor-nav button, .actor-nav .all-actors {
    min-height: 42px; border: 1px solid #444447; background: #29292b; color: #d4d4d6;
    border-radius: 4px; padding: 0 16px; display: flex; align-items: center; justify-content: center; gap: 9px;
    font-size: 14px; transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.episode-nav a:hover, .episode-nav button:hover, .actor-nav a:hover, .actor-nav button:hover { background: #303033; border-color: #56565a; color: #fff; }
.episode-nav .episode-nav__center, .actor-nav .all-actors { color: var(--accent); border-color: #4b4543; background: #272727; }
.episode-nav .ui-icon, .actor-nav .ui-icon { width: 15px; height: 15px; }
.episode-nav__spacer { visibility: hidden; }

.schedule { border-left: 1px solid #39393c; padding-left: 20px; position: relative; max-height: 465px; overflow: hidden; padding-bottom: 28px; }
.schedule h3 { font-size: 21px; font-weight: 600; border-bottom: 2px solid #7c3734; padding-bottom: 12px; margin: 0; position: relative; z-index: 2; background: var(--canvas); }
.schedule-scroll { max-height: 390px; overflow-y: auto; padding: 14px 14px 0 0; scrollbar-width: thin; scrollbar-color: #505054 #29292b; }
.schedule-scroll::-webkit-scrollbar { width: 9px; }
.schedule-scroll::-webkit-scrollbar-track { background: #29292b; border-radius: 8px; }
.schedule-scroll::-webkit-scrollbar-thumb { background: #505054; border-radius: 8px; border: 2px solid #29292b; }
.schedule::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 76px; pointer-events: none;
    background: linear-gradient(to bottom, rgba(33, 33, 33, 0), var(--canvas) 82%); z-index: 3;
}
.schedule-item { margin: 0 0 14px; display: block; }
.schedule-item b { display: block; color: #e7e7e9; font-size: 16px; line-height: 1.35; font-weight: 500; }
.schedule-item span { color: #8f8f93; font-size: 14px; line-height: 1.4; }
.schedule-item:hover b { color: var(--accent); }

.episode-frames { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px; }
.episode-frames img { width: 100%; height: 190px; object-fit: cover; border-radius: 3px; }
.episode-frames-title { font-size: 25px; font-weight: 500; margin: 34px 0 14px; }
.episode-info { display: block; margin-top: 24px; }
.episode-text { margin-top: 28px; padding-top: 24px; border-top: 1px solid #383838; }
.episode-text h2 { font-size: 28px; line-height: 1.25; font-weight: 500; letter-spacing: -.25px; }
.episode-text .date { color: #838388; margin-bottom: 14px; font-size: 15px; }
.episode-text p { font-size: 18px; line-height: 1.72; color: #c7c7ca; }

/* ============================================================
   КОММЕНТАРИИ
   ============================================================ */
.comments { margin-top: 46px; width: 100%; padding-top: 10px; }
.comments h2 { font-size: 29px; font-weight: 500; margin: 0; }
.comments small { display: block; color: #ff4e4e; text-transform: uppercase; margin-bottom: 10px; }
.comment-form { background: none; border: 0; padding: 0; margin-bottom: 16px; }
.comment-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.comment-form__line { min-height: 50px; border: 1px solid #48484c; background: #28282b; display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 4px; }
.comment-form__line .textarea, .comment-form__line input {
    flex: 1; border: 0; outline: 0; background: transparent; color: #fff; min-height: 38px; padding: 0; resize: none;
}
.comment-form__send { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #505055; background: #242427; color: var(--accent); display: grid; place-items: center; flex: none; }
.comment-form__send .ui-icon { width: 18px; height: 18px; }
.comment-form__hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

.comment-tabs { margin-top: 16px; min-height: 48px; background: #2b2b2e; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 7px; }
.comment-tabs button { border: 1px solid #3c3c40; background: #28282a; color: #e5e5e7; border-radius: 4px; min-height: 34px; }
.comment-tabs button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.comment { padding: 20px 0; border-bottom: 1px solid #303034; }
.comment-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.avatar, .comment__avatar {
    width: 34px; height: 34px; border-radius: 50%; background: #3a3a3d; overflow: hidden; flex: none;
    display: grid; place-items: center; color: #e6e6e8; font-size: 14px; font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-user { font-weight: 700; font-size: 15px; }
.comment-date { color: #777; font-size: 12px; }
.comment__body { min-width: 0; flex: 1; }
.comment p, .comment__text { color: #c1c1c5; margin: 11px 0; font-size: 16px; line-height: 1.62; overflow-wrap: anywhere; }
.comment-actions, .comment__actions { font-size: 11px; color: #777; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.comment__action { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; color: #777; font-size: 12px; }
.comment__action:hover, .comment__action.is-active { color: var(--accent); }
.comment__action .ui-icon { width: 14px; height: 14px; }
.comment__children { margin-left: 22px; padding-left: 14px; border-left: 2px solid #303034; }
.comment__reply-form { margin: 10px 0 4px; }
.comment--pending { opacity: .65; }

/* ============================================================
   СТРАНИЦА АКТЁРА
   ============================================================ */
.actor-shell { background: var(--canvas); padding-bottom: 48px; }
.actor-headline { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 8px 0 18px; border-bottom: 1px solid #3a3030; }
.actor-headline h1 { margin: 0; font-size: 31px; line-height: 1.2; font-weight: 650; color: #f1f1f2; }
.actor-votes { min-width: 150px; text-align: right; color: #777; font-size: 11px; }
.actor-votes .rating-stars { justify-content: flex-end; margin-top: 5px; }
.actor-profile { display: grid; grid-template-columns: 160px 1fr; gap: 42px; padding: 28px 20px 24px; }
.actor-photo { height: 205px; background: #262626; overflow: hidden; }
.actor-photo img { width: 100%; height: 100%; object-fit: cover; }
.actor-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(210px, 1fr)); gap: 20px 56px; align-content: start; }
.actor-facts div { min-width: 0; }
.actor-facts dt { font-size: 13px; color: #777; margin-bottom: 7px; }
.actor-facts dd { margin: 0; font-size: 16px; color: #d1d1d4; line-height: 1.35; }
.actor-nav { margin-top: 0; grid-template-columns: 1fr 220px 1fr; }
.actor-nav a:first-child, .actor-nav button:first-child { justify-content: flex-start; }
.actor-nav a:last-child, .actor-nav button:last-child { justify-content: flex-end; }
.actor-works h2, .actor-bio h2 { font-size: 25px; line-height: 1.25; font-weight: 500; margin: 30px 0 18px; color: #efeff1; }
.actor-grid { padding: 0; background: transparent; grid-template-columns: repeat(5, 1fr); gap: 28px 18px; }
.actor-grid .poster { height: auto; aspect-ratio: 2 / 3; }
.actor-grid .poster-title { font-size: 16px; text-align: left; color: #d3d3d6; }
.actor-grid .poster-sub { display: none; }
.actor-bio { width: 100%; max-width: none; }
.actor-bio p { font-size: 17px; line-height: 1.64; color: #b9b9bd; margin: 0 0 17px; max-width: none; }

/* ============================================================
   ОСТАЛЬНЫЕ РАЗДЕЛЫ
   ============================================================ */
/* Лента обновлений и расписание */
.updates__day { margin-bottom: 30px; }
.updates__day-title { font-size: 21px; font-weight: 500; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 10px; }
.updates__day-count { font-size: 13px; color: var(--muted); }

.schedule-day { margin-bottom: 26px; }
.schedule-day__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.schedule-day__weekday { font-size: 19px; font-weight: 600; }
.schedule-day__date { color: var(--muted); font-size: 15px; }
.schedule-day--today .schedule-day__weekday { color: var(--accent); }
.schedule-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid #2e2e30; }
.schedule-row__time { font-weight: 600; color: var(--accent); min-width: 52px; }
.schedule-row img { width: 40px; height: 60px; object-fit: cover; border-radius: 3px; flex: none; }
.schedule-empty { padding: 12px 0; color: var(--muted-2); }

/* Текстовые страницы и SEO-блок */
.prose { color: #c0c0c4; font-size: 17px; line-height: 1.75; }
.prose h2, .prose h3 { color: var(--text); margin-top: 1.4em; font-weight: 500; }
.prose img { border-radius: 3px; margin: 1em 0; }
.seo-text { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line); }

/* Ошибки */
.error-page { text-align: center; padding: 60px 0 40px; }
.error-page__code { font-size: clamp(64px, 14vw, 128px); font-weight: 800; line-height: 1; color: var(--accent); }
.error-page__title { margin-top: 8px; font-size: 27px; font-weight: 500; }
.error-page__search { max-width: 460px; margin: 24px auto; }

/* Оценка «звёздами» */
.rate { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.rate__star { width: 26px; height: 26px; border: 0; background: none; padding: 0; color: #4a4a4e; transition: color .12s ease, transform .12s ease; }
.rate__star svg { width: 22px; height: 22px; fill: currentColor; }
.rate__star:hover { transform: scale(1.12); }
.rate__star.is-on { color: var(--star); }
.rate__result { font-size: 13px; color: var(--muted); }

/* Галерея-лайтбокс */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.gallery__item { border: 0; padding: 0; background: #202021; border-radius: 3px; overflow: hidden; display: block; aspect-ratio: 16 / 9; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }

/* Кнопка «Фильтры» — только на мобильных */
.filters__mobile-btn { display: none; margin: 14px 0 0; }
.filters-panel { display: block; }
.filter-actions { grid-template-columns: 200px 1fr; }
.filter-actions .btn-flat, .filter-actions .btn-accent { white-space: nowrap; }
@media (max-width: 900px) {
    .filters__mobile-btn { display: inline-flex; }
    .filters-panel { display: none; }
    .filters-panel.is-open { display: block; }
}

/* Отступы между блоками главной и в списке актёров */
.home-shell .more-button { margin-bottom: 32px; }
.home-shell .home-band:last-of-type { margin-bottom: 8px; }
.people-row { gap: 22px 14px; }
.person { padding-bottom: 6px; }

/* Изображение задаёт высоту карточки само — height:100% от .no-image-svg тут мешает */
.person img, .poster img, .collection-card img { height: auto; }
.person img { aspect-ratio: 1 / 1.05; }
.poster img { aspect-ratio: 2 / 3; }
.collection-card img { height: 100%; }
.person-name { min-height: 42px; }

/* Озвучки и сезоны — одной строкой с горизонтальным скролом */
.voice-row {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: #4a4a4e transparent;
}
.voice-row::-webkit-scrollbar { height: 6px; }
.voice-row::-webkit-scrollbar-thumb { background: #4a4a4e; border-radius: 6px; }
.voice { flex: 0 0 auto; padding: 8px 15px; font-size: 14px; white-space: nowrap; }

/* Рейтинг внутри таблицы характеристик */
.meta .rating-line { margin: 0; display: block; }
.meta .rate { gap: 1px; }
.meta .rate__star { width: 21px; height: 21px; }
.meta .rate__star svg { width: 18px; height: 18px; }
.meta .rating-line__votes { display: block; margin-bottom: 3px; }

/* Компактная выдача быстрого поиска */
.search-results { padding: 14px 18px; }
.search-result {
    grid-template-columns: 74px 1fr auto; gap: 14px;
    padding-bottom: 12px; margin-bottom: 12px; align-items: center;
}
.search-result img { width: 74px; height: 108px; }
.search-result h3 { font-size: 18px; margin: 0 0 2px; }
.search-result .sub { font-size: 14px; }
.search-result p { font-size: 13px; color: #9a9aa0; margin: 4px 0 0; }
.search-result .state { padding: 4px 9px; font-size: 12px; }
.search-group-title { padding: 2px 0 8px; font-size: 12px; }
.all-results { height: 42px; font-size: 14px; font-weight: 600; }
.search-empty, .search-hint { padding: 22px 14px; font-size: 15px; }

/* ============================================================
   ЕДИНЫЙ ФОРМАТ КНОПОК — по образцу вкладок сезонов (.voice)
   ============================================================ */
.voice,
.tab,
.more-button,
.watch-small,
.status,
.btn-flat,
.btn-accent,
.page-dot,
.episode-nav a, .episode-nav button,
.actor-nav a, .actor-nav button, .actor-nav .all-actors,
.filters .select, .filters .input, .selectish,
.comment-tabs button,
.chip,
.search-buttons a, .search-buttons button {
    min-height: 40px;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--chip);
    color: #d6d6d8;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .15s ease, color .15s ease;
}
.voice:hover, .tab:hover, .more-button:hover, .watch-small:hover,
.btn-flat:hover, .page-dot:hover,
.episode-nav a:hover, .episode-nav button:hover,
.actor-nav a:hover, .actor-nav button:hover,
.comment-tabs button:hover,
.chip:hover,
.search-buttons a:hover, .search-buttons button:hover { background: #454549; color: #fff; }

/* активные и главные действия — оранжевые */
.voice.active, .tab.active, .tab[aria-selected="true"], .page-dot.active,
.btn-accent, .comment-tabs button.active, .chip--active, .status {
    background: var(--accent); color: #fff; border-color: var(--accent);
}
.chip--active:hover { background: var(--accent-hover); color: #fff; }
.btn-accent:hover, .comment-tabs button.active:hover { background: var(--accent-hover); color: #fff; }

/* элементы, которым нужна своя ширина */
.more-button { width: 100%; margin: 18px 0 0; }
.watch-small { width: 100%; margin-top: 8px; color: var(--accent); }
.watch-small:hover { color: #fff; }
.page-dot { min-width: 40px; padding: 8px 12px; }
.status { min-height: 28px; padding: 4px 11px; font-size: 12px; text-transform: uppercase; }
.filters .select, .filters .input, .selectish { width: 100%; height: 40px; justify-content: space-between; }
.filters .select { color: var(--accent); text-transform: none; font-size: 14px; }
.filters .input { color: var(--text); }
.filters .input::placeholder { color: var(--muted-2); }
.episode-nav a, .episode-nav button, .actor-nav a, .actor-nav button { width: 100%; }
.episode-nav .episode-nav__center, .actor-nav .all-actors { color: var(--accent); background: var(--chip); }
.episode-nav .episode-nav__center:hover, .actor-nav .all-actors:hover { background: #454549; color: #fff; }

/* значок «i» на постере */
.poster-badge {
    border-radius: 6px; background: #252525; border: 0; color: inherit;
    width: 28px; height: 28px; top: 8px; right: 8px;
}
.poster-badge .ui-icon { color: #d6d6d8; }
.poster-badge:hover .ui-icon { color: var(--accent); }
/* всплывающая карточка не должна исчезать при переводе курсора и уходит поверх соседей */
.poster-info-pop { top: 36px; }
.poster-badge:hover ~ .poster-info-pop,
.poster-badge:focus ~ .poster-info-pop,
.poster-info-pop:hover { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.poster-card { z-index: 1; }
.poster-card:has(.poster-badge:hover), .poster-card:has(.poster-info-pop:hover) { z-index: 40; }
.poster-card:hover { z-index: 30; }

/* фотография актёра — вытянутая */
.person img { aspect-ratio: 1 / 1.42; }

/* звёзды оценки крупнее, чтобы удобно попадать */
.rate__star { width: 34px; height: 34px; }
.rate__star svg { width: 30px; height: 30px; }
.meta .rate__star { width: 30px; height: 30px; }
.meta .rate__star svg { width: 26px; height: 26px; }
.rating-stars .ui-icon, .stars .ui-icon { width: 20px; height: 20px; }

/* Заголовок раздела в шапке каталога */
.catalog-head h1 { font-size: 22px; font-weight: 500; letter-spacing: -.2px; margin: 0; }
.home-shell .catalog-head h1 { font-size: 24px; }

/* Подсказка вынесена из карточки — старые правила ховера больше не нужны */
.poster-card:has(.poster-badge:hover), .poster-card:has(.poster-info-pop:hover) { z-index: auto; }
.poster-badge { cursor: pointer; }

/* Метки озвучек поверх превью: одна строка, лишнее срезается */
.tags { flex-wrap: nowrap; overflow: hidden; }
.mini-tag {
    background: #28282abd; border: 0; box-shadow: none;
    min-width: 0; overflow: hidden; text-overflow: ellipsis; display: block;
    line-height: 19px; padding: 4px 10px;
}
.air-img .mini-tag, .episode-thumb .mini-tag, .strip-img .mini-tag { background: #28282abd; }

/* Профиль актёра — на фоне шапки */
.actor-profile { background: var(--header-bg); border-radius: 6px; }

/* Список актёров не должен упираться в верхнюю границу */
.catalog .people-row { margin-top: 22px; }

/* Быстрый поиск в общей гамме сайта */
.search-modal { background: var(--canvas); border-color: var(--line); }
.search-top { border-bottom-color: var(--line); }
.search-result { border-bottom-color: var(--line); }

/* Поля комментариев в общей гамме */
.comment-form .input,
.comment-form .textarea,
.comment-form__line {
    background: var(--panel-2); border: 1px solid var(--line);
    color: var(--text); border-radius: 6px;
}
.comment-form .input { height: 40px; padding: 0 13px; font-size: 14px; }
.comment-form .input::placeholder,
.comment-form .textarea::placeholder { color: var(--muted-2); }
.comment-form .input:focus,
.comment-form__line:focus-within { border-color: var(--accent); outline: none; }
.comment-form__line { padding: 5px 6px 5px 13px; }
.comment-form__line .textarea { background: transparent; border: 0; font-size: 14px; }
.comment-form__send { background: var(--chip); border: 0; color: var(--accent); border-radius: 6px; width: 38px; height: 38px; }
.comment-form__send:hover { background: var(--accent); color: #fff; }
/* Вкладки сортировки комментариев — панель во всю ширину, как в макете */
.comment-tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    width: 100%; min-height: 48px; padding: 7px; margin: 18px 0 4px;
    background: #272727; border-radius: 6px;
}
.comment-tabs button {
    width: 100%; min-height: 34px; padding: 6px 12px;
    background: #28282a; border: 1px solid #3c3c40; border-radius: 4px; color: #e5e5e7;
}
.comment-tabs button:hover { background: #33333a; border-color: #4a4a50; color: #fff; }
.comment-tabs button.active,
.comment-tabs button.active:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Фото в профиле актёра показываем целиком */
.actor-photo { height: auto; aspect-ratio: 1 / 1.28; border-radius: 6px; }
.actor-photo img { height: 100%; }
.actor-profile { padding: 22px; gap: 34px; align-items: start; }
/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 900px) {
    body { font-size: 16px; }

    .main-nav { display: none; }
    .burger { display: grid; }
    .search-open { width: 200px; }

    .hero-title { font-size: 30px; }
    .air-grid { grid-template-columns: repeat(2, 1fr); }
    .row-strip, .poster-strip, .catalog-grid, .skeleton-grid { grid-template-columns: repeat(3, 1fr); }
    .episodes-grid { grid-template-columns: repeat(3, 1fr); }
    .people-row { grid-template-columns: repeat(3, 1fr); }
    .frame-row { grid-template-columns: repeat(2, 1fr); }
    .collection-row { grid-template-columns: repeat(2, 1fr); }
    .poster-info-pop { width: 290px; }

    .air-name { font-size: 18px; }
    .air-ep { font-size: 15px; }
    .poster-title, .catalog-grid .poster-title { font-size: 16px; }
    .detail-head h1 { font-size: 29px; }

    .about { grid-template-columns: 180px 1fr; gap: 28px; }
    .about-scroll { max-height: 420px; }

    .episode-layout { grid-template-columns: 1fr; }
    .schedule { border-left: 0; border-top: 1px solid #444; padding-left: 0; padding-top: 15px; max-height: none; }
    .schedule-scroll { max-height: 330px; }
    .episode-frames img { height: 160px; }

    .actor-grid { grid-template-columns: repeat(4, 1fr); }
    .actor-profile { grid-template-columns: 140px 1fr; gap: 26px; }
    .actor-photo { height: 185px; }

    .search-result { grid-template-columns: 140px 1fr; }
    .search-result img { width: 140px; height: 210px; }
    .search-result .state { display: none; }
}

@media (max-width: 700px) {
    .actor-headline { display: block; }
    .actor-votes { text-align: left; margin-top: 12px; }
    .actor-votes .rating-stars { justify-content: flex-start; }
    .actor-profile { grid-template-columns: 110px 1fr; padding-left: 0; padding-right: 0; }
    .actor-photo { height: 145px; }
    .actor-facts { grid-template-columns: 1fr; gap: 12px; }
    .actor-grid { grid-template-columns: repeat(2, 1fr); }
    .actor-bio p { font-size: 16px; }

    .episode-nav, .actor-nav { grid-template-columns: 1fr; gap: 8px; }
    .actor-nav a:first-child, .actor-nav a:last-child,
    .actor-nav button:first-child, .actor-nav button:last-child { justify-content: center; }
    .back-to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}

@media (max-width: 600px) {
    :root { --gutter: 10px; }

    .header-inner { gap: 10px; }
    .logo { font-size: 19px; }
    .header-actions { gap: 8px; }
    .search-open { width: 42px; padding: 0; justify-content: center; }
    .search-open span { display: none; }
    .search-open b { font-size: 0; }

    .hero-title { font-size: 25px; margin: 24px 0 20px; }
    .section { margin-top: 26px; }
    .section-title { font-size: 20px; }

    .air-grid { grid-template-columns: 1fr 1fr; gap: 18px 9px; }
    .air-img { height: 95px; }
    .air-name { font-size: 16px; }
    .air-ep { font-size: 14px; }
    .row-strip, .poster-strip, .catalog-grid, .skeleton-grid { grid-template-columns: repeat(2, 1fr); }
    .poster-title, .catalog-grid .poster-title { font-size: 15px; }
    .catalog-grid { padding: 14px 10px 20px; gap: 20px 10px; }
    .filters { grid-template-columns: 1fr 1fr; }
    .filter-actions { grid-template-columns: 1fr; }
    .episodes-grid { grid-template-columns: repeat(2, 1fr); }
    .episode-thumb { height: 92px; }
    .episode-num { font-size: 16px; }
    .people-row { grid-template-columns: repeat(2, 1fr); }
    .frame-row { grid-template-columns: 1fr 1fr; }
    .collection-row { grid-template-columns: 1fr; }
    .collection-card { height: 210px; }
    .poster-info-pop { display: none; }

    .content-panel { padding: 20px 14px; }
    .detail-head { align-items: flex-start; }
    .detail-head h1 { font-size: 25px; }
    .detail-links { display: none; }

    .about { grid-template-columns: 1fr; margin-top: 42px; padding-top: 30px; }
    .about-poster { max-width: 220px; }
    .about h2 { font-size: 23px; }
    .meta { grid-template-columns: 1fr; gap: 5px; font-size: 14px; }
    .meta dd { margin-bottom: 8px; }

    .description h2, .frames h2, .actors h2, .similar h2, .picks h2 { font-size: 22px; }
    .description p, .episode-text p { font-size: 16px; }
    .player__empty, .player-empty { min-height: 270px; }
    .episode-frames { grid-template-columns: 1fr; }
    .episode-frames img { height: 190px; }
    .poster-sub { font-size: 13px; }

    .comment-form__row { grid-template-columns: 1fr; }

    .footer-inner { flex-direction: column; align-items: flex-start; }
    .footer-links { flex-wrap: wrap; }

    .search-result { grid-template-columns: 90px 1fr; gap: 12px; }
    .search-result img { width: 90px; height: 135px; }
    .search-result h3 { font-size: 19px; }
    .search-result .sub { font-size: 14px; }
    .search-result p { font-size: 13px; }
    .search-meta { grid-template-columns: 1fr; }
    .search-buttons { grid-template-columns: 1fr; }
    .search-results { padding: 12px; }

    .toasts { left: 14px; right: 14px; bottom: 80px; max-width: none; }
    .modal__dialog { margin-top: 0; height: 100%; max-height: 100%; width: 100%; border-radius: 0; }
    .modal--lightbox .modal__dialog { height: auto; margin-top: 10vh; }
}

@media (max-width: 380px) {
    .catalog-grid, .poster-strip, .row-strip { grid-template-columns: repeat(2, 1fr); }
}

@media print {
    .site-header, .site-footer, .comments, .schedule, .voice-row, .back-to-top { display: none; }
}
