/* DPL Home: three vertical winners on the left, one match panel on the right.
   Loaded AFTER home_tabs_champions.css.  No changes to other pages. */
.home-page main.home-shell .home-dashboard-lower {
    display: grid;
    grid-template-columns: minmax(0, 0.97fr) minmax(0, 1.03fr);
    align-items: stretch;
    gap: 14px;
    min-width: 0;
    min-height: 0;
    margin-top: 12px;
}
.home-page main.home-shell .home-dashboard-lower:not(:has(.home-recent-champions)) {
    grid-template-columns: minmax(0, 1fr);
}
.home-page main.home-shell .home-dashboard-lower .home-recent-champions {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    margin: 0;
}
.home-page main.home-shell .home-dashboard-lower .home-recent-champions-heading {
    margin: 0 0 8px;
    flex: 0 0 auto;
}
.home-page main.home-shell .home-dashboard-lower .home-recent-champions-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(3, minmax(0, 1fr));
    flex: 1 1 auto;
    gap: 10px;
    min-width: 0;
    min-height: 0;
}
.home-page main.home-shell .home-dashboard-lower .home-recent-champion.home-champion-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 9px 15px;
    gap: 10px;
}
.home-page main.home-shell .home-dashboard-lower .home-recent-champion .home-champion-main {
    flex: 1 1 auto;
    min-width: 0;
}
.home-page main.home-shell .home-dashboard-lower .home-recent-champion button.home-champion-team {
    margin-top: 7px;
}
.home-page main.home-shell .home-dashboard-lower .home-recent-champion .home-champion-team-copy,
.home-page main.home-shell .home-dashboard-lower .home-recent-champion .home-champion-team-cell {
    min-width: 0;
}
.home-page main.home-shell .home-dashboard-lower .home-recent-champion .home-champion-team-copy strong {
    font-size: clamp(15px, 1.3vw, 20px);
    line-height: 1.16;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.home-page main.home-shell .home-dashboard-lower .home-recent-champion .home-recent-champion-score {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    align-self: center;
    border-top: 0;
    border-left: 1px solid rgba(163, 105, 238, .25);
    padding: 0 0 0 12px;
    text-align: right;
    white-space: nowrap;
}
.home-page main.home-shell .home-dashboard-lower .home-match-columns.home-match-tabs-section {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.home-page main.home-shell .home-dashboard-lower .home-match-tabs-section > .home-panel.home-match-tabbed-panel {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    height: 100%;
    width: 100%;
}
.home-page main.home-shell .home-dashboard-lower .home-match-tabbed-panel .home-match-tabbed-header {
    flex: 0 0 auto;
}
.home-page main.home-shell .home-dashboard-lower .home-match-tabbed-panel .home-match-tab-content {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
}
.home-page main.home-shell .home-dashboard-lower .home-match-tabbed-panel .home-empty-list {
    flex: 1 1 auto;
    min-height: 0;
}

/* Desktop fitting applies ONLY to the lower two-column area.
   The existing styles from style.css control the tournament banner,
   player/match/tournament stat cards, their sizes and outer spacing. */
@media (min-width: 1101px) and (min-height: 710px) {
    body.home-page {
        overflow-y: hidden;
    }
    .home-page main.home-shell:has(.home-dashboard-lower) {
        /* Keep the same width, hero and stat-card appearance as before. */
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        height: calc(100vh - 72px);
        height: calc(100dvh - 72px);
        min-height: 0;
        padding-bottom: 12px;
    }
    .home-page main.home-shell .home-dashboard-lower {
        flex: 1 1 auto;
        align-self: stretch;
        min-height: 0;
        height: auto;
        margin-top: 11px;
    }
    .home-page main.home-shell .home-dashboard-lower .home-recent-champions,
    .home-page main.home-shell .home-dashboard-lower .home-match-columns.home-match-tabs-section {
        min-height: 0;
    }
    .home-page main.home-shell .home-dashboard-lower .home-recent-champions-grid {
        min-height: 0;
    }
    .home-page main.home-shell .home-dashboard-lower .home-recent-champion.home-champion-card {
        min-height: 0;
        padding: 8px 14px;
    }
    .home-page main.home-shell .home-dashboard-lower .home-match-tabbed-panel .home-match-tab-content {
        max-height: none;
    }
}
/* Preserve the site's existing bottom spacing on taller desktops. */
@media (min-width: 1101px) and (min-height: 820px) {
    .home-page main.home-shell:has(.home-dashboard-lower) {
        padding-bottom: 18px;
    }
}
/* Tighten ONLY the new champion cards at shorter desktop heights. */
@media (min-width: 1101px) and (min-height: 710px) and (max-height: 795px) {
    .home-page main.home-shell .home-dashboard-lower .home-recent-champion.home-champion-card {
        padding: 6px 12px;
    }
    .home-page main.home-shell .home-dashboard-lower .home-recent-champions-grid {
        gap: 7px;
    }
    .home-page main.home-shell .home-dashboard-lower .home-recent-champion button.home-champion-team {
        margin-top: 4px;
    }
    .home-page main.home-shell .home-dashboard-lower .home-recent-champion .home-champion-logo {
        width: 36px;
        height: 36px;
    }
    .home-page main.home-shell .home-dashboard-lower .home-recent-champion button.home-champion-team .group-v2-team-logo,
    .home-page main.home-shell .home-dashboard-lower .home-recent-champion button.home-champion-team .home-champion-logo {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }
}

/* Small windows and mobile: preserve full content and normal page scroll. */
@media (max-width: 1100px), (max-height: 709px) {
    body.home-page { overflow-y: auto; }
    .home-page main.home-shell .home-dashboard-lower {
        display: flex;
        flex-direction: column;
        gap: 14px;
        margin-top: 12px;
    }
    .home-page main.home-shell .home-dashboard-lower .home-recent-champions-grid {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 9px;
    }
    .home-page main.home-shell .home-dashboard-lower .home-recent-champion.home-champion-card {
        height: auto;
        min-height: 105px;
    }
    .home-page main.home-shell .home-dashboard-lower .home-match-columns.home-match-tabs-section {
        height: auto;
        min-height: 250px;
        margin: 0 0 20px;
    }
    .home-page main.home-shell .home-dashboard-lower .home-match-tabs-section > .home-panel.home-match-tabbed-panel {
        height: auto;
        min-height: 250px;
    }
    .home-page main.home-shell .home-dashboard-lower .home-match-tabbed-panel .home-match-tab-content {
        height: 270px;
        max-height: 430px;
        min-height: 230px;
        flex: 0 1 auto;
    }
}
@media (max-width: 600px) {
    .home-page main.home-shell .home-dashboard-lower .home-recent-champion.home-champion-card {
        padding: 11px 12px;
    }
    .home-page main.home-shell .home-dashboard-lower .home-recent-champion .home-recent-champion-score {
        padding-left: 8px;
    }
    .home-page main.home-shell .home-dashboard-lower .home-recent-champion .home-recent-champion-score span {
        font-size: 9px;
    }
}
