html, body {
        overflow: hidden;
        height: 100vh;
    }

    .breadcrumb {
        margin-bottom: 0.75rem;
    }

    /*
     * --left-h: total height of the left column (hero card + gap + modes box with 6 rows).
     * hero card ≈ 195px  |  gap: 8px  |  modes box ≈ 315px  → total ≈ 518px
     * The matches box uses this as its exact height so it lines up flush.
     * The analysis boxes (picks + maps) split this height between them.
     */
    :root {
        --left-h: 538px;
        --modes-h: 315px;
    }

    /* ── Main layout: left 220px | right fills rest ── */
    .h2h-layout {
        display: grid;
        grid-template-columns: 220px 1fr;
        gap: 1rem;
        width: 100%;
        align-items: start;
    }

    /* Left column: hero card stacked above modes box */
    .left-column {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    /*
     * Right column: [matches wider] [analysis fills rest]
     * Both the matches column and analysis column are capped at --left-h.
     */
    .right-column {
        display: grid;
        grid-template-columns: 420px 1fr;
        gap: 0.5rem;
        min-width: 0;
        align-items: start;
    }

    /* Analysis column: picks (wider) + maps (narrower) SIDE BY SIDE */
    .analysis-column {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        min-width: 0;
        height: var(--left-h);
        align-items: flex-start;
    }

    .stats-section.picks-box { flex: 3; min-width: 0; height: 100%; }
    .stats-section.maps-box  { flex: 2; min-width: 0; max-height: 100%; }

    /* Mobile show/hide defaults */
    .maps-box-desktop { display: flex; flex-direction: column; }

    /* Modes grid (used on mobile) */
    .modes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.2rem; padding: 0.25rem; }
    .mode-card { background: var(--dark); border-radius: 6px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); transition: all 0.2s ease; text-decoration: none; color: inherit; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; padding: 0.3rem 0.15rem; cursor: pointer; }
    .mode-card:hover { background: rgba(var(--primary-rgb), 0.08); border-color: rgba(var(--primary-rgb), 0.5); }
    .mode-icon { width: 28px; height: 28px; flex-shrink: 0; }
    .mode-icon img { width: 28px; height: 28px; object-fit: contain; }
    .mode-name { font-size: 0.7rem; font-weight: 700; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-align: center; }
    .mode-wr { font-size: 0.8rem; font-weight: 800; flex-shrink: 0; }

    /* ── Hero card (matches team_mode hero style) ── */
    .h2h-hero-card {
        background: var(--card);
        backdrop-filter: blur(10px);
        border-radius: 16px;
        padding: 0.6rem;
        border: 2px solid rgba(var(--primary-rgb), 0.25);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.4rem;
        transition: all 0.2s ease;
    }

    .h2h-hero-card:hover {
        border-color: rgba(var(--primary-rgb), 0.5);
        box-shadow: 0 6px 28px rgba(var(--primary-rgb), 0.2);
    }

    .hero-logos {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
    }

    .hero-logo {
        width: 50px;
        height: 50px;
        object-fit: contain;
        filter: drop-shadow(0 4px 12px rgba(var(--primary-rgb), 0.4));
        flex-shrink: 0;
        transition: transform 0.2s ease, filter 0.2s ease;
    }

    .hero-logo:hover {
        transform: scale(1.15);
        filter: drop-shadow(0 6px 16px rgba(var(--primary-rgb), 0.7));
    }

    .hero-vs {
        font-size: 0.9rem;
        font-weight: 900;
        color: var(--text-dim);
    }

    .hero-score {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 1.6rem;
        font-weight: 900;
        line-height: 1;
    }

    .hero-score-sep {
        font-size: 1rem;
        color: var(--text-dim);
        font-weight: 700;
    }

    .hero-sub {
        font-size: 0.6rem;
        color: var(--text-dim);
        text-align: center;
    }

    /* ── Overview stats 2x2 grid (same as team_mode) ── */
    .overview-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
        width: 100%;
    }

    .overview-stat-card {
        background: var(--dark);
        padding: 0.45rem;
        border-radius: 8px;
        text-align: center;
        overflow: hidden;
        min-width: 0;
    }

    .overview-stat-label {
        font-size: 0.55rem;
        text-transform: uppercase;
        color: rgba(255,255,255,0.5);
        font-weight: 700;
        letter-spacing: 0.2px;
        margin-bottom: 0.1rem;
    }

    .overview-stat-value {
        font-size: 0.9rem;
        font-weight: 900;
        color: var(--text);
        line-height: 1.2;
    }

    /* ── By Mode card — no scroll, natural height of however many rows ── */
    .left-card {
        background: var(--card);
        backdrop-filter: blur(10px);
        border-radius: 16px;
        overflow: hidden;
        border: 2px solid rgba(var(--primary-rgb), 0.2);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        display: flex;
        flex-direction: column;
        transition: all 0.2s ease;
    }

    .left-card:hover {
        border-color: rgba(var(--primary-rgb), 0.4);
        box-shadow: 0 6px 28px rgba(var(--primary-rgb), 0.2);
    }

    .left-card-header {
        background: var(--dark);
        padding: 0.4rem 0.7rem;
        font-size: 0.72rem;
        font-weight: 800;
        border-bottom: 2px solid rgba(var(--primary-rgb), 0.4);
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--text);
        flex-shrink: 0;
    }

    .left-card-body {
        padding: 0.3rem;
        background: var(--bg);
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        /* No overflow — shows all rows, no scrollbar */
    }

    /* mode rows in left card */
    .mode-row {
        background: var(--dark);
        border-radius: 7px;
        border: 1px solid rgba(255,255,255,0.06);
        padding: 0.35rem 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.4rem;
        text-decoration: none;
        color: inherit;
        transition: all 0.15s ease;
    }

    .mode-row:hover {
        background: rgba(var(--primary-rgb), 0.1);
        border-color: rgba(var(--primary-rgb), 0.4);
        box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.15);
    }

    .mode-row-icon {
        width: 27px;
        height: 27px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .mode-row-name {
        flex: 1;
        font-size: 0.72rem;
        font-weight: 700;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    .mode-row-score {
        font-size: 0.7rem;
        color: var(--text-dim);
        font-weight: 700;
        flex-shrink: 0;
    }

    .mode-row-wr {
        font-size: 0.8rem;
        font-weight: 900;
        flex-shrink: 0;
        width: 40px;
        text-align: right;
    }

    /* ── Shared card shell for all right-side boxes ── */
    .stats-section {
        background: var(--card);
        backdrop-filter: blur(15px);
        border-radius: 16px;
        overflow: hidden;
        border: 2px solid rgba(var(--primary-rgb), 0.2);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        display: flex;
        flex-direction: column;
        transition: all 0.2s ease;
    }

    .stats-section:hover {
        border-color: rgba(var(--primary-rgb), 0.4);
        box-shadow: 0 6px 28px rgba(var(--primary-rgb), 0.2);
    }


    /* Matches box: exact height of the full left column — lines up flush */
    .stats-section.matches-box {
        height: var(--left-h);
    }

    /* picks-box and maps-box flex ratios set in .analysis-column block above */

    .stats-header {
        background: var(--dark);
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        font-weight: 800;
        border-bottom: 2px solid rgba(var(--primary-rgb), 0.4);
        text-transform: uppercase;
        letter-spacing: 1px;
        flex-shrink: 0;
        color: var(--text);
    }

    .stats-content {
        padding: 0.35rem;
        background: var(--bg);
        overflow-y: auto;
        flex: 1;
        min-height: 0;
    }

    .stats-content::-webkit-scrollbar { width: 4px; }
    .stats-content::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
    .stats-content::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb),0.4); border-radius: 2px; }
    .stats-content::-webkit-scrollbar-thumb:hover { background: rgba(var(--primary-rgb),0.6); }

    /* ── Match card: header bar + body ── */
    .match-card {
        background: var(--dark);
        border-radius: 8px;
        border: 1px solid rgba(255,255,255,0.07);
        margin-bottom: 0.4rem;
        overflow: hidden;
        transition: all 0.15s ease;
    }

    .match-card:hover {
        border-color: rgba(var(--primary-rgb), 0.4);
        box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.15);
    }

    .match-card:last-child { margin-bottom: 0; }

    /* ── Score row: [team1 logo + score] [mode info + time] [score + team2 logo] ── */
    .match-header {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 0.4rem;
        padding: 0.35rem 0.6rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    /* Left side: logo then score, score nearest centre */
    .match-header-team {
        display: flex;
        align-items: center;
        gap: 0.35rem;
    }
    .match-header-team.left  { flex-direction: row;         justify-content: flex-start; }
    .match-header-team.right { flex-direction: row-reverse; justify-content: flex-start; }

    .match-header-logo {
        width: 28px;
        height: 28px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .match-header-team-score {
        font-size: 1.05rem;
        font-weight: 900;
        letter-spacing: 0.5px;
        flex-shrink: 0;
        line-height: 1;
    }

    /* Centre: mode icon + name + time */
    .match-header-centre {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.05rem;
        min-width: 0;
    }

    .match-header-mode {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    .match-header-mode-icon {
        width: 19px;
        height: 19px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .match-header-mode-name {
        font-size: 0.75rem;
        color: var(--text-dim);
        font-weight: 700;
        white-space: nowrap;
    }

    .match-header-time {
        font-size: 0.68rem;
        color: rgba(255,255,255,0.38);
        white-space: nowrap;
        font-weight: 600;
    }

    /* ── Match body: left comp | center map | right comp ── */
    .match-body {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 0.6rem;
    }

    /* ── Composition column: vertical brawler list ── */
    .match-comp {
        display: flex;
        flex-direction: column;
        gap: 0.32rem;
        min-width: 0;
    }

    /* Each brawler row: [icon] [brawler name / player name] */
    .brawler-row {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        min-width: 0;
    }

    /* Right side rows: text right-aligned, icon on right */
    .match-comp.right .brawler-row {
        flex-direction: row-reverse;
    }

    .comp-brawler {
        width: 38px;
        height: 38px;
        object-fit: contain;
        border-radius: 5px;
        flex-shrink: 0;
    }

    .brawler-row-info {
        display: flex;
        flex-direction: column;
        min-width: 0;
        gap: 0.06rem;
    }

    .match-comp.right .brawler-row-info {
        align-items: flex-end;
    }

    .brawler-slot-name {
        font-size: 0.82rem;
        font-weight: 800;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 110px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .brawler-slot-player {
        font-size: 0.72rem;
        color: rgba(255,255,255,0.5);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 110px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 2px;
    }


    /* ── Center map column ── */
    .match-center {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
        flex-shrink: 0;
        width: 90px;
    }

    .match-map-img {
        width: 90px;
        height: auto;
        display: block;
        object-fit: contain;
        border-radius: 6px;
        border: 1px solid rgba(255,255,255,0.1);
        background: rgba(0,0,0,0.4);
    }

    .match-map-name {
        font-size: 0.72rem;
        color: rgba(255,255,255,0.35);
        white-space: nowrap;
        text-align: center;
        max-width: 90px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* mini game indicator strip (dots horizontal) */
    .game-strip {
        display: flex;
        flex-direction: row;
        gap: 4px;
        align-items: center;
        justify-content: center;
    }

    .game-strip-row {
        display: contents;
    }

    .game-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .game-dot.win  { background: #10b981; }
    .game-dot.loss { background: #f87171; }

    /* ── Picks box: two team columns side-by-side ── */
    .picks-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        height: 100%;
    }

    .picks-col {
        display: flex;
        flex-direction: column;
        min-width: 0;
        overflow: hidden;
    }

    .picks-col:first-child {
        border-right: 2px solid rgba(255,255,255,0.12);
    }

    .picks-col-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.5rem 0.7rem;
        background: var(--dark);
        border-bottom: 2px solid rgba(255,255,255,0.12);
        flex-shrink: 0;
    }

    .picks-col-logo {
        width: 28px;
        height: 28px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .picks-col-name {
        font-size: 0.78rem;
        font-weight: 800;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    /* Brawler card grid — scrollable, 2 per row */
    .picks-col-body {
        flex: 1;
        min-height: 0;
        padding: 0.3rem;
        overflow-y: auto;
    }

    .picks-col-body::-webkit-scrollbar { width: 4px; }
    .picks-col-body::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
    .picks-col-body::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb),0.4); border-radius: 2px; }

    .picks-brawler-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
    }

    /* Brawler card — exact copy of team.html .brawler-card, fixed size, clickable */
    .h2h-brawler-card {
        background: var(--dark);
        border-radius: 8px;
        padding: 0.35rem;
        border: 1px solid rgba(255,255,255,0.06);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.2rem;
        position: relative;
        transition: all 0.2s ease;
        overflow: hidden;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
        text-decoration: none;
        color: inherit;
    }

    .h2h-brawler-card:hover {
        background: rgba(var(--primary-rgb), 0.08);
        border-color: rgba(var(--primary-rgb), 0.5);
        box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.2);
    }

    .h2h-brawler-rank {
        position: absolute;
        top: 4px;
        left: 4px;
        font-size: 0.55rem;
        font-weight: 900;
        color: var(--text-dim);
        background: rgba(255,255,255,0.06);
        width: 18px;
        height: 18px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .h2h-brawler-rank.top-1 { background: rgba(255,215,0,0.2); color: #ffd700; }
    .h2h-brawler-rank.top-2 { background: rgba(192,192,192,0.2); color: #c0c0c0; }
    .h2h-brawler-rank.top-3 { background: rgba(205,127,50,0.2); color: #cd7f32; }

    .h2h-brawler-img {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }

    .h2h-brawler-name {
        font-size: 0.7rem;
        font-weight: 700;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }

    .h2h-brawler-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.2rem;
        width: 100%;
    }

    .h2h-brawler-mini-stat {
        background: rgba(255,255,255,0.04);
        border-radius: 4px;
        padding: 0.2rem;
        text-align: center;
    }

    .h2h-brawler-mini-value {
        font-size: 0.7rem;
        font-weight: 800;
        color: var(--text);
    }

    .h2h-brawler-mini-label {
        font-size: 0.45rem;
        color: var(--text-dim);
        text-transform: uppercase;
    }

    /* ── Maps box: 1 per row ── */
    .maps-grid {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }

    /* Map row — matches team_mode .map-row exactly, clickable */
    .h2h-map-row {
        background: var(--dark);
        padding: 0.35rem 0.5rem;
        border-radius: 7px;
        border: 1px solid rgba(255,255,255,0.06);
        display: flex;
        align-items: center;
        gap: 0.4rem;
        transition: all 0.15s ease;
        text-decoration: none;
        color: inherit;
    }

    .h2h-map-row:hover {
        background: rgba(var(--primary-rgb), 0.1);
        border-color: rgba(var(--primary-rgb), 0.4);
        box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.15);
    }



    .h2h-map-img {
        width: 39px;
        height: 39px;
        object-fit: cover;
        border-radius: 4px;
        flex-shrink: 0;
        background: rgba(0,0,0,0.3);
    }

    .h2h-map-info {
        flex: 1;
        min-width: 0;
    }

    .h2h-map-name {
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .h2h-map-sub {
        font-size: 0.65rem;
        color: var(--text-dim);
        margin-top: 0.03rem;
    }

    .h2h-map-wr {
        font-size: 0.88rem;
        font-weight: 800;
        flex-shrink: 0;
    }

    /* ── Win rate colors ── */
    .wr-s { color: #10b981; }
    .wr-a { color: #84cc16; }
    .wr-b { color: #fbbf24; }
    .wr-c { color: #fb923c; }
    .wr-d { color: #f87171; }
    .wr-f { color: #dc2626; }

    .no-data {
        text-align: center;
        padding: 1rem 0.5rem;
        color: var(--text-dim);
        font-size: 0.75rem;
    }
