.page-matches .official-matches-main {
    margin-top: 1rem;
}

.matches-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.matches-tab {
    min-height: 4rem;
    padding: 0.85rem 1rem;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.025);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--text-soft);
}

.matches-tab.is-active {
    background: rgba(228, 198, 132, 0.1);
    border-color: rgba(228, 198, 132, 0.2);
    color: var(--text);
}

.matches-tab__label {
    font-weight: 600;
}

.matches-toolbar {
    grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr));
    align-items: end;
    margin-bottom: 1rem;
}

.matches-search-field,
.matches-filter {
    display: grid;
    gap: 0.55rem;
}

.matches-search-field__input-wrap,
.matches-filter__date-wrap,
.matches-filter__trigger {
    min-height: 3.25rem;
    padding-inline: 1rem;
    border-radius: 18px;
}

.matches-search-field__input-wrap,
.matches-filter__date-wrap {
    border: 1px solid var(--line);
    background: rgba(8,11,17,.88);
}

.matches-filter {
    position: relative;
}

.matches-filter__trigger {
    width: 100%;
    justify-content: space-between;
}

.matches-filter__value {
    min-width: 0;
}

.matches-filter__value span[data-filter-label] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.matches-filter__menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    z-index: 12;
    padding: 0.45rem;
}

.matches-filter__option {
    width: 100%;
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.65rem 0.85rem;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--text-soft);
    text-align: left;
}

.matches-filter__option:hover,
.matches-filter__option:focus-visible,
.matches-filter__option.is-selected {
    background: rgba(228,198,132,0.08);
    color: var(--text);
}

.matches-filter__battle-icon {
    width: 18px;
    height: 18px;
}

.matches-results,
.matches-grid {
    display: grid;
    gap: 1rem;
}

.official-match-card {
    padding: clamp(18px, 2.2vw, 24px);
}

.official-match-card.is-premium {
    border-color: rgba(228, 198, 132, 0.26);
}

.official-match-card__premium-star {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--accent-strong);
    background: rgba(228, 198, 132, 0.08);
    border: 1px solid rgba(228, 198, 132, 0.16);
}

.official-match-card__type-badge,
.official-match-card__match-number,
.official-match-card__level,
.official-match-card__boost {
    justify-self: start;
}

.official-match-card__type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.official-match-card__agency-pill,
.official-match-card__person-row,
.official-match-card__actions,
.official-match-card__identity,
.official-match-card__identity-copy,
.official-match-card__name-row,
.duel-compact,
.duel-compact__arena,
.duel-compact__side,
.duel-compact__agency,
.duel-compact__agency-copy,
.duel-compact__copy,
.duel-compact__estimate,
.duel-compact__meta,
.duel-compact__schedule,
.duel-compact__center {
    display: grid;
    gap: 1rem;
}

.official-match-card__agency-pill,
.official-match-card__person-row,
.official-match-card__actions,
.official-match-card__name-row,
.duel-compact__header-side,
.duel-compact__schedule,
.duel-compact__meta,
.duel-card__player-name-row,
.duel-compact__agency {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.official-match-card__agency-logo,
.duel-compact__agency .official-match-card__agency-logo {
    width: 3rem;
    height: 3rem;
    border-radius: 18px;
    display: inline-grid;
    place-items: center;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--agency-logo-a), var(--agency-logo-b));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.official-match-card__avatar,
.duel-card__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(228,198,132,0.16);
}

.official-match-card__badge,
.duel-card__badge {
    width: 18px;
    height: 18px;
}

.official-match-card__fact-box,
.duel-compact__estimate,
.duel-compact__meta-item,
.duel-compact__schedule-date,
.duel-compact__schedule-subline {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.025);
}

.official-match-card__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.official-match-card__fact-box strong,
.duel-compact__estimate strong,
.duel-compact__schedule strong {
    display: block;
    color: var(--text);
    font-size: 1.2rem;
    line-height: 1.15;
}

.duel-compact__arena {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: start;
}

.duel-compact__side {
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}

.duel-compact__side.is-leading,
.duel-compact__side.is-winner {
    border-color: rgba(228,198,132,0.2);
    background: rgba(228,198,132,0.06);
}

.duel-compact__side.is-loser {
    opacity: 0.78;
}

.duel-compact__center {
    align-self: center;
}

.duel-compact__vs {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(228,198,132,0.06);
    color: var(--accent-strong);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.duel-card__live-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #8ff0b1;
}

.matches-pagination {
    justify-content: center;
    margin-top: 1rem;
}

@media (max-width: 1199px) {
    .matches-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1079px) {
    .matches-tabs,
    .matches-toolbar,
    .official-match-card__facts,
    .duel-compact__arena {
        grid-template-columns: 1fr;
    }

    .duel-compact__center {
        justify-self: start;
    }
}


/* Phase 13 — compact filters, 2x2 tabs, stronger premium cards */
.page-matches .official-matches-main {
    margin-top: 0.6rem;
}

.matches-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.matches-tab {
    min-height: 4.3rem;
    padding: 0.9rem 1rem;
    border-radius: 20px;
    align-items: flex-start;
    gap: 0.65rem;
    text-align: left;
}

.matches-tab__label {
    line-height: 1.15;
}

.matches-tab__count {
    margin-top: auto;
    align-self: flex-start;
}

.matches-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    align-items: end;
    margin-bottom: 1.15rem;
}

.matches-search-field {
    grid-column: 1 / -1;
}

.matches-toolbar__reset {
    grid-column: 1 / -1;
    justify-self: start;
}

.matches-search-field,
.matches-filter {
    gap: 0.45rem;
}

.matches-search-field__label,
.matches-filter__label {
    display: inline-block;
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.matches-search-field__input-wrap,
.matches-filter__date-wrap,
.matches-filter__trigger {
    min-height: 3.1rem;
    padding-inline: 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(6, 9, 14, 0.96);
}

.matches-filter__trigger,
.matches-filter__value,
.matches-search-field__input-wrap,
.matches-filter__date-wrap {
    gap: 0.65rem;
}

.matches-filter__menu {
    top: calc(100% + 0.45rem);
    padding: 0.4rem;
    border-radius: 18px;
}

.matches-filter__option {
    min-height: 2.55rem;
    border-radius: 12px;
}

.matches-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
    gap: 1rem;
}

.official-match-card {
    padding: 1rem 1rem 1.05rem;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(11, 15, 22, 0.98), rgba(8, 11, 16, 0.98));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.official-match-card::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 4px;
    border-radius: 24px 24px 0 0;
    background: transparent;
}

.official-match-card.is-premium {
    border-color: rgba(223, 191, 127, 0.28);
    background: linear-gradient(180deg, rgba(16, 18, 22, 0.99), rgba(10, 12, 17, 0.99));
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.official-match-card.is-premium::after {
    background: linear-gradient(90deg, #f3dfb1 0%, #ddb970 48%, #f3dfb1 100%);
}

.official-match-card__premium-star {
    width: 2.2rem;
    height: 2.2rem;
    top: 0.95rem;
    right: 0.95rem;
}

.official-match-card__type-badge,
.official-match-card__match-number,
.official-match-card__level,
.official-match-card__boost {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.official-match-card__agency-pill {
    padding: 0.75rem 0.85rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
}

.official-match-card__person-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
}

.official-match-card__identity {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.85rem;
}

.official-match-card__aside {
    display: grid;
    gap: 0.5rem;
    justify-items: end;
}

.official-match-card__facts,
.duel-compact__schedule {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.official-match-card__fact-box,
.official-match-card__estimate,
.duel-compact__estimate,
.duel-compact__meta-item,
.duel-compact__schedule-date,
.duel-compact__schedule-subline,
.duel-compact__side {
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
}

.official-match-card__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.official-match-card__action {
    min-height: 3rem;
    border-radius: 16px;
    text-transform: none;
    letter-spacing: 0.02em;
}

.duel-compact {
    gap: 0.85rem;
}

.duel-compact__arena {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.duel-compact__center {
    grid-column: 1 / -1;
    justify-self: center;
    margin-block: -0.1rem;
}

.duel-compact__vs {
    width: 2.55rem;
    height: 2.55rem;
}

.duel-compact__side.is-leading,
.duel-compact__side.is-winner {
    border-color: rgba(223, 191, 127, 0.22);
    background: rgba(223, 191, 127, 0.06);
}

.matches-toolbar__reset {
    min-width: 0;
}

@media (min-width: 1100px) {
    .matches-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .matches-toolbar {
        grid-template-columns: minmax(280px, 1.65fr) repeat(4, minmax(145px, 1fr)) auto;
    }

    .matches-search-field,
    .matches-toolbar__reset {
        grid-column: auto;
    }

    .matches-toolbar__reset {
        justify-self: stretch;
    }
}

@media (max-width: 899px) {
    .matches-grid,
    .official-match-card__facts,
    .duel-compact__arena,
    .duel-compact__schedule,
    .official-match-card__person-row,
    .official-match-card__actions {
        grid-template-columns: 1fr;
    }

    .official-match-card__aside {
        justify-items: start;
    }
}

@media (max-width: 639px) {
    .matches-toolbar {
        grid-template-columns: 1fr;
    }

    .matches-tab {
        min-height: 4rem;
    }
}

/* Phase 14 — tighter filters, cleaner tabs, stronger match card structure */
.matches-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.matches-tab {
    min-height: 3.9rem;
    padding: 0.8rem 0.9rem;
    border-radius: 18px;
}

.matches-tab__label {
    font-size: 0.94rem;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.matches-tab__count {
    min-width: 2.8rem;
    justify-content: center;
    font-size: 0.68rem;
    padding-inline: 0.65rem;
}

.matches-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.matches-search-field {
    grid-column: 1 / -1;
}

.matches-toolbar__reset {
    grid-column: 1 / -1;
    justify-self: start;
}

.matches-search-field__label,
.matches-filter__label {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
}

.matches-search-field__input-wrap,
.matches-filter__date-wrap,
.matches-filter__trigger,
.matches-toolbar__reset {
    min-height: 2.95rem;
    border-radius: 15px;
}

.matches-filter__value {
    min-width: 0;
}

.matches-filter__value span[data-filter-label] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.matches-grid {
    gap: 0.95rem;
}

.official-match-card {
    padding: 0.95rem;
    border-radius: 24px;
    overflow: clip;
}

.official-match-card.is-premium {
    border-color: rgba(228, 198, 132, 0.24);
    background:
        radial-gradient(circle at top right, rgba(228, 198, 132, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(12, 17, 25, 0.98), rgba(8, 12, 18, 0.98));
}

.official-match-card__meta-row,
.official-match-card__meta-row--duel {
    align-items: center;
    gap: 0.55rem;
}

.official-match-card__meta-row--duel {
    justify-content: space-between;
}

.official-match-card__type-badge,
.official-match-card__match-number,
.official-match-card__level,
.official-match-card__boost,
.duel-card__live-pill,
.duel-card__result-pill {
    min-height: 1.85rem;
    padding: 0.32rem 0.72rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}

.official-match-card__agency-pill {
    padding: 0.68rem 0.82rem;
    border-radius: 16px;
    gap: 0.8rem;
}

.official-match-card__agency-name {
    font-size: 0.92rem;
    line-height: 1.2;
    color: var(--text-soft);
}

.official-match-card__person-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
}

.official-match-card__identity {
    padding: 0.75rem 0.8rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
}

.official-match-card__identity-copy strong,
.duel-card__player-name-row strong {
    font-size: 1rem;
    line-height: 1.08;
}

.official-match-card__identity-copy span,
.duel-compact__copy span {
    font-size: 0.94rem;
}

.official-match-card__aside {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.45rem;
}

.official-match-card__facts,
.duel-compact__schedule,
.duel-compact__meta--single {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.official-match-card__fact-box,
.official-match-card__estimate,
.duel-compact__estimate,
.duel-compact__meta-item,
.duel-compact__schedule-date,
.duel-compact__schedule-subline,
.duel-compact__side {
    padding: 0.78rem 0.9rem;
    border-radius: 18px;
}

.official-match-card__fact-box span,
.official-match-card__estimate span,
.duel-compact__estimate span,
.duel-compact__schedule-date,
.duel-compact__schedule-subline {
    font-size: 0.84rem;
}

.official-match-card__fact-box strong,
.official-match-card__estimate strong,
.duel-compact__estimate strong,
.duel-compact__schedule strong {
    font-size: clamp(1.02rem, 2.6vw, 1.26rem);
}

.official-match-card__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.official-match-card__action {
    min-height: 3rem;
    padding-inline: 0.95rem;
    justify-content: center;
}

.duel-compact {
    gap: 0.75rem;
}

.duel-compact__arena {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.duel-compact__side {
    display: grid;
    gap: 0.7rem;
}

.duel-compact__identity {
    align-items: center;
}

.duel-compact__agency {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.1rem;
}

.duel-compact__agency-copy strong {
    font-size: 0.94rem;
    line-height: 1.15;
}

.duel-compact__profile-link {
    justify-content: center;
}

@media (min-width: 720px) {
    .matches-toolbar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .matches-search-field {
        grid-column: 1 / span 2;
    }

    .matches-toolbar__reset {
        grid-column: 4;
        justify-self: stretch;
    }
}

@media (min-width: 1120px) {
    .matches-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .matches-tab {
        min-height: 3.45rem;
        align-items: center;
    }

    .matches-toolbar {
        grid-template-columns: minmax(260px, 1.3fr) repeat(4, minmax(150px, 1fr)) auto;
    }

    .matches-search-field {
        grid-column: auto;
    }

    .matches-toolbar__reset {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .matches-tab__label {
        font-size: 0.9rem;
    }

    .official-match-card__actions,
    .official-match-card__facts,
    .duel-compact__arena,
    .duel-compact__schedule,
    .duel-compact__meta--single {
        grid-template-columns: 1fr;
    }

    .official-match-card__action,
    .duel-compact__profile-link {
        width: 100%;
    }
}
