.tcg-sort-group{display:none}
.filter-preset-btn[data-leaderboard-preset=tcg]{font-family:ArenaBrand,BeauMed,sans-serif;font-size:18px;font-weight:800;letter-spacing:1.2px;line-height:1}
:root[data-leaderboard-mode=tcg] .filters-advanced>.filters-group:not(.tcg-sort-group){display:none}
:root[data-leaderboard-mode=tcg] .tcg-sort-group{display:flex}
#tcg-sort-dropdown{position:relative}
#tcg-sort-dropdown summary{list-style:none}
#tcg-sort-dropdown summary::-webkit-details-marker{display:none}
#tcg-sort-dropdown:not([open]) .filter-dropdown-panel{display:none}
#tcg-sort-dropdown[open] .filter-dropdown-panel{display:block}
/* One row at every width. Below 1280px the site scales the whole container down from a layout at
   least ~770px wide, so phones get this same row, shrunk, like the main leaderboard. */
.carousel-item.carousel-item--tcg,.carousel-header.tcg-leaderboard-header{display:grid;grid-template-columns:100px minmax(130px,1fr) 156px 236px 65px;gap:12px;align-items:center;margin-inline:15px;padding-inline:12px}
.carousel-item.carousel-item--tcg{min-height:0;padding-block:4px}
.carousel-item.carousel-item--tcg>*{margin-right:0}
.carousel-item--tcg[hidden]{display:none!important}
.carousel-header.tcg-leaderboard-header>span{min-width:0;pointer-events:auto;white-space:nowrap;font:inherit;letter-spacing:inherit}
.carousel-header.tcg-leaderboard-header>span:nth-child(2){text-align:left}
.carousel-header.tcg-leaderboard-header>span:nth-child(3){display:flex;align-items:center;justify-content:center;gap:4px}
.carousel-item--tcg .rank{width:auto;min-width:0;justify-content:center;text-align:center}
.tcg-leaderboard-rank-block{display:flex;align-items:center;justify-content:center;gap:8px}
.tcg-leaderboard-crest{display:flex;align-items:center;justify-content:center;flex:none;width:40px;height:40px}
.tcg-leaderboard-crest img{display:block;width:100%;height:100%;object-fit:contain}
.tcg-unranked-crest{color:var(--text-color);opacity:.5}
.carousel-item--tcg .player-name{min-width:0;max-width:none;margin:0}
.carousel-item--tcg .player-name-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.carousel-item--tcg .rating.tcg-leaderboard-power{box-sizing:border-box;width:100%;min-width:0;max-width:none;padding:8px 12px;justify-content:center;font:italic 800 clamp(24px,3vw,32px)/1 PowerBarlow,sans-serif;font-variant-numeric:tabular-nums;color:var(--primary-color);white-space:nowrap}
.tcg-leaderboard-card-tip{white-space:nowrap}
/* The gold corner marks a best-card score; collection totals have none. */
.carousel-item--tcg .rating.rating--champ-score.tcg-leaderboard-power--collection::after{content:none}
.tcg-leaderboard-cards{display:flex;justify-content:center;align-items:center;gap:4px;min-width:0}
.tcg-leaderboard-card{display:block;width:44px;flex:0 0 44px;padding:0;border:0;border-radius:4px;background:none;color:inherit;cursor:pointer}
.tcg-leaderboard-card:hover,.tcg-leaderboard-card:focus-visible{outline:1px solid var(--primary-color);outline-offset:2px}
.tcg-leaderboard-card:disabled{cursor:wait;opacity:.65}
.tcg-leaderboard-card .tcg-card-slot{width:100%}
/* Until all of a row's cards are ready (tcg/leaderboard.js), each shows an empty card-shaped slot. */
.tcg-leaderboard-cards:not([data-thumbnails=ready]) .tcg-leaderboard-card{aspect-ratio:258/366;background:rgba(255,255,255,.06)}
.tcg-leaderboard-cards:not([data-thumbnails=ready]) .tcg-leaderboard-card{content-visibility:hidden}
.tcg-leaderboard-card .tcg-card{pointer-events:none;transform:none;filter:none;transition:none}
.tcg-leaderboard-card *{animation:none!important}
.tcg-leaderboard-card .tcg-aura,.tcg-leaderboard-card .tcg-card-meta{display:none}
.carousel-item--tcg .button-group{display:flex;margin:0;justify-content:center}
.carousel-item--tcg .profile-btn{box-sizing:border-box;width:65px;min-height:48px}
.carousel-item--tcg .profile-btn p{margin-bottom:0}
.tcg-leaderboard-status{text-align:center;padding:20px;color:var(--text-color)}
/* Extend the header background to the track edges. Move the row gutters into
   its padding so the grid's content width and column positions stay identical. */
.carousel-header.tcg-leaderboard-header{width:100%;margin-inline:0;padding-inline:27px}
/* While a TCG screen covers the page (page-cover.js), the list stays visible behind it but its card thumbnails give up
   their own compositor layers (flat-thumbnail.js) and are drawn into the list's. Measured with 100 rows behind a pack
   opening, about 90 separate thumbnail layers cost roughly ten extra dropped frames each in the opening and the reveals. */
:root.tcg-page-covered .tcg-leaderboard-card .tcg-card[data-flat="true"]{will-change:auto!important}
/* The TCG view's Player / Card search switch, at the left of the search box (index.html, playersearch.js): the match
   detail's stacked ranked breakdown buttons (.ranked-breakdown-view-toggle), sharing the box's height with no gap. */
.tcg-search-switch{display:none!important}
:root[data-leaderboard-mode=tcg] .tcg-search-switch{display:grid!important}
.search-container .tcg-search-switch{align-self:stretch;grid-template-rows:1fr 1fr;min-width:72px;border-radius:0;box-shadow:none}
.search-container .tcg-search-switch button{min-height:0;padding:0 14px;font-size:.72rem}
/* The collection ranking's sorts, or a card search's (leaderboard.js syncTCGSearchUi). Recently active only for a
   viewer with a collection, the only one who gets last-active buckets (tcg/leaderboard.js noteActivity). */
:root[data-tcg-card-search] [data-tcg-sort=collection],:root[data-tcg-card-search] [data-tcg-sort=best-card],
:root:not([data-tcg-card-search]) [data-tcg-sort=match],:root:not([data-tcg-card-search]) [data-tcg-sort=active],
:root:not([data-tcg-activity]) [data-tcg-sort=active]{display:none}
/* Card search suggestions (tcg/leaderboard.js tcgCardSearchItem), laid out as the champion search's: each card drawn
   small, a group's three fanned with the last in front; the hint at the right. */
.search-container .autocomplete-dropdown.autocomplete-dropdown--tcg-cards{max-height:420px}
.autocomplete-dropdown .autocomplete-item--tcg-card,.autocomplete-dropdown .autocomplete-item--tcg-group{padding-top:3px;padding-bottom:3px}
.tcg-search-icon{position:relative;flex:none;width:40px;height:38px;margin-right:10px}
.tcg-search-icon .tcg-card-slot{position:absolute;top:1px;left:50%;width:25px;margin-left:-12.5px}
.tcg-search-icon--stack .tcg-card-slot{top:2px;width:23px;margin-left:-11.5px}
.tcg-search-icon--stack .tcg-card-slot:nth-child(1){transform:translateX(-7px) rotate(-14deg)}
.tcg-search-icon--stack .tcg-card-slot:nth-child(2){transform:translateX(7px) rotate(14deg)}
.tcg-search-icon .tcg-card{pointer-events:none;transform:none;filter:none;transition:none}
.tcg-search-icon *{animation:none!important}
.tcg-search-icon .tcg-aura,.tcg-search-icon .tcg-card-meta{display:none}
.autocomplete-item--tcg-card .rank-hint,.autocomplete-item--tcg-group .rank-hint{margin-left:auto;padding-left:12px}
/* Card search results: identical copies show once, with how many below the card (tcg/leaderboard.js). Every card
   keeps room for the count, so the rows stay one height and their cards in line. */
:root[data-tcg-card-search] .tcg-leaderboard-card{position:relative;padding-bottom:15px}
.tcg-leaderboard-copies{position:absolute;inset:auto 0 0;color:var(--primary-color);font:700 12px/1 "Montserrat",sans-serif;letter-spacing:.5px;text-align:center}
