/* ══════════════════════════════════════════════════════════════════════════
   anime-single.css — страница аниме
   РЕДИЗАЙН 2026-07-24 · визуальный язык «манга-панели»
   Полностью переписан. Бэкап старой версии:
   _backup_redesign_2026_07_24/anivibe/css/anime-single.css

   Оглавление
    1.  Шрифты и токены
    2.  Примитивы манга-панели (.mp-panel / .mp-head / .mp-title)
    3.  Контейнер страницы и декорации
    4.  Hero
    5.  Чипы списков (замена дропдауна)
    6.  Статистика на постере · DMCA-баннер
    7.  Блок «Просмотр»: панель, переключатель источников
    8.  Плеер: сцена, iframe, боковая колонка серий
    9.  Селектор озвучки и выпадающий список
   10.  Тулбар серий (поиск / счётчик / «показать все»)
   11.  Кнопки серий, диапазоны, переход по номеру
   12.  Панель навигации под плеером · мобильные контролы · bottom-sheet
   13.  Театральный режим
   14.  Заглушка «нет плеера»
   15.  Контентная сетка: описание, жанры, порядок просмотра
   16.  Поделиться · умные рекомендации
   17.  Сайдбар: карточки, вайб-рейтинг, инфо, новости, подборки
   18.  Табы: комментарии / рецензии / похожие
   19.  Комментарии
   20.  Рецензии
   21.  Карусель похожих
   22.  FAQ
   23.  Тосты
   24.  Telegram-модалка
   25.  Админ-элементы · тайм-коды · утилиты
   26.  Анимации
   27.  Адаптив (единые брейкпоинты 1199 / 1023 / 767 / 479)
   ══════════════════════════════════════════════════════════════════════════ */

/* ═══ 1. ШРИФТЫ И ТОКЕНЫ ═══ */

@font-face {
    font-family: 'AV Condensed';
    src: url('/fonts/Roboto-Condensed.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'AV Condensed';
    src: url('/fonts/Roboto-BoldCondensed.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

.anime-page-container {
    /* поверхности */
    --mp-bg: #0c0f16;
    --mp-panel: #141926;
    --mp-panel-2: #1a2131;
    --mp-panel-3: #212a3d;

    /* линии */
    --mp-line: #2c3547;
    --mp-line-strong: #3e4a63;

    /* текст */
    --mp-ink: #f2f5fb;
    --mp-text: #c6cede;
    --mp-muted: #8791a5;
    --mp-faint: #626c80;

    /* акценты */
    --mp-accent: #d1373b;
    --mp-accent-soft: rgba(209, 55, 59, .16);
    --mp-accent-2: #e3b23c;
    --mp-ok: #4aa96c;
    --mp-warn: #d98324;
    --mp-info: #4d7cc7;

    /* геометрия */
    --mp-radius: 6px;
    --mp-border: 1px;
    --mp-gap: 16px;

    /* типографика */
    --mp-font-display: 'AV Condensed', 'Roboto Condensed', 'Arial Narrow', Impact, sans-serif;
    --mp-font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* полутон */
    --mp-halftone: radial-gradient(rgba(255, 255, 255, .055) 1px, transparent 1.2px);
}

/* ═══ 2. ПРИМИТИВЫ МАНГА-ПАНЕЛИ ═══ */

.anime-page-container .mp-panel {
    position: relative;
    background: var(--mp-panel);
    border: var(--mp-border) solid var(--mp-line);
    border-radius: var(--mp-radius);
    padding: 18px 20px;
    margin-bottom: var(--mp-gap);
}

/* Угловые скобки убраны по фидбеку: рамки визуально шумели.
   Панель держится на ровной 1px-линии и подчёркивании заголовка. */

.mp-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--mp-line);
}

.mp-head::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 56px;
    height: 2px;
    background: var(--mp-accent);
}

.mp-title {
    margin: 0;
    font-family: var(--mp-font-display);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--mp-ink);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.mp-title--sm {
    font-size: 18px;
}

.mp-title[data-jp]::before {
    content: attr(data-jp);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .22em;
    color: var(--mp-accent);
    padding: 3px 7px;
    border: 1px solid var(--mp-accent);
    border-radius: 2px;
    line-height: 1;
    flex: 0 0 auto;
    text-transform: none;
}

/* ═══ 3. КОНТЕЙНЕР СТРАНИЦЫ И ДЕКОРАЦИИ ═══ */

.anime-page-container {
    font-family: var(--mp-font-body);
    color: var(--mp-text);
    padding-bottom: 40px;
}

.anime-page-container a {
    text-decoration: none;
}

.anime-decoration-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.anime-decoration-left,
.anime-decoration-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 400px;
    opacity: .16;
    pointer-events: auto;
    transition: opacity .5s ease;
    background-image: url('/images/anime_decoration.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: drop-shadow(0 0 5px rgba(138, 43, 226, .3));
}

.anime-decoration-left {
    left: -100px;
}

.anime-decoration-right {
    right: -100px;
}

.anime-decoration-left.vanish,
.anime-decoration-right.vanish {
    opacity: 0;
}

@media (max-width: 1200px) {
    .anime-decoration-container {
        display: none;
    }
}

.visually-hidden-select {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ═══ 4. HERO ═══ */

.anime-hero {
    position: relative;
    isolation: isolate;
    border: var(--mp-border) solid var(--mp-line);
    border-radius: var(--mp-radius);
    overflow: hidden;
    margin-bottom: var(--mp-gap);
    background: var(--mp-panel);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 25%;
    filter: blur(18px) saturate(.65) brightness(.42);
    transform: scale(1.15);
    z-index: 0;
}

.hero-veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(rgba(255, 255, 255, .055) 1px, transparent 1.2px),
        linear-gradient(105deg, rgba(12, 15, 22, .96) 0%, rgba(12, 15, 22, .88) 45%, rgba(12, 15, 22, .62) 100%);
    background-size: 5px 5px, auto;
}

.hero-speedlines {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: .5;
    background: repeating-linear-gradient(112deg,
            transparent 0 7px,
            rgba(255, 255, 255, .045) 7px 8px);
    -webkit-mask-image: linear-gradient(to left, #000, transparent 60%);
    mask-image: linear-gradient(to left, #000, transparent 60%);
}

.hero-content {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 28px;
    padding: 26px;
    align-items: start;
}

/* — постер — */
.hero-poster {
    position: relative;
    border: var(--mp-border) solid var(--mp-line-strong);
    border-radius: var(--mp-radius);
    background: #000;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, .45);
}

.hero-poster > img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 225 / 320;
    object-fit: cover;
    border-radius: 2px;
}

.poster-status-label {
    position: absolute;
    top: 10px;
    left: -8px;
    z-index: 3;
    padding: 5px 12px 5px 10px;
    font-family: var(--mp-font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
    background: var(--mp-accent);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, .5);
}

.poster-status-label.is-announce {
    background: var(--mp-warn);
}

.poster-status-label.is-released {
    background: var(--mp-ok);
}

/* — правая колонка — */
.hero-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mp-font-display);
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--mp-muted);
}

.hero-eyebrow__jp {
    color: var(--mp-accent);
    font-weight: 700;
    letter-spacing: .24em;
}

.hero-eyebrow__sep {
    flex: 1 1 auto;
    height: 1px;
    max-width: 120px;
    background: linear-gradient(to right, var(--mp-line-strong), transparent);
}

.hero-title {
    margin: 0;
    font-family: var(--mp-font-display);
    font-weight: 700;
    font-size: clamp(26px, 3.4vw, 44px);
    line-height: 1.03;
    letter-spacing: .01em;
    text-transform: uppercase;
    color: var(--mp-ink);
    text-shadow: 3px 3px 0 rgba(0, 0, 0, .55);
    word-break: break-word;
}

.hero-original-title {
    margin-top: -6px;
    font-size: 14px;
    color: var(--mp-faint);
    font-style: italic;
    word-break: break-word;
}

.hero-statline {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.score-plate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    padding: 8px 12px;
    background: var(--mp-ink);
    color: #0c0f16;
    border-radius: 2px;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, .5);
    flex: 0 0 auto;
}

.score-plate.is-empty {
    background: var(--mp-panel-3);
    color: var(--mp-muted);
}

.score-plate__value {
    font-family: var(--mp-font-display);
    font-weight: 700;
    font-size: 26px;
    line-height: 1;
}

.score-plate__label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    opacity: .7;
    margin-top: 3px;
}

.hero-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--mp-text);
    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--mp-line);
    border-radius: 2px;
    white-space: nowrap;
}

.hero-tag i {
    color: var(--mp-muted);
    font-size: 11px;
}

/* — действия — */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.btn-watch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 26px;
    font-family: var(--mp-font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--mp-accent);
    border: 2px solid var(--mp-accent);
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, .5);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.btn-watch:hover {
    background: #e04347;
    transform: translate(-1px, -1px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, .55);
}

.btn-watch:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 rgba(0, 0, 0, .5);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mp-text);
    background: rgba(255, 255, 255, .04);
    border: 2px solid var(--mp-line-strong);
    border-radius: 2px;
    cursor: pointer;
    transition: border-color .12s ease, color .12s ease, background .12s ease;
}

.btn-ghost:hover {
    border-color: var(--mp-ink);
    color: var(--mp-ink);
    background: rgba(255, 255, 255, .07);
}

.btn-ghost--fav.is-favorite {
    color: #fff;
    border-color: var(--mp-accent);
    background: var(--mp-accent-soft);
}

.btn-ghost--fav.is-favorite i {
    color: var(--mp-accent);
}

/* ═══ 5. ЧИПЫ СПИСКОВ ═══ */

.watch-chips {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.watch-chips__legend {
    font-family: var(--mp-font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--mp-faint);
    flex: 0 0 auto;
}

.watch-chips__row {
    display: flex;
    gap: 0;
    border: 2px solid var(--mp-line-strong);
    border-radius: 2px;
    overflow: hidden;
    background: rgba(0, 0, 0, .25);
    min-width: 0;
}

.watch-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-muted);
    background: transparent;
    border: 0;
    border-right: 1px solid var(--mp-line);
    cursor: pointer;
    white-space: nowrap;
    transition: background .14s ease, color .14s ease;
}

.watch-chip:last-child {
    border-right: 0;
}

.watch-chip i {
    font-size: 12px;
}

.watch-chip:hover:not(.is-active) {
    background: rgba(255, 255, 255, .06);
    color: var(--mp-ink);
}

.watch-chip.is-active {
    background: var(--mp-accent);
    color: #fff;
}

.watch-chip.is-pulse {
    animation: mp-chip-pop .4s ease;
}

.watch-chips.is-busy {
    opacity: .6;
    pointer-events: none;
}

/* ═══ 6. СТАТИСТИКА НА ПОСТЕРЕ · DMCA ═══ */

.poster-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
}

.poster-stats {
    position: relative;
}

.stats-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mp-ink);
    background: rgba(12, 15, 22, .88);
    border: 0;
    border-top: 2px solid var(--mp-line-strong);
    cursor: pointer;
    transition: background .15s ease;
}

.stats-toggle:hover {
    background: rgba(209, 55, 59, .75);
}

.stats-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 6px);
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    background: var(--mp-panel-2);
    border: 2px solid var(--mp-line-strong);
    border-radius: var(--mp-radius);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
    z-index: 20;
}

.stats-dropdown.show {
    display: flex;
    animation: mp-fade-up .18s ease;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--mp-text);
    padding: 4px 2px;
}

.stats-item i {
    width: 14px;
    color: var(--mp-muted);
    font-size: 11px;
}

.stats-item b {
    margin-left: auto;
    color: var(--mp-ink);
    font-family: var(--mp-font-display);
}

.dmca-hero-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: var(--mp-gap);
    background: rgba(209, 55, 59, .1);
    border: 2px solid rgba(209, 55, 59, .35);
    border-radius: var(--mp-radius);
}

.dmca-hero-notice__icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--mp-accent);
    background: rgba(209, 55, 59, .16);
}

.dmca-hero-notice p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--mp-text);
}

.dmca-hero-notice__owner {
    color: var(--mp-faint);
}

/* ═══ 7. БЛОК «ПРОСМОТР» ═══ */

.section-watch {
    margin-bottom: var(--mp-gap);
    scroll-margin-top: 80px;
}

.modern-player-wrapper {
    position: relative;
}

.episodes-section {
    position: relative;
}

.theater-toggle {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 14px;
    font-family: var(--mp-font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mp-muted);
    background: transparent;
    border: 2px solid var(--mp-line-strong);
    border-radius: 2px;
    cursor: pointer;
    transition: color .14s ease, border-color .14s ease;
}

.theater-toggle:hover,
.theater-toggle[aria-pressed="true"] {
    color: var(--mp-ink);
    border-color: var(--mp-accent);
}

/* шапка от watch-redesign.js */
.watch-head-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    font-family: var(--mp-font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--mp-ok);
    border-radius: 2px;
}

.watch-head-next {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--mp-muted);
}

/* — переключатель источников — */
.player-source-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.player-source-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    font-family: var(--mp-font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mp-muted);
    background: var(--mp-panel-2);
    border: 2px solid var(--mp-line);
    border-radius: 2px;
    cursor: pointer;
    transition: color .14s ease, border-color .14s ease, background .14s ease;
}

.player-source-btn:hover:not(.is-disabled) {
    color: var(--mp-ink);
    border-color: var(--mp-line-strong);
}

.player-source-btn.active {
    color: #fff;
    background: var(--mp-accent);
    border-color: var(--mp-accent);
}

.player-source-btn.is-disabled,
.player-source-btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
}

.player-source-btn__note {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--mp-warn);
}

.quality-badge {
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--mp-accent-2);
    background: rgba(227, 178, 60, .14);
    border: 1px solid rgba(227, 178, 60, .35);
    border-radius: 2px;
}

.player-source-btn.active .quality-badge {
    color: #fff;
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .32);
}

.vidoza-ep-count-badge {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--mp-faint);
}

.player-source-btn.active .vidoza-ep-count-badge {
    color: rgba(255, 255, 255, .78);
}

.kodik-maintenance-notice {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    font-size: 12px;
    color: var(--mp-warn);
    background: rgba(217, 131, 36, .1);
    border: 1px solid rgba(217, 131, 36, .32);
    border-radius: 2px;
}

/* ═══ 8. ПЛЕЕР: СЦЕНА · IFRAME · КОЛОНКА СЕРИЙ ═══ */

.player-instance {
    display: none;
}

/* Без animation: transform на предке ломает position:fixed
   у модалки «Плеер AniVibe», которая лежит внутри инстанса. */
.player-instance.active {
    display: block;
}

.player-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas:
        "video aside"
        "nav   aside";
    grid-template-rows: auto auto;
    gap: 12px;
    align-items: start;
}

/* строго 16:9 — плеер точно вписан в карточку */
.player-iframe-container {
    grid-area: video;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: var(--mp-border) solid var(--mp-line-strong);
    border-radius: var(--mp-radius);
    overflow: hidden;
}

.player-iframe-container > iframe,
.player-iframe-container > video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.player-notice {
    padding: 40px 20px;
    text-align: center;
    color: var(--mp-muted);
    background: var(--mp-panel-2);
    border: 2px dashed var(--mp-line);
    border-radius: var(--mp-radius);
}

/* — боковая колонка — */
.player-area-modern {
    grid-area: aside;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    max-height: var(--aside-h, 520px);
    padding: 12px;
    background: var(--mp-panel-2);
    border: var(--mp-border) solid var(--mp-line);
    border-radius: var(--mp-radius);
}

.player-top-bar {
    flex: 0 0 auto;
}

/* ═══ 9. СЕЛЕКТОР ОЗВУЧКИ ═══ */

.player-selector {
    position: relative;
    z-index: 15;
}

.selector-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--mp-panel-3);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    cursor: pointer;
    transition: border-color .14s ease;
}

.selector-control:hover {
    border-color: var(--mp-accent);
}

.selector-value {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-ink);
}

#current-translation-name,
#bunny-current-translation-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.selector-type-icon {
    color: var(--mp-accent);
    font-size: 12px;
    flex: 0 0 auto;
}

.selector-arrow {
    color: var(--mp-muted);
    font-size: 11px;
    transition: transform .18s ease;
    flex: 0 0 auto;
}

.player-selector.open .selector-arrow {
    transform: rotate(180deg);
}

.episode-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 3px 7px;
    font-size: 10px;
    font-weight: 600;
    color: var(--mp-muted);
    background: rgba(255, 255, 255, .06);
    border-radius: 2px;
    white-space: nowrap;
}

.episode-count-badge i {
    font-size: 8px;
}

.selector-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    background: var(--mp-panel-3);
    border: 2px solid var(--mp-line-strong);
    border-radius: var(--mp-radius);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
    z-index: 40;
}

.player-selector.open .selector-dropdown {
    display: block;
    animation: mp-fade-up .16s ease;
}

.dropdown-header {
    padding: 8px 8px 5px;
    font-family: var(--mp-font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--mp-faint);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 2px;
    cursor: pointer;
    transition: background .12s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, .06);
}

.dropdown-item.selected {
    background: var(--mp-accent-soft);
    box-shadow: inset 3px 0 0 var(--mp-accent);
}

.item-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-popularity {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--mp-faint);
}

.popularity-bar {
    flex: 1 1 auto;
    height: 3px;
    min-width: 30px;
    background: rgba(255, 255, 255, .08);
    border-radius: 2px;
    overflow: hidden;
}

.popularity-bar-inner {
    height: 100%;
    background: var(--mp-accent);
}

/* ═══ 10. ТУЛБАР СЕРИЙ ═══ */

.ep-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ep-toolbar[hidden] {
    display: none;
}

.ep-toolbar__search {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    min-width: 0;
}

.ep-toolbar__search > i {
    position: absolute;
    left: 10px;
    font-size: 11px;
    color: var(--mp-faint);
    pointer-events: none;
}

.ep-filter-input {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 30px 0 28px;
    font-size: 13px;
    font-family: var(--mp-font-body);
    color: var(--mp-ink);
    background: var(--mp-panel);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    outline: none;
    transition: border-color .14s ease;
}

.ep-filter-input::placeholder {
    color: var(--mp-faint);
}

.ep-filter-input:focus {
    border-color: var(--mp-accent);
}

.ep-filter-input::-webkit-search-cancel-button {
    display: none;
}

.ep-filter-clear {
    position: absolute;
    right: 6px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    font-size: 11px;
    color: var(--mp-muted);
    background: transparent;
    border: 0;
    border-radius: 2px;
    cursor: pointer;
}

.ep-filter-clear:hover {
    color: var(--mp-ink);
    background: rgba(255, 255, 255, .08);
}

.ep-toolbar__meta {
    flex: 0 0 auto;
}

.ep-toolbar__count {
    font-family: var(--mp-font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mp-faint);
    white-space: nowrap;
}

.ep-expand-btn {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 38px;
    font-family: var(--mp-font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mp-muted);
    background: var(--mp-panel);
    border: 1px dashed var(--mp-line-strong);
    border-radius: 2px;
    cursor: pointer;
    transition: color .14s ease, border-color .14s ease;
}

.ep-expand-btn:hover {
    color: var(--mp-ink);
    border-color: var(--mp-accent);
}

.ep-expand-btn[hidden] {
    display: none;
}

.ep-empty {
    padding: 18px 10px;
    text-align: center;
    font-size: 13px;
    color: var(--mp-faint);
}

/* ═══ 11. КНОПКИ СЕРИЙ ═══ */

.episode-list-container {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 6px;
    align-content: start;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--mp-line-strong) transparent;
}

.episode-list-container::-webkit-scrollbar {
    width: 8px;
}

.episode-list-container::-webkit-scrollbar-thumb {
    background: var(--mp-line-strong);
    border-radius: 4px;
}

.episode-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.episode-list-container > .episode-range-picker,
.episode-list-container > .episode-jump-wrap,
.episode-list-container > .episode-grid-inner,
.episode-list-container > .ep-empty {
    grid-column: 1 / -1;
}

.episode-grid-inner {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 6px;
}

.episode-list-container.is-collapsed {
    max-height: 190px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}

.episode-button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 52px;
    padding: 6px 4px 9px;
    font-family: var(--mp-font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--mp-text);
    background: var(--mp-panel);
    border: 1px solid var(--mp-line);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
    transition: transform .12s ease, border-color .12s ease, background .12s ease, color .12s ease;
}

.episode-button[hidden] {
    display: none;
}

.episode-button:hover {
    border-color: var(--mp-line-strong);
    background: var(--mp-panel-3);
    transform: translateY(-2px);
}

.episode-button.active {
    color: #fff;
    background: var(--mp-accent);
    border-color: var(--mp-accent);
    box-shadow: 0 0 0 1px var(--mp-accent);
}

.ep-num {
    font-size: 16px;
    line-height: 1;
}

.ep-sub {
    font-family: var(--mp-font-body);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mp-faint);
    line-height: 1;
}

.episode-button.active .ep-sub {
    color: rgba(255, 255, 255, .82);
}

.ep-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, .07);
}

.ep-bar-fill {
    display: block;
    height: 100%;
    background: var(--mp-accent);
}

.episode-button.watched {
    border-color: rgba(74, 169, 108, .5);
}

.episode-button.watched .ep-sub {
    color: var(--mp-ok);
}

.episode-button.watched .ep-bar-fill {
    background: var(--mp-ok);
}

.episode-button.active.watched .ep-bar-fill {
    background: #fff;
}

.episode-button.upcoming,
.episode-button.episode-upcoming {
    opacity: .45;
    cursor: default;
    border-style: dashed;
    background: transparent;
}

.episode-button.upcoming:hover {
    transform: none;
    background: transparent;
}

/* — диапазоны и переход по номеру (для >50 серий) — */
.episode-range-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-bottom: 4px;
}

.episode-range-tab {
    padding: 5px 10px;
    font-family: var(--mp-font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--mp-muted);
    background: var(--mp-panel);
    border: 1px solid var(--mp-line);
    border-radius: 2px;
    cursor: pointer;
    transition: color .12s ease, border-color .12s ease;
}

.episode-range-tab:hover {
    color: var(--mp-ink);
    border-color: var(--mp-line-strong);
}

.episode-range-tab.active {
    color: #fff;
    background: var(--mp-accent);
    border-color: var(--mp-accent);
}

.episode-jump-wrap {
    display: flex;
    gap: 6px;
}

.episode-jump-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
    color: var(--mp-ink);
    background: var(--mp-panel);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    outline: none;
}

.episode-jump-input:focus {
    border-color: var(--mp-accent);
}

.episode-jump-btn {
    flex: 0 0 auto;
    width: 34px;
    height: 32px;
    display: grid;
    place-items: center;
    color: var(--mp-ink);
    background: var(--mp-panel-3);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    cursor: pointer;
}

.episode-jump-btn:hover {
    background: var(--mp-accent);
    border-color: var(--mp-accent);
    color: #fff;
}

/* ═══ 12. НАВИГАЦИЯ · МОБИЛЬНЫЕ КОНТРОЛЫ · BOTTOM-SHEET ═══ */

.player-nav-bar {
    grid-area: nav;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
}

.player-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    font-family: var(--mp-font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mp-text);
    background: var(--mp-panel);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    cursor: pointer;
    transition: border-color .14s ease, color .14s ease;
}

.player-nav-btn:hover:not([disabled]) {
    border-color: var(--mp-accent);
    color: var(--mp-ink);
}

.player-nav-btn[disabled] {
    opacity: .35;
    cursor: not-allowed;
}

.player-nav-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}

.now-playing {
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.continue-hint {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--mp-accent-2);
}

/* — мобильная панель — */
.mobile-player-controls {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding: 12px;
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
}

.current-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.current-info__title {
    font-size: 12px;
    color: var(--mp-muted);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.current-info__ep-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.current-info__ep {
    font-family: var(--mp-font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mp-ink);
    min-width: 96px;
    text-align: center;
}

.ep-nav-btn {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--mp-text);
    background: var(--mp-panel);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    cursor: pointer;
}

.ep-nav-btn:active {
    background: var(--mp-accent);
    border-color: var(--mp-accent);
    color: #fff;
}

.controls-buttons {
    display: flex;
    gap: 8px;
}

.mobile-btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-text);
    background: var(--mp-panel);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    cursor: pointer;
}

.mobile-btn:active {
    border-color: var(--mp-accent);
}

/* список серий теперь всегда на странице — отдельная кнопка «Серии» не нужна */
.mobile-btn[data-sheet-for$="-episodes"] {
    display: none;
}

/* — bottom sheet — */
/* !important — перебиваем глобальное правило .is-mobile{display:block} из style.css */
.player-bottom-sheet:not(.is-open) {
    display: none !important;
}

.player-bottom-sheet {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.player-bottom-sheet.is-open {
    display: block;
}

.sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 10, .72);
    backdrop-filter: blur(2px);
}

.sheet-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 78vh;
    display: flex;
    flex-direction: column;
    background: var(--mp-panel);
    border-top: 3px solid var(--mp-accent);
    border-radius: 10px 10px 0 0;
    animation: mp-sheet-up .22s ease;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--mp-line);
}

.sheet-title {
    margin: 0;
    font-family: var(--mp-font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mp-ink);
}

.sheet-close-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    font-size: 16px;
    color: var(--mp-muted);
    background: transparent;
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    cursor: pointer;
}

.sheet-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 8px;
    align-content: start;
}

.sheet-body > .dropdown-item,
.sheet-body > .dropdown-header,
.sheet-body > .episode-range-picker,
.sheet-body > .episode-jump-wrap,
.sheet-body > .episode-grid-inner {
    grid-column: 1 / -1;
}

.episode-button-mobile {
    min-height: 48px;
    display: grid;
    place-items: center;
    font-family: var(--mp-font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--mp-text);
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line);
    border-radius: 2px;
    cursor: pointer;
}

.episode-button-mobile.active {
    color: #fff;
    background: var(--mp-accent);
    border-color: var(--mp-accent);
}

/* ═══ 13. ТЕАТРАЛЬНЫЙ РЕЖИМ ═══ */

html.theater-mode,
body.theater-mode {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    overscroll-behavior-x: none;
}

@supports (overflow: clip) {
    html.theater-mode,
    body.theater-mode {
        overflow-x: clip !important;
    }
}

.modern-player-wrapper.is-theater {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}

.modern-player-wrapper.is-theater .episodes-section {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    padding-left: clamp(16px, 4vw, 70px);
    padding-right: clamp(16px, 4vw, 70px);
    background: #070a10;
}

.modern-player-wrapper.is-theater .episodes-section::before,
.modern-player-wrapper.is-theater .episodes-section::after {
    display: none;
}

.modern-player-wrapper.is-theater .player-stage {
    grid-template-columns: minmax(0, 1fr) 360px;
}

/* ═══ 14. ЗАГЛУШКА «НЕТ ПЛЕЕРА» ═══ */

.no-player-status {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--mp-muted);
    background: var(--mp-panel-2);
    border: 1px dashed var(--mp-line-strong);
    border-radius: 2px;
}

.player-placeholder-box {
    padding: 40px 20px;
    text-align: center;
    background: var(--mp-panel-2);
    border: 2px dashed var(--mp-line-strong);
    border-radius: var(--mp-radius);
}

.placeholder-img {
    max-width: 160px;
    opacity: .8;
    margin-bottom: 14px;
}

.placeholder-content h4 {
    margin: 0 0 8px;
    font-family: var(--mp-font-display);
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--mp-ink);
}

.placeholder-content p {
    margin: 0 auto 18px;
    max-width: 480px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--mp-muted);
}

/* ═══ 15. КОНТЕНТНАЯ СЕТКА ═══ */

.anime-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas:
        "left aside"
        "tabs aside";
    grid-template-rows: auto 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: var(--mp-gap);
}

.anime-content-left {
    grid-area: left;
    min-width: 0;
}

.anime-page-container .modern-tabs-container {
    grid-area: tabs;
    min-width: 0;
    margin-bottom: 0;
}

.anime-page-container .anime-content-left > *:last-child {
    margin-bottom: 0;
}

.anime-description {
    font-size: 15px;
    line-height: 1.72;
    color: var(--mp-text);
}

.anime-description p {
    margin: 0 0 12px;
}

.anime-description p:last-child {
    margin-bottom: 0;
}

.anime-description a {
    color: var(--mp-accent-2);
    border-bottom: 1px dotted currentColor;
}

.anime-description.collapsed {
    max-height: 132px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

.anime-description.expanded {
    max-height: none;
    -webkit-mask-image: none;
    mask-image: none;
}

.description-toggle {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    font-family: var(--mp-font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mp-muted);
    background: transparent;
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    cursor: pointer;
}

.description-toggle:hover {
    color: var(--mp-ink);
    border-color: var(--mp-accent);
}

#description-textarea {
    width: 100%;
    min-height: 250px;
    padding: 12px;
    font-size: 14px;
    font-family: var(--mp-font-body);
    color: var(--mp-ink);
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    resize: vertical;
}

.editor-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* — жанры — */
.anime-page-container .genres-panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
}

.genre-tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-text);
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    transition: color .14s ease, border-color .14s ease, background .14s ease;
}

.genre-tag:hover {
    color: #fff;
    background: var(--mp-accent);
    border-color: var(--mp-accent);
}

/* — порядок просмотра — */
.anime-page-container .watch-order-container {
    padding: 0;
    overflow: hidden;
}

.watch-order-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    font-family: var(--mp-font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mp-ink);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.watch-order-toggle .toggle-icon {
    margin-left: auto;
    font-size: 12px;
    color: var(--mp-muted);
    transition: transform .2s ease;
}

.watch-order-container.collapsed .watch-order-toggle .toggle-icon {
    transform: rotate(180deg);
}

.watch-order-content {
    border-top: 2px solid var(--mp-line);
    padding: 12px 18px 18px;
}

.watch-order-container.collapsed .watch-order-content {
    display: none;
}

.anime-page-container .watch-order-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    counter-reset: wo;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.anime-page-container .watch-order-list li {
    counter-increment: wo;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 10px 8px 38px;
    position: relative;
    background: var(--mp-panel-2);
    border-left: 3px solid var(--mp-line-strong);
    border-radius: 0 2px 2px 0;
}

.anime-page-container .watch-order-list li::before {
    content: counter(wo);
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--mp-font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--mp-faint);
}

/* Старый общий style.css рисует здесь зелёные точки через ::after.
   В V2 статус текущего пункта уже показан номером и цветом строки. */
.anime-page-container .watch-order-list li::after {
    content: none;
}

.anime-page-container .watch-order-list li.current::before {
    color: var(--mp-accent);
}

.watch-order-list li.wo-side {
    opacity: .74;
    border-left-style: dashed;
}

.watch-order-list li.current {
    border-left-color: var(--mp-accent);
    background: var(--mp-accent-soft);
}

.watch-order-list li a {
    color: var(--mp-ink);
    font-weight: 600;
    font-size: 14px;
}

.watch-order-list li a:hover {
    color: var(--mp-accent-2);
}

.wo-badge {
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mp-accent);
    border: 1px solid var(--mp-accent);
    border-radius: 2px;
}

.watch-order-list .details {
    margin-left: auto;
    font-size: 12px;
    color: var(--mp-faint);
    white-space: nowrap;
}

/* ═══ 16. ПОДЕЛИТЬСЯ · РЕКОМЕНДАЦИИ ═══ */

.content-footer-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--mp-gap);
    align-items: stretch;
}

.anime-page-container .content-footer-row > * {
    margin-bottom: 0;
}

.share-buttons-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.share-title {
    margin: 0;
    font-family: var(--mp-font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--mp-faint);
}

.share-buttons-list {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    font-size: 17px;
    color: var(--mp-text);
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    transition: transform .12s ease, background .14s ease, color .14s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}

.share-btn.vk:hover {
    background: #0077ff;
    border-color: #0077ff;
}

.share-btn.tg:hover {
    background: #229ed9;
    border-color: #229ed9;
}

.share-btn.ok:hover {
    background: #ee8208;
    border-color: #ee8208;
}

.share-btn.wa:hover {
    background: #25d366;
    border-color: #25d366;
}

.similar-link-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mp-font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mp-ink);
    transition: border-color .14s ease;
}

.similar-link-bar:hover {
    border-color: var(--mp-accent);
}

.similar-link-bar > i:first-child {
    color: var(--mp-accent);
}

.similar-link-bar__text {
    flex: 1 1 auto;
}

.similar-link-bar__arrow {
    color: var(--mp-muted);
    font-size: 13px;
    transition: transform .16s ease;
}

.similar-link-bar:hover .similar-link-bar__arrow {
    transform: translateX(4px);
    color: var(--mp-accent);
}

/* ═══ 17. САЙДБАР ═══ */

.anime-sidebar-right {
    grid-area: aside;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--mp-gap);
    position: sticky;
    top: 84px;
    scroll-margin-top: 80px;
}

.anime-sidebar-card {
    position: relative;
    padding: 16px;
    background: var(--mp-panel);
    border: var(--mp-border) solid var(--mp-line);
    border-radius: var(--mp-radius);
}

.sidebar-title {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--mp-line);
    font-family: var(--mp-font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mp-ink);
}

.sidebar-title i {
    color: var(--mp-accent);
    font-size: 13px;
}

.sidebar-title[data-jp]::after {
    content: attr(data-jp);
    margin-left: auto;
    font-size: 10px;
    letter-spacing: .18em;
    color: var(--mp-faint);
    text-transform: none;
}

/* — вайб-рейтинг (единственный на странице) — */
.vibe-card {
    text-align: center;
}

.vibe-rating-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vibe-rating-controls.processing {
    opacity: .6;
    pointer-events: none;
}

.vibe-score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.vibe-score-number {
    font-family: var(--mp-font-display);
    font-size: 46px;
    font-weight: 700;
    line-height: 1;
    color: var(--mp-ink);
    text-shadow: 3px 3px 0 rgba(0, 0, 0, .5);
}

.vibe-score-label {
    font-size: 11px;
    letter-spacing: .06em;
    color: var(--mp-faint);
}

.vibe-bar {
    height: 6px;
    background: rgba(255, 255, 255, .07);
    border-radius: 2px;
    overflow: hidden;
}

.vibe-bar__fill {
    height: 100%;
    background: linear-gradient(to right, var(--mp-ok), var(--mp-accent-2));
    transition: width .3s ease;
}

.vibe-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.vibe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mp-muted);
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    cursor: pointer;
    transition: color .14s ease, border-color .14s ease, background .14s ease;
}

.vibe-btn:hover {
    color: var(--mp-ink);
    border-color: var(--mp-ink);
}

.vibe-btn.liked {
    color: #fff;
    background: rgba(74, 169, 108, .22);
    border-color: var(--mp-ok);
}

.vibe-btn.liked i {
    color: var(--mp-ok);
}

.vibe-btn.disliked {
    color: #fff;
    background: var(--mp-accent-soft);
    border-color: var(--mp-accent);
}

.vibe-btn.disliked i {
    color: var(--mp-accent);
}

.vibe-btn.voted {
    animation: mp-chip-pop .3s ease;
}

.vibe-btn.loading {
    opacity: .5;
}

.vibe-card.is-flash {
    animation: mp-flash .5s ease;
}

.guest-tooltip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 9px 10px;
    font-size: 11px;
    line-height: 1.5;
    text-align: left;
    color: var(--mp-faint);
    background: rgba(255, 255, 255, .035);
    border-radius: 2px;
}

.guest-tooltip i {
    margin-top: 2px;
}

/* — инфо-строки — */
.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, .06);
}

.meta-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.meta-label {
    font-size: 12px;
    color: var(--mp-faint);
}

.meta-value {
    font-family: var(--mp-font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--mp-ink);
    text-align: right;
}

.meta-value.next-episode {
    color: var(--mp-accent-2);
    font-size: 12px;
}

.status-tag {
    padding: 3px 9px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: 2px;
    color: #fff;
    background: var(--mp-line-strong);
}

.status-tag.status-онгоинг {
    background: var(--mp-ok);
}

.status-tag.status-анонс {
    background: var(--mp-warn);
}

.status-tag.status-вышло {
    background: var(--mp-info);
}

/* — новости — */
.anime-page-container .anime-sidebar-right > .anime-latest-news-widget {
    /* Legacy css/style.css adds margin-bottom: 15px. Sidebar gap is the
       single source of spacing between V2 cards. */
    margin-bottom: 0;
}

.anime-latest-news-widget .widget-content p {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--mp-text);
}

.anime-latest-news-widget .btn {
    width: 100%;
}

/* — подборки — */
.anime-page-container .anime-sidebar-right > .collections-section {
    /* css/style.css adds 25px for the legacy page. V2 already spaces every
       sidebar card with gap, so that legacy margin doubled this one gap. */
    margin-top: 0;
}

.collections-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.collection-tag {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    font-size: 13px;
    color: var(--mp-text);
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line);
    border-radius: 2px;
    transition: color .14s ease, border-color .14s ease;
}

.collection-tag i {
    color: var(--mp-muted);
    font-size: 12px;
}

.collection-tag:hover {
    color: var(--mp-ink);
    border-color: var(--mp-accent);
}

.collection-tag:hover i {
    color: var(--mp-accent);
}

/* ═══ 18. ТАБЫ ═══ */

.anime-page-container .modern-tabs-container {
    padding: 0;
}

.modern-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--mp-line);
    overflow-x: auto;
    scrollbar-width: none;
}

.modern-tabs::-webkit-scrollbar {
    display: none;
}

.modern-tab-btn {
    position: relative;
    flex: 0 0 auto;
    min-height: 52px;
    padding: 0 22px;
    font-family: var(--mp-font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mp-muted);
    background: transparent;
    border: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: color .14s ease;
}

.modern-tab-btn:hover,
.modern-tab-btn.active {
    color: var(--mp-ink);
}

.modern-tab-btn.active::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -2px;
    height: 3px;
    background: var(--mp-accent);
}

.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
    animation: mp-fade-up .2s ease;
}

.anime-discussion-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 16px 18px;
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line-strong);
    border-left: 3px solid var(--mp-accent);
    border-radius: 2px;
}

.anime-discussion-cta__copy strong {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    color: var(--mp-ink);
}

.anime-discussion-cta__copy span {
    font-size: 13px;
    line-height: 1.6;
    color: var(--mp-muted);
}

.anime-discussion-cta__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 18px;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    background: var(--mp-accent);
    border-radius: 2px;
    transition: transform .16s ease;
}

.anime-discussion-cta__link:hover {
    transform: translateY(-1px);
}

/* ═══ 19. КОММЕНТАРИИ ═══ */

.comments-section .section-head,
.section-comments .section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.comments-section .section-head h3,
.section-comments .section-head h3 {
    margin: 0;
    font-family: var(--mp-font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mp-ink);
}

.forum-comments-sort,
#comments-sort {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
    color: var(--mp-text);
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
}

.comment-form-container {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
    position: relative;
}

.comment-form-container > .comment-avatar {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 2px;
    object-fit: cover;
    border: 1px solid var(--mp-line-strong);
}

#comment-form,
.comment-form-container form {
    flex: 1 1 auto;
    min-width: 0;
}

#comment-content,
#forum-comment-content {
    width: 100%;
    min-height: 92px;
    padding: 12px;
    font-family: var(--mp-font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--mp-ink);
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    resize: vertical;
    outline: none;
}

#comment-content:focus,
#forum-comment-content:focus {
    border-color: var(--mp-accent);
}

.comment-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.comment-guest-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--mp-muted);
    background: var(--mp-panel-2);
    border: 1px dashed var(--mp-line-strong);
    border-radius: 2px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line);
    border-left: 3px solid var(--mp-line-strong);
    border-radius: 0 2px 2px 0;
    scroll-margin-top: 90px;
}

.comment:target {
    border-left-color: var(--mp-accent);
    background: var(--mp-accent-soft);
}

.comment-avatar-container {
    flex: 0 0 auto;
    position: relative;
}

.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 2px;
    object-fit: cover;
    display: block;
    border: 1px solid var(--mp-line-strong);
}

.comment-body {
    flex: 1 1 auto;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.comment-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.comment-author {
    font-weight: 700;
    font-size: 14px;
    color: var(--mp-ink);
}

.comment-author:hover {
    color: var(--mp-accent-2);
}

.user-badge {
    height: 16px;
    width: auto;
}

.user-level-badge {
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 2px;
    color: var(--user-level-color, var(--mp-muted));
    border: 1px solid currentColor;
}

.user-profile-status-badge {
    font-size: 11px;
    color: var(--mp-faint);
    font-style: italic;
}

.comment-date {
    font-size: 11px;
    color: var(--mp-faint);
}

.comment-voting {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.comment-vote-btn {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    font-size: 12px;
    color: var(--mp-muted);
    background: rgba(255, 255, 255, .04);
    border-radius: 2px;
    cursor: pointer;
}

.comment-vote-btn:hover {
    color: var(--mp-ink);
    background: rgba(255, 255, 255, .09);
}

.comment-vote-btn.active.up {
    color: var(--mp-ok);
}

.comment-vote-btn.active.down {
    color: var(--mp-accent);
}

.comment-votes-sum {
    min-width: 22px;
    text-align: center;
    font-family: var(--mp-font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--mp-ink);
}

.comment-content {
    font-size: 14px;
    line-height: 1.65;
    color: var(--mp-text);
    word-break: break-word;
}

.comment-content.limit-height {
    max-height: 190px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
    mask-image: linear-gradient(to bottom, #000 70%, transparent);
}

.comment-read-more-btn {
    margin-top: 8px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mp-accent-2);
    background: transparent;
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    cursor: pointer;
}

.comment-content-collapsed .comment-content-inner {
    display: none;
}

.comment-content-collapsed.revealed .comment-content-inner {
    display: block;
}

.collapsed-notice {
    font-size: 13px;
    color: var(--mp-faint);
}

.show-collapsed-btn {
    color: var(--mp-accent-2);
    cursor: pointer;
    text-decoration: underline;
}

.comment-footer {
    display: flex;
    gap: 14px;
    margin-top: 10px;
}

.reply-btn,
.mention-btn {
    font-size: 12px;
    font-weight: 600;
    color: var(--mp-muted);
    cursor: pointer;
}

.reply-btn:hover,
.mention-btn:hover {
    color: var(--mp-accent-2);
}

.replies-wrapper {
    padding-left: 22px;
    border-left: 1px dashed var(--mp-line-strong);
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toggle-replies-btn {
    align-self: flex-start;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mp-muted);
    background: transparent;
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    cursor: pointer;
}

.toggle-replies-btn:hover {
    color: var(--mp-ink);
    border-color: var(--mp-accent);
}

.show-more-comments {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.show-more-btn {
    min-height: 44px;
    padding: 0 24px;
    font-family: var(--mp-font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mp-text);
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    cursor: pointer;
}

.show-more-btn:hover {
    color: #fff;
    background: var(--mp-accent);
    border-color: var(--mp-accent);
}

.mention-dropdown {
    position: absolute;
    z-index: 60;
    max-height: 220px;
    overflow-y: auto;
    background: var(--mp-panel-3);
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .5);
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--mp-text);
    cursor: pointer;
}

.mention-item:hover {
    background: rgba(255, 255, 255, .07);
}

.mention-avatar {
    width: 24px;
    height: 24px;
    border-radius: 2px;
    object-fit: cover;
}

/* ═══ 20. РЕЦЕНЗИИ ═══ */

.loading-reviews,
.no-reviews {
    padding: 40px 20px;
    text-align: center;
    color: var(--mp-muted);
}

.loading-reviews i {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--mp-accent);
}

.no-reviews i {
    font-size: 34px;
    margin-bottom: 12px;
    color: var(--mp-line-strong);
}

.no-reviews h4 {
    margin: 0 0 8px;
    font-family: var(--mp-font-display);
    font-size: 18px;
    text-transform: uppercase;
    color: var(--mp-ink);
}

.review-card {
    position: relative;
    padding: 16px;
    margin-bottom: 14px;
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line);
    border-left: 3px solid var(--mp-accent);
    border-radius: 0 2px 2px 0;
}

.spoiler-warning {
    display: inline-block;
    margin-bottom: 10px;
    padding: 3px 9px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--mp-warn);
    border-radius: 2px;
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.review-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.review-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 2px;
    object-fit: cover;
    border: 1px solid var(--mp-line-strong);
}

.review-author-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.review-author-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--mp-ink);
}

.review-date {
    font-size: 11px;
    color: var(--mp-faint);
}

.review-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    font-family: var(--mp-font-display);
    font-size: 15px;
    font-weight: 700;
    color: #0c0f16;
    background: var(--mp-accent-2);
    border-radius: 2px;
}

.review-card h4.review-title {
    margin: 0 0 10px;
    font-family: var(--mp-font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .02em;
}

.review-card h4.review-title a {
    color: var(--mp-ink);
}

.review-card h4.review-title a:hover {
    color: var(--mp-accent-2);
}

.review-content {
    font-size: 14px;
    line-height: 1.68;
    color: var(--mp-text);
}

.review-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--mp-line);
}

.review-stats {
    display: flex;
    gap: 14px;
}

.review-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--mp-faint);
}

.reviews-pagination {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

/* ═══ 21. КАРУСЕЛЬ ПОХОЖИХ ═══ */

.recommendations-carousel {
    overflow: hidden;
}

.recommendations-carousel .anime-item {
    min-width: 0;
}

.recommendations-carousel .poster {
    position: relative;
    aspect-ratio: 225 / 320;
    overflow: hidden;
    border: 1px solid var(--mp-line-strong);
    border-radius: 2px;
    background: #000;
}

.recommendations-carousel .poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.recommendations-carousel .anime-item:hover .poster img {
    transform: scale(1.06);
}

.recommendations-carousel .anime-item:hover .poster {
    border-color: var(--mp-accent);
}

.recommendations-carousel .title {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--mp-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommendations-carousel .anime-item:hover .title {
    color: var(--mp-ink);
}

/* ═══ 22. FAQ ═══ */

.section-faq .faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-faq .faq-item {
    background: var(--mp-panel-2);
    border: 1px solid var(--mp-line);
    border-radius: 2px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mp-ink);
    cursor: pointer;
    transition: background .14s ease;
}

.faq-question:hover {
    background: rgba(255, 255, 255, .04);
}

.faq-question i {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--mp-muted);
    transition: transform .2s ease;
}

.faq-item.active .faq-question {
    color: var(--mp-accent-2);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.section-faq .faq-answer {
    display: none;
    padding: 0 16px 16px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--mp-muted);
}

.section-faq .faq-item.active .faq-answer {
    display: block;
    animation: mp-fade-up .18s ease;
}

/* ═══ 23. ТОСТЫ ═══ */

.toast-container {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #f2f5fb;
    background: #141926;
    border: 1px solid #3e4a63;
    border-left: 3px solid #8791a5;
    border-radius: 2px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .22s ease, transform .22s ease;
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-left-color: #4aa96c;
}

.toast-error {
    border-left-color: #d1373b;
}

.toast-warning {
    border-left-color: #d98324;
}

.toast-info {
    border-left-color: #4d7cc7;
}

/* ═══ 24. TELEGRAM-МОДАЛКА ═══ */

.tg-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.tg-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 10, .78);
}

.tg-modal-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 24px;
    background: #141926;
    border: 2px solid #3e4a63;
    border-radius: 4px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}

.tg-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    font-size: 22px;
    line-height: 1;
    color: #8791a5;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.tg-modal-close:hover {
    color: #f2f5fb;
}

.tg-channel-switch {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 4px 0 18px;
}

.tg-channel-btn {
    flex: 1;
    max-width: 150px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    font-size: 14px;
    font-weight: 600;
    color: #8791a5;
    background: transparent;
    border: 1px solid #3e4a63;
    border-radius: 2px;
    cursor: pointer;
    transition: all .15s ease;
}

.tg-channel-btn:hover {
    border-color: #d1373b;
    color: #f2f5fb;
}

.tg-channel-btn.active {
    background: #d1373b;
    border-color: #d1373b;
    color: #fff;
}

.tg-channel-btn[data-channel="vk"].active {
    background: #0077ff;
    border-color: #0077ff;
}

.tg-modal-view {
    display: none;
}

.tg-modal-view.active {
    display: block;
}

.tg-modal-header {
    text-align: center;
    margin-bottom: 16px;
}

.tg-modal-header h3 {
    margin: 0 0 6px;
    font-family: 'AV Condensed', 'Roboto Condensed', sans-serif;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #f2f5fb;
}

.tg-modal-header p {
    margin: 0;
    font-size: 13px;
    color: #8791a5;
}

.tg-qr-container {
    display: grid;
    place-items: center;
    padding: 14px;
    margin-bottom: 14px;
    background: #fff;
    border-radius: 4px;
}

.tg-loader {
    width: 36px;
    height: 36px;
    margin: 20px auto 12px;
    border: 3px solid rgba(255, 255, 255, .12);
    border-top-color: #d1373b;
    border-radius: 50%;
    animation: mp-spin .8s linear infinite;
}

.tg-status-text {
    margin-top: 10px;
    font-size: 12px;
    text-align: center;
    color: #8791a5;
}

.tg-voiceover-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 46vh;
    overflow-y: auto;
    margin-bottom: 16px;
}

.tg-voiceover-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #c6cede;
    background: #1a2131;
    border: 1px solid #2c3547;
    border-radius: 2px;
    cursor: pointer;
}

.tg-voiceover-item:hover {
    border-color: #d1373b;
}

.tg-voiceover-item .name {
    flex: 1 1 auto;
    min-width: 0;
}

.tg-voiceover-item .ep-count {
    font-size: 11px;
    color: #626c80;
}

.tg-modal-footer {
    display: flex;
    gap: 10px;
}

.tg-modal-footer .btn {
    flex: 1 1 0;
}

.telegram-notify-container {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.btn-tg-notify {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mp-text, #c6cede);
    background: var(--mp-panel-2, #1a2131);
    border: 1px solid var(--mp-line-strong, #3e4a63);
    border-radius: 2px;
    cursor: pointer;
}

.btn-tg-notify:hover {
    color: #fff;
    background: #229ed9;
    border-color: #229ed9;
}

/* ═══ 25. АДМИН · ТАЙМ-КОДЫ · УТИЛИТЫ ═══ */

.admin-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    font-size: 12px;
    color: var(--mp-muted);
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--mp-line);
    border-radius: 2px;
    cursor: pointer;
}

.admin-edit-btn:hover {
    color: var(--mp-ink);
    border-color: var(--mp-accent);
}

.admin-magnet-controls {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    padding: 5px;
    background: rgba(255, 255, 255, .04);
    border-radius: 2px;
}

.timecode {
    color: var(--mp-accent-2);
    cursor: pointer;
    border-bottom: 1px dotted currentColor;
}

.timecode:hover {
    color: #fff;
    background: var(--mp-accent);
}

.anime-page-container .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 2px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .12s ease, background .14s ease, border-color .14s ease;
}

.anime-page-container .btn-primary {
    color: #fff;
    background: var(--mp-accent);
    border-color: var(--mp-accent);
}

.anime-page-container .btn-primary:hover {
    background: #e04347;
    transform: translateY(-1px);
}

.anime-page-container .btn-secondary {
    color: var(--mp-text);
    background: var(--mp-panel-2);
    border-color: var(--mp-line-strong);
}

.anime-page-container .btn-secondary:hover {
    color: var(--mp-ink);
    border-color: var(--mp-accent);
}

.anime-page-container .btn-small {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
}

/* ═══ 26. АНИМАЦИИ ═══ */

@keyframes mp-fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mp-sheet-up {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes mp-chip-pop {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.09);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes mp-flash {
    0% {
        box-shadow: 0 0 0 0 var(--mp-accent-soft);
    }

    50% {
        box-shadow: 0 0 0 6px var(--mp-accent-soft);
    }

    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

@keyframes mp-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {

    .anime-page-container *,
    .anime-page-container *::before,
    .anime-page-container *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   27. АДАПТИВ · единые брейкпоинты 1199 / 1023 / 767 / 479
   ══════════════════════════════════════════════════════════════════════════ */

/* ─── ≤1199px: колонка серий уходит под видео ─── */
@media (max-width: 1199px) {

    .player-stage {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "video"
            "nav"
            "aside";
    }

    .player-area-modern {
        max-height: none;
    }

    .episode-list-container {
        overflow-y: visible;
        max-height: none;
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }

    .player-nav-bar.is-desktop {
        display: none;
    }

    .mobile-player-controls.is-mobile {
        display: flex;
    }

    .modern-player-wrapper.is-theater .player-stage {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ─── ≤1023px: сайдбар под контентом ─── */
@media (max-width: 1023px) {

    .anime-content-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "left"
            "aside"
            "tabs";
        grid-template-rows: auto auto auto;
    }

    .anime-sidebar-right {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        align-items: start;
        gap: 14px;
    }

    .hero-content {
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 20px;
        padding: 20px;
    }

    .side-ad-right {
        display: none !important;
    }
}

/* ─── ≤767px: мобильная раскладка ─── */
@media (max-width: 767px) {

    /* V2 mobile is edge-to-edge. The global stylesheet gives the anime page
       20px side padding and adds another 15px to .section-watch, which made
       the video visibly narrower than the rest of the page. */
    .page-anime main.container {
        width: 100%;
        max-width: none;
        margin-inline: 0;
        padding-inline: 0;
    }

    .anime-page-container {
        --mp-gap: 12px;
        width: 100%;
        max-width: none;
        overflow-x: clip;
    }

    .anime-page-container .mp-panel,
    .anime-sidebar-card {
        padding: 14px;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .anime-hero {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .page-anime .anime-page-container .section-watch {
        width: 100%;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* — hero: постер сверху по центру — */
    .hero-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        padding: 16px;
        justify-items: center;
        text-align: center;
    }

    .hero-poster {
        width: 158px;
        max-width: 60%;
        box-shadow: 6px 6px 0 rgba(0, 0, 0, .45);
    }

    .hero-info {
        align-items: center;
        width: 100%;
    }

    .hero-eyebrow {
        justify-content: center;
    }

    .hero-eyebrow__sep {
        display: none;
    }

    .hero-title {
        font-size: clamp(21px, 6.4vw, 30px);
        text-shadow: 2px 2px 0 rgba(0, 0, 0, .55);
    }

    .hero-statline {
        justify-content: center;
        gap: 12px;
    }

    .hero-meta-tags {
        justify-content: center;
    }

    .hero-tag {
        font-size: 11px;
        padding: 5px 8px;
    }

    .hero-actions {
        width: 100%;
        gap: 8px;
    }

    .btn-watch {
        flex: 1 1 100%;
        min-height: 50px;
    }

    .btn-ghost {
        flex: 1 1 0;
        min-height: 46px;
        padding: 0 10px;
    }

    /* чипы списков — горизонтальный скролл */
    .watch-chips {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .watch-chips__legend {
        text-align: left;
    }

    .watch-chips__row {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .watch-chips__row::-webkit-scrollbar {
        display: none;
    }

    .watch-chip {
        flex: 1 0 auto;
        min-height: 46px;
        padding: 0 12px;
        font-size: 12px;
    }

    /* — плеер — */
    .mp-head {
        gap: 8px;
        padding-bottom: 10px;
        margin-bottom: 12px;
    }

    .mp-title {
        font-size: 17px;
    }

    .mp-title--sm {
        font-size: 15px;
    }

    .mp-title[data-jp]::before {
        font-size: 10px;
        padding: 2px 5px;
    }

    .theater-toggle {
        display: none;
    }

    .player-source-switcher {
        gap: 6px;
        margin-bottom: 12px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    .player-source-switcher::-webkit-scrollbar {
        display: none;
    }

    .player-source-btn {
        flex: 0 0 auto;
        min-height: 44px;
        font-size: 13px;
        padding: 0 12px;
    }

    /* ── Плеер во всю ширину: убираем вложенные отступы панели ──
       Раньше видео зажимали padding контейнера + padding панели, и окно
       получалось маленьким. Панель раскрывается на всю ширину, а внутренние
       блоки получают собственные боковые поля. */
    .anime-page-container .episodes-section.mp-panel {
        padding-left: 0;
        padding-right: 0;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .episodes-section > .section-head,
    .episodes-section .player-source-switcher,
    .episodes-section .player-area-modern,
    .episodes-section .mobile-player-controls,
    .episodes-section .player-nav-bar,
    .episodes-section .player-placeholder-box,
    .episodes-section .dmca-player-blocked {
        margin-left: 12px;
        margin-right: 12px;
    }

    .player-stage {
        gap: 10px;
        width: 100%;
        min-width: 0;
    }

    .player-iframe-container {
        width: 100%;
        max-width: none;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .player-area-modern {
        padding: 10px;
    }

    .telegram-notify-container {
        padding-inline: 12px;
    }

    /* The mobile RTB slot is always present in the markup, even when an
       ad blocker (or Yandex itself) leaves it empty. Its inline 24px
       vertical margin used to create a 48px blank band below the
       subscription button. Keep the slot neutral until it has content. */
    .page-anime .under-player-ad {
        margin: 0 auto !important;
    }

    .page-anime .under-player-ad:has(> div > *) {
        margin: var(--mp-gap) auto !important;
    }

    .btn-tg-notify {
        width: 100%;
        justify-content: center;
    }

    /* Селектор озвучки уже есть в колонке серий — дублирующие
       кнопки «Озвучка/Серии» под плеером убираем. */
    .mobile-player-controls .controls-buttons {
        display: none;
    }

    .episode-list-container {
        grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
        gap: 5px;
    }

    .episode-button {
        min-height: 50px;
    }

    .ep-toolbar {
        flex-wrap: wrap;
    }

    .ep-toolbar__search {
        flex: 1 1 100%;
    }

    .ep-filter-input {
        height: 42px;
        font-size: 15px;
    }

    .ep-toolbar__meta {
        flex: 1 1 100%;
    }

    /* — контент — */
    .content-footer-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .anime-sidebar-right {
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: max-content;
        align-content: start;
        row-gap: var(--mp-gap);
    }

    .vibe-score-number {
        font-size: 40px;
    }

    /* — табы — */
    .modern-tab-btn {
        min-height: 48px;
        padding: 0 16px;
        font-size: 14px;
    }

    .tab-content {
        padding: 14px;
    }

    .anime-discussion-cta {
        align-items: flex-start;
        padding: 14px;
    }

    .anime-discussion-cta__link {
        width: 100%;
    }

    /* — комментарии — */
    #content-comments {
        padding: 12px 0 0;
    }

    #content-comments > .anime-discussion-cta,
    .comments-section > .section-head,
    .comments-section > .comment-form-container,
    .comments-section > .comment-guest-notice {
        margin-left: 14px;
        margin-right: 14px;
    }

    .comments-section .section-head,
    .section-comments .section-head {
        flex-wrap: nowrap;
        margin-bottom: 12px;
    }

    .comments-section .section-head h3,
    .section-comments .section-head h3 {
        font-size: 16px;
    }

    .forum-comments-sort,
    #comments-sort {
        min-height: 34px;
        max-width: 142px;
        padding-inline: 8px;
        font-size: 11px;
    }

    .comment-form-container {
        gap: 8px;
        margin-bottom: 16px;
    }

    #comment-content,
    #forum-comment-content {
        min-height: 64px;
        padding: 9px 10px;
        line-height: 1.45;
    }

    .comment-form-actions {
        margin-top: 7px;
    }

    .comment-form-actions .btn {
        min-height: 36px;
        padding: 0 14px;
    }

    .comments-list,
    .comment-thread {
        gap: 0;
    }

    .comment {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 9px;
        padding: 11px 14px;
        background: transparent;
        border: 0;
        border-bottom: 1px solid var(--mp-line);
        border-radius: 0;
    }

    .comment-avatar,
    .comment-form-container > .comment-avatar {
        width: 36px;
        height: 36px;
    }

    .comment-body {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "author author"
            "content content"
            "readmore readmore"
            "voting actions";
        column-gap: 10px;
        min-width: 0;
    }

    .comment-header {
        display: contents;
    }

    .comment-author-info {
        grid-area: author;
        gap: 5px;
        margin-bottom: 5px;
    }

    .comment-author {
        font-size: 13px;
    }

    .comment-date {
        font-size: 10px;
    }

    .comment-content,
    .comment-content-collapsed {
        grid-area: content;
        font-size: 14px;
        line-height: 1.48;
    }

    .comment-voting {
        grid-area: voting;
        justify-self: start;
        gap: 2px;
        margin-top: 6px;
    }

    .comment-vote-btn {
        width: 24px;
        height: 24px;
        background: transparent;
    }

    .comment-votes-sum {
        min-width: 16px;
        font-size: 12px;
    }

    .comment-footer {
        grid-area: actions;
        align-self: center;
        justify-self: start;
        gap: 10px;
        margin-top: 6px;
    }

    .reply-btn,
    .mention-btn {
        font-size: 11px;
    }

    .comment-body > .comment-read-more-btn {
        grid-area: readmore;
        justify-self: start;
        margin: 6px 0 0;
        text-align: left;
    }

    .replies-wrapper {
        gap: 0;
        padding-left: 0;
        margin-left: 14px;
        border-left: 0;
    }

    .toggle-replies-btn {
        align-self: stretch;
        margin: 8px 14px 8px 0;
        text-align: center;
    }

    .replies-wrapper > .comment-replies {
        margin: 0 0 0 14px;
        padding-left: 12px;
        border-left: 2px solid var(--mp-line-strong);
    }

    /* — рецензии — */
    .review-card {
        padding: 14px;
    }

    /* — тосты снизу по центру — */
    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
        align-items: stretch;
    }

    .toast {
        max-width: none;
    }

    /* театр на мобильном не нужен */
    .modern-player-wrapper.is-theater {
        width: auto;
        margin-left: 0;
    }

    .modern-player-wrapper.is-theater .episodes-section {
        padding-left: 14px;
        padding-right: 14px;
        border-left: var(--mp-border) solid var(--mp-line);
        border-right: var(--mp-border) solid var(--mp-line);
        border-radius: var(--mp-radius);
    }
}

/* ─── ≤479px: узкие экраны ─── */
@media (max-width: 479px) {

    .hero-poster {
        width: 138px;
    }

    .score-plate {
        min-width: 66px;
        padding: 6px 10px;
    }

    .score-plate__value {
        font-size: 22px;
    }

    .episode-list-container {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }

    .episode-button {
        min-height: 46px;
        padding: 5px 2px 8px;
    }

    .ep-num {
        font-size: 14px;
    }

    .ep-sub {
        font-size: 8px;
    }

    .watch-chip span {
        font-size: 11px;
    }

    .current-info__ep {
        min-width: 78px;
        font-size: 14px;
    }

    .btn-ghost .btn-text {
        display: none;
    }

    .btn-ghost {
        flex: 0 0 auto;
        width: 52px;
        padding: 0;
    }

    .sheet-body {
        grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    }
}

/* ─── Ландшафт на телефоне ─── */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1023px) {

    .player-iframe-container {
        max-height: 82vh;
    }
}
