/**
 * Оформление сайта лиги.
 * Палитра по умолчанию: красный, оранжево-жёлтый, белый (по логотипу АБЛ).
 * Своя палитра у лиги задаётся в config/tenants/<slug>.php, ключ brand.colors —
 * значения подставляются в :root на странице и перекрывают этот блок.
 */

:root {
    --abl-red:           #c41e3a;
    --abl-red-dark:      #9e1830;
    --abl-orange:        #e85d04;
    --abl-orange-light:  #f48c06;
    --abl-yellow:        #ffba08;
    --abl-gold:          #c9a227;
    --abl-white:         #fff;
    --abl-gray-bg:       #f5f5f5;
    --abl-gray-text:     #333;
    --abl-gray-muted:    #666;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--abl-gray-text);
    background: var(--abl-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ----- Donate / Поддержать ----- */
.donate-section {
    max-width: 560px;
    margin: 0 auto;
    padding: 2rem 0;
}
.donate-section__title {
    margin: 0 0 1rem;
    font-size: 1.75rem;
    color: var(--abl-gray-text);
}
.donate-section__intro {
    margin: 0 0 1.5rem;
    color: var(--abl-gray-muted);
    line-height: 1.6;
}
.donate-card {
    background: var(--abl-gray-bg);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.donate-card__hint {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--abl-gray-muted);
}
.donate-card__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}
.donate-card__row:last-of-type {
    margin-bottom: 0;
}
.donate-card__label {
    flex: 0 0 auto;
    font-weight: 600;
    color: var(--abl-gray-text);
    min-width: 110px;
}
.donate-card__value {
    flex: 1 1 auto;
    font-family: ui-monospace, monospace;
    font-size: 1rem;
}
.donate-card__value_number {
    letter-spacing: 0.05em;
}
.donate-card__copy {
    flex-shrink: 0;
}
.donate-card__comment {
    margin: 1rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9rem;
    color: var(--abl-gray-muted);
}
.donate-section__note {
    margin: 0;
    color: var(--abl-gray-muted);
}
.donate-section__placeholder {
    padding: 1.5rem;
    background: var(--abl-gray-bg);
    border-radius: 8px;
    color: var(--abl-gray-muted);
}
.donate-card_qr .donate-card__qr-wrap {
    text-align: center;
    margin: 1rem 0;
}
.donate-card__qr {
    display: inline-block;
    max-width: 280px;
    height: auto;
    border-radius: 8px;
    background: var(--abl-white);
    padding: 0.5rem;
}
.donate-card__contract {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: var(--abl-gray-text);
    font-weight: 500;
}
.donate-card__qr-instruction {
    margin: 0;
    font-size: 0.9rem;
    color: var(--abl-gray-muted);
}
.donate-card_qr .donate-card__comment {
    margin-top: 1rem;
}

/* ----- Header ----- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--abl-white);
    border-bottom: 3px solid var(--abl-orange);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.header__top {
    padding: 0.75rem 0;
    background: linear-gradient(135deg, #0D47A1 0%, #1565C0 100%);
    color: var(--abl-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header__container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header__logo {
    display: block;
    flex-shrink: 0;
}

.header__logo img,
.header__logo-img {
    display: block;
    height: 72px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.header__title {
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
}

.header__auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header__auth-link {
    color: inherit;
    text-decoration: none;
    font-size: 0.9rem;
}

.header__auth-link:hover {
    text-decoration: underline;
}

.header__auth-link_btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

/* Модальное окно входа */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal[aria-hidden="true"],
.modal[hidden] {
    display: none;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal__box {
    position: relative;
    width: 100%;
    max-width: 360px;
    padding: 1.5rem;
    background: var(--abl-white);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    color: var(--abl-gray-text);
}

.modal__title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

.modal__error {
    margin-bottom: 0.75rem;
}

.modal__form .form-row:last-of-type {
    margin-bottom: 0;
}

.modal__register {
    margin: 1rem 0 0;
    font-size: 0.9rem;
}

.modal__register a {
    color: var(--abl-red);
    text-decoration: none;
}

.modal__register a:hover {
    text-decoration: underline;
}

.modal__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--abl-gray-muted);
    cursor: pointer;
}

.modal__close:hover {
    color: var(--abl-gray-text);
}

/* Круг с инициалами и выпадающее меню пользователя */
.header__user {
    position: relative;
    flex-shrink: 0;
}

.header__user-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.header__user-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.header__user-avatar {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
}

.header__user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 180px;
    margin: 0;
    padding: 0.5rem 0;
    list-style: none;
    background: var(--abl-white);
    color: var(--abl-gray-text);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 100;
}

.header__user:hover .header__user-dropdown,
.header__user.header__user_open .header__user-dropdown {
    pointer-events: auto;
}

.header__user:hover .header__user-dropdown,
.header__user.header__user_open .header__user-dropdown {
    opacity: 1;
    visibility: visible;
}

.header__user-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--abl-gray-text);
    text-decoration: none;
    font-size: 0.9rem;
}

.header__user-dropdown a:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* Формы входа/регистрации/кабинета */
.auth-form .form-row {
    margin-bottom: 1rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form textarea {
    padding: 0.5rem;
    min-width: 220px;
    max-width: 100%;
    font-size: 1.05rem;
    box-sizing: border-box;
}

.auth-form textarea {
    min-height: 8rem;
    resize: vertical;
}

/* Honeypot для форм (скрыто от пользователей) */
.auth-form .form-row_hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.form-message {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.form-message_error {
    background: #f8d7da;
    color: #721c24;
}

.form-message_success {
    background: #d4edda;
    color: #155724;
}

.verified {
    color: #155724;
}

/* Личный кабинет: строка мессенджера + «Отвязать» справа */
.profile-messenger-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.35rem 1rem;
    margin: 0 0 1rem;
}

.profile-messenger-line__text {
    flex: 1 1 auto;
    min-width: 0;
}

.profile-messenger-line__action {
    flex: 0 0 auto;
    text-align: right;
    max-width: 100%;
}

.profile-messenger-line .btn_link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--abl-link, #0d6efd);
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    white-space: nowrap;
}

.profile-messenger-line .btn_link:hover {
    text-decoration: none;
}

.profile-unlink-inline {
    margin: 0;
    text-align: left;
}

.profile-unlink-inline input[type="password"] {
    display: block;
    width: 100%;
    max-width: 220px;
    margin-bottom: 0.4rem;
    padding: 0.45rem 0.5rem;
    font-size: 1rem;
    box-sizing: border-box;
}

.profile-unlink-inline__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.profile-unlink-inline__buttons .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.95rem;
}

.header__site-name {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Сокращённое наименование только в мобильной версии */
.header__site-short {
    display: none;
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.95;
}

/* Кнопка «Открыть меню» — в ряду с АБЛ-1/АБЛ-2; шрифт как у «Вход» (.header__auth-link); на десктопе скрыта */
.header__burger {
    display: none;
    flex-shrink: 0;
    min-width: 0;
    padding: 0.4rem 0.75rem;
    border: 1px solid #c8c8c8;
    border-radius: 12px;
    background: #f3f3f3;
    color: var(--abl-gray-text);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.25;
    cursor: pointer;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.header__burger:hover {
    background: #fff;
    border-color: #999;
}

.header__burger:focus-visible {
    background: #fff;
    border-color: var(--abl-orange);
    box-shadow: 0 0 0 2px var(--abl-white), 0 0 0 4px var(--abl-orange);
    outline: none;
}

.header__burger-lines {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.header__burger-label {
    display: block;
    font: inherit;
    text-align: left;
    white-space: nowrap;
}

.header__burger-bar {
    display: block;
    width: 1.25rem;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

/* Tournament tabs (активные турниры + Завершён) + выпадающий сезон справа */
.header__tournaments {
    padding: 0.5rem 0;
    background: var(--abl-gray-bg);
}

.header__tournaments-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.header__season-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header__season-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--abl-gray-text);
}

.header__season-select {
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    font-size: inherit;
    font-weight: 600;
    color: var(--abl-gray-text);
    background: var(--abl-white);
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

.header__season-select:hover {
    border-color: var(--abl-orange);
}

.tournament-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.tournament-tabs__item {
    display: inline-block;
    padding: 0.4rem 1rem;
    font-weight: 600;
    color: var(--abl-gray-text);
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.tournament-tabs__item:hover {
    background: var(--abl-white);
    color: var(--abl-red);
}

.tournament-tabs__item_active {
    background: var(--abl-orange);
    color: var(--abl-white);
}

.tournament-tabs__item_active:hover {
    background: var(--abl-orange-light);
    color: var(--abl-white);
}

/* League tabs (режим без групп) */
.header__leagues {
    padding: 0.5rem 0;
    background: var(--abl-gray-bg);
}

.league-tabs {
    display: flex;
    gap: 0.5rem;
}

.league-tabs__item {
    display: inline-block;
    padding: 0.4rem 1rem;
    font-weight: 600;
    color: var(--abl-gray-text);
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.league-tabs__item:hover {
    background: var(--abl-white);
    color: var(--abl-red);
}

.league-tabs__item_active {
    background: var(--abl-orange);
    color: var(--abl-white);
}

.league-tabs__item_active:hover {
    background: var(--abl-orange-light);
    color: var(--abl-white);
}

/* Main nav */
.header__nav {
    padding: 0.5rem 0;
}

.nav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav__link {
    display: inline-block;
    color: var(--abl-gray-text);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 7px;
    transition: color 0.15s, background-color 0.15s;
}

.nav__link:hover {
    color: var(--abl-red);
    background: rgba(255, 90, 0, 0.08);
}

.nav__link_active,
.nav__link_active:hover {
    color: #fff;
    background: #FF5A00;
    font-weight: 600;
}

/* Сезон в гамбургере — показывать только в drawer на мобильных */
.header__drawer-season {
    display: none;
}

@media (min-width: 768px) {
    .header__bottom {
        display: block;
    }
}

/* Мобильная шапка: турниры всегда на экране, в гамбургере — сезон + меню */
@media (max-width: 767px) {
    .header__burger {
        display: flex;
        margin-left: auto;
    }

    .header__tournaments-row .tournament-tabs,
    .header__tournaments-row .league-tabs {
        flex: 1;
        min-width: 0;
    }

    .header__site-name {
        display: none;
    }

    .header__site-short {
        display: block;
        margin: 0;
        font-size: 1.25rem;
        font-weight: 700;
    }

    .header__logo img,
    .header__logo-img {
        height: 44px;
    }

    /* Сезон в ряду турниров на мобильных скрыт — он в гамбургере */
    .header__season-wrap_desktop {
        display: none !important;
    }

    /* В drawer показываем сезон + нав */
    .header__drawer-season {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #eee;
        background: var(--abl-gray-bg);
    }

    .header__bottom {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--abl-white);
        border-bottom: 2px solid var(--abl-orange);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        max-height: 80vh;
        overflow-y: auto;
    }

    .header__bottom_open {
        display: block;
    }

    .header__tournaments .container,
    .header__leagues .container {
        padding: 0.5rem 1rem;
    }

    .header__nav .container {
        padding: 0.75rem 1rem;
    }

    .header__nav .nav__list {
        flex-direction: column;
        gap: 0;
    }

    .header__nav .nav__link {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid #eee;
    }
}

@media (min-width: 768px) {
    .header__bottom {
        display: block;
    }
}

/* ----- Main ----- */
.main {
    min-height: 50vh;
    padding: 2rem 0;
}

.main .container {
    padding: 0 1rem;
}

.page-title {
    margin: 0 0 1.5rem;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--abl-gray-text);
}

.home-section {
    margin-bottom: 2.5rem;
}

.news__heading {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--abl-gray-text);
}

.news__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .news__list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .news__list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.news__item {
    margin-bottom: 0;
}

.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--abl-gray-bg);
    border-radius: 8px;
    border-left: 4px solid var(--abl-orange);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card_link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.news-card_link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.news-card_link:hover .news-card__title-text {
    color: var(--abl-orange);
}

.news-card__thumb {
    width: 100%;
    height: 160px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
}

.news-card__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
}

.news-card__content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1rem 1.25rem;
}

.news-card__image {
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

.news-card__image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    object-position: left center;
}

.news-card_full {
    padding: 1.25rem 1.5rem;
}

.news-card_full .news-card__image {
    margin: -1.25rem -1.5rem 1rem -1.5rem;
    border-radius: 8px 8px 0 0;
}

.news-card__header {
    margin-bottom: 0.5rem;
}

.news-card__title {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--abl-gray-text);
}

.news-card__title-text {
    transition: color 0.2s ease;
}

.news-card__meta {
    margin: 0;
    font-size: 0.85rem;
    color: var(--abl-gray-muted);
}

.news-card__views {
    white-space: nowrap;
}

.news-card__preview {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--abl-gray-text);
    margin: 0;
    flex-grow: 1;
}

.news-back {
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.news-back:link,
.news-back:visited {
    color: var(--abl-gray-muted);
}

.news-back:hover {
    color: var(--abl-red);
}

.news-card__body {
    font-size: 0.95rem;
    line-height: 1.6;
}

.news-body__feedback-link,
.news-body__team-link,
.news-body__game-link,
.news-body__url-link {
    color: var(--abl-red);
    text-decoration: underline;
}

.news-body__feedback-link:hover,
.news-body__team-link:hover,
.news-body__game-link:hover,
.news-body__url-link:hover {
    text-decoration: none;
}

.news-card__title_full {
    font-size: 1.5rem;
}

.placeholder-block {
    background: var(--abl-gray-bg);
    border: 1px dashed var(--abl-orange);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: var(--abl-gray-muted);
}

.media-section {
    display: grid;
    gap: 1rem;
}

@media (min-width: 1100px) {
    .media-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.media-card {
    background: var(--abl-white);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1rem;
}

.media-card__title {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}

.media-card__meta {
    margin: 0 0 1rem;
    color: var(--abl-gray-muted);
    font-size: 0.95rem;
}

.media-card__video {
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

.media-card__video iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ----- Команды (по образцу РФБ: сетка карточек, название + город) ----- */
.teams-empty {
    color: var(--abl-gray-muted);
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 600px) {
    .teams-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .team-card__link {
        padding: 0.75rem 0.5rem;
    }
    .team-card__logo {
        min-height: 48px;
    }
    .team-card__logo img {
        width: 48px;
        height: 48px;
    }
    .team-card__name {
        font-size: 0.9rem;
    }
    .team-card__city {
        font-size: 0.75rem;
    }
}

.team-card__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem;
    background: var(--abl-white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: var(--abl-gray-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.team-card__link:hover {
    border-color: var(--abl-orange);
    box-shadow: 0 2px 8px rgba(232, 93, 4, 0.15);
}

.team-card__logo {
    display: block;
    margin-bottom: 0.5rem;
    min-height: 64px;
}

.team-card__logo img {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.team-card__logo-placeholder {
    opacity: 0.85;
}

.team-card__name {
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
}

.team-card__city {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--abl-gray-muted);
    text-align: center;
}

.team-card_favorite .team-card__link {
    border-color: var(--abl-gold);
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.3);
}

/* ----- Страница команды: хлебные крошки, шапка, переключатели, состав ----- */
.breadcrumb {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--abl-gray-muted);
}

.breadcrumb a {
    color: var(--abl-orange);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb__sep {
    margin: 0 0.35rem;
}

.team-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.team-header__logo img {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.team-header__logo-placeholder {
    opacity: 0.85;
}

.team-header__logo_clickable {
    cursor: pointer;
}
.team-header__logo_clickable:hover {
    opacity: 0.9;
}

/* Полноэкранный просмотр логотипа по клику */
.team-logo-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}
.team-logo-overlay_is-open {
    display: flex;
}
.team-logo-overlay__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.team-logo-overlay__close:hover {
    background: rgba(255, 255, 255, 0.25);
}
.team-logo-overlay__img {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.team-header__name-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.team-header__name {
    margin: 0;
}

/* Кнопка избранного (звёздочка) */
.favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--abl-gray-muted);
    transition: color 0.2s, transform 0.15s;
}

.favorite-btn:hover {
    color: var(--abl-gold);
}

.favorite-btn:focus {
    outline: 2px solid var(--abl-gold);
    outline-offset: 2px;
}

.favorite-btn_active {
    color: var(--abl-gold);
}

.favorite-btn_active .favorite-btn__icon {
    font-style: normal;
}

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

.team-header__city {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: var(--abl-gray-muted);
}

.team-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.team-toolbar__group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-toolbar__label {
    font-weight: 600;
    color: var(--abl-gray-muted);
    font-size: 0.9rem;
}

.team-toolbar__tabs {
    display: flex;
    gap: 0.25rem;
}

.team-toolbar__tab {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
    color: var(--abl-gray-text);
    text-decoration: none;
    border-radius: 4px;
    background: var(--abl-gray-bg);
    transition: background 0.2s, color 0.2s;
}

.team-toolbar__tab:hover {
    background: #e8e8e8;
    color: var(--abl-red);
}

.team-toolbar__tab_active {
    background: var(--abl-orange);
    color: var(--abl-white);
}

.team-toolbar__tab_active:hover {
    color: var(--abl-white);
    background: var(--abl-orange-light);
}

.team-roster__title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

.team-roster__empty {
    color: var(--abl-gray-muted);
}

/* Таблица состава */
.roster-table-wrap {
    overflow-x: auto;
}

.roster-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.roster-table th,
.roster-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.roster-table th {
    font-weight: 600;
    color: var(--abl-gray-muted);
    background: var(--abl-gray-bg);
}

.roster-table__num {
    font-weight: 600;
    width: 2.5rem;
}

.roster-table__photo {
    width: 48px;
    background: #fff;
}

.roster-table__photo img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.roster-table__photo-placeholder {
    opacity: 0.8;
    object-fit: contain;
}

/* Карточки состава */
.roster-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.roster-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--abl-white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
}

.roster-card__photo {
    margin-bottom: 0.5rem;
    background: #fff;
}

.roster-card__photo img {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.roster-card__photo-placeholder {
    object-fit: contain;
    opacity: 0.85;
}

.roster-card__num {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--abl-orange);
}

.roster-card__name {
    margin-top: 0.25rem;
    font-weight: 600;
    font-size: 1rem;
}

.roster-card__position {
    margin-top: 0.15rem;
    font-size: 0.85rem;
    color: var(--abl-gray-muted);
}

.roster-card__phys {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--abl-gray-muted);
}

.roster-card_favorite {
    border-color: var(--abl-orange);
    background: rgba(232, 93, 4, 0.06);
}

.roster-card {
    position: relative;
}

.roster-card__fav {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.roster-row_favorite {
    background: rgba(232, 93, 4, 0.06);
}

.roster-row_favorite td {
    border-bottom-color: rgba(232, 93, 4, 0.15);
}

.roster-table__fav-th {
    width: 2.5rem;
    text-align: center;
}

.roster-table__fav {
    text-align: center;
    width: 2.5rem;
}

/* Кнопка открытия фото в карточке игрока */
.roster-card__photo .roster-photo-open {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
}

.roster-table__photo-btn {
    display: block;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
}

.roster-table__photo-btn img {
    display: block;
}

/* Лайтбокс фото игрока: затемнённый фон + белая панель под фото */
.player-photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: pointer;
}

.player-photo-lightbox[hidden] {
    display: none;
}

.player-photo-lightbox__panel {
    background: #fff;
    padding: 1rem 1rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: calc(100vw - 8rem);
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.player-photo-lightbox__panel img {
    max-width: 100%;
    max-height: calc(100vh - 8rem);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.player-photo-lightbox__caption {
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
}

.player-photo-lightbox__num {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--abl-orange);
}

.player-photo-lightbox__name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--abl-gray-text);
}

.player-photo-lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1.75rem;
    line-height: 1;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-photo-lightbox__arrow:hover {
    background: #fff;
}

.player-photo-lightbox__arrow_prev {
    left: 1rem;
}

.player-photo-lightbox__arrow_next {
    right: 1rem;
}

.player-photo-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1;
}

.player-photo-lightbox__close:hover {
    background: #fff;
}

/* ----- Статистика команд (переключатель сезон + показатель, таблица) ----- */
.stat-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.stat-toolbar__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.stat-toolbar__group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-toolbar__label {
    font-weight: 600;
    color: var(--abl-gray-muted);
    font-size: 0.9rem;
}

.stat-toolbar__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.stat-toolbar__tabs_stats {
    gap: 0.35rem;
}

.stat-toolbar__tab {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
    color: var(--abl-gray-text);
    text-decoration: none;
    border-radius: 4px;
    background: var(--abl-gray-bg);
    transition: background 0.2s, color 0.2s;
}

.stat-toolbar__tab:hover {
    background: #e8e8e8;
    color: var(--abl-red);
}

.stat-toolbar__tab_active {
    background: var(--abl-orange);
    color: var(--abl-white);
}

.stat-toolbar__tab_active:hover {
    color: var(--abl-white);
    background: var(--abl-orange-light);
}

.stat-toolbar__select {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    min-width: 150px;
}

.stat-toolbar__select:hover {
    border-color: var(--abl-orange);
}

.stat-toolbar__select:focus {
    outline: none;
    border-color: var(--abl-orange);
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

/* На мобильных панели с вкладками переносятся — увеличиваем вертикальный отступ между рядами */
@media (max-width: 600px) {
    .stat-toolbar,
    .match-toolbar {
        row-gap: 1rem;
    }
    .stat-toolbar__group,
    .match-toolbar .team-toolbar__group {
        flex: 1 1 auto;
        min-width: 0;
    }
}

.stat-empty {
    color: var(--abl-gray-muted);
}

.player-stats__ranking-note {
    max-width: 720px;
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--abl-gray-muted);
    line-height: 1.45;
}

.stat-table .stat-table__pb-strong {
    font-weight: 700;
    color: var(--abl-gray-text);
}

.stat-table-wrap {
    overflow-x: auto;
}

/* Статистика игроков: закреплённый заголовок таблицы */
.stat-table-wrap_sticky {
    overflow: auto;
    max-height: min(70vh, 520px);
}
.stat-table-wrap_sticky .stat-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--abl-gray-bg);
    border-bottom: 2px solid #e0e0e0;
}

.stat-table {
    width: 100%;
    max-width: 720px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.stat-table th,
.stat-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.stat-table th {
    font-weight: 600;
    color: var(--abl-gray-muted);
    background: var(--abl-gray-bg);
}

.stat-table__sort {
    color: var(--abl-gray-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-table__sort:hover {
    color: var(--abl-orange);
}

.stat-table__sort_active {
    color: var(--abl-gray-text);
    font-weight: 700;
}

.stat-table__sort_active::after {
    content: '▼';
    font-size: 0.65em;
}

.stat-table__col_active {
    font-weight: 700;
}

.stat-table__place {
    width: 2.5rem;
    font-weight: 600;
    color: var(--abl-gray-muted);
}

.stat-table__place_medal {
    text-align: center;
    font-size: 1.2rem;
    line-height: 1;
}

.stat-table__team {
    font-weight: 600;
}

/* Ячейка «игрок»: только table-cell; inline-flex на <td> ломает раскладку и подвал (Итого) */
.stat-table__player {
    font-weight: 600;
    vertical-align: middle;
}

.stat-table td.stat-table__player,
.stat-table th.stat-table__player {
    display: table-cell;
}

.stat-table__player > .stat-table__photo-btn {
    margin-left: 0.35rem;
    vertical-align: middle;
}

.stat-table__photo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--abl-gray-muted, #666);
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
}

.stat-table__photo-btn:hover {
    color: var(--abl-orange, #e85d04);
    background: rgba(0, 0, 0, 0.05);
}

.stat-table__photo-icon {
    display: block;
}

/* Лайтбокс фото на странице статистики игроков */
.player-stats-photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: pointer;
}

.player-stats-photo-lightbox[hidden] {
    display: none;
}

.player-stats-photo-lightbox__panel {
    background: #fff;
    padding: 1rem 1rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: calc(100vw - 8rem);
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.player-stats-photo-lightbox__panel img {
    max-width: 100%;
    max-height: calc(100vh - 8rem);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.player-stats-photo-lightbox__caption {
    margin: 0.75rem 0 0;
    padding: 0;
    font-weight: 600;
    font-size: 1rem;
    color: var(--abl-gray-text, #333);
}

.player-stats-photo-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1;
}

.player-stats-photo-lightbox__close:hover {
    background: #fff;
}

.stat-table__value {
    font-weight: 400;
}

.stat-table__total td {
    font-weight: 600;
    background: var(--abl-gray-bg);
    border-top: 2px solid var(--abl-orange);
}

.stat-table__avg {
    color: var(--abl-gray-muted);
}

/* Таблица игр игрока: закреплённый заголовок и колонка «Матч» */
.player-page__games .stat-table-wrap {
    overflow: auto;
    max-height: min(70vh, 520px);
}
.player-page__games .stat-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--abl-gray-bg);
    border-bottom: 2px solid #e0e0e0;
}
.player-page__games .stat-table th.stat-table__pin,
.player-page__games .stat-table td.stat-table__pin {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 10rem;
    background: var(--abl-white);
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.06);
}
.player-page__games .stat-table thead th.stat-table__pin {
    z-index: 3;
    background: var(--abl-gray-bg);
}
.player-page__games .stat-table tbody td.stat-table__pin {
    background: var(--abl-white);
}
.player-page__games .stat-table tfoot td.stat-table__pin {
    background: var(--abl-gray-bg);
    border-top: 2px solid var(--abl-orange);
}

/* Колонка Дата — тот же размер шрифта, что у Матч */
.player-page__games .stat-table th.stat-table__date,
.player-page__games .stat-table td.stat-table__date {
    font-size: 0.85rem;
}
@media (max-width: 600px) {
    .player-page__games .stat-table th.stat-table__pin,
    .player-page__games .stat-table td.stat-table__pin {
        min-width: 0;
        font-size: 0.8rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .player-page__games .stat-table th.stat-table__date,
    .player-page__games .stat-table td.stat-table__date {
        font-size: 0.8rem;
    }
}

/* ----- Положение команд (таблица участников) ----- */
.standings-table-wrap {
    overflow-x: auto;
}

.standings-table {
    width: 100%;
    max-width: 720px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.standings-table th,
.standings-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.standings-table th {
    font-weight: 600;
    color: var(--abl-gray-muted);
    background: var(--abl-gray-bg);
}

.standings-table__place {
    width: 2.5rem;
    font-weight: 600;
    color: var(--abl-gray-muted);
}

.standings-table td.standings-table__td-place--medal {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.2;
    vertical-align: middle;
    font-weight: 400;
}

.standings-table__team {
    font-weight: 600;
}

.standings-table__team a {
    color: inherit;
    text-decoration: none;
}

.standings-table__team a:hover {
    text-decoration: underline;
}

/* Колонки № и Название — как в шахматке (0.85rem) */
.standings-table th.standings-table__th-place,
.standings-table th.standings-table__th-team,
.standings-table td.standings-table__td-place,
.standings-table td.standings-table__td-team {
    font-size: 0.85rem;
}

.standings-table__points {
    font-weight: 600;
}

.standings-table__pct {
    color: var(--abl-gray-muted);
    font-weight: 400;
    font-size: 0.9em;
}

.standings-table__zp {
    white-space: nowrap;
}

.standings-table__diff {
    color: var(--abl-gray-muted);
    font-size: 0.9em;
}

.standings-table__avg {
    display: block;
    color: var(--abl-gray-muted);
    font-size: 0.85em;
}

/* Подсветка строки при наведении (лёгкий фирменный оттенок) */
.standings-table tbody tr td {
    transition: background-color 0.16s ease;
}

.standings-table tbody tr:hover td {
    background-color: rgba(196, 30, 58, 0.055);
}

/* Sticky-ячейки с серым фоном — тот же hover, иначе визуально «рвёт» строку */
.standings-table.standings-table_sticky tbody tr:hover .standings-table__td-place,
.standings-table.standings-table_sticky tbody tr:hover .standings-table__td-team {
    background-color: rgba(196, 30, 58, 0.055);
}

/* Sticky турнирная таблица */
.standings-table-wrap_sticky {
    overflow: auto;
    max-height: 80vh;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.standings-table_sticky {
    border-collapse: separate;
    border-spacing: 0;
}

.standings-table_sticky th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f5f5f5;
}

.standings-table_sticky .standings-table__th-place {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #f5f5f5;
}

.standings-table_sticky .standings-table__th-team {
    position: sticky;
    left: 2.5rem;
    z-index: 3;
    background: #f5f5f5;
}

.standings-table_sticky .standings-table__td-place {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #f5f5f5;
}

.standings-table_sticky .standings-table__td-team {
    position: sticky;
    left: 2.5rem;
    z-index: 1;
    background: #f5f5f5;
}

/* ----- Игры: список ----- */
.matches-empty {
    color: var(--abl-gray-muted);
}

.match-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.matches-list__title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

.matches-list__count {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--abl-gray, #666);
}

.matches-list__show-more {
    margin: 1.25rem 0 0;
}

.match-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.match-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e8e8e8;
    background: var(--abl-white);
}

.match-row:last-child {
    border-bottom: none;
}

@media (min-width: 720px) {
    .match-row {
        grid-template-columns: 140px minmax(0, 1fr) auto;
        gap: 1rem;
    }
}

/* Дата и время всегда в одну строку (один текстовый блок — одинаково во всех браузерах) */
.match-row__datetime {
    font-size: 0.9rem;
}

.match-row__datetime-one {
    white-space: nowrap;
    font-weight: 600;
    color: var(--abl-gray-text);
}

.match-row__datetime-one .match-row__time {
    font-weight: normal;
}

.match-row__time {
    color: var(--abl-gray-muted);
    font-size: 0.85rem;
}

/* Широкий экран: 3 одинаковые ячейки (команда А | счёт | команда Б), всё по центру */
@media (min-width: 720px) {
    .match-row__teams {
        display: table;
        table-layout: fixed;
        width: 360px;
        margin-left: auto;
        margin-right: auto;
    }
    .match-row__team,
    .match-row__score,
    .match-row__vs {
        display: table-cell;
        vertical-align: middle;
        width: 33.33%;
        text-align: center;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    .match-row__team {
        overflow: hidden;
    }
    .match-row__team_away {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    .match-row__score,
    .match-row__vs {
        white-space: nowrap;
    }
    .match-row__team-name {
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0.25rem auto 0;
        text-align: center;
    }
    .match-row__logo {
        display: block;
        width: fit-content;
        max-width: 100%;
        margin: 0 auto;
    }
}

/* Мобильная: счёт первым блоком, под логотипом — название по центру */
@media (max-width: 719px) {
    .match-row__teams {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.75rem;
        justify-content: space-between;
    }
    .match-row__score,
    .match-row__vs {
        flex-shrink: 0;
        font-size: 1.1rem;
    }
    .match-row__team {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1 1 0;
        min-width: 0;
    }
    .match-row__team-name {
        display: block;
        text-align: center;
        margin-top: 0.25rem;
        max-width: 100%;
        font-size: 0.85rem;
    }
}

.match-row__team-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.match-row__team-name:hover {
    text-decoration: underline;
}

.match-row__team_favorite {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--abl-orange);
    background: rgba(232, 93, 4, 0.08);
}

.match-row__logo {
    flex-shrink: 0;
}

.match-row__logo img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.match-row__logo-placeholder {
    opacity: 0.85;
}

.match-row__vs {
    font-weight: 700;
    color: var(--abl-gray-muted);
    font-size: 0.9rem;
    margin: 0 0.25rem;
}

.match-row__score {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--abl-gray-text);
}

.match-row__score-main {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    white-space: nowrap;
}

.match-row__score-sep {
    color: var(--abl-gray-muted);
    font-weight: 600;
}

.match-row__action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.match-row__venue {
    color: var(--abl-gray-text);
    font-size: 0.9rem;
}

@media (max-width: 719px) {
    .match-row__action_venue {
        justify-content: center;
        width: 100%;
    }

    .match-row__venue {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        text-align: center;
    }
}

@media (min-width: 720px) {
    .match-row__venue {
        max-width: 18rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.match-row__action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    color: var(--abl-gray-text);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.match-row__action-icon:hover {
    border-color: var(--abl-orange);
    background: #fff5ef;
    box-shadow: 0 0 0 1px rgba(232, 93, 4, 0.18);
}

.match-row__action-icon_disabled {
    opacity: 0.5;
    cursor: default;
}

.match-row__action-icon_disabled .match-row__action-icon-image {
    filter: grayscale(1);
}

.match-row__action-icon_empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
    pointer-events: none;
}

.match-row__action-icon_empty:hover {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.match-row__action-icon-image {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
    object-fit: contain;
}

.match-row__video-link {
    text-decoration: none;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn_primary {
    background: var(--abl-orange);
    color: var(--abl-white);
}

.btn_primary:hover {
    background: var(--abl-orange-light);
    color: var(--abl-white);
}

.btn_secondary {
    background: var(--abl-gray-bg);
    color: var(--abl-gray-text);
}

.btn_secondary:hover {
    background: #e8e8e8;
    color: var(--abl-red);
}

.match-row__chronology-link_missing {
    color: #b8b8b8;
    cursor: default;
    pointer-events: none;
}

.match-row__chronology-link_missing:hover {
    color: #b8b8b8;
    background: var(--abl-gray-bg);
}

/* ----- Страница матча (Статистика матча) ----- */
.game-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.game-header__teams {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.5rem;
}

.game-header__team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
}

.game-header__team-label {
    font-size: 0.8rem;
    color: var(--abl-gray-muted);
    font-weight: 600;
}

.game-header__team-name {
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
}

.game-header__team-name_link {
    color: var(--abl-red);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.game-header__team-name_link:hover {
    color: var(--abl-red-dark);
    border-bottom-color: var(--abl-orange);
}

.game-header__logo img {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.game-header__logo-placeholder {
    opacity: 0.85;
}

/* Кликабельный логотип на странице матча — те же классы, что на странице команды (.team-header__logo_clickable) */
.game-header__team .team-header__logo_clickable:hover {
    opacity: 0.9;
}

.game-header__score {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--abl-gray-text);
}

.game-header__score-sep {
    color: var(--abl-gray-muted);
    font-weight: 700;
}

.game-header__meta {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.95rem;
    color: var(--abl-gray-muted);
}

.game-media {
    margin: 0 0 1.5rem;
}

.game-media__title {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

/* Фото статистики матча (превью + лайтбокс) */
.game-stats-image {
    margin-bottom: 2rem;
}

.game-stats-image__thumb {
    display: block;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: var(--abl-gray-bg);
    max-width: 200px;
}

.game-stats-image__thumb:hover {
    border-color: var(--abl-orange);
    opacity: 0.95;
}

.game-stats-image__thumb img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

.game-stats-image__lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: pointer;
}

.game-stats-image__lightbox[hidden] {
    display: none;
}

.game-stats-image__lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: default;
}

.game-stats-image__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 4px;
    cursor: pointer;
}

.game-stats-image__close:hover {
    background: rgba(255,255,255,0.3);
}

.game-quarters__title,
.game-player-stats__title {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

.game-quarters__table-wrap,
.game-player-stats__table-wrap {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.game-quarters__table {
    width: 100%;
    max-width: 400px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.game-quarters__table th,
.game-quarters__table td {
    padding: 0.5rem 0.75rem;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
}

.game-quarters__table th {
    font-weight: 600;
    color: var(--abl-gray-muted);
    background: var(--abl-gray-bg);
}

.game-quarters__team {
    text-align: left;
    font-weight: 600;
}

.game-quarters__total {
    font-weight: 700;
}

.game-player-stats__team-name {
    margin: 1rem 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.game-player-stats__table {
    margin-bottom: 1rem;
}

.game-player-stats__legend {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    color: var(--abl-gray-muted);
    max-width: 720px;
}

/* ----- Footer ----- */
.footer {
    margin-top: auto;
    padding: 1.5rem 0;
    background: var(--abl-gray-text);
    color: var(--abl-white);
}

.footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-bottom: 1rem;
}

.footer__link {
    color: var(--abl-white);
    text-decoration: none;
    opacity: 0.9;
}

.footer__link:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer__link_active {
    opacity: 1;
    font-weight: 600;
    text-decoration: underline;
}

.footer__copy {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.85;
}

.footer__feedback {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    opacity: 0.9;
}

.footer__feedback-link {
    color: var(--abl-white);
    text-decoration: none;
}

.footer__feedback-link:hover {
    text-decoration: underline;
    opacity: 1;
}

.footer__editor {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    opacity: 0.6;
}

.footer__editor-link {
    color: var(--abl-white);
    text-decoration: none;
}

.footer__editor-link:hover {
    text-decoration: underline;
    opacity: 0.9;
}

.footer__donate {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
}

.footer__donate-link {
    color: var(--abl-white);
    text-decoration: none;
}

.footer__donate-link:hover {
    text-decoration: underline;
    opacity: 0.9;
}

/* Кнопки Протокол / Лидеры матча под датой и местом (в одном стиле с team-toolbar / stat-toolbar) */
.game-header__tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 1rem;
}

.game-header__tab {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
    color: var(--abl-gray-text);
    text-decoration: none;
    border-radius: 4px;
    background: var(--abl-gray-bg);
    transition: background 0.2s, color 0.2s;
}

.game-header__tab:hover {
    background: #e8e8e8;
    color: var(--abl-red);
}

.game-header__tab_active {
    background: var(--abl-orange);
    color: var(--abl-white);
}

.game-header__tab_active:hover {
    color: var(--abl-white);
    background: var(--abl-orange-light);
}

/* Лидеры матча: вкладки категорий */
.game-leaders {
    margin-top: 1.5rem;
}

.game-leaders__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--abl-gray-border, #e0e0e0);
}

.game-leaders__tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: var(--abl-gray-text);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}

.game-leaders__tab:hover {
    color: var(--abl-orange);
}

.game-leaders__tab_active {
    color: var(--abl-orange);
    border-bottom-color: var(--abl-orange);
    font-weight: 600;
}

/* Строка сравнения двух игроков */
.game-leaders__content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-leaders__duel {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr) 72px;
    grid-template-rows: auto auto;
    gap: 0.4rem 0.75rem;
    align-items: center;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--abl-gray-border, #e0e0e0);
    border-radius: 10px;
    background: #fff;
}

.game-leaders__photo-slot {
    grid-row: 1 / span 2;
    width: 72px;
    height: 72px;
}

.game-leaders__photo-slot_home {
    grid-column: 1;
}

.game-leaders__photo-slot_away {
    grid-column: 4;
}

.game-leaders__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.game-leaders__meta_home {
    grid-column: 2;
    justify-content: flex-start;
}

.game-leaders__meta_away {
    grid-column: 3;
    justify-content: flex-end;
    text-align: right;
}

.game-leaders__num {
    font-weight: 600;
    color: var(--abl-gray-text);
    min-width: 1.5em;
}

.game-leaders__name {
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-leaders__name_empty {
    color: var(--abl-gray-text);
}

.game-leaders__photo {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.game-leaders__photo-btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
}

.game-leaders__photo-placeholder-img {
    object-fit: contain;
    opacity: 0.85;
}

.game-leaders__bar-wrap {
    grid-column: 2 / 4;
    grid-row: 2;
}

.game-leaders__bar {
    position: relative;
    display: flex;
    width: 100%;
    height: 1.3rem;
    border-radius: 999px;
    overflow: hidden;
    background: var(--abl-gray-bg, #f5f5f5);
}

.game-leaders__bar-seg {
    height: 100%;
    transition: width 0.3s ease;
}

.game-leaders__bar-seg_home {
    background: #243b97;
}

.game-leaders__bar-seg_away {
    background: #ff8a00;
}

.game-leaders__value-box {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2em;
    height: 1.1rem;
    padding: 0 0.35rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1;
    z-index: 1;
    flex-shrink: 0;
}

.game-leaders__value-box_home {
    left: 0.3rem;
    background: #243b97;
    color: #fff;
}

.game-leaders__value-box_away {
    right: 0.3rem;
    background: #ff8a00;
    color: #fff;
}

.game-leaders__empty {
    margin: 0;
    color: var(--abl-gray-text);
}

@media (max-width: 720px) {
    .game-leaders__duel {
        grid-template-columns: 50px minmax(0, 1fr) minmax(0, 1fr) 50px;
        gap: 0.3rem 0.35rem;
        padding: 0.45rem 0;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .game-leaders__photo-slot {
        width: 50px;
        height: 50px;
    }

    .game-leaders__meta {
        gap: 0.25rem;
    }

    .game-leaders__name {
        font-size: 0.86rem;
    }
}

@media (max-width: 560px) {
    .game-leaders__duel {
        grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1fr) 42px;
        gap: 0.3rem 0.25rem;
        padding: 0.35rem 0;
    }

    .game-leaders__photo-slot {
        width: 42px;
        height: 42px;
    }

    .game-leaders__num {
        min-width: 1.05em;
        font-size: 0.78rem;
    }

    .game-leaders__name {
        font-size: 0.74rem;
    }

    .game-leaders__value-box {
        min-width: 1.8em;
        font-size: 0.72rem;
    }
}

/* ===== Страница игрока ===== */
.player-page {
    max-width: 900px;
}

.player-page__header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.player-page__photo img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.player-page__photo-placeholder {
    position: relative;
    width: 150px;
    height: 150px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.player-page__photo-placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/*
 * Номер на шаблоне без фото (player-no-photo.png ≈ 682×1024, contain в 150×150).
 * Силуэт центрируется (~100px ширины, отступ ~25px слева): левая грудь ≈ 40–42% контейнера, не ~26%.
 */
.player-page__jersey-num {
    position: absolute;
    z-index: 1;
    left: calc(41% - 10px);
    top: calc(30% + 50px);
    transform: translate(-50%, -50%);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.03em;
    color: #d8dce2;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

.player-page__jersey-num_double {
    font-size: 0.88rem;
    left: calc(41.5% - 10px);
    letter-spacing: -0.08em;
}

.player-page__info {
    flex: 1;
}

.player-page__name-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.player-page__name-block {
    flex: 1;
    min-width: 0;
}

.player-page__name-row .player-page__name {
    margin: 0;
}

.player-page__name {
    font-size: 1.75rem;
    margin: 0 0 0.25rem 0;
    color: var(--abl-gray-text);
}

.player-page__team-line {
    margin: 0 0 0.75rem 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--abl-gray-muted);
    line-height: 1.35;
}

.player-page__details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.player-page__detail {
    color: var(--abl-gray-muted);
    font-size: 0.95rem;
}

.player-page__tournaments {
    margin-bottom: 1.5rem;
}

.player-page__stats-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.player-page__stats h2,
.player-page__games h2 {
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
    color: var(--abl-gray-text);
}

.player-page__stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.player-page__stat-card {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 1rem 0.75rem;
    text-align: center;
}

.player-page__stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--abl-gray-text);
}

.player-page__stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--abl-gray-muted);
    margin-top: 0.25rem;
}

.player-page__games {
    margin-top: 1.5rem;
}

@media (max-width: 600px) {
    .player-page__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .player-page__details {
        justify-content: center;
    }
    .player-page__stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Шахматка (Chess Table) ===== */
.standings-toolbar {
    margin-bottom: 1.5rem;
}

.chess-table-wrap {
    overflow: auto;
    max-width: 100%;
    max-height: 80vh;
    border: 1px solid #ddd;
    border-radius: 6px;
    position: relative;
}

.chess-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 100%;
    font-size: 0.85rem;
}

.chess-table th,
.chess-table td {
    border: 1px solid #ddd;
    padding: 0.4rem 0.5rem;
    text-align: center;
    white-space: nowrap;
}

.chess-table__corner {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 3;
    background: #f5f5f5;
}

.chess-table__col-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f5f5f5;
    font-weight: 600;
    font-size: 0.8rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    min-height: 100px;
    vertical-align: middle;
    text-align: center;
}

.chess-table__row-header {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #f5f5f5;
    font-weight: 600;
    text-align: left;
    font-size: 0.8rem;
}

.chess-table__cell {
    background: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
}

.chess-table__cell_diagonal {
    background: #e0e0e0;
    cursor: default;
}

.chess-table__cell_empty {
    color: #bbb;
}

.chess-table__cell_highlight {
    background: #fff3cd !important;
}

.chess-table__header_highlight {
    background: #ffc107 !important;
    color: #000;
}

.chess-table__score-link {
    text-decoration: none;
    font-weight: 500;
}

.chess-table__score-link:hover {
    text-decoration: underline;
}

.chess-table__score_win {
    color: #1565c0;
}

.chess-table__score_loss {
    color: #c41e3a;
}

.chess-table__score_sep {
    color: #333;
}

.chess-table__cell_tech {
    background: #ffe0e6 !important;
}

/* ===== Плей-офф: сетка на странице «Положение команд» ===== */
.playoff-bracket {
    position: relative;
    margin-top: 2rem;
    padding: 1rem 0.25rem 0;
    border-top: 1px solid #e0e0e0;
}
.playoff-bracket__rounds {
    display: flex;
    align-items: stretch;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
}
.playoff-bracket__round {
    flex: 0 0 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 0.75rem;
    min-height: 100%;
}
/* Колонка с ровно двумя матчами (1/2 финала, заключительные): заголовок сверху, пары по центру вертикали */
.playoff-bracket__round--center-pair {
    justify-content: flex-start;
    gap: 0.35rem;
}
.playoff-bracket__round-matches {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    min-height: 0;
}
/* 1/2 финала: два матча дальше друг от друга (~высота одной карточки), заключительные остаются плотнее */
.playoff-bracket__round-matches--semis {
    gap: min(5.75rem, 32vh);
}
.playoff-bracket__round-matches .playoff-bracket__match {
    margin: 0;
}
.playoff-bracket__match-stack {
    display: flex;
    flex-direction: column;
}
.playoff-bracket__round-title {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #777;
    text-align: center;
    margin-bottom: 0.15rem;
}
.playoff-bracket__match-stage {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    text-align: center;
    font-weight: 700;
    line-height: 1.2;
}
.playoff-bracket__match-stage--above {
    margin-bottom: 0.15rem;
}
.playoff-bracket__match-stage--below {
    margin-top: 0.15rem;
}
.playoff-bracket__match {
    border: 1px solid #d7dbe0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}
.playoff-bracket__match--finished { background: #f5fbf5; border-color: #b9d9b9; }
.playoff-bracket__match--final {
    border: 2px solid rgba(201, 162, 39, 0.55);
    box-shadow: 0 1px 6px rgba(184, 134, 11, 0.18);
}
.playoff-bracket__match--final.playoff-bracket__match--finished {
    border-color: rgba(175, 135, 45, 0.82);
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.26);
}
.playoff-bracket__match--linked:hover { box-shadow: 0 2px 6px rgba(29,109,29,0.18); }
.playoff-bracket__match--final.playoff-bracket__match--linked:hover {
    box-shadow: 0 2px 10px rgba(184, 134, 11, 0.32);
}
.playoff-bracket__match-link { display: block; color: inherit; text-decoration: none; }
.playoff-bracket__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.7rem;
}
.playoff-bracket__row + .playoff-bracket__row {
    border-top: 1px solid #ececec;
}
.playoff-bracket__row--winner { font-weight: 700; color: #1d6d1d; background: rgba(29,109,29,0.06); }
.playoff-bracket__row--loser {
    color: #777;
    background: #ffe0e6;
    font-weight: 500;
}
.playoff-bracket__row--loser .playoff-bracket__score {
    color: #777;
}
.playoff-bracket__team {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 auto;
}
.playoff-bracket__team-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Медали плей-офф — те же эмодзи и класс, что в таблице статистики игроков (.stat-table__place_medal) */
.playoff-bracket__team .stat-table__place_medal {
    flex-shrink: 0;
    display: inline-block;
}
.playoff-bracket__score {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    min-width: 1.8rem;
    text-align: right;
}

/* Визуальное выравнивание: во втором раунде и финале карточки растягиваются,
   чтобы было ощущение «дерева». */
.playoff-bracket__round[data-round="1"] { justify-content: space-between; }
.playoff-bracket__round[data-round="2"] .playoff-bracket__match,
.playoff-bracket__round[data-round="3"] .playoff-bracket__match {
    margin: auto 0;
}
/* Мобильные: раунды в ряд с горизонтальной прокруткой (сетка читается как на десктопе). */
@media (max-width: 640px) {
    .playoff-bracket {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .playoff-bracket__rounds {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0.75rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.25rem 0.5rem 0.6rem;
        margin: 0 -0.25rem;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }
    .playoff-bracket__round {
        flex: 0 0 auto;
        width: min(78vw, 220px);
        min-width: 168px;
        scroll-snap-align: start;
        gap: 0.55rem;
    }
    .playoff-bracket__round--center-pair {
        gap: 0.3rem;
    }
    .playoff-bracket__round-matches--semis {
        gap: min(4.75rem, 28vh);
    }
    .playoff-bracket__round-title {
        text-align: center;
        font-size: 0.78rem;
        color: #555;
        font-weight: 700;
        letter-spacing: 0.03em;
    }
    .playoff-bracket__round[data-round="2"] .playoff-bracket__match,
    .playoff-bracket__round[data-round="3"] .playoff-bracket__match {
        margin: auto 0;
    }
    .playoff-bracket__round-matches .playoff-bracket__match {
        margin: 0;
    }
}

/* ----- Витрина BasketOnline (тенант hub) ----- */
.is-hub {
    scroll-behavior: smooth;
}
.main_hub {
    padding: 0;
}

.header_hub .header-hub__nav {
    display: none;
    flex: 1 1 auto;
    min-width: 0;
}
.header_hub .header-hub__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    justify-content: flex-end;
}
.header_hub .header-hub__list a {
    color: var(--abl-white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}
.header_hub .header-hub__list a:hover {
    text-decoration: underline;
}
.header_hub .header-hub__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: auto;
}
.header_hub .header-hub__cta {
    white-space: nowrap;
}
@media (min-width: 768px) {
    .header_hub .header-hub__nav {
        display: block;
    }
    .header_hub .header__burger {
        display: none;
    }
    .header_hub .header__bottom {
        display: none;
    }
}
@media (max-width: 767px) {
    .header_hub .header-hub__cta {
        display: none;
    }
}

.hub-hero {
    background: var(--abl-red);
    color: var(--abl-white);
    padding: 2.5rem 0 2.75rem;
}
.hub-hero__inner {
    max-width: 720px;
}
.hub-hero__kicker {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--abl-yellow);
}
.hub-hero__title {
    margin: 0 0 1rem;
    font-size: 1.75rem;
    line-height: 1.25;
    font-weight: 700;
}
.hub-hero__lead {
    margin: 0 0 1.25rem;
    font-size: 1.05rem;
    line-height: 1.55;
}
.hub-hero__lead code,
.hub-card code,
.hub-steps code,
.hub-list code {
    font-size: 0.92em;
}
.hub-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
}
.hub-hero .btn_secondary {
    background: var(--abl-white);
    color: var(--abl-red);
}
.hub-hero .btn_secondary:hover {
    background: var(--abl-gray-bg);
    color: var(--abl-red-dark);
}
.hub-hero__points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
    font-size: 0.95rem;
}
.hub-hero__points strong {
    font-weight: 650;
}

.hub-section {
    padding: 2.5rem 0;
}
.hub-section_alt {
    background: var(--abl-gray-bg);
}
.hub-section__title {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--abl-gray-text);
}
.hub-section__lead {
    margin: 0 0 1.5rem;
    color: var(--abl-gray-muted);
    max-width: 46rem;
}
.hub-section__subtitle {
    margin: 2rem 0 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.hub-grid {
    display: grid;
    gap: 1.25rem;
}
@media (min-width: 768px) {
    .hub-grid {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }
}
.hub-card {
    background: var(--abl-white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.25rem 1.4rem;
}
.hub-section_alt .hub-card {
    border-color: #d8d8d8;
}
.hub-card__title {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
}
.hub-card__meta {
    margin: 0 0 0.85rem;
    font-size: 0.85rem;
    color: var(--abl-gray-muted);
    font-weight: 600;
}
.hub-card__subtitle {
    margin: 1.1rem 0 0.5rem;
    font-size: 0.95rem;
}
.hub-card p {
    margin: 0 0 0.75rem;
}
.hub-card__note {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: var(--abl-gray-muted);
}
.hub-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.hub-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    padding: 0.4rem 0;
    border-top: 1px solid #eee;
    font-size: 0.95rem;
}
.hub-list li span {
    font-weight: 600;
    min-width: 9rem;
}

.hub-flow {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    counter-reset: hub-flow;
}
@media (min-width: 768px) {
    .hub-flow {
        grid-template-columns: repeat(3, 1fr);
    }
}
.hub-flow__item {
    counter-increment: hub-flow;
    background: var(--abl-white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem 1.1rem 1rem 2.6rem;
    position: relative;
}
.hub-flow__item::before {
    content: counter(hub-flow);
    position: absolute;
    left: 0.85rem;
    top: 1rem;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: var(--abl-orange);
    color: var(--abl-white);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hub-flow__item strong,
.hub-flow__item span {
    display: block;
}
.hub-flow__item span {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: var(--abl-gray-muted);
}
.hub-flow-notes {
    display: grid;
    gap: 0.5rem 1.5rem;
    margin-bottom: 0.5rem;
}
@media (min-width: 768px) {
    .hub-flow-notes {
        grid-template-columns: 1fr 1fr;
    }
}
.hub-flow-notes p {
    margin: 0;
    font-size: 0.95rem;
}

.hub-steps {
    margin: 0;
    padding-left: 1.25rem;
}
.hub-steps li {
    margin: 0 0 0.75rem;
}

.hub-showcase {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.75rem;
}
@media (min-width: 768px) {
    .hub-showcase {
        grid-template-columns: 1fr 1fr;
    }
}
.hub-showcase__item {
    display: grid;
    gap: 0.2rem;
    padding: 1rem 1.15rem;
    background: var(--abl-white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}
.hub-showcase__item:hover {
    border-color: var(--abl-orange);
}
.hub-showcase__name {
    font-weight: 700;
}
.hub-showcase__host {
    font-family: ui-monospace, monospace;
    font-size: 0.9rem;
    color: var(--abl-red);
}
.hub-showcase__how {
    font-size: 0.85rem;
    color: var(--abl-gray-muted);
}

.hub-split {
    display: grid;
    gap: 1.25rem;
}
@media (min-width: 768px) {
    .hub-split {
        grid-template-columns: 1.2fr 1fr;
        align-items: start;
    }
}
.hub-note {
    background: var(--abl-white);
    border-left: 4px solid var(--abl-orange);
    padding: 1rem 1.15rem;
}
.hub-note__title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}
.hub-note p {
    margin: 0;
    font-size: 0.95rem;
}

.hub-cta {
    padding: 2rem 0 2.5rem;
    border-top: 1px solid #e0e0e0;
}
.hub-cta__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    justify-content: space-between;
}
.hub-cta__title {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
}
.hub-cta p {
    margin: 0;
    color: var(--abl-gray-muted);
}

.hub-form {
    padding: 0 0 2rem;
}
.hub-form__legend {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.hub-form__radio {
    display: block;
    margin: 0.35rem 0;
    font-weight: 400;
}
