html, body { overflow: hidden; }
    .breadcrumb { margin-bottom: 0.75rem; }

    /* ── Page layout: left sidebar + main area ── */
    .page-layout {
        display: grid;
        grid-template-columns: 230px 1fr;
        gap: 1rem;
        overflow: visible;
    }

    /* ── Left sidebar ── */
    .sidebar {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        align-self: start;
    }
    .sidebar::-webkit-scrollbar { width: 3px; }
    .sidebar::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb),0.3); border-radius: 2px; }

    /* Hero card — matches meta/esport/teams style */
    .hero-card {
        background: var(--card);
        border-radius: 16px;
        border: 2px solid rgba(var(--primary-rgb), 0.3);
        box-shadow: 0 4px 24px rgba(0,0,0,0.35);
        padding: 1.25rem 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.4rem;
        text-align: center;
        transition: all 0.2s ease;
    }


    .hero-icon { font-size: 2rem; line-height: 1; }
    .hero-title {
        font-size: 1.4rem;
        font-weight: 900;
        color: var(--primary);
        line-height: 1;
        letter-spacing: -0.5px;
    }
    .hero-sub {
        font-size: 0.85rem;
        color: var(--text-dim);
        line-height: 1.4;
    }

    /* Filter card */
    .filter-card {
        background: var(--card);
        border-radius: 16px;
        border: 2px solid rgba(var(--primary-rgb), 0.2);
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        overflow: hidden;
        flex-shrink: 0;
        transition: all 0.2s ease;
    }

    .filter-card:hover {
        border-color: rgba(var(--primary-rgb), 0.4);
        box-shadow: 0 6px 28px rgba(var(--primary-rgb), 0.2);
    }
    .filter-header {
        background: var(--dark);
        padding: 0.5rem 0.9rem;
        font-size: 0.7rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 1px;
        border-bottom: 2px solid rgba(var(--primary-rgb), 0.4);
        color: var(--text);
    }
    .filter-body { padding: 0.6rem; display: flex; flex-direction: column; gap: 0.4rem; }

    .filter-label {
        font-size: 0.6rem;
        font-weight: 700;
        color: var(--text-dim);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding-left: 0.1rem;
    }

    /* Mode buttons — stacked vertically with icon */
    .mode-list {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    .mode-btn {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.35rem 0.55rem;
        border-radius: 8px;
        cursor: pointer;
        background: var(--dark);
        border: 1px solid rgba(255,255,255,0.06);
        color: var(--text-dim);
        font-size: 0.68rem;
        font-weight: 600;
        transition: all 0.15s;
        text-align: left;
    }
    .mode-btn:hover { background: rgba(var(--primary-rgb),0.1); color: var(--text); border-color: rgba(var(--primary-rgb),0.25); }
    .mode-btn.active { background: rgba(var(--primary-rgb),0.18); color: var(--primary); border-color: rgba(var(--primary-rgb),0.5); }
    .mode-btn img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
    .mode-btn .mode-check { margin-left: auto; font-size: 0.65rem; opacity: 0; transition: opacity 0.15s; }
    .mode-btn.active .mode-check { opacity: 1; }

    /* Map buttons — shown below mode list when mode selected */
    .map-list {
        display: none;
        flex-direction: column;
        gap: 0.2rem;
        margin-top: 0.15rem;
    }
    .map-list.visible { display: flex; }
    .map-btn {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        padding: 0.28rem 0.55rem;
        border-radius: 7px;
        cursor: pointer;
        background: rgba(0,0,0,0.2);
        border: 1px solid rgba(255,255,255,0.05);
        color: var(--text-dim);
        font-size: 0.63rem;
        font-weight: 500;
        transition: all 0.15s;
    }
    .map-btn:hover { background: rgba(var(--primary-rgb),0.08); color: var(--text); }
    .map-btn.active { background: rgba(var(--primary-rgb),0.15); color: var(--primary); border-color: rgba(var(--primary-rgb),0.4); }
    .map-btn img { width: 32px; height: 20px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
    .map-btn .map-check { margin-left: auto; font-size: 0.6rem; opacity: 0; }
    .map-btn.active .map-check { opacity: 1; }

    .filter-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 0.15rem 0; }

    .filter-reset {
        width: 100%;
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 6px;
        color: var(--text-dim);
        font-size: 0.65rem;
        padding: 0.3rem;
        cursor: pointer;
        transition: all 0.15s;
    }
    .filter-reset:hover { background: rgba(var(--primary-rgb),0.1); color: var(--primary); border-color: rgba(var(--primary-rgb),0.3); }

    /* ── Time range buttons ── */
    .time-range-list { display: flex; flex-direction: column; gap: 0.25rem; }
    .time-range-btn {
        display: flex; align-items: center; gap: 0.45rem;
        padding: 0.32rem 0.55rem; border-radius: 8px; cursor: pointer;
        background: var(--dark); border: 1px solid rgba(255,255,255,0.06);
        color: var(--text-dim); font-size: 0.68rem; font-weight: 600;
        transition: all 0.15s; text-align: left;
    }
    .time-range-btn:hover { background: rgba(var(--primary-rgb),0.1); color: var(--text); border-color: rgba(var(--primary-rgb),0.25); }
    .time-range-btn.active { background: rgba(var(--primary-rgb),0.18); color: var(--primary); border-color: rgba(var(--primary-rgb),0.5); }
    .time-range-btn .tr-icon { font-size: 0.85rem; flex-shrink: 0; }

    /* Custom date popup — floats over layout, doesn't push sidebar */
    .time-range-card-wrap { position: relative; }
    .custom-date-popup {
        display: none;
        position: absolute;
        left: 0; right: 0;
        top: calc(100% + 4px);
        z-index: 400;
        background: var(--card);
        border: 2px solid rgba(var(--primary-rgb), 0.4);
        border-radius: 12px;
        padding: 0.75rem;
        box-shadow: 0 8px 32px rgba(0,0,0,0.6);
        flex-direction: column;
        gap: 0.55rem;
    }
    .custom-date-popup.visible { display: flex; }
    .custom-date-row {
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
    }
    .custom-date-group {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }
    .custom-date-group label {
        font-size: 0.65rem; font-weight: 700; color: var(--text);
        text-transform: uppercase; letter-spacing: 0.5px;
    }
    .custom-date-group input[type="date"] {
        width: 100%; padding: 0.5rem 0.6rem;
        background: var(--dark);
        border: 2px solid rgba(255,255,255,0.08);
        border-radius: 8px; color: var(--text); font-size: 0.8rem;
        outline: none; cursor: pointer; transition: border-color 0.15s;
        box-sizing: border-box;
        color-scheme: dark;  /* makes native calendar icon visible on dark bg */
    }
    .custom-date-group input[type="date"]:focus {
        border-color: rgba(var(--primary-rgb),0.6);
        box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.12);
    }
    .custom-date-group input[type="date"]:hover {
        border-color: rgba(var(--primary-rgb),0.35);
    }
    .custom-date-confirm {
        width: 100%; padding: 0.45rem;
        background: var(--primary); border: none;
        border-radius: 8px; color: white; font-size: 0.72rem; font-weight: 700;
        cursor: pointer; transition: all 0.15s;
        text-transform: uppercase; letter-spacing: 0.5px;
    }
    .custom-date-confirm:hover { opacity: 0.88; transform: translateY(-1px); }

    .active-filter-badge {
        background: rgba(var(--primary-rgb),0.15);
        border: 1px solid rgba(var(--primary-rgb),0.35);
        border-radius: 6px;
        padding: 0.25rem 0.5rem;
        font-size: 0.62rem;
        color: var(--primary);
        font-weight: 700;
        text-align: center;
        display: none;
    }

    /* ── Main area ── */
    .main-area {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        align-self: start;
    }
    .main-area::-webkit-scrollbar { width: 3px; }
    .main-area::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb),0.3); border-radius: 2px; }

    /* ── Comp panels row ── */
    .comps-row {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 0.75rem;
        align-items: stretch;
        flex-shrink: 0;
    }

    .team-panel {
        background: var(--card);
        border-radius: 16px;
        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;
        overflow: hidden;
        transition: all 0.2s ease;
    }

    .team-panel:hover {
        border-color: rgba(var(--primary-rgb), 0.4);
        box-shadow: 0 6px 28px rgba(var(--primary-rgb), 0.2);
    }
    .panel-header {
        background: var(--dark);
        padding: 0.5rem 0.85rem;
        font-size: 0.75rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 1px;
        border-bottom: 2px solid rgba(var(--primary-rgb), 0.4);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .panel-label { flex: 1; display: flex; align-items: center; gap: 0.45rem; }
    .panel-team-logo { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; opacity: 0.85; }
    .panel-clear {
        background: rgba(255,255,255,0.05);
        border: none;
        color: var(--text-dim);
        padding: 0.18rem 0.5rem;
        border-radius: 4px;
        font-size: 0.6rem;
        cursor: pointer;
        transition: all 0.15s;
    }
    .panel-clear:hover { background: rgba(255,255,255,0.1); color: var(--text); }
    .panel-body { padding: 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; }

    /* ── Brawler slots ── */
    .slots-row {
        display: grid;
        grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);
        gap: 0.4rem;
    }
    .brawler-slot {
        background: var(--dark);
        border-radius: 10px;
        border: 2px dashed rgba(var(--primary-rgb), 0.25);
        aspect-ratio: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.15s;
        position: relative;
        gap: 0.25rem;
        padding: 0.4rem;
        min-width: 0;
        overflow: hidden;
    }
    .brawler-slot:hover { border-color: rgba(var(--primary-rgb),0.6); background: rgba(var(--primary-rgb),0.08); }
    .brawler-slot.filled { border-style: solid; border-color: rgba(var(--primary-rgb),0.4); }
    .brawler-slot.selected-slot { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(var(--primary-rgb),0.3); }
    .slot-img { width: 80%; height: 80%; max-width: 104px; max-height: 104px; object-fit: contain; }
    .slot-name { font-size: 0.72rem; font-weight: 700; color: var(--text); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .slot-empty-icon { font-size: 1.4rem; color: rgba(var(--primary-rgb),0.3); }
    .slot-remove {
        position: absolute; top: 3px; right: 3px;
        width: 14px; height: 14px; border-radius: 50%;
        background: rgba(220,38,38,0.75); color: white; font-size: 0.55rem;
        display: flex; align-items: center; justify-content: center;
        cursor: pointer; opacity: 0; transition: opacity 0.15s;
    }
    .brawler-slot.filled:hover .slot-remove { opacity: 1; }

    /* ── Picker ── */
    .picker-section { background: var(--bg); border-radius: 8px; overflow: hidden; }
    .picker-search {
        width: 100%; padding: 0.38rem 0.6rem;
        background: var(--dark); border: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        color: var(--text); font-size: 0.72rem; outline: none;
    }
    .picker-search::placeholder { color: var(--text-dim); }
    .picker-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
        gap: 0.2rem; padding: 0.3rem;
        max-height: 150px; overflow-y: auto;
    }
    .picker-grid::-webkit-scrollbar { width: 3px; }
    .picker-grid::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb),0.35); border-radius: 2px; }
    .picker-brawler {
        display: flex; flex-direction: column; align-items: center; gap: 0.08rem;
        padding: 0.22rem 0.12rem; border-radius: 6px; cursor: pointer;
        transition: all 0.12s; border: 1px solid transparent;
    }
    .picker-brawler:hover { background: rgba(var(--primary-rgb),0.12); border-color: rgba(var(--primary-rgb),0.3); }
    .picker-brawler.in-use { opacity: 0.28; pointer-events: none; }
    .picker-brawler img { width: 39px; height: 39px; object-fit: contain; }
    .picker-brawler-name { font-size: 0.5rem; font-weight: 600; color: var(--text-dim); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52px; }

    /* ── VS / result column ── */
    .vs-column { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; padding-top: 0; width: 185px; height: 100%; }
    .vs-label { font-size: 1.6rem; font-weight: 900; color: var(--primary); }

    .result-box {
        background: var(--card);
        border-radius: 16px;
        border: 2px solid rgba(var(--primary-rgb), 0.2);
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        padding: 0.85rem 0.75rem;
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        width: 100%;
        position: relative;
        transition: all 0.2s ease;
    }

    .result-box:hover {
        border-color: rgba(var(--primary-rgb), 0.4);
    }
    .result-title {
        font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
        letter-spacing: 1px; color: var(--text-dim); text-align: center;
    }
    /* placeholder overlays the content so box size never changes */
    .result-placeholder {
        position: absolute; inset: 0;
        display: flex; align-items: center; justify-content: center;
        font-size: 0.82rem; color: var(--text-dim);
        background: var(--card); border-radius: 14px;
        text-align: center; padding: 0.75rem;
        opacity: 1; transition: opacity 0.2s;
        pointer-events: none;
    }
    .result-placeholder.hidden { opacity: 0; }

    /* Score display — no progress bar */
    .result-scores {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.4rem;
    }
    .result-score-block { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
    .result-score-label { font-size: 0.55rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
    .result-score-val { font-size: 1.5rem; font-weight: 900; line-height: 1; }
    .score-a { color: #3b82f6; }
    .score-b { color: #ef4444; }
    .result-score-sep { font-size: 0.7rem; color: var(--text-dim); font-weight: 700; }

    .result-verdict {
        text-align: center; font-size: 0.65rem; font-weight: 700;
        color: var(--text-dim); background: var(--dark);
        border-radius: 8px; padding: 0.32rem 0.5rem;
    }
    .result-verdict span { color: var(--text); }
    .result-note { text-align: center; font-size: 0.68rem; color: var(--text-dim); }

    /* ── Recent match box ── */
    .recent-match-box {
        background: var(--card);
        border-radius: 16px;
        border: 2px solid rgba(var(--primary-rgb), 0.2);
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        overflow: hidden;
        width: 100%;
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        min-height: 0;
        transition: all 0.2s ease;
    }

    .recent-match-box:hover {
        border-color: rgba(var(--primary-rgb), 0.4);
        box-shadow: 0 6px 28px rgba(var(--primary-rgb), 0.2);
    }
    .recent-match-header {
        background: var(--dark);
        padding: 0.4rem 0.75rem;
        font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
        border-bottom: 2px solid rgba(var(--primary-rgb),0.4); color: var(--text);
        flex-shrink: 0;
    }
    .recent-match-body { padding: 0.4rem; flex: 1; display: flex; flex-direction: column; }
    .recent-match-empty { font-size: 0.9rem; color: var(--text-dim); text-align: center; padding: 0.5rem 0; }

    /* ── mini match-card (mirrors team_h2h match-card style) ── */
    .rm-card {
        background: var(--dark);
        border-radius: 8px;
        border: 1px solid rgba(255,255,255,0.07);
        overflow: hidden;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    /* header: [logo W/L] [mode+time] [W/L logo] */
    .rm-header {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 0.3rem;
        padding: 0.3rem 0.45rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .rm-header-team { display: flex; align-items: center; gap: 0.28rem; }
    .rm-header-team.left  { flex-direction: row; }
    .rm-header-team.right { flex-direction: row-reverse; }
    .rm-header-logo { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
    .rm-header-result {
        font-size: 0.72rem; font-weight: 900; letter-spacing: 0.5px; flex-shrink: 0; line-height: 1;
    }
    .rm-header-centre {
        display: flex; flex-direction: column; align-items: center; gap: 0.03rem;
    }
    .rm-header-mode { display: flex; align-items: center; gap: 0.2rem; }
    .rm-header-mode-icon { width: 14px; height: 14px; object-fit: contain; flex-shrink: 0; }
    .rm-header-mode-name { font-size: 0.58rem; color: var(--text-dim); font-weight: 700; white-space: nowrap; }
    .rm-header-time { font-size: 0.52rem; color: rgba(255,255,255,0.35); white-space: nowrap; font-weight: 600; }

    /* body: [left comp] [map center] [right comp] */
    .rm-body {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 0.35rem;
        padding: 0.4rem 0.45rem;
        flex: 1;
    }
    /* rm-comp: row of game columns, each column = one game's 3 brawlers stacked */
    .rm-comp { display: flex; flex-direction: row; gap: 0.2rem; align-items: center; justify-content: center; min-width: 0; }
    .rm-game-col { display: flex; flex-direction: column; gap: 0.15rem; align-items: center; }
    .rm-brawler-icon { width: 30px; height: 30px; object-fit: contain; border-radius: 4px; flex-shrink: 0; }
    .rm-center {
        display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
        flex-shrink: 0; width: 52px;
    }
    .rm-map-img {
        width: 52px; height: auto; display: block; object-fit: contain;
        border-radius: 5px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.4);
    }
    .rm-map-name {
        font-size: 0.5rem; color: rgba(255,255,255,0.35); white-space: nowrap;
        text-align: center; max-width: 52px; overflow: hidden; text-overflow: ellipsis;
    }

    /* win colours reused */
    .rm-win  { color: #10b981; }
    .rm-loss { color: #f87171; }

    /* ── Breakdown ── */
    .breakdown-section {
        background: var(--card);
        border-radius: 16px;
        border: 2px solid rgba(var(--primary-rgb), 0.2);
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        overflow: hidden;
        flex-shrink: 0;
        transition: all 0.2s ease;
    }

    .breakdown-section:hover {
        border-color: rgba(var(--primary-rgb), 0.4);
        box-shadow: 0 6px 28px rgba(var(--primary-rgb), 0.2);
    }
    .breakdown-header {
        background: var(--dark);
        padding: 0.45rem 0.85rem;
        font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
        border-bottom: 2px solid rgba(var(--primary-rgb),0.4); color: var(--text);
        display: flex; justify-content: space-between; align-items: center;
    }
    .breakdown-tabs { display: flex; gap: 0.35rem; }
    .breakdown-tab {
        font-size: 0.6rem; font-weight: 700; padding: 0.18rem 0.55rem;
        border-radius: 4px; cursor: pointer; background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.08); color: var(--text-dim); transition: all 0.15s;
    }
    .breakdown-tab.active { background: var(--primary); border-color: var(--primary); color: var(--bg); }
    .breakdown-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 0.4rem; padding: 0.55rem; }
    .matchup-cell {
        background: var(--dark); border-radius: 8px; padding: 0.5rem;
        display: flex; align-items: center; gap: 0.4rem;
        border: 1px solid rgba(255,255,255,0.05);
    }
    .matchup-cell img { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
    .matchup-cell-info { flex: 1; min-width: 0; }
    .matchup-cell-names { font-size: 0.58rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
    .matchup-cell-wr { font-size: 0.75rem; font-weight: 800; }
    .matchup-cell-picks { font-size: 0.5rem; color: var(--text-dim); }

    /* PC: Red Team header — clear on left, name/logo right-aligned */
    @media (min-width: 769px) {
        #panel-b .panel-header { flex-direction: row-reverse; }
        #panel-b .panel-label { justify-content: flex-start; flex-direction: row-reverse; }
    }

    .wr-s { color: #10b981; }
    .wr-a { color: #84cc16; }
    .wr-b { color: #fbbf24; }
    .wr-c { color: #fb923c; }
    .wr-d { color: #f87171; }
    .wr-f { color: #dc2626; }

    @media (max-width: 768px) {
        html, body { overflow-x: hidden !important; overflow-y: auto !important; height: auto !important; }

        .page-layout, .sidebar, .main-area, .hero-card,
        .filter-card, .team-panel, .breakdown-section {
            max-width: 100% !important;
            box-sizing: border-box !important;
            min-width: 0 !important;
        }

        .breadcrumb { font-size: 0.72rem; margin-bottom: 0.4rem; }

        .page-layout {
            display: flex !important;
            flex-direction: column !important;
            gap: 0.5rem !important;
        }

        .sidebar { display: flex !important; flex-direction: column !important; gap: 0.5rem !important; }

        .hero-card {
            flex-direction: row !important; align-items: center !important;
            gap: 0.6rem !important; padding: 0.6rem 0.75rem !important;
            border-radius: 10px !important; text-align: left !important;
        }
        .hero-icon { font-size: 1.5rem !important; flex-shrink: 0 !important; }
        .hero-title { font-size: 1.1rem !important; }
        .hero-sub { font-size: 0.62rem !important; text-align: right !important; margin-left: auto !important; }

        .filter-card { border-radius: 10px !important; }
        .filter-header { padding: 0.3rem 0.6rem !important; font-size: 0.7rem !important; }
        .filter-body { padding: 0.4rem !important; gap: 0.3rem !important; }

        .mode-list { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 0.2rem !important; }
        .time-range-list { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 0.2rem !important; }
        #tr-custom { grid-column: 1 / -1 !important; justify-content: center !important; }
        .mode-btn, .time-range-btn { font-size: 0.62rem !important; padding: 0.3rem 0.4rem !important; border-radius: 6px !important; }
        .mode-btn img { width: 18px !important; height: 18px !important; }
        .time-range-card-wrap { width: 100% !important; box-sizing: border-box !important; }
        .custom-date-popup { position: static !important; display: none; width: 100% !important; box-sizing: border-box !important; margin-top: 0.4rem !important; border-radius: 10px !important; }
        .custom-date-popup.visible { display: flex !important; }

        .main-area { display: flex !important; flex-direction: column !important; gap: 0.5rem !important; width: 100% !important; align-self: stretch !important; }

        /* Stack: team A → VS row → team B */
        .comps-row { display: flex !important; flex-direction: column !important; gap: 0.5rem !important; width: 100% !important; }

        /* Team panels always full width */
        .team-panel { width: 100% !important; border-radius: 10px !important; box-sizing: border-box !important; align-self: stretch !important; }
        .panel-header { padding: 0.35rem 0.6rem !important; font-size: 0.7rem !important; }
        .panel-body { padding: 0.4rem !important; gap: 0.4rem !important; }

        /* Slots always 3-col full width */
        .panel-body { width: 100% !important; box-sizing: border-box !important; }
        .slots-row { display: grid !important; grid-template-columns: 1fr 1fr 1fr !important; gap: 0.3rem !important; width: 100% !important; box-sizing: border-box !important; }
        .brawler-slot { aspect-ratio: 1 !important; min-width: 0 !important; width: 100% !important; box-sizing: border-box !important; }
        .slot-name { font-size: 0.62rem !important; }
        .slot-empty-icon { font-size: 1.1rem !important; }

        /* VS column: just centered VS text when no result, full-width result box when active */
        .vs-column {
            display: flex !important;
            flex-direction: column !important;
            width: 100% !important;
            max-width: 100% !important;
            height: auto !important;
            padding: 0 !important;
            gap: 0 !important;
            align-items: stretch !important;
        }

        /* VS label: centered, shown only when result-box is hidden */
        .vs-label {
            font-size: 1.4rem !important;
            text-align: center !important;
            padding: 0.4rem 0 !important;
        }

        /* Hide result-box when placeholder is active (no brawlers entered yet) */
        .result-box:has(.result-placeholder:not(.hidden)) {
            display: none !important;
        }

        /* When result-box IS hidden, show vs-label prominently */
        .vs-column:has(.result-placeholder:not(.hidden)) .vs-label {
            display: block !important;
        }

        /* When result IS showing: hide standalone vs-label, show result-box full width */
        .vs-column:has(.result-placeholder.hidden) .vs-label {
            display: none !important;
        }

        .result-box {
            width: 100% !important;
            padding: 0.6rem !important;
            border-radius: 10px !important;
            box-sizing: border-box !important;
        }

        /* Result scores: Blue% | VS | Red% in a row */
        .result-title { display: none !important; }
        .result-scores {
            display: grid !important;
            grid-template-columns: 1fr auto 1fr !important;
            align-items: center !important;
            gap: 0.5rem !important;
        }
        .result-score-block { text-align: center !important; }
        .result-score-val { font-size: 1.3rem !important; }
        /* mobile-vs-mid injected by JS between the two score blocks */
        .mobile-vs-mid {
            font-size: 1rem !important;
            font-weight: 900 !important;
            color: var(--primary) !important;
            text-align: center !important;
        }

        .recent-match-box { display: none !important; }

        /* Prevent iOS zoom on input focus */
        .picker-search { font-size: 16px !important; }

        /* Picker */
        .picker-section { width: 100% !important; box-sizing: border-box !important; overflow: hidden !important; }
        .picker-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)) !important; max-height: 130px !important; width: 100% !important; box-sizing: border-box !important; }
        .picker-brawler img { width: 34px !important; height: 34px !important; }
        .picker-brawler-name { font-size: 0.48rem !important; max-width: 46px !important; }

        /* Breakdown */
        .breakdown-section { border-radius: 10px !important; }
        .breakdown-header { padding: 0.35rem 0.6rem !important; font-size: 0.68rem !important; flex-wrap: wrap !important; gap: 0.3rem !important; }
        .breakdown-tab { font-size: 0.58rem !important; padding: 0.15rem 0.45rem !important; }
        .breakdown-grid { grid-template-columns: 1fr 1fr !important; gap: 0.3rem !important; padding: 0.4rem !important; }
        .matchup-cell { padding: 0.4rem !important; gap: 0.3rem !important; border-radius: 6px !important; }
        .matchup-cell img { width: 24px !important; height: 24px !important; }
        .matchup-cell-names { font-size: 0.54rem !important; }
        .matchup-cell-wr { font-size: 0.68rem !important; }
        .matchup-cell-picks { font-size: 0.48rem !important; }
    }
