.home-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: -10px;
    padding-bottom: 36px;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.home-card {
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
}

.home-card-leaders {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.home-card-tournaments {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.home-card-pad {
    padding: 16px;
}

.leaders-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.leaders-card-title {
    color: var(--bg-nav);
    font-family: var(--font-headings);
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
}

.leader-feature-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.leader-feature {
    display: grid;
    grid-template-columns: 82px minmax(110px, 1fr) 96px minmax(96px, .72fr);
    min-height: 108px;
    gap: 0;
    align-items: center;
    padding: 0;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--border-color);
    background: #fff;
    transition: border-color .15s ease;
}

.leader-feature:hover {
    border-color: var(--accent-red);
}

.leader-photo {
    width: 70px;
    height: 92px;
    margin-left: 12px;
    border-radius: 0;
    object-fit: cover;
    background: #f3f5f8;
    align-self: center;
}

.leader-info-panel {
    min-width: 0;
    padding: 14px 9px;
}

.leader-role {
    color: var(--bg-nav);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.leader-name {
    margin-top: 7px;
    color: var(--text-color);
    font-family: var(--font-headings);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.08;
}

.leader-meta {
    margin-top: 3px;
    color: var(--text-muted);
    font-family: var(--font-headings);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.1;
}

.leader-team-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 14px 0;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    background: #f3f8fd;
}

.leader-team-logo {
    width: 78px;
    height: 78px;
    object-fit: contain;
}

.leader-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    padding: 12px 12px 12px 8px;
    color: #0068ad;
    font-family: var(--font-headings);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.05;
    text-align: center;
}

.leader-value span {
    display: block;
    width: 100%;
    margin-bottom: 6px;
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.leader-value-main {
    width: 100%;
    white-space: nowrap;
    text-align: center;
}

.home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: auto;
    border-radius: 0;
    background: var(--accent-red);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
}

.home-btn:hover {
    background: var(--accent-red-hover);
    color: #fff;
}

.tournament-board {
    display: grid;
    gap: 18px;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 6px;
    margin-bottom: 12px;
    max-height: 520px;
}

.tournament-board::-webkit-scrollbar {
    width: 6px;
}

.tournament-board::-webkit-scrollbar-track {
    background: transparent;
}

.tournament-board::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

.tournament-board::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-muted);
}

.tournament-board-card {
    border-top: 1px solid var(--border-color);
    padding-top: 18px;
}

.tournament-board-card:first-child {
    border-top: 0;
    padding-top: 0;
}

.tournament-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.tournament-board-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--text-color);
    font-family: var(--font-headings);
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
}

.tournament-board-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex: 0 0 auto;
}

.tournament-count {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.home-table {
    margin-bottom: 0;
    font-size: 13px;
    table-layout: fixed;
    width: 100%;
}

.home-table th {
    background-color: var(--bg-nav);
    color: var(--text-white);
    padding: 10px 8px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
}

.home-table th:nth-child(2) {
    text-align: left;
}

.home-table td {
    padding: 9px 8px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.home-table .team-cell {
    text-align: left;
    font-weight: 800;
    text-transform: uppercase;
}

/* table-layout:fixed (см. .home-table выше) гарантирует, что таблица не
   вылезет за 9px-отступ карточки — но тогда длинное название команды нужно
   обрезать многоточием, а не позволять ему растягивать/переполнять ячейку. */
.home-table .td-team {
    overflow: hidden;
}

.home-table .team-link-wrapper {
    max-width: 100%;
    min-width: 0;
}

.home-table-team-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.home-table a {
    color: var(--text-color);
    text-decoration: none;
}

.home-table a:hover {
    color: var(--accent-red);
}

.home-empty {
    padding: 28px 16px;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

.roster-moves-list {
    display: flex;
    flex-direction: column;
}

.roster-move-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.roster-move-row:last-child {
    border-bottom: 0;
}

.roster-move-badge {
    flex-shrink: 0;
    width: 90px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.1;
    padding: 5px 2px;
    box-sizing: border-box;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: #fff;
}

.roster-move-signed {
    background: #15803d;
}

.roster-move-transfer {
    background: #1d4ed8;
}

.roster-move-loan {
    background: #0369a1;
}

.roster-move-terminated {
    background: #b91c1c;
}

.roster-move-player {
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.roster-move-player:hover {
    color: var(--accent-red);
}

.roster-move-text {
    color: var(--text-muted);
}

.roster-move-disq-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    order: 0;
}

.roster-move-disq-player {
    display: inline-flex;
    line-height: 1.25;
    order: 1;
}

.roster-move-disq-person-team {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    width: 100%;
    order: 1;
}

.roster-move-disq-row .roster-move-disq-player {
    order: 1;
}

.roster-move-disq-team {
    order: 2;
    white-space: nowrap;
}

.roster-move-disq-row .roster-move-disq-team {
    order: 2;
}

.roster-move-description {
    width: 100%;
    font-size: 11px;
    line-height: 1.4;
    order: 2;
    text-align: justify;
    text-align-last: left;
}

.roster-move-team-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 3px;
    margin-top: -3px;
    flex-shrink: 0;
}

.roster-moves-show-all {
    padding: 6px 14px;
    font-size: 12px;
    min-height: unset;
    flex-shrink: 0;
}

.roster-move-team {
    color: var(--bg-nav);
    font-weight: 600;
    text-decoration: none;
}

.roster-move-team:hover {
    color: var(--accent-red);
}

.roster-move-date {
    margin-left: auto;
    flex-shrink: 0;
    color: #000;
    font-size: 11px;
    white-space: nowrap;
}

.roster-move-one-match {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
    border-radius: 0;
    padding: 1px 6px;
    white-space: nowrap;
}

.roster-move-batch {
    display: block;
    padding: 0;
}

.roster-move-batch-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 4px;
    cursor: pointer;
    list-style: none;
}

.roster-move-batch-summary::-webkit-details-marker {
    display: none;
}

.roster-move-batch-arrow {
    display: inline-block;
    margin-left: 4px;
    color: var(--text-muted);
    font-size: 11px;
    transition: transform .15s ease;
}

.roster-move-batch[open] .roster-move-batch-arrow {
    transform: rotate(90deg);
}

.roster-move-batch-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 4px 12px 24px;
}

.roster-move-batch-item {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.roster-move-batch-num {
    color: var(--text-muted);
    font-size: 12px;
    min-width: 16px;
}

.roster-move-batch-player {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
}

.roster-move-batch-player:hover {
    color: var(--accent-red);
}

.roster-move-batch-meta {
    font-size: 11px;
    color: var(--text-muted);
}

@media (max-width: 920px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .home-card {
        margin-left: -9px;
        margin-right: -9px;
        max-width: calc(100% + 18px);
    }

    .home-card-pad {
        padding-left: 9px;
        padding-right: 9px;
    }
}

@media (max-width: 640px) {
    .leaders-card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .leaders-card-head #home-division-form {
        align-self: stretch;
        width: 100%;
    }

    .leaders-card-head #home-division-form #home-division-select {
        flex: 1;
        width: 100%;
    }

    .roster-moves-head {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .roster-moves-show-all {
        padding: 5px 10px;
        font-size: 10px;
    }

    .news-card-head {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .roster-move-row {
        row-gap: 2px;
    }

    .roster-move-row::after {
        content: '';
        flex-basis: 100%;
        order: 2;
    }

    .roster-move-disq-row::after {
        content: none;
    }

    .roster-move-badge {
        order: 0;
    }

    .roster-move-date {
        order: 1;
    }

    .roster-move-player,
    .roster-move-text {
        order: 3;
    }

    .roster-move-batch-summary::after {
        content: '';
        flex-basis: 100%;
        order: 2;
    }

    .roster-move-batch-summary .roster-move-badge {
        order: 0;
    }

    .roster-move-batch-summary .roster-move-date {
        order: 1;
    }

    .roster-move-batch-summary .roster-move-text {
        order: 3;
    }

    .leader-feature {
        grid-template-columns: 66px minmax(0, 1fr) 64px 68px;
        min-height: 88px;
    }

    .leader-photo {
        width: 56px;
        height: 72px;
        margin-left: 8px;
    }

    .leader-info-panel {
        padding: 10px 8px;
    }

    .leader-role {
        font-size: 10px;
    }

    .leader-name {
        font-size: 14px;
    }

    .leader-meta {
        font-size: 13px;
    }

    .leader-team-badge {
        margin: 8px 0;
    }

    .leader-team-logo {
        width: 52px;
        height: 52px;
    }

    .leader-value {
        padding: 8px;
        font-size: 20px;
    }

    .leader-value span {
        font-size: 10px;
    }
}
