/* Only completed homepage match cards opt into this layout. */
.match-card.match-card--compact {
    container-type: inline-size;
    container-name: compact-match-card;
    border-left: 3px solid var(--border-color);
    border-radius: 10px;
}
.match-card.match-card--compact.win { border-left-color: #10b981; }
.match-card.match-card--compact.loss { border-left-color: #ef4444; }
.home-feed-column .match-card.match-card--compact { margin-bottom: 8px; width: 100%; }
.home-feed-column .match-feed.match-feed--compact { gap: 8px; }
.home-feed-column .match-feed--compact > .match-card--compact,
.home-feed-column .match-feed--compact > .feed-skin-event { margin: 0; width: 100%; }
.home-feed-column .match-feed--compact > .feed-skin-event { padding: 12px 14px; min-height: 44px; box-sizing: border-box; }
.compact-feed-day { width: 100%; text-align: center; color: var(--text-muted); font-size: 12px; line-height: 1.5; font-weight: 400; margin: 12px 0 4px; }
.home-top-bar .home-match-view-toggle { display: inline-flex; gap: 4px; padding-right: 12px; margin-right: 4px; border-right: 1px solid var(--border-color); }
.home-top-bar .home-match-view-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 7px; border: 1px solid transparent; border-radius: 8px; color: var(--text-muted); background: transparent; cursor: pointer; }
.home-top-bar .home-match-view-btn svg { width: 20px; height: 20px; }
.home-top-bar .home-match-view-btn:hover { color: var(--text-primary); background: var(--bg-card); }
.home-top-bar .home-match-view-btn[aria-pressed="true"] { color: var(--text-primary); background: rgba(99, 102, 241, 0.18); border-color: rgba(99, 102, 241, 0.42); }
.match-card--compact .compact-match-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1.6fr) minmax(78px, .75fr) minmax(72px, .65fr) minmax(85px, .8fr) minmax(64px, .6fr) 28px;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 3px 8px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.4;
}
.match-card--compact .compact-match-portrait {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 38px;
    height: 38px;
    object-fit: cover;
    object-position: center;
    border-radius: 7px;
}
.match-card--compact .compact-match-identity {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 3px 5px;
    min-width: 0;
    overflow-wrap: anywhere;
}
.match-card--compact .compact-match-identity .user-name,
.match-card--compact .compact-match-identity .user-button-name {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
}
.match-card--compact .compact-match-identity .user-button {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: baseline;
    gap: 3px;
    padding: 2px 4px;
    min-width: 0;
    font-size: 11px;
    border-radius: 4px;
}
.match-card--compact .compact-match-tag { color: var(--text-muted); font-size: 10px; }
.match-card--compact .compact-match-champion {
    grid-column: 2;
    grid-row: 2;
    color: var(--text-muted);
    font-size: 10px;
    overflow-wrap: anywhere;
}
.match-card--compact .compact-match-mode { grid-column: 5; grid-row: 1 / 3; text-align: center; align-self: center; color: var(--text-muted); font-size: 11px; overflow-wrap: anywhere; }
.match-card--compact .compact-match-mode .match-warning { display: inline-flex; vertical-align: middle; margin-left: 3px; }
.match-card--compact .compact-match-result { grid-column: 3; grid-row: 1; font-size: 10px; font-weight: 600; }
.match-card--compact .compact-match-result.win { color: #10b981; }
.match-card--compact .compact-match-result.loss { color: #f87171; }
.match-card--compact .compact-match-result.remake { color: var(--text-muted); }
.match-card--compact .compact-match-duration { grid-column: 3; grid-row: 2; color: var(--text-muted); font-size: 10px; }
.match-card--compact .compact-match-lp.pos { color: #34d399; }
.match-card--compact .compact-match-lp.neg { color: #f87171; }
.match-card--compact .compact-match-kda { grid-column: 4; grid-row: 1; font-variant-numeric: tabular-nums; }
.match-card--compact .compact-match-kda-label { grid-column: 4; grid-row: 2; color: var(--text-muted); font-size: 10px; }
.match-card--compact .compact-match-rating { grid-column: 6; grid-row: 1; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.match-card--compact .compact-match-time { grid-column: 6; grid-row: 2; text-align: right; color: var(--text-muted); font-size: 10px; }
.match-card--compact .compact-match-comments {
    grid-column: 7;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    align-self: stretch;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    padding: 0;
    font: inherit;
    font-size: 10px;
    cursor: pointer;
}
.match-card--compact .compact-match-comments svg { width: 16px; height: 16px; }
.match-card--compact .compact-match-comments[aria-expanded="true"] { color: var(--accent-color); }
.match-card--compact .compact-match-details { border-top: 1px solid var(--border-color); }
.match-card--compact .compact-match-details .match-comments-section { border-top: 0; }
.match-card--compact .compact-match-live-status { grid-column: 3; grid-row: 1 / 3; }
.match-card--compact .compact-match-live-status .live-badge { padding: 3px 6px; font-size: 10px; white-space: nowrap; }
.match-card--compact .live-timer-value { min-width: 0; }
.match-card--compact .compact-live-open { grid-column: 7; grid-row: 1 / 3; text-align: center; color: var(--text-muted); font-size: 20px; }
@container compact-match-card (max-width: 650px) {
    .match-card--compact .compact-match-row {
        grid-template-columns: 34px minmax(0, 1fr) 72px 48px 24px;
        grid-template-rows: auto auto auto auto;
        padding: 10px;
        gap: 5px 7px;
    }
    .match-card--compact .compact-match-portrait { width: 34px; height: 34px; }
    .match-card--compact .compact-match-result { grid-column: 2; grid-row: 3; }
    .match-card--compact .compact-match-rating { grid-column: 4; grid-row: 1; }
    .match-card--compact .compact-match-mode { grid-column: 3; grid-row: 1 / 3; font-size: 10px; }
    .match-card--compact .compact-match-kda { grid-column: 3; grid-row: 3; font-size: 11px; text-align: center; }
    .match-card--compact .compact-match-duration { grid-column: 2 / 5; grid-row: 4; }
    .match-card--compact .compact-match-time { grid-column: 4; grid-row: 2; overflow-wrap: anywhere; }
    .match-card--compact .compact-match-comments { grid-column: 5; grid-row: 1 / 3; }
    .match-card--compact .compact-match-kda-label { display: none; }
    .match-card--compact .compact-match-live-status { grid-column: 2; grid-row: 3 / 5; }
    .match-card--compact .compact-live-open { grid-column: 5; grid-row: 1 / 3; }
}
@media (pointer: coarse) {
    .match-card--compact .compact-match-comments { min-height: 44px; }
    .home-top-bar .home-match-view-btn { min-width: 44px; min-height: 44px; }
}
