/* ============================================================
   IMBYTE — Tournament card v2 (FACEIT/FastCup-style)

   Полностью изолированный CSS для новой карточки турнира.
   Не зависит от style-esports.css, использует только переменные
   из qladder-theme.css (--ql-*).

   Префикс всех классов: .tv2- (tournament v2).
   ============================================================ */

/* ── HERO ────────────────────────────────────────────────────── */

.tv2-hero {
    position: relative;
    margin: 0 0 var(--ql-sp-5);
    border-radius: var(--ql-r-lg);
    overflow: hidden;
    min-height: 280px;
    background: var(--ql-bg-2);
    box-shadow: var(--ql-shadow-2);
}

.tv2-hero__cover {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--ql-bg-2);
    filter: brightness(0.45) saturate(1.1);
    z-index: 0;
    transition: filter .3s;
}

.tv2-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(13, 16, 24, 0.65) 0%, rgba(13, 16, 24, 0.85) 100%),
        linear-gradient(to top, rgba(13, 16, 24, 0.92) 0%, transparent 60%);
    z-index: 1;
}

.tv2-hero__content {
    position: relative;
    z-index: 2;
    padding: var(--ql-sp-7) var(--ql-sp-6);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--ql-sp-5);
    align-items: end;
}

.tv2-hero__title-block {
    min-width: 0;
}

.tv2-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ql-sp-2);
    margin-bottom: var(--ql-sp-3);
}

.tv2-hero__title {
    font-family: var(--ql-font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 var(--ql-sp-3);
    color: var(--ql-fg);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.tv2-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ql-sp-4);
    color: var(--ql-fg-1);
    font-size: 14px;
}

.tv2-hero__meta-item {
    display: inline-flex;
    align-items: center;
    gap: var(--ql-sp-2);
}

.tv2-hero__meta-item i {
    color: var(--ql-accent);
    width: 16px;
}

.tv2-hero__cta {
    display: flex;
    flex-direction: column;
    gap: var(--ql-sp-2);
    align-items: flex-end;
}

.tv2-hero__cta .ql-btn {
    min-width: 200px;
    font-size: 15px;
    padding: var(--ql-sp-3) var(--ql-sp-5);
}

/* Адаптив: hero на мобильных — колонкой. */
@media (max-width: 700px) {
    .tv2-hero { min-height: 220px; }
    .tv2-hero__content {
        grid-template-columns: 1fr;
        padding: var(--ql-sp-5) var(--ql-sp-4);
    }
    .tv2-hero__cta { align-items: stretch; }
    .tv2-hero__cta .ql-btn { width: 100%; }
}

/* ── TIMELINE ───────────────────────────────────────────────── */

.tv2-timeline {
    background: var(--ql-bg-2);
    border-radius: var(--ql-r-md);
    padding: var(--ql-sp-5) var(--ql-sp-5);
    margin-bottom: var(--ql-sp-5);
    box-shadow: var(--ql-shadow-1);
    overflow-x: auto;
}

.tv2-timeline__track {
    display: flex;
    align-items: flex-start;
    gap: var(--ql-sp-1);
    min-width: 720px;
    position: relative;
}

.tv2-timeline__stage {
    flex: 1;
    text-align: center;
    min-width: 100px;
    position: relative;
}

.tv2-timeline__dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    margin: 0 auto var(--ql-sp-3);
    display: grid;
    place-items: center;
    background: var(--ql-bg-3);
    border: 2px solid var(--ql-bg-4);
    color: var(--ql-fg-muted);
    font-size: 14px;
    position: relative;
    z-index: 2;
    transition: all .2s;
}

.tv2-timeline__stage--past .tv2-timeline__dot {
    background: var(--ql-accent);
    border-color: var(--ql-accent);
    color: #0d1018;
}

.tv2-timeline__stage--active .tv2-timeline__dot {
    background: var(--ql-accent);
    border-color: var(--ql-accent);
    color: #0d1018;
    box-shadow: 0 0 0 6px rgba(0, 255, 91, 0.18), var(--ql-glow-accent, 0 0 16px rgba(0, 255, 91, 0.4));
    animation: tv2-pulse 2s ease-in-out infinite;
}

@keyframes tv2-pulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(0, 255, 91, 0.18); }
    50%      { box-shadow: 0 0 0 12px rgba(0, 255, 91, 0.05); }
}

.tv2-timeline__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ql-fg-1);
    line-height: 1.3;
}

.tv2-timeline__stage--past .tv2-timeline__label,
.tv2-timeline__stage--active .tv2-timeline__label {
    color: var(--ql-fg);
}

.tv2-timeline__date {
    font-size: 10px;
    color: var(--ql-fg-muted);
    font-family: var(--ql-font-mono);
    margin-top: var(--ql-sp-1);
}

/* Линия-соединитель между точками. */
.tv2-timeline__stage:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--ql-bg-4);
    z-index: 1;
}

.tv2-timeline__stage--past:not(:last-child)::after {
    background: var(--ql-accent);
}

/* ── TABS ───────────────────────────────────────────────────── */

.tv2-tabs {
    display: flex;
    gap: 2px;
    background: var(--ql-bg-2);
    border-radius: var(--ql-r-md) var(--ql-r-md) 0 0;
    padding: 0 var(--ql-sp-2);
    margin-bottom: 0;
    border-bottom: 1px solid var(--ql-bg-4);
    overflow-x: auto;
    scrollbar-width: none;
}

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

.tv2-tab {
    padding: var(--ql-sp-3) var(--ql-sp-4);
    color: var(--ql-fg-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: all .15s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: var(--ql-sp-2);
}

.tv2-tab i { font-size: 13px; }

.tv2-tab:hover {
    color: var(--ql-fg-1);
    background: var(--ql-bg-3);
}

.tv2-tab--active {
    color: var(--ql-accent);
    border-bottom-color: var(--ql-accent);
    background: transparent;
}

.tv2-tab--active:hover { color: var(--ql-accent); background: transparent; }

/* ── LAYOUT ─────────────────────────────────────────────────── */

.tv2-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--ql-sp-5);
}

.tv2-layout__main {
    background: var(--ql-bg-2);
    border-radius: 0 0 var(--ql-r-md) var(--ql-r-md);
    padding: var(--ql-sp-5);
    min-height: 400px;
    box-shadow: var(--ql-shadow-1);
}

.tv2-layout__sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--ql-sp-4);
}

@media (max-width: 1000px) {
    .tv2-layout { grid-template-columns: 1fr; }
}

/* ── SIDEBAR CARDS ──────────────────────────────────────────── */

.tv2-side-card {
    background: var(--ql-bg-2);
    border-radius: var(--ql-r-md);
    overflow: hidden;
    box-shadow: var(--ql-shadow-1);
}

.tv2-side-card__header {
    padding: var(--ql-sp-3) var(--ql-sp-4);
    border-bottom: 1px solid var(--ql-bg-3);
    background: var(--ql-bg-3);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ql-fg-1);
    display: flex;
    align-items: center;
    gap: var(--ql-sp-2);
}

.tv2-side-card__header i { color: var(--ql-accent); }

.tv2-side-card__body { padding: var(--ql-sp-4); }

/* Призовые места. */
.tv2-prize {
    display: flex;
    align-items: center;
    gap: var(--ql-sp-3);
    padding: var(--ql-sp-2) 0;
    border-bottom: 1px dashed var(--ql-bg-3);
}

.tv2-prize:last-child { border-bottom: none; }

.tv2-prize__rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
}

.tv2-prize--gold .tv2-prize__rank { background: var(--ql-gold); color: #000; }
.tv2-prize--silver .tv2-prize__rank { background: #c0c5ce; color: #000; }
.tv2-prize--bronze .tv2-prize__rank { background: #cd7f32; color: #000; }

.tv2-prize__amount { font-weight: 700; font-size: 14px; color: var(--ql-fg); }

/* Вводные регистрации. */
.tv2-req {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ql-sp-2) 0;
    border-bottom: 1px dashed var(--ql-bg-3);
    font-size: 13px;
}

.tv2-req:last-child { border-bottom: none; }

.tv2-req__label {
    color: var(--ql-fg-1);
    display: inline-flex;
    align-items: center;
    gap: var(--ql-sp-2);
}

.tv2-req__label i { color: var(--ql-accent); width: 14px; }

.tv2-req__value {
    color: var(--ql-fg);
    font-weight: 600;
    font-family: var(--ql-font-mono);
}

.tv2-req__value--ok { color: var(--ql-accent); }
.tv2-req__value--off { color: var(--ql-fg-muted); }

/* ── TAB CONTENT ────────────────────────────────────────────── */

.tv2-section { margin-bottom: var(--ql-sp-5); }

.tv2-section:last-child { margin-bottom: 0; }

.tv2-section__title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--ql-fg-1);
    margin: 0 0 var(--ql-sp-3);
    padding-bottom: var(--ql-sp-2);
    border-bottom: 1px solid var(--ql-bg-3);
}

.tv2-section__title i {
    color: var(--ql-accent);
    margin-right: var(--ql-sp-2);
}

/* Map pool grid. */
.tv2-maps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--ql-sp-3);
}

.tv2-map {
    background: var(--ql-bg-3);
    border-radius: var(--ql-r-md);
    overflow: hidden;
    transition: transform .15s;
    border: 1px solid var(--ql-bg-4);
}

.tv2-map:hover { transform: translateY(-2px); }

.tv2-map__image {
    width: 100%;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    background-color: var(--ql-bg-4);
}

.tv2-map__label {
    padding: var(--ql-sp-2) var(--ql-sp-3);
    font-weight: 600;
    font-size: 13px;
    color: var(--ql-fg);
}

/* Organizer block. */
.tv2-organizer {
    display: flex;
    align-items: center;
    gap: var(--ql-sp-3);
    padding: var(--ql-sp-3);
    background: var(--ql-bg-3);
    border-radius: var(--ql-r-md);
}

.tv2-organizer__avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--ql-bg-4);
}

.tv2-organizer__name {
    font-weight: 700;
    color: var(--ql-fg);
    font-size: 14px;
}

.tv2-organizer__country {
    color: var(--ql-fg-muted);
    font-size: 12px;
    font-family: var(--ql-font-mono);
}

/* Participants compact list. */
.tv2-participants {
    display: flex;
    flex-direction: column;
    gap: var(--ql-sp-2);
    max-height: 360px;
    overflow-y: auto;
}

.tv2-participant {
    display: flex;
    align-items: center;
    gap: var(--ql-sp-3);
    padding: var(--ql-sp-2);
    border-radius: var(--ql-r-sm);
    background: var(--ql-bg-3);
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}

.tv2-participant:hover { background: var(--ql-bg-4); }

.tv2-participant__avatar {
    width: 32px; height: 32px;
    border-radius: var(--ql-r-sm);
    object-fit: cover;
    background: var(--ql-bg-4);
}

.tv2-participant__name { color: var(--ql-fg); font-size: 13px; font-weight: 500; }

/* Status badge для виджета регистрации в sidebar. */
.tv2-status-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--ql-sp-2);
    padding: var(--ql-sp-2) var(--ql-sp-3);
    border-radius: var(--ql-r-pill);
    background: var(--ql-bg-3);
    font-size: 12px;
    font-weight: 600;
}

.tv2-status-pill--joined {
    background: rgba(0, 255, 91, 0.12);
    color: var(--ql-accent);
}

.tv2-status-pill--open {
    background: rgba(255, 180, 0, 0.12);
    color: var(--ql-gold);
}

.tv2-status-pill--closed { color: var(--ql-fg-muted); }

/* ─────────────────────── BRACKET TREE (single_elim) ─────────────────── */

.tv2-bracket-tree {
    display: flex;
    gap: var(--ql-sp-4);
    overflow-x: auto;
    padding: var(--ql-sp-4) 0;
    align-items: stretch;
    position: relative;
}

.tv2-bracket-tree__col {
    display: flex;
    flex-direction: column;
    min-width: 220px;
    position: relative;
}

.tv2-bracket-tree__col--final,
.tv2-bracket-tree__col--champion {
    min-width: 240px;
    justify-content: center;
}

.tv2-bracket-tree__col-title {
    text-align: center;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: var(--ql-sp-3);
    font-weight: 700;
    color: var(--ql-fg-1);
    padding: 6px 10px;
    background: var(--ql-bg-3);
    border-radius: var(--ql-r-md);
    border: 1px solid var(--ql-border);
}

.tv2-bracket-tree__col-title--accent {
    color: var(--ql-accent);
    border-color: rgba(0, 255, 91, 0.4);
    background: rgba(0, 255, 91, 0.08);
}

.tv2-bracket-tree__col-sub {
    display: block;
    font-size: 9px;
    color: var(--ql-fg-3);
    font-weight: 500;
    margin-top: 2px;
    letter-spacing: 1px;
    text-transform: none;
}

.tv2-bracket-tree__col-matches {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex: 1;
    gap: var(--ql-sp-2);
}

.tv2-bracket-tree__match-wrap {
    position: relative;
}

/* Соединительная линия от матча к следующему раунду (вправо).
   Не рисуем для последней колонки (champion). */
.tv2-bracket-tree__col:not(:last-child) .tv2-bracket-tree__match-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    right: calc(var(--ql-sp-4) * -1);
    width: var(--ql-sp-4);
    height: 2px;
    background: var(--ql-border);
    transform: translateY(-50%);
    pointer-events: none;
}

/* Соединительная вертикальная линия между парой матчей (если есть следующая колонка). */
.tv2-bracket-tree__col:not(:last-child) .tv2-bracket-tree__col-matches::before {
    content: '';
    position: absolute;
    right: calc(var(--ql-sp-4) * -1 + 1px);
    top: 50%;
    height: 50%;
    width: 2px;
    background: var(--ql-border);
    pointer-events: none;
}

.tv2-bracket-tree__champion {
    background: linear-gradient(135deg, rgba(255, 180, 0, 0.15), rgba(0, 255, 91, 0.08));
    border: 2px dashed var(--ql-accent);
    border-radius: var(--ql-r-md);
    padding: var(--ql-sp-4);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ql-sp-2);
}

.tv2-bracket-tree__champion i {
    font-size: 32px;
    color: var(--ql-gold);
}

.tv2-bracket-tree__champion a {
    color: var(--ql-accent);
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
}

/* Mobile: убираем соединительные линии — они визуально шумят. */
@media (max-width: 900px) {
    .tv2-bracket-tree__col:not(:last-child) .tv2-bracket-tree__match-wrap::after,
    .tv2-bracket-tree__col:not(:last-child) .tv2-bracket-tree__col-matches::before {
        display: none;
    }
    .tv2-bracket-tree__col { min-width: 200px; }
}

/* ─────────────────────── BRACKET NODE (single_elim) ─────────────────── */

.tv2-node {
    background: var(--ql-bg-2);
    border: 1px solid var(--ql-border);
    border-radius: var(--ql-r-md);
    overflow: hidden;
    transition: border-color .15s ease, transform .15s ease;
    position: relative;
}
.tv2-node:hover { border-color: rgba(0, 255, 91, 0.4); }
.tv2-node--final {
    border-color: var(--ql-accent);
    box-shadow: 0 0 0 1px rgba(0, 255, 91, 0.3);
}

/* ИМБАЙТ: row = grid 28px + 1fr + 36px — флаг/имя/счёт всегда в фиксированных колонках.
   Это гарантирует что верхний и нижний игрок выравнены 1-в-1. */
.tv2-node__row {
    display: grid;
    grid-template-columns: 28px 1fr 36px;
    align-items: center;
    padding: 9px 12px;
    border-bottom: 1px solid var(--ql-border);
    column-gap: 8px;
    min-height: 38px;
}
.tv2-node__row:last-child { border-bottom: 0; }
.tv2-node__row--win { background: rgba(0, 255, 91, 0.08); }

/* tv2-node__team — занимает 2 колонки (флаг + имя), grid внутри для align. */
.tv2-node__team {
    display: grid;
    grid-template-columns: 24px 1fr;
    column-gap: 6px;
    align-items: center;
    grid-column: 1 / span 2;
    min-width: 0;
    text-decoration: none;
    color: var(--ql-fg);
    font-weight: 700;
    font-size: 13px;
    transition: color .15s ease;
}
.tv2-node__team:hover { color: var(--ql-accent); }
.tv2-node__team--tbd {
    color: var(--ql-fg-muted);
    font-style: italic;
    font-weight: 400;
    /* TBD не имеет вложенного flag/name, ставим в первой колонке. */
    grid-column: 1 / span 2;
    padding-left: 2px;
}
.tv2-node__flag {
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 24px;
    height: 18px;
    font-family: "Twemoji Mozilla", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-variant-emoji: emoji;
}
.tv2-node__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tv2-node__name--win { color: var(--ql-accent); }
.tv2-node__tag {
    color: var(--ql-fg-muted);
    font-family: var(--ql-font-mono);
    font-size: 11px;
    font-weight: 400;
}
.tv2-node__score {
    font-family: var(--ql-font-display);
    font-weight: 700;
    font-size: 14px;
    color: var(--ql-fg);
    min-width: 24px;
    text-align: right;
    flex-shrink: 0;
}
.tv2-node__score--win { color: var(--ql-accent); }

.tv2-node__match-link {
    display: block;
    text-align: center;
    padding: 4px 8px;
    background: var(--ql-bg-3);
    color: var(--ql-fg-2);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    text-decoration: none;
    border-top: 1px solid var(--ql-border);
    transition: background .15s ease, color .15s ease;
}
.tv2-node__match-link:hover {
    background: var(--ql-accent-soft, rgba(0, 255, 91, 0.10));
    color: var(--ql-accent);
}
.tv2-node__match-link i { margin-right: 4px; }

/* ════════════════════════════════════════════════════════════
   tv2-matches — список матчей вкладки «Матчи»
   ════════════════════════════════════════════════════════════ */
.tv2-matches {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tv2-match-row {
    display: grid;
    grid-template-columns: 140px 1fr auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--ql-bg-2, rgba(255,255,255,0.02));
    border: 1px solid var(--ql-border);
    border-radius: 8px;
    transition: background .15s ease, border-color .15s ease;
}
.tv2-match-row:hover {
    background: var(--ql-bg-3, rgba(255,255,255,0.04));
    border-color: var(--ql-accent-soft, rgba(0,255,91,0.20));
}
.tv2-match-row__stage {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ql-fg-muted);
    font-weight: 600;
}
.tv2-match-row__team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.tv2-match-row__team--a { justify-content: flex-end; text-align: right; }
.tv2-match-row__team--b { justify-content: flex-start; text-align: left; }
.tv2-match-row__flag { font-size: 14px; line-height: 1; flex-shrink: 0; }
.tv2-match-row__name {
    color: var(--ql-fg);
    text-decoration: none;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.tv2-match-row__name:hover { color: var(--ql-accent); }
.tv2-match-row__team.is-win .tv2-match-row__name { color: var(--ql-accent); }
.tv2-match-row__score {
    font-family: var(--ql-font-mono, monospace);
    font-weight: 700;
    font-size: 16px;
    padding: 6px 14px;
    background: var(--ql-bg-1, rgba(0,0,0,0.20));
    border-radius: 6px;
    min-width: 80px;
    text-align: center;
    color: var(--ql-fg);
    white-space: nowrap;
}
.tv2-match-row__score .is-win { color: var(--ql-accent); }
.tv2-match-row__score-sep { color: var(--ql-fg-muted); margin: 0 4px; }
.tv2-match-row__open {
    color: var(--ql-fg-muted);
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.tv2-match-row__open:hover {
    background: var(--ql-accent-soft, rgba(0,255,91,0.10));
    color: var(--ql-accent);
}
@media (max-width: 700px) {
    .tv2-match-row {
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: auto auto;
    }
    .tv2-match-row__stage { grid-column: 1 / -1; }
    .tv2-match-row__open { display: none; }
}

/* ════════════════════════════════════════════════════════════
   TV2 LIVE CENTER — живой центр турнира (новый ТЗ)
   ════════════════════════════════════════════════════════════ */
.tv2-live { display: flex; flex-direction: column; gap: var(--ql-sp-4); }

/* KPI */
.tv2-live__kpi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--ql-sp-3);
}
.tv2-live__kpi-card {
    display: flex;
    align-items: center;
    gap: var(--ql-sp-2);
    padding: var(--ql-sp-3) var(--ql-sp-4);
    background: var(--ql-bg-2);
    border: 1px solid var(--ql-border);
    border-radius: var(--ql-r-md);
    border-left: 3px solid var(--ql-fg-3);
}
.tv2-live__kpi-card--live      { border-left-color: var(--ql-danger, #ef4444); }
.tv2-live__kpi-card--upcoming  { border-left-color: var(--ql-cyan, #00D1FF); }
.tv2-live__kpi-card--finished  { border-left-color: var(--ql-fg-3); }
.tv2-live__kpi-card--stories   { border-left-color: var(--ql-gold, #F59E0B); }
.tv2-live__kpi-card i,
.tv2-live__kpi-card .ql-pulse-dot { color: var(--ql-fg-2); }
.tv2-live__kpi-card--live .ql-pulse-dot { background: var(--ql-danger); box-shadow: 0 0 6px var(--ql-danger); }
.tv2-live__kpi-card--upcoming i  { color: var(--ql-cyan); }
.tv2-live__kpi-card--stories i   { color: var(--ql-gold); }
.tv2-live__kpi-value {
    font-family: var(--ql-font-mono);
    font-size: 22px; font-weight: 800;
    color: var(--ql-fg);
    transition: color .3s ease;
}
.tv2-live__kpi-value.is-flash { color: var(--ql-accent, #00FFB2); }
.tv2-live__kpi-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--ql-fg-2);
    font-weight: 700;
    margin-left: auto;
}

/* Двухколоночный grid (live + stories) */
.tv2-live__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: var(--ql-sp-4);
}
.tv2-live__grid--3col {
    grid-template-columns: 1fr 1fr 1.2fr;
}
@media (max-width: 1100px) {
    .tv2-live__grid,
    .tv2-live__grid--3col { grid-template-columns: 1fr; }
}

/* Live матчи */
.tv2-live__matches {
    display: flex;
    flex-direction: column;
    gap: var(--ql-sp-2);
}
.tv2-live__match {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto;
    align-items: center;
    gap: var(--ql-sp-3);
    padding: var(--ql-sp-3);
    background: var(--ql-bg-3);
    border: 1px solid var(--ql-border);
    border-radius: var(--ql-r-md);
    text-decoration: none;
    color: var(--ql-fg);
    transition: border-color .15s ease, transform .1s ease;
}
.tv2-live__match:hover {
    border-color: var(--ql-danger, #ef4444);
    transform: translateY(-1px);
    color: var(--ql-fg);
}
.tv2-live__match-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: var(--ql-r-pill);
    background: rgba(239,68,68,0.10);
    border: 1px solid rgba(239,68,68,0.30);
    color: var(--ql-danger);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.tv2-live__match-team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-weight: 600;
    font-size: 13px;
}
.tv2-live__match-team img {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--ql-bg-2);
}
.tv2-live__match-team span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tv2-live__match-score {
    font-family: var(--ql-font-mono);
    font-size: 18px;
    font-weight: 800;
    padding: 4px 10px;
    background: var(--ql-bg-1);
    border-radius: var(--ql-r-sm);
    white-space: nowrap;
}
.tv2-live__match-score .is-lead { color: var(--ql-accent, #00FFB2); }
.tv2-live__match-sep { color: var(--ql-fg-3); margin: 0 4px; }
.tv2-live__match-meta {
    grid-column: 1 / -1;
    display: flex; gap: var(--ql-sp-3);
    font-size: 11px;
    color: var(--ql-fg-2);
    padding-top: 6px;
    border-top: 1px solid var(--ql-border);
}
.tv2-live__match-meta i { color: var(--ql-fg-3); margin-right: 3px; }
@media (max-width: 600px) {
    .tv2-live__match { grid-template-columns: 1fr; }
}

/* Stories */
.tv2-live__stories {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tv2-live__story {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: var(--ql-sp-3);
    padding: var(--ql-sp-3);
    background: var(--ql-bg-3);
    border: 1px solid var(--ql-border);
    border-radius: var(--ql-r-sm);
    text-decoration: none;
    color: var(--ql-fg);
    border-left: 3px solid var(--ql-fg-3);
    transition: background .15s ease;
}
.tv2-live__story:hover { background: var(--ql-bg-2); color: var(--ql-fg); }
.tv2-live__story--info      { border-left-color: var(--ql-cyan, #00D1FF); }
.tv2-live__story--highlight { border-left-color: var(--ql-gold, #F59E0B); }
.tv2-live__story--epic      { border-left-color: var(--ql-violet, #8B5CF6); box-shadow: 0 0 18px rgba(139,92,246,0.10); }
.tv2-live__story-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--ql-bg-2);
    color: var(--ql-fg-2);
    font-size: 16px;
}
.tv2-live__story--highlight .tv2-live__story-icon { color: var(--ql-gold); }
.tv2-live__story--epic .tv2-live__story-icon { color: var(--ql-violet); }
.tv2-live__story-title { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.tv2-live__story-text { font-size: 12px; color: var(--ql-fg-2); line-height: 1.4; }

/* Upcoming + finished lists */
.tv2-live__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tv2-live__row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--ql-sp-2);
    padding: 8px 10px;
    background: var(--ql-bg-3);
    border-radius: var(--ql-r-sm);
    text-decoration: none;
    color: var(--ql-fg);
    font-size: 12px;
    transition: background .12s ease;
}
.tv2-live__row:hover { background: var(--ql-bg-2); color: var(--ql-fg); }
.tv2-live__row-team {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tv2-live__row-team.is-win { color: var(--ql-accent, #00FFB2); font-weight: 700; }
.tv2-live__row-vs,
.tv2-live__row-time,
.tv2-live__row-score {
    font-family: var(--ql-font-mono);
    color: var(--ql-fg-2);
    font-size: 11px;
}
.tv2-live__row-score { color: var(--ql-fg); font-weight: 700; }

/* Events feed */
.tv2-section--feed { max-height: 480px; display: flex; flex-direction: column; }
.tv2-live__events {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.tv2-live__event {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 8px;
    padding: 6px 8px;
    background: var(--ql-bg-3);
    border-radius: var(--ql-r-sm);
    border-left: 2px solid var(--ql-fg-3);
    font-size: 11px;
}
.tv2-live__event--autopilot { border-left-color: var(--ql-accent, #00FFB2); }
.tv2-live__event--match     { border-left-color: var(--ql-cyan, #00D1FF); }
.tv2-live__event-time {
    font-family: var(--ql-font-mono);
    color: var(--ql-fg-3);
}
.tv2-live__event-msg { color: var(--ql-fg-1); }
