/* ── /live, мастер-деталь ──────────────────────────────────────────────────
   Заголовок штатный (.aa-page-hero), справа от него — счётчик матчей и круговой
   отсчёт до следующего обновления. Строка игрока и способности в панели собраны
   классами matches.css (тот же файл, что у страницы матча), здесь — только
   раскладка списка/панели, чипы, плитки предметов и мини-статы. */
.lv2-page { padding-bottom: 44px; min-height: 60vh; }

.lv2-hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.lv2-hero__row .aa-page-hero__title { margin: 0; }

/* Правый угол: сколько матчей идёт и сколько секунд до обновления. */
.lv2-meta { display: flex; align-items: center; gap: 14px; padding-bottom: 6px; }
.lv2-meta__num { font-size: 20px; color: var(--color-text-default); font-variant-numeric: tabular-nums; line-height: 1; }
.lv2-meta__lbl { display: block; margin-top: 3px; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-muted); }

.lv2-tick { position: relative; width: 38px; height: 38px; flex: 0 0 auto; }
.lv2-tick svg { display: block; transform: rotate(-90deg); }
.lv2-tick__track { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 3; }
.lv2-tick__bar { fill: none; stroke: var(--accent, #ff8c42); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .95s linear; }
.lv2-tick__n {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 12.5px; color: var(--color-text-default); font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) { .lv2-tick__bar { transition: none; } }

.lv2-wrap { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; }
/* min-width:0 у детей — обязательно. У грид-элемента автоминимум равен
   min-content, а внутри панели лежит .lv2-table с min-width:1108px: ниже
   1100px, где колонка одна, эта таблица распирала всю страницу (на 1024
   вылет 132px, на 390 — 751px), хотя у .lv2-tablewrap уже есть своя
   горизонтальная прокрутка. */
.lv2-wrap > * { min-width: 0; }
@media (max-width: 1100px) { .lv2-wrap { grid-template-columns: minmax(0, 1fr); } }

/* ── список игр ── */
.lv2-listbox { position: sticky; top: 74px; }
.lv2-list {
    display: flex; flex-direction: column; gap: 8px;
    /* 262 = прежние 210 плюс высота панели поиска: иначе низ списка уезжает
       за край экрана и до последних матчей не долистать. */
    max-height: calc(100vh - 262px); overflow-y: auto; overscroll-behavior: contain;
    padding-right: 4px; scrollbar-width: thin;
}
.lv2-list::-webkit-scrollbar { width: 8px; }
.lv2-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.10); border-radius: 4px; }
@media (max-width: 1100px) { .lv2-list { max-height: 320px; } .lv2-listbox { position: static; } }

.lv2-item {
    display: block; width: 100%; text-align: left; cursor: pointer; padding: 11px 13px; border-radius: 3px;
    background: var(--bg-surface); border: 1px solid rgba(255,255,255,.05);
    transition: background .14s ease, border-color .14s ease;
}
.lv2-item:hover { background: var(--bg-surface-elevated); border-color: rgba(255,255,255,.09); }
.lv2-item.is-on { background: var(--bg-surface-elevated); border-color: rgba(255,140,66,.45); }
.lv2-item:focus-visible { outline: 2px solid var(--accent, #ff8c42); outline-offset: 2px; }
.lv2-item__top { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
/* Кнопка «скопировать номер матча»: иконка вместо длинного номера. */
.lv2-item__copy { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 4px; margin-left: auto; border: 0; border-radius: 2px; background: transparent; color: var(--color-text-subtle); font-size: 11px; opacity: .7; }
.lv2-item__copy:hover { color: var(--color-text-strong); opacity: 1; }
.lv2-item__copy.is-copied { color: var(--color-success); opacity: 1; }
.lv2-item__copy-txt:empty { display: none; }
.lv2-item__id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--color-text-muted, var(--color-text-muted)); font-variant-numeric: tabular-nums; }
.lv2-item.is-on .lv2-item__id { color: var(--color-text-default); }
.lv2-item__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 12px; }
/* Иконка + значение одной строкой: подписи-капсом были мелкими, владелец снял.
   Название метрики — в title карточки-ячейки. */
.lv2-cell { display: flex; align-items: center; gap: 7px; }
.lv2-cell__ic { flex: 0 0 auto; width: 14px; height: 14px; color: var(--color-text-muted); }
.lv2-cell__v { display: block; font-size: 15.5px; color: var(--color-text-default); font-variant-numeric: tabular-nums; }
.lv2-cell__v small { font-size: 12.5px; color: var(--color-text-muted); }

/* В карточке списка чипы стоят пачкой справа от номера. */
.lv2-item__top .lv2-chip { margin-left: 4px; }
.lv2-item__top .lv2-chip { margin-left: 0; }

.lv2-chip { padding: 2px 8px; border-radius: 2px; font-size: 11.5px; line-height: 18px; white-space: nowrap; background: rgba(255,255,255,.06); color: var(--color-text-default); font-variant-numeric: tabular-nums; }
.lv2-chip--prep { background: rgba(255,140,66,.14); color: #ffb37a; }
.lv2-chip--pause { background: rgba(251,191,36,.14); color: #fbbf24; }
.lv2-chip--duel { background: rgba(90,170,255,.14); color: #8ec6ff; }

/* ── панель матча ── */
.lv2-detail { position: sticky; top: 74px; background: var(--bg-surface); border: 1px solid rgba(255,255,255,.06); border-radius: 3px; }
.lv2-detail__head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.06); }
.lv2-detail__id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; color: var(--color-text-default); font-variant-numeric: tabular-nums; }
.lv2-detail__spacer { flex: 1 1 auto; }
.lv2-detail__avg { font-size: 12.5px; color: var(--color-text-muted, var(--color-text-muted)); font-variant-numeric: tabular-nums; }

.lv2-tablewrap { overflow-x: auto; }
/* Специфичность выше, чем у правил .table-container из matches.css: иначе они
   отбирают фиксированную раскладку и колонки разъезжаются. */
.lv2-detail .lv2-tablewrap .lv2-table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 1108px; }
.lv2-detail .lv2-tablewrap .lv2-table col.c-num   { width: 44px; }
.lv2-detail .lv2-tablewrap .lv2-table col.c-pl    { width: 280px; }
.lv2-detail .lv2-tablewrap .lv2-table col.c-gold  { width: 104px; }
.lv2-detail .lv2-tablewrap .lv2-table col.c-books { width: 72px; }
.lv2-detail .lv2-tablewrap .lv2-table col.c-abil  { width: 286px; }
.lv2-detail .lv2-tablewrap .lv2-table col.c-item  { width: 322px; }
.lv2-pages { color: var(--color-text-muted); }

/* Заголовки прижаты влево — под иконки героев и плитки; числовые вправо. */
.lv2-detail .lv2-tablewrap .lv2-table th { text-align: left; }
.lv2-detail .lv2-tablewrap .lv2-table th.num { text-align: right; }
.lv2-detail .lv2-tablewrap .lv2-table th.c-first { text-align: center; }
/* Золото и книги — по центру: и заголовок, и значения (просьба владельца). */
.lv2-detail .lv2-tablewrap .lv2-table th.c-mid, .lv2-detail .lv2-tablewrap .lv2-table td.c-mid { text-align: center; }

.lv2-table th { padding: 9px 12px; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-muted); font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.06); white-space: nowrap; }
.lv2-table td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.035); font-size: 13.5px; color: var(--color-text-strong); vertical-align: middle; }
.lv2-table tbody tr:last-child td { border-bottom: 0; }
.lv2-table tbody tr:hover td { background: rgba(255,255,255,.02); }
.lv2-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.lv2-dotlive { color: #46d17a; font-size: 18px; line-height: 1; }
.lv2-left { font-size: 11px; color: #b6707a; text-transform: uppercase; letter-spacing: .04em; }
.lv2-none { color: var(--color-text-subtle); }
.lv2-row--out td { color: var(--color-text-muted); }
.lv2-row--out .match-hero-icon img, .lv2-row--out .item-icon, .lv2-row--out .ability-icon-shared { filter: grayscale(1); opacity: .55; }

/* Ник ограничиваем, иначе длинный распирает колонку. */
.lv2-detail .match-player-name { max-width: 155px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Способности матча стоят в одну строку без переноса; у нас колонка уже — разрешаем перенос. */
.lv2-detail .abilities-inline { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 3px; row-gap: 5px; }
.lv2-detail .ability-item { flex: 0 0 auto; text-align: center; }
.lv2-detail .ability-icon-shared { width: 38px; height: 38px; border-radius: 2px; display: block; }
.lv2-detail .wave-number { font-size: 10px; color: var(--color-text-muted); text-align: center; margin-top: 2px; font-variant-numeric: tabular-nums; }

.lv2-mini { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.lv2-mini span { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.lv2-mini img { width: 13px; height: 13px; display: block; opacity: .85; }
.lv2-mini span.is-zero { opacity: .38; }

.lv2-gold { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.lv2-gold img { width: 14px; height: 14px; display: block; }

/* Предметы: инвентарь + нейтрал сверху, рюкзак снизу — раскладка строки матча. */
/* inline-flex: блок предметов центрируется в ячейке как единое целое,
   рюкзак остаётся под началом инвентаря. */
.lv2-items { display: inline-flex; flex-direction: column; gap: 4px; vertical-align: middle; }
.lv2-items__row { display: flex; align-items: center; gap: 4px; }
.lv2-items__gap { width: 8px; flex: 0 0 auto; }
/* Размер задаём максимально специфично: правила предметов из matches.css выигрывали
   у одноклассового селектора, и иконки расползались по натуральным размерам. */
.lv2-detail .lv2-items .lv2-items__row .item-icon {
    width: 46px; height: 33px; min-width: 46px; max-width: 46px; border-radius: 2px; display: block;
    object-fit: cover; flex: 0 0 auto; box-sizing: border-box;
}
.lv2-detail .lv2-items .lv2-items__row .item-icon-empty { background: rgba(255,255,255,.035); border: 1px dashed rgba(255,255,255,.07); }

.lv2-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 13px 16px; border-top: 1px solid rgba(255,255,255,.06); }
.lv2-foot__note { font-size: 12px; color: var(--color-text-muted); }
/* Цвет текста прибит и на ховере тоже: глобальный a:hover сайта перекрашивает
   ссылки в акцентный — на акцентной кнопке текст становился нечитаемым. */
.lv2-page a.lv2-cta, .lv2-page a.lv2-cta:hover, .lv2-page a.lv2-cta:focus, .lv2-page a.lv2-cta:active {
    color: var(--color-bg-base); text-decoration: none;
}
.lv2-cta { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 3px; background: var(--accent, #ff8c42); font-size: 13.5px; font-weight: 600; transition: filter .14s ease; }
.lv2-cta:hover { filter: brightness(1.08); }
.lv2-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lv2-empty { padding: 40px 16px; text-align: center; color: var(--color-text-muted, var(--color-text-muted)); font-size: 14px; }

/* «Ещё 10» — в конце прокручиваемого списка; цифра рядом — сколько скрыто. */
.lv2-more {
    display: block; width: 100%; padding: 10px 13px; border-radius: 3px; cursor: pointer;
    background: transparent; border: 1px dashed rgba(255,255,255,.14);
    color: var(--color-text-muted, var(--color-text-muted)); font-size: 12.5px; text-align: center;
    transition: border-color .14s ease, color .14s ease;
}
.lv2-more:hover { border-color: rgba(255,140,66,.45); color: var(--color-text-default); }
.lv2-more:focus-visible { outline: 2px solid var(--accent, #ff8c42); outline-offset: 2px; }

/* ═══ «Глубина+»: утверждённая владельцем палитра (десатурированный сине-чёрный) ═══
   Переопределения стоят В КОНЦЕ файла намеренно: при равной специфичности CSS
   отдаёт приоритет тому правилу, что идёт ПОЗЖЕ в исходнике. Раньше этот же блок
   стоял ближе к началу файла и проигрывал оригинальным .lv2-detail/.lv2-chip/
   .lv2-cell__v — панель рисовалась сайтовым --bg-surface (тогда — бирюзовый, светлее и
   зеленее), а не согласованным в макете тёмным тоном. Отсюда и жалоба «не такой
   тёмный и премиальный, как в мокапе» — задача была не в hex, а в порядке правил. */
.lv2-listbox, .lv2-detail { background: var(--color-bg-surface-1); border-color: var(--color-border-default); }
.lv2-detail { box-shadow: 0 14px 40px rgba(0,8,20,.55); }
.lv2-item { background: var(--color-bg-surface-1); border-color: var(--color-border-default); }
.lv2-item:hover { background: var(--color-bg-surface-2); }
.lv2-item.is-on { background: var(--color-bg-surface-3); border-color: rgba(255,140,66,.55); }
.lv2-chip { background: var(--color-bg-surface-3); color: var(--color-text-default); }
/* Выбранная карточка сама окрашена в surface-3 — чип на ней исчезал (владелец, 2026-09-12:
   «у волны пропадает прямоугольник»). Внутри выбранной поднимаем чип на ступень выше. */
.lv2-item.is-on .lv2-chip { background: var(--color-bg-surface-4, #363d4b); }
/* Волна — капсом и чуть плотнее: место в шапке карточки освободилось после укорочения
   меток серверов до «DE-1» (владелец, 2026-09-12). */
.lv2-chip--wave { text-transform: uppercase; font-weight: 600; letter-spacing: .04em; }
/* Регион игрового сервера Valve. Стоит ПОСЛЕ переопределения .lv2-chip выше:
   специфичность у них равная, и правило, идущее позже, забирает фон и цвет. */
.lv2-chip--region { background: rgba(120,200,170,.13); color: #8fd6bb; }
/* Наш сервер («DE-0», «FI-3») — оранжевый ТЕКСТ на нейтральной подложке с тонкой оранжевой
   рамкой (владелец, 2026-09-12: оранжевый по оранжевой заливке не читался). Отличие от
   регионов Valve сохраняется за счёт цвета текста и рамки, а не заливки. */
.lv2-chip--ours {
    background: var(--color-bg-surface-3, rgba(255,255,255,.06));
    color: var(--color-primary-400, #f3813c);
    box-shadow: inset 0 0 0 1px rgba(243,129,60,.45);
    font-weight: 600;
    letter-spacing: .03em;
}
.lv2-cell__ic { color: var(--color-text-subtle); }
.lv2-cell__v { color: var(--color-text-strong); }
.match-player-name { color: var(--color-text-strong) !important; }
.lv2-dotlive { color: #46d17a; animation: lv2Pulse 2.2s ease-in-out infinite; }
@keyframes lv2Pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .lv2-dotlive { animation: none; } }
.lv2-detail .lv2-tablewrap .lv2-table { background: transparent; }
.lv2-detail .lv2-tablewrap .lv2-table thead th { background: var(--color-bg-surface-2); color: var(--color-text-subtle); }
.lv2-table td { border-bottom-color: var(--color-border-subtle); color: var(--color-text-default); }
.lv2-table tbody tr:hover td { background: var(--color-bg-surface-3); }
.lv2-goldval, .lv2-gold { color: var(--color-text-strong); font-weight: 600; }

/* ═══ счётчик: live-точка у заголовка вместо кругового отсчёта (владелец: старый
   вариант выглядел «не там» — переехал сюда одной строкой с числом матчей) ═══ */
.cx-live { display: inline-flex; align-items: center; gap: 7px; align-self: flex-end; padding-bottom: 10px;
    font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-text-muted); }
.cx-live__dot { width: 8px; height: 8px; border-radius: 50%; background: #ff8c42; box-shadow: 0 0 8px rgba(255,140,66,.6); animation: cxLiveDot 2s ease-in-out infinite; }
@keyframes cxLiveDot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.cx-live__sep { width: 1px; height: 11px; background: rgba(140,180,220,.25); margin: 0 2px; }
.cx-live__n { color: var(--color-text-strong); font-size: 13px; font-weight: 600; letter-spacing: 0; }
@media (prefers-reduced-motion: reduce) { .cx-live__dot { animation: none; } }

/* ═══ новая шапка панели матча ═══ */
.cx-head { padding: 16px 18px 14px; border-bottom: 1px solid var(--color-border-default); background: var(--color-bg-surface-2); }
.cx-head__row { display: flex; align-items: flex-start; gap: 26px; flex-wrap: wrap; }
.cx-stat { display: flex; flex-direction: column; gap: 3px; }
.cx-stat__l { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--color-text-subtle); }
.cx-stat__v { font-size: 23px; line-height: 1; color: var(--color-text-strong); font-weight: 600; font-variant-numeric: tabular-nums; }
.cx-sep { width: 1px; align-self: stretch; background: var(--color-border-default); }
.cx-alive { display: flex; flex-direction: column; gap: 6px; }
.cx-dots { display: flex; gap: 5px; }
.cx-dot { width: 9px; height: 9px; border-radius: 50%; background: #46d17a; box-shadow: 0 0 6px rgba(70,209,122,.35); transition: background .6s ease, box-shadow .6s ease; }
.cx-dot.is-out { background: var(--color-bg-surface-4); box-shadow: none; }
.cx-spacer { flex: 1 1 auto; }
.cx-cta {
    display: inline-flex; align-items: center; gap: 8px; align-self: center;
    padding: 9px 15px; border-radius: 3px; border: 1px solid rgba(140,180,220,.22);
    color: var(--color-text-default); font-size: 13px; text-decoration: none;
    transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.cx-cta:hover, .cx-cta:focus, .cx-cta:active { border-color: #ff8c42; color: #ffb37a; background: rgba(255,140,66,.06); text-decoration: none; }
.cx-cta svg { transition: transform .16s ease; }
.cx-cta:hover svg { transform: translateX(3px); }
.cx-sub { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.cx-id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
.cx-mode { display: none; padding: 2px 9px; border-radius: 2px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.cx-mode.on { display: inline-block; }
.cx-mode--duel { background: rgba(255,140,66,.15); color: #ffb37a; animation: cxModePulse 1.6s ease-in-out infinite; }
.cx-mode--pause { background: rgba(140,180,220,.12); color: var(--color-text-muted); }
@keyframes cxModePulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .cx-mode--duel { animation: none; } }

/* ── лента событий ── */
.cx-feed { display: flex; align-items: center; gap: 9px; padding: 9px 18px; min-height: 48px; border-bottom: 1px solid var(--color-border-subtle); overflow: hidden; }
.cx-feed__hint { font-size: 11px; color: var(--color-text-subtle); letter-spacing: .05em; text-transform: uppercase; flex: 0 0 auto; }
.cx-ev {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 2px;
    background: var(--color-bg-surface-2); border: 1px solid var(--color-border-default); font-size: 13px; color: var(--color-text-default);
    white-space: nowrap; flex: 0 0 auto; opacity: 1; transition: opacity .8s ease;
    animation: cxEvIn .45s cubic-bezier(.2,.8,.25,1);
}
@keyframes cxEvIn { 0% { opacity: 0; transform: translateX(-14px); } 100% { opacity: 1; transform: none; } }
.cx-ev.is-old { opacity: .35; }
.cx-ev__ic { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.cx-ev--death .cx-ev__ic { background: #d98f8f; }
.cx-ev--aegis .cx-ev__ic { background: #ffd9a0; }
.cx-ev--smoke .cx-ev__ic { background: var(--color-text-muted); }
.cx-ev--duel .cx-ev__ic { background: #ff8c42; }
.cx-ev--abil .cx-ev__ic { background: #8ec6ff; }
.cx-ev--lead .cx-ev__ic { background: #46d17a; }
.cx-ev--curse .cx-ev__ic { background: #d9757a; }
.cx-ev b { color: var(--color-text-strong); font-weight: 600; }
.cx-ev__img { width: 22px; height: 16px; border-radius: 2px; object-fit: cover; }
.cx-ev__img--sq { width: 17px; height: 17px; object-fit: contain; }
.cx-ev__arrow { color: var(--color-text-subtle); }
@media (prefers-reduced-motion: reduce) { .cx-ev { animation: none; } }

/* ── общие переезды/вспышки строк ── */
tr.lv2-swap { transition: transform .55s cubic-bezier(.2,.8,.25,1); will-change: transform; }
tr.lv2-flash td { animation: cxRowFlash 1.1s ease; }
@keyframes cxRowFlash { 0% { background: rgba(140,180,220,.06); } 100% { background: transparent; } }

/* смерть: медленное почернение → обесцвечивание строки; штамп места выскакивает,
   как только попадает в DOM (одинаково — что на первой загрузке, что после события) */
tr.cx-dying td { animation: cxDie 1.8s ease forwards; }
@keyframes cxDie { 0% { background: rgba(217,143,143,.10); } 45% { background: rgba(120,30,30,.14); } 100% { background: rgba(0,0,0,.28); } }
tr.cx-dying .match-hero-icon img, tr.cx-dying .item-icon, tr.cx-dying .ability-icon-shared { transition: filter 1.6s ease, opacity 1.6s ease; filter: grayscale(1) brightness(.7); opacity: .55; }
.cx-place-stamp { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 50%; background: var(--color-bg-surface-3); color: var(--color-text-default); font-size: 12px; font-weight: 700; animation: cxStamp .6s cubic-bezier(.34,1.4,.4,1); }
@keyframes cxStamp { 0% { transform: scale(2.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* аегис: щит вырастает над портретом и расщепляется на осколки (вписан в размер портрета) */
.cx-aegis-stage { position: absolute; inset: 0; overflow: visible; pointer-events: none; z-index: 5; }
.match-hero-icon img.cx-aegis-icon { position: absolute; left: 50%; top: 50%; width: 30px !important; height: 23px !important; min-width: 0 !important; transform: translate(-50%,-50%) scale(.3); opacity: 0; animation: cxAegisIn 2.6s ease forwards; filter: drop-shadow(0 0 10px rgba(255,200,90,.8)); }
@keyframes cxAegisIn { 0% { transform: translate(-50%,-50%) scale(.3); opacity: 0; } 14% { transform: translate(-50%,-50%) scale(1.1); opacity: 1; } 46% { transform: translate(-50%,-50%) scale(1); opacity: 1; } 54% { opacity: 0; } 100% { opacity: 0; } }
.cx-shard { position: absolute; left: 50%; top: 50%; width: 7px; height: 6px; background-image: url('https://ancientarena.pro/images/items/item_aegis.png'); background-size: 34px 28px; opacity: 0; animation: cxShard 1.5s cubic-bezier(.2,.7,.3,1) forwards; animation-delay: 1.25s; filter: drop-shadow(0 0 4px rgba(255,200,90,.7)); }
@keyframes cxShard { 0% { opacity: 1; transform: translate(-50%,-50%) rotate(0); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)); } }
.cx-aegis-ring { animation: cxAegisRing 2.4s ease; border-radius: 4px; }
@keyframes cxAegisRing { 0% { box-shadow: 0 0 0 0 rgba(255,217,160,0); } 12% { box-shadow: 0 0 0 3px rgba(255,217,160,.9), 0 0 26px rgba(255,190,90,.6); } 55% { box-shadow: 0 0 0 2px rgba(255,217,160,.5), 0 0 18px rgba(255,190,90,.35); } 100% { box-shadow: 0 0 0 0 rgba(255,217,160,0); } }
.cx-pip-drop { animation: cxPip .9s ease; }
@keyframes cxPip { 0% { color: #ffd9a0; transform: scale(1.5); } 100% { transform: scale(1); } }

/* проклятие: ПОЛУЧЕНИЕ — тёмные осколки слетаются, иконка собирается и ВПИТЫВАЕТСЯ
   в портрет (обратная логика аегису, который теряется) */
.cx-curse-stage { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: visible; }
.match-hero-icon img.cx-curse-icon { position: absolute; left: 50%; top: 50%; width: 25px !important; height: 25px !important; min-width: 0 !important; border-radius: 3px; transform: translate(-50%,-50%) scale(.4); opacity: 0; animation: cxCurseIn 3s ease forwards; filter: drop-shadow(0 0 8px rgba(200,70,70,.9)); }
@keyframes cxCurseIn { 0% { transform: translate(-50%,-50%) scale(.4); opacity: 0; } 38% { transform: translate(-50%,-50%) scale(.4); opacity: 0; } 48% { transform: translate(-50%,-50%) scale(1.15); opacity: 1; } 58% { transform: translate(-50%,-50%) scale(1); opacity: 1; } 78% { transform: translate(-50%,-50%) scale(1); opacity: 1; } 100% { transform: translate(-50%,-50%) scale(.55); opacity: 0; } }
.cx-curse-shard { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; background-image: url('https://ancientarena.pro/images/abilities/doom_bringer_doom.png'); background-size: 34px 34px; opacity: 0; animation: cxCurseGather 1.25s ease-in forwards; animation-delay: var(--gd); filter: drop-shadow(0 0 4px rgba(200,70,70,.8)); }
@keyframes cxCurseGather { 0% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)); } 30% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-50%) rotate(0); } }
.cx-curse-ring { animation: cxCurseRing 3s ease; border-radius: 4px; }
@keyframes cxCurseRing { 0% { box-shadow: 0 0 0 0 rgba(200,70,70,0); } 45% { box-shadow: 0 0 0 2px rgba(200,70,70,.5), 0 0 14px rgba(190,60,60,.35); } 82% { box-shadow: 0 0 0 3px rgba(200,70,70,.8), 0 0 24px rgba(190,60,60,.6); } 100% { box-shadow: 0 0 0 0 rgba(200,70,70,0); } }
tr.cx-cursed td { animation: cxCurseTint 3.2s ease; }
@keyframes cxCurseTint { 0% { background: transparent; } 40% { background: rgba(150,40,40,.05); } 82% { background: rgba(110,25,55,.10); } 100% { background: transparent; } }

/* смок: «дымовая завеса» — контент строки мутнеет под матовым стеклом + мягкие шлейфы */
.cx-smokelayer { position: absolute; pointer-events: none; z-index: 4; }
.cx-veil { position: absolute; inset: 0; opacity: 0;
    backdrop-filter: blur(5px) saturate(.75) brightness(.92);
    -webkit-backdrop-filter: blur(5px) saturate(.75) brightness(.92);
    background: rgba(120,130,170,.07);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
    animation: cxVeil 3.8s ease forwards; }
@keyframes cxVeil { 0% { opacity: 0; } 15% { opacity: 1; } 72% { opacity: 1; } 100% { opacity: 0; } }
.cx-wisp { position: absolute; top: 8%; height: 84%; width: 140px; opacity: 0; border-radius: 50%;
    background: linear-gradient(90deg, transparent, rgba(190,200,235,.16) 35%, rgba(190,200,235,.22) 50%, rgba(190,200,235,.16) 65%, transparent);
    filter: blur(9px); animation: cxWisp var(--t) ease-in-out forwards; animation-delay: var(--d); }
@keyframes cxWisp { 0% { opacity: 0; transform: translateX(0) skewX(-8deg); } 20% { opacity: 1; } 80% { opacity: .7; } 100% { opacity: 0; transform: translateX(var(--mx)) skewX(-8deg); } }
tr.cx-smoked td { animation: cxSmokedTint 3.8s ease; }
@keyframes cxSmokedTint { 0% { background: transparent; } 20% { background: rgba(139,148,200,.06); } 74% { background: rgba(139,148,200,.06); } 100% { background: transparent; } }

/* дуэль: «Корона + Прожектор» — таблица гаснет, светятся ровно двое */
tbody.cx-spot tr { transition: opacity .4s ease; opacity: .45; }
tbody.cx-spot tr.cx-duel-won, tbody.cx-spot tr.cx-duel-lost { opacity: 1; }
tbody.cx-spot tr.cx-duel-won td { background: rgba(255,140,66,.055); }
tbody.cx-spot tr.cx-duel-lost td { background: rgba(140,180,220,.045); }
.cx-duel-flash { animation: cxDuel 1.2s ease; }
@keyframes cxDuel { 0% { color: #ffb37a; text-shadow: 0 0 10px rgba(255,140,66,.7); transform: scale(1.35); } 100% { transform: scale(1); } }
.cx-crown { position: absolute; left: 50%; top: -13px; transform: translateX(-50%); z-index: 6; color: #ffd9a0; pointer-events: none; animation: cxCrown 4.2s ease forwards; filter: drop-shadow(0 0 6px rgba(255,200,90,.7)); }
@keyframes cxCrown { 0% { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.4); } 8% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.1); } 14% { transform: translateX(-50%) scale(1); } 88% { opacity: 1; } 100% { opacity: 0; } }
tr.cx-duel-lost .match-hero-icon img { animation: cxLostDim 3.8s ease; }
@keyframes cxLostDim { 0% { filter: none; } 25% { filter: grayscale(1) brightness(.55); } 75% { filter: grayscale(1) brightness(.55); } 100% { filter: none; } }

/* новый предмет: появление с масштабом и голубым свечением (только пустой слот → заполнен) */
.cx-new-icon { animation: cxNewIcon .8s cubic-bezier(.34,1.4,.4,1); }
@keyframes cxNewIcon { 0% { transform: scale(.2); opacity: 0; box-shadow: 0 0 0 3px rgba(142,198,255,.7); } 60% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(142,198,255,0); } }

/* замена способности: акцент притуханием соседних → барабан слота (крутится только
   иконка, номер волны обновляется отдельно после остановки барабана) */
.abilities-inline .ability-item { transition: opacity .35s ease; }
.abilities-inline.cx-focus .ability-item { opacity: .28; }
.abilities-inline.cx-focus .ability-item.cx-target { opacity: 1; box-shadow: 0 0 0 1px rgba(142,198,255,.55); border-radius: 2px; }
.cx-reelbox { overflow: hidden; position: relative; }
.cx-reeltrack { display: flex; flex-direction: column; transform: translateY(-100%); }
.cx-reeltrack.go { transition: transform 3.4s cubic-bezier(.25,1.15,.35,1); transform: translateY(0); }
.cx-reelcell { flex: 0 0 auto; }
.cx-reel-glow { animation: cxReelGlow 3.6s ease; border-radius: 2px; }
@keyframes cxReelGlow { 0% { box-shadow: 0 0 0 2px rgba(142,198,255,0); } 35% { box-shadow: 0 0 0 2px rgba(142,198,255,.75), 0 0 16px rgba(142,198,255,.45); } 100% { box-shadow: 0 0 0 0 rgba(142,198,255,0); } }
.wave-number.cx-wave-new { animation: cxWaveNew 1s ease; }
@keyframes cxWaveNew { 0% { opacity: 0; transform: translateY(-4px); color: #8ec6ff; } 45% { opacity: 1; color: #8ec6ff; } 100% { transform: none; color: inherit; } }

/* золото: докрутка числа + всплывающая дельта */
.lv2-goldval.bump { animation: cxGoldBump .9s ease; }
@keyframes cxGoldBump { 0% { color: #ffd9a0; } 100% { color: var(--color-text-strong); } }
.lv2-gold { position: relative; }
.lv2-delta { position: absolute; left: 100%; top: 50%; margin-left: 7px; transform: translateY(-50%);
    font-size: 11px; color: #7fc98f; font-weight: 600; white-space: nowrap; opacity: 0;
    animation: cxDeltaUp 1.4s ease forwards; font-variant-numeric: tabular-nums; pointer-events: none; }
@keyframes cxDeltaUp { 0% { opacity: 0; transform: translateY(-30%);} 18% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-85%);} }

@media (prefers-reduced-motion: reduce) {
    tr.lv2-swap { transition: none; }
    .cx-ev, tr.cx-dying td, .cx-place-stamp, .cx-aegis-icon, .cx-shard, .cx-aegis-ring,
    .cx-curse-icon, .cx-curse-shard, .cx-curse-ring, tr.cx-cursed td, .cx-veil, .cx-wisp, tr.cx-smoked td,
    .cx-duel-flash, .cx-crown, tr.cx-duel-lost .match-hero-icon img, .cx-new-icon,
    .cx-reeltrack.go, .cx-reel-glow, .wave-number.cx-wave-new,
    .lv2-goldval.bump, .lv2-delta, .lv2-dotlive, .cx-mode--duel, .cx-live__dot { animation: none; transition: none; }
    .lv2-delta { opacity: 1; }
}

/* ═══ панель над списком: поиск игрока и сортировка ═══
   Липкая внутри колонки списка: при прокрутке остаётся сверху, поэтому фон
   непрозрачный — иначе сквозь неё просвечивают уезжающие карточки. */
.lv2-tools { display: flex; gap: 8px; align-items: center; padding: 10px; background: var(--color-bg-surface-1);
  border-bottom: 1px solid var(--color-border-default); border-radius: 3px 3px 0 0; }

.lv2-find { position: relative; flex: 1 1 auto; min-width: 0; }
.lv2-find__input { width: 100%; box-sizing: border-box; padding: 7px 26px 7px 10px; border-radius: 3px;
  border: 1px solid var(--color-border-default); background: var(--color-bg-surface-2); color: var(--color-text-default); font-size: 12.5px; }
.lv2-find__input::placeholder { color: var(--color-text-subtle); }
.lv2-find__input:focus { outline: none; border-color: rgba(255,140,66,.55); }
.lv2-find__clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 20px;
  height: 20px; border: 0; border-radius: 2px; background: transparent; color: var(--color-text-muted); font-size: 16px;
  line-height: 1; cursor: pointer; }
.lv2-find__clear:hover { color: var(--color-text-default); }

/* Выпадающий список найденных. Скролл внутри: совпадений может быть много. */
.lv2-find__drop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
  max-height: 264px; overflow-y: auto; background: var(--color-bg-surface-2); border: 1px solid var(--color-border-default);
  border-radius: 3px; box-shadow: 0 14px 40px rgba(0,8,20,.55); }
.lv2-find__row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px;
  border: 0; background: transparent; color: var(--color-text-default); font-size: 12.5px; text-align: left; cursor: pointer; }
.lv2-find__row:hover { background: var(--color-bg-surface-3); }

/* Портрет героя. Пропорции доты 16:9, поэтому не квадрат. */
.lv2-find__hero { flex: 0 0 auto; width: 32px; height: 18px; object-fit: cover; border-radius: 2px;
  background: var(--color-bg-surface-3); }
/* Герой ещё не выбран: тот же габарит, чтобы строки не прыгали. */
.lv2-find__hero--none { display: flex; align-items: center; justify-content: center; color: var(--color-text-subtle);
  font-size: 11px; border: 1px dashed rgba(140,180,220,.22); box-sizing: border-box; }

.lv2-find__nick { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv2-find__kd { flex: 0 0 auto; color: var(--color-text-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* Точка состояния: игрок может сидеть в матче, но уже выйти, и может встречаться
   сразу в двух матчах — состояние своё у каждой строки. */
.lv2-find__st { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #46d17a; }
.lv2-find__st.is-out { background: var(--color-text-subtle); }
.lv2-find__st.is-left { background: #d1584f; }
.lv2-find__empty { padding: 9px 10px; color: var(--color-text-muted); font-size: 12.5px; }

.lv2-sort { display: flex; flex: 0 0 auto; border: 1px solid var(--color-border-default); border-radius: 3px;
  overflow: hidden; }
/* Кнопки — только иконки: подпись съедала место в узкой колонке, смысл живёт
   в title и aria-label. */
.lv2-sort__btn { display: flex; align-items: center; justify-content: center; width: 34px; height: 32px;
  padding: 0; border: 0; background: var(--color-bg-surface-2); color: var(--color-text-muted); cursor: pointer; }
.lv2-sort__btn + .lv2-sort__btn { border-left: 1px solid var(--color-border-default); }
.lv2-sort__btn:hover { color: var(--color-text-default); }
.lv2-sort__btn.is-on { background: var(--color-bg-surface-3); color: #ffb37a; }

@media (max-width: 720px) {
  .lv2-tools { flex-wrap: wrap; }
  .lv2-sort { width: 100%; }
  .lv2-sort__btn { flex: 1 1 0; }
}
