/**
 * Оформление сайта лиги.
 * Палитра по умолчанию: красный, оранжево-жёлтый, белый (по логотипу АБЛ).
 * Своя палитра у лиги задаётся в 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;
}

/* Тёмный основной без явного значения — производный от --abl-red (см. «Оформление»).
   Перекрывается inline <style> лиги, когда задан color_primary_dark. */
@supports (color: color-mix(in srgb, red 70%, black)) {
    :root:not([style]) {
        --abl-red-dark: color-mix(in srgb, var(--abl-red) 72%, #000);
        --abl-orange-light: color-mix(in srgb, var(--abl-orange) 80%, #fff);
    }
}

*,
*::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;
    /* Палитра лиги: градиент из основного цвета (var задаётся в config или «Оформлении»).
       Цвета с прозрачностью — через color-mix, fallback — исходный цвет. */
    background: linear-gradient(135deg, var(--abl-red) 0%, var(--abl-red-dark, var(--abl-red)) 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): дизайн-система ----- */
/* Изоляция: токены и оверрайды глобальных .btn/.header/.auth-form только под .is-hub / .header_hub.
   Секции витрины — классы .hub-*. Сайты лиг эти селекторы не получают. */

.is-hub {
    --hub-navy: #0b2348;
    --hub-navy-mid: #123a6b;
    --hub-ink: #172033;
    --hub-muted: #5a6578;
    --hub-paper: #f6f1e8;
    --hub-surface: #fffdf8;
    --hub-line: #d8cfc0;
    --hub-orange: #FB670A;
    --hub-orange-deep: #d45500;
    --hub-white: #fff;
    --hub-court: rgba(255, 255, 255, 0.14);
    --hub-score: #08182f;
    background: var(--hub-paper);
    color: var(--hub-ink);
    overflow-x: clip;
}

.is-hub,
.is-hub button,
.is-hub input,
.is-hub textarea,
.is-hub select {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-reduced-motion: no-preference) {
    .is-hub {
        scroll-behavior: smooth;
    }
}

.is-hub img {
    max-width: 100%;
    height: auto;
}

.is-hub .main_hub {
    padding: 0;
}

.is-hub .main_hub > .container:not(.hub-apply):not(.hub-legal) {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
}

.is-hub code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
}

/* Кнопки: только витрина, глобальный .btn не меняем */
.is-hub .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1.2rem;
    border-radius: 2px;
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.2;
    border: 1px solid transparent;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

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

.is-hub .btn_primary:hover {
    background: var(--hub-orange-deep);
    color: var(--hub-white);
}

.is-hub .btn_secondary {
    background: transparent;
    color: var(--hub-navy);
    border-color: var(--hub-navy);
}

.is-hub .btn_secondary:hover {
    background: var(--hub-navy);
    color: var(--hub-white);
}

.is-hub .btn:focus-visible,
.header_hub a:focus-visible,
.header_hub button:focus-visible,
.hub-match-card:focus-visible,
.hub-screen:focus-visible,
.hub-showcase__item:focus-visible,
.hub-faq__question:focus-visible,
.hub-footer a:focus-visible,
.is-hub .hub-form__input:focus-visible {
    outline: 2px solid var(--hub-orange);
    outline-offset: 3px;
}

.is-hub .auth-form input[type="text"],
.is-hub .auth-form input[type="email"],
.is-hub .auth-form textarea {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

/* ----- Header ----- */
.header.header_hub,
.header_hub.hub-header {
    background: var(--hub-navy);
    border-bottom: 2px solid var(--hub-orange);
    box-shadow: none;
}

.header_hub .header__top,
.header_hub .hub-header__bar {
    background: var(--hub-navy);
    box-shadow: none;
    padding: 0;
}

.header_hub .hub-header__inner,
.header_hub .header__container {
    display: flex;
    align-items: center;
    gap: 0.75rem 1rem;
    min-height: 56px;
    min-width: 0;
}

.header_hub .hub-header__logo,
.header_hub .header__logo {
    flex-shrink: 0;
}

.header_hub .header__logo-img {
    height: 40px;
    width: auto;
    max-height: 40px;
    filter: none;
}

.header_hub .hub-wordmark {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.header_hub .hub-wordmark__online {
    color: var(--hub-orange);
}

.header_hub .hub-header__title,
.header_hub .header__title {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
}

.header_hub .header__site-name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-shadow: none;
}

.header_hub .header__site-short {
    font-size: 1.05rem;
    font-weight: 700;
    text-shadow: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header_hub .hub-header__nav,
.header_hub .header-hub__nav {
    display: none;
    flex: 1 1 auto;
    min-width: 0;
}

.header_hub .hub-header__list,
.header_hub .header-hub__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.15rem 1.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header_hub .hub-header__list a,
.header_hub .header-hub__list a {
    color: var(--hub-white);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.45rem 0;
    border-bottom: 2px solid transparent;
}

.header_hub .hub-header__list a:hover,
.header_hub .header-hub__list a:hover {
    text-decoration: none;
    border-bottom-color: var(--hub-orange);
}

.header_hub .hub-header__actions,
.header_hub .header-hub__actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    margin-left: auto;
}

.header_hub .hub-header__cta,
.header_hub .header-hub__cta {
    white-space: nowrap;
}

.header.header_hub .header__burger {
    position: relative;
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    border-radius: 2px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
}

.header_hub .header__burger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.55);
    color: var(--hub-white);
}

.header_hub .header__burger:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--hub-orange);
    box-shadow: none;
}

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

.header_hub .header__burger-bar {
    width: 1.15rem;
    height: 2px;
    background: #fff;
}

.header_hub .hub-header__drawer,
.header_hub .header__bottom {
    background: var(--hub-navy);
    border-bottom: 2px solid var(--hub-orange);
    box-shadow: 0 10px 20px rgba(8, 24, 47, 0.18);
}

.header_hub .header__nav {
    padding: 0.35rem 0 0.75rem;
}

.header_hub .nav__link {
    color: var(--hub-white);
    background: transparent;
    border-radius: 0;
}

.header_hub .nav__link:hover {
    color: var(--hub-white);
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 4px;
}

@media (min-width: 768px) {
    .header_hub .hub-header__nav,
    .header_hub .header-hub__nav {
        display: block;
    }

    .header_hub .header__burger {
        display: none;
    }

    .header.header_hub .header__bottom,
    .header_hub .hub-header__drawer {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1040px) {
    .header_hub .header__site-name,
    .header_hub .header__site-short {
        display: none;
    }

    .header_hub .hub-header__cta {
        font-size: 0.88rem;
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }
}

@media (max-width: 767px) {
    .header.header_hub .hub-header__inner {
        padding-right: 3.4rem;
    }

    .header.header_hub .header__burger {
        display: flex;
        position: absolute;
        top: 6px;
        right: 1rem;
        margin: 0;
        z-index: 3;
    }

    .header_hub .hub-header__cta,
    .header_hub .header-hub__cta {
        display: none;
    }

    .header_hub .header__logo-img {
        height: 32px;
        width: auto;
        max-height: 32px;
    }

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

    .header_hub .header__nav .nav__link {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0.7rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }
}

/* ----- Hero + court geometry ----- */
.hub-hero {
    position: relative;
    overflow: hidden;
    background: var(--hub-navy);
    color: var(--hub-white);
    padding: 2.75rem 0 3rem;
}

.hub-hero::before {
    content: "";
    position: absolute;
    right: 4%;
    top: 10%;
    width: min(42vw, 460px);
    height: 78%;
    border: 2px solid var(--hub-court);
    border-right-width: 0;
    pointer-events: none;
}

.hub-hero::after {
    content: "";
    position: absolute;
    right: -12%;
    top: 50%;
    width: min(70vw, 720px);
    height: min(70vw, 720px);
    border: 2px solid var(--hub-court);
    border-radius: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.hub-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 2rem;
    align-items: center;
    min-width: 0;
}

.hub-hero__inner::before {
    content: "";
    position: absolute;
    left: 6%;
    top: 18%;
    width: 132px;
    height: 132px;
    border: 2px solid var(--hub-court);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.hub-hero__inner::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 6%;
    width: 64px;
    height: 48%;
    border: 2px solid var(--hub-court);
    pointer-events: none;
    z-index: 0;
}

.hub-hero__content,
.hub-hero__visual {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.hub-hero__kicker {
    margin: 0 0 0.85rem;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #f0c9a8;
}

.hub-hero__kicker::before {
    content: "";
    display: inline-block;
    width: 1.15rem;
    height: 2px;
    margin-right: 0.55rem;
    vertical-align: middle;
    background: var(--hub-orange);
}

.hub-hero__title {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4.4vw, 3.35rem);
    line-height: 1.12;
    font-weight: 780;
    letter-spacing: -0.03em;
    max-width: 14ch;
}

.hub-hero__lead {
    margin: 0 0 1.4rem;
    font-size: 1.08rem;
    line-height: 1.55;
    max-width: 36rem;
    color: rgba(255, 255, 255, 0.86);
}

.hub-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
}

.hub-hero .btn_secondary {
    background: transparent;
    color: var(--hub-white);
    border-color: rgba(255, 255, 255, 0.45);
}

.hub-hero .btn_secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--hub-white);
    border-color: var(--hub-white);
}

@media (min-width: 900px) {
    .hub-hero {
        padding: 3.4rem 0 3.6rem;
    }

    .hub-hero__inner {
        grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
        gap: 2.5rem 3rem;
        align-items: center;
    }
}

@media (max-width: 767px) {
    .hub-hero {
        padding: 1.85rem 0 2.1rem;
    }

    .hub-hero__inner::before,
    .hub-hero__inner::after {
        display: none;
    }

    .hub-hero__title {
        max-width: none;
        font-size: 1.85rem;
    }

    .hub-hero__actions .btn {
        width: 100%;
    }
}

/* ----- Live scoreboard / product proof ----- */
.hub-match-card {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    background: var(--hub-score);
    color: var(--hub-white);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-top: 3px solid var(--hub-orange);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hub-match-card:hover {
    border-color: rgba(255, 255, 255, 0.34);
    border-top-color: var(--hub-orange);
}

.hub-match-card__league {
    margin: 0;
    padding: 0.7rem 1rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f0c9a8;
}

.hub-match-card__scoreboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.4rem 0.65rem;
    padding: 0.15rem 1rem 0.35rem;
}

.hub-match-card__team {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.hub-match-card__team_away {
    justify-content: flex-end;
}

.hub-match-card__name {
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.2;
    min-width: 0;
    overflow-wrap: anywhere;
}

.hub-match-card__points {
    font-size: clamp(2.1rem, 5vw, 3.15rem);
    font-weight: 780;
    line-height: 0.95;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.hub-match-card__divider {
    font-size: 1.6rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    font-variant-numeric: tabular-nums;
}

.hub-match-card__meta {
    margin: 0;
    padding: 0 1rem 0.65rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.68);
}

.hub-match-card__quarters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.hub-match-card__quarters li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.5rem 0.2rem 0.55rem;
    font-size: 0.92rem;
    font-weight: 650;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.hub-match-card__quarters li:first-child {
    border-left: 0;
}

.hub-match-card__quarters li span {
    font-size: 0.66rem;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.hub-match-card__shot {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1440 / 900;
    object-fit: cover;
    object-position: top center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hub-match-card__caption {
    display: block;
    padding: 0.7rem 1rem 0.8rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 560px) {
    .hub-match-card__scoreboard {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        grid-template-areas:
            "home-name . away-name"
            "home-pts divider away-pts";
        justify-items: center;
        text-align: center;
        gap: 0.25rem 0.5rem;
    }

    .hub-match-card__team,
    .hub-match-card__team_away {
        display: contents;
    }

    .hub-match-card__team .hub-match-card__name {
        grid-area: home-name;
    }

    .hub-match-card__team .hub-match-card__points {
        grid-area: home-pts;
    }

    .hub-match-card__divider {
        grid-area: divider;
    }

    .hub-match-card__team_away .hub-match-card__points {
        grid-area: away-pts;
    }

    .hub-match-card__team_away .hub-match-card__name {
        grid-area: away-name;
    }

    .hub-match-card__name {
        overflow-wrap: normal;
        max-width: 100%;
    }

    .hub-match-card__points {
        font-size: 2.35rem;
    }
}

/* ----- Proof strip: metrics, not cards ----- */
.hub-proof {
    background: var(--hub-surface);
    border-bottom: 1px solid var(--hub-line);
    padding: 1.15rem 0;
}

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

.hub-proof__value {
    display: block;
    font-size: 1.12rem;
    font-weight: 750;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    color: var(--hub-navy);
}

.hub-proof__label {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.86rem;
    color: var(--hub-muted);
}

@media (min-width: 768px) {
    .hub-proof__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hub-proof__item + .hub-proof__item {
        border-left: 1px solid var(--hub-line);
        padding-left: 1.5rem;
    }
}

/* ----- Shared section chrome ----- */
.hub-section {
    padding: 2.75rem 0;
}

.hub-section[id],
.hub-cta {
    scroll-margin-top: 4.75rem;
}

.hub-section_alt {
    background: var(--hub-surface);
}

.hub-section__title {
    margin: 0 0 0.65rem;
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--hub-ink);
}

.hub-section__lead {
    margin: 0 0 1.6rem;
    color: var(--hub-muted);
    max-width: 40rem;
    font-size: 1.02rem;
}

.hub-section__subtitle {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.hub-section__footnote {
    margin: 1.15rem 0 0;
    color: var(--hub-muted);
    font-size: 0.9rem;
}

.hub-section a {
    color: var(--hub-navy-mid);
}

.hub-section a:hover {
    color: var(--hub-orange-deep);
}

/* ----- How: process track ----- */
.hub-how .hub-section__title {
    max-width: 20ch;
}

.hub-flow {
    display: grid;
    gap: 1.5rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
    counter-reset: hub-flow;
}

.hub-flow__item {
    counter-increment: hub-flow;
    position: relative;
    padding: 0;
    background: none;
    border: none;
}

.hub-flow__item::before {
    content: counter(hub-flow, decimal-leading-zero);
    display: block;
    margin-bottom: 0.65rem;
    font-size: 1.7rem;
    font-weight: 780;
    line-height: 1;
    letter-spacing: 0.04em;
    color: var(--hub-orange);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.hub-flow__item strong,
.hub-flow__item span {
    display: block;
}

.hub-flow__item strong {
    font-size: 1.12rem;
}

.hub-flow__item span {
    margin-top: 0.3rem;
    font-size: 0.95rem;
    color: var(--hub-muted);
}

.hub-flow-notes {
    display: grid;
    gap: 0.75rem 1.5rem;
}

.hub-flow-notes p {
    margin: 0;
    padding: 0.15rem 0 0.15rem 0.9rem;
    font-size: 0.95rem;
    border-left: 3px solid var(--hub-line);
}

.hub-flow-notes p:first-child {
    border-left-color: var(--hub-orange);
}

.hub-flow-notes p:last-child {
    border-left-color: var(--hub-navy);
}

@media (min-width: 768px) {
    .hub-flow {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0 2rem;
    }

    .hub-flow__item:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 0.85rem;
        left: 3.4rem;
        right: -1.4rem;
        height: 1px;
        background: var(--hub-line);
    }

    .hub-flow-notes {
        grid-template-columns: 1fr 1fr;
    }
}

/* ----- Features: split board, not twin cards ----- */
.hub-features.hub-section_alt {
    background: var(--hub-paper);
}

.hub-grid,
.hub-features__grid {
    display: grid;
    gap: 0;
    min-width: 0;
    border: 1px solid var(--hub-line);
    background: var(--hub-surface);
}

.hub-features__card,
.hub-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 1.5rem 1.35rem 1.6rem;
}

.hub-features__card + .hub-features__card,
.hub-grid .hub-card + .hub-card {
    border-top: 1px solid var(--hub-line);
}

.hub-card__title {
    margin: 0 0 0.3rem;
    font-size: 1.25rem;
    font-weight: 750;
}

.hub-card__meta {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--hub-muted);
}

.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(--hub-muted);
}

.hub-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hub-list li {
    display: grid;
    grid-template-columns: minmax(7rem, 9.5rem) minmax(0, 1fr);
    gap: 0.35rem 0.9rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--hub-line);
    font-size: 0.95rem;
}

.hub-list li span {
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hub-navy);
    padding-top: 0.15rem;
}

.hub-features__card:first-child {
    background: var(--hub-navy);
    color: var(--hub-white);
}

.hub-features__card:first-child .hub-card__title,
.hub-features__card:first-child .hub-list li span {
    color: var(--hub-white);
}

.hub-features__card:first-child .hub-card__meta,
.hub-features__card:first-child .hub-list li {
    color: rgba(255, 255, 255, 0.84);
}

.hub-features__card:first-child .hub-list li {
    border-top-color: rgba(255, 255, 255, 0.12);
}

.hub-features__card:first-child code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.05em 0.3em;
}

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

    .hub-features__card + .hub-features__card,
    .hub-grid .hub-card + .hub-card {
        border-top: none;
        border-left: 1px solid var(--hub-line);
    }
}

@media (max-width: 479px) {
    .hub-list li {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

/* ----- Examples: mosaic + compact league rows ----- */
.hub-screens {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.hub-screen {
    display: block;
    min-width: 0;
    overflow: hidden;
    background: var(--hub-surface);
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--hub-line);
}

.hub-screen::before {
    content: "";
    display: block;
    height: 10px;
    background: var(--hub-navy);
    border-bottom: 2px solid var(--hub-orange);
}

.hub-screen:hover {
    border-color: var(--hub-navy);
}

.hub-screen img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1440 / 920;
    object-fit: cover;
    object-position: top center;
    border-bottom: 1px solid var(--hub-line);
}

.hub-screen span {
    display: block;
    padding: 0.8rem 0.95rem 0.95rem;
    color: var(--hub-muted);
    font-size: 0.9rem;
}

.hub-screen strong {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--hub-ink);
    font-size: 1rem;
}

.hub-examples__live {
    margin-top: 2.1rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--hub-line);
}

.hub-showcase {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--hub-line);
}

.hub-showcase li {
    margin: 0;
}

.hub-showcase__item {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
    gap: 0.35rem 1rem;
    align-items: baseline;
    padding: 0.85rem 0.15rem;
    background: none;
    border: none;
    border-bottom: 1px solid var(--hub-line);
    border-radius: 0;
    text-decoration: none;
    color: inherit;
}

.hub-showcase__item:hover {
    background: rgba(11, 35, 72, 0.03);
}

.hub-showcase__name {
    font-weight: 700;
}

.hub-showcase__host {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem;
    color: var(--hub-navy-mid);
}

.hub-showcase__how {
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hub-muted);
}

@media (min-width: 900px) {
    .hub-screens {
        grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 1rem;
    }

    .hub-screen:first-child {
        grid-row: 1 / span 2;
        display: flex;
        flex-direction: column;
    }

    .hub-screen:first-child img {
        flex: 1 1 auto;
        height: auto;
        min-height: 12rem;
        aspect-ratio: 1440 / 1100;
        object-fit: cover;
    }
}

@media (max-width: 639px) {
    .hub-showcase__item {
        grid-template-columns: 1fr;
        gap: 0.15rem;
        padding: 0.8rem 0;
    }
}

/* ----- Offer: checklist band ----- */
.hub-offer.hub-section_alt {
    background: var(--hub-navy);
    color: var(--hub-white);
}

.hub-offer .hub-section__title {
    color: var(--hub-white);
}

.hub-offer .hub-section__lead,
.hub-offer .hub-section__footnote {
    color: rgba(255, 255, 255, 0.74);
}

.hub-offer a {
    color: var(--hub-white);
}

.hub-offer__list {
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 44rem;
}

.hub-offer__list li {
    position: relative;
    padding: 0.85rem 0 0.85rem 1.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 1.02rem;
}

.hub-offer__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.2rem;
    width: 0.7rem;
    height: 0.7rem;
    background: var(--hub-orange);
}

/* ----- FAQ: editorial accordion ----- */
.hub-faq .hub-section__title {
    max-width: 16ch;
}

.hub-faq__list {
    max-width: 40rem;
    border-top: 1px solid var(--hub-line);
}

.hub-faq__item {
    border-bottom: 1px solid var(--hub-line);
}

.hub-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 52px;
    padding: 0.85rem 0;
    cursor: pointer;
    font-weight: 650;
    list-style: none;
}

.hub-faq__question::-webkit-details-marker {
    display: none;
}

.hub-faq__question::after {
    content: "+";
    flex-shrink: 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--hub-orange);
    line-height: 1;
}

.hub-faq__item[open] .hub-faq__question::after {
    content: "–";
}

.hub-faq__answer {
    margin: 0 0 1rem;
    color: var(--hub-muted);
}

/* ----- Closing CTA ----- */
.hub-cta {
    background: var(--hub-ink);
    color: var(--hub-white);
    padding: 2.6rem 0;
    border-top: none;
}

.hub-cta__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.15rem 1.75rem;
}

.hub-cta__title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    font-weight: 750;
    letter-spacing: -0.02em;
}

.hub-cta p {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    max-width: 34rem;
}

.hub-cta .btn_primary {
    flex-shrink: 0;
}

@media (max-width: 639px) {
    .hub-cta .btn {
        width: 100%;
    }
}

/* ----- Apply form ----- */
.hub-apply {
    padding: 2.4rem 0 3.2rem;
    min-width: 0;
}

.hub-apply__layout {
    display: grid;
    gap: 2rem;
    min-width: 0;
}

.hub-apply__kicker {
    margin: 0 0 0.7rem;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hub-orange-deep);
}

.hub-apply__title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    line-height: 1.15;
    font-weight: 780;
    letter-spacing: -0.03em;
}

.hub-apply__lead {
    margin: 0 0 1.4rem;
    color: var(--hub-muted);
    font-size: 1.05rem;
}

.hub-apply__steps {
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    counter-reset: hub-apply;
}

.hub-apply__steps li {
    counter-increment: hub-apply;
    position: relative;
    padding: 0 0 1.1rem 2.6rem;
    border-left: 1px solid var(--hub-line);
    margin-left: 0.7rem;
}

.hub-apply__steps li:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
}

.hub-apply__steps li::before {
    content: counter(hub-apply, decimal-leading-zero);
    position: absolute;
    left: -0.75rem;
    top: 0;
    width: 1.5rem;
    font-size: 0.85rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    color: var(--hub-orange);
    background: var(--hub-paper);
    font-variant-numeric: tabular-nums;
}

.hub-apply__steps strong {
    display: block;
    margin-bottom: 0.15rem;
}

.hub-apply__note {
    margin: 0;
    font-size: 0.9rem;
    color: var(--hub-muted);
}

.hub-apply__note a,
.hub-apply a {
    color: var(--hub-navy-mid);
}

.hub-apply__card {
    min-width: 0;
    background: var(--hub-surface);
    border: 1px solid var(--hub-line);
    padding: 1.4rem 1.2rem 1.5rem;
    box-shadow: 0 1px 2px rgba(23, 32, 51, 0.05);
}

.hub-apply__card-title {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
    font-weight: 750;
}

.hub-apply__card-lead {
    margin: 0 0 1.15rem;
    color: var(--hub-muted);
    font-size: 0.95rem;
}

.hub-apply__success-title {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
}

.hub-apply__success-text {
    margin: 0 0 1.15rem;
    color: var(--hub-muted);
}

.hub-apply__success-actions {
    margin: 0;
}

.hub-form {
    max-width: none;
    padding: 0;
}

.hub-form__field,
.hub-form .form-row {
    margin-bottom: 1rem;
}

.hub-form__field_hp,
.hub-form .form-row_hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.hub-form__label,
.hub-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
    font-weight: 650;
}

.hub-form__row {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.hub-form__input,
.hub-form input[type="text"],
.hub-form input[type="email"],
.hub-form textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0.65rem 0.75rem;
    border: 1px solid #c9c0b2;
    border-radius: 2px;
    background: var(--hub-white);
    color: var(--hub-ink);
    font: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.hub-form__textarea,
.hub-form textarea {
    min-height: 6.5rem;
    resize: vertical;
}

.hub-form__input:hover,
.hub-form input[type="text"]:hover,
.hub-form textarea:hover {
    border-color: #9d9282;
}

.hub-form__legend {
    display: block;
    font-weight: 650;
    margin-bottom: 0.4rem;
}

.hub-form__radio {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    margin: 0;
    font-weight: 400;
}

.hub-form input[type="checkbox"],
.hub-form input[type="radio"] {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0.15rem 0 0;
    accent-color: var(--hub-orange);
    flex-shrink: 0;
}

.hub-form__consent {
    margin-bottom: 1rem;
}

.hub-form__consent label {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    min-height: 44px;
    font-weight: 400;
    line-height: 1.45;
}

.hub-form__captcha-hint {
    margin: 0.4rem 0 0;
    color: #a83a00;
    font-size: 0.9rem;
}

.hub-form__actions .btn,
.hub-form .btn {
    min-width: 12rem;
}

.hub-form__message,
.is-hub .hub-form__message {
    padding: 0.8rem 0.9rem;
    margin-bottom: 1rem;
    border-radius: 2px;
}

.is-hub .hub-form__message_error,
.is-hub .form-message.hub-form__message_error {
    background: #f8e8e6;
    color: #7a1f18;
    border: 1px solid #e2b4ae;
    border-left: 3px solid #b42318;
}

.is-hub .hub-form__message_success,
.is-hub .form-message.hub-form__message_success {
    background: #e7f2ea;
    color: #1d4d2c;
    border: 1px solid #b7d4bf;
    border-left: 3px solid #2f6f45;
}

@media (min-width: 900px) {
    .hub-apply__layout {
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
        align-items: start;
        gap: 2.75rem;
    }

    .hub-apply__card {
        padding: 1.7rem 1.55rem 1.8rem;
    }

    .hub-form__row_split {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .hub-form__actions .btn,
    .hub-form .btn {
        width: 100%;
        min-width: 0;
    }
}

/* ----- Legal ----- */
.hub-legal {
    max-width: 44rem;
    padding: 2.2rem 0 3rem;
}

.hub-legal__updated {
    margin: -0.35rem 0 1.5rem;
    color: var(--hub-muted);
    font-size: 0.9rem;
}

.hub-legal h1,
.hub-legal h2 {
    letter-spacing: -0.02em;
}

.hub-legal h2 {
    margin: 1.75rem 0 0.6rem;
    font-size: 1.2rem;
}

.hub-legal p,
.hub-legal li {
    line-height: 1.6;
}

.hub-legal a {
    color: var(--hub-navy-mid);
}

/* ----- Footer ----- */
.footer.hub-footer {
    margin-top: 0;
    padding: 2.4rem 0 1.7rem;
    background: var(--hub-navy);
    color: rgba(255, 255, 255, 0.86);
}

.hub-footer__inner {
    display: grid;
    gap: 1.35rem 2rem;
    min-width: 0;
}

.hub-footer__logo {
    display: inline-block;
    margin: 0 0 0.55rem;
}

.hub-footer__logo img {
    display: block;
    height: 88px;
    width: auto;
    max-width: min(100%, 220px);
}

.hub-footer__name {
    margin: 0 0 0.4rem;
    font-size: 1.15rem;
    font-weight: 750;
    color: var(--hub-white);
}

.hub-footer__tagline {
    margin: 0;
    max-width: 22rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.7);
}

.hub-footer__nav,
.hub-footer__legal-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
}

.hub-footer__link,
.footer.hub-footer .footer__link {
    color: var(--hub-white);
    text-decoration: none;
    opacity: 0.88;
    min-height: 32px;
}

.hub-footer__link:hover,
.footer.hub-footer .footer__link:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hub-footer__copy,
.hub-footer__operator,
.hub-footer__contact {
    margin: 0;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.62);
}

.hub-footer__mail,
.footer.hub-footer .footer__feedback-link {
    color: var(--hub-white);
}

@media (min-width: 768px) {
    .hub-footer__inner {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.15fr);
        column-gap: 2.25rem;
        row-gap: 0.85rem;
    }

    .hub-footer__brand {
        grid-column: 1;
        grid-row: 1 / span 3;
    }

    .hub-footer__nav {
        grid-column: 2;
        grid-row: 1;
    }

    .hub-footer__legal-nav {
        grid-column: 3;
        grid-row: 1;
    }

    .hub-footer__copy,
    .hub-footer__operator {
        grid-column: 2;
    }

    .hub-footer__contact {
        grid-column: 3;
        grid-row: 2;
    }
}

/* ----- Leftover utility blocks used by older hub pages ----- */
.hub-steps {
    margin: 0;
    padding-left: 1.25rem;
}

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

.hub-case,
.hub-note {
    margin-top: 1rem;
    padding: 1rem 1.15rem;
    border-left: 3px solid var(--hub-orange);
    background: var(--hub-surface);
}

.hub-split {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .hub-split {
        grid-template-columns: 1.2fr 1fr;
        align-items: start;
    }
}

/* ----- Motion ----- */
@media (prefers-reduced-motion: no-preference) {
    .hub-match-card,
    .hub-screen,
    .hub-showcase__item,
    .hub-faq__question {
        transition: border-color 0.16s ease, background-color 0.16s ease;
    }
}

@media (prefers-reduced-motion: reduce) {
    .is-hub {
        scroll-behavior: auto;
    }

    .is-hub .btn,
    .header_hub a,
    .header_hub button,
    .hub-match-card,
    .hub-screen,
    .hub-showcase__item,
    .hub-faq__question,
    .hub-form__input,
    .hub-form input,
    .hub-form textarea {
        transition: none;
    }
}
