/* Mobile controls keep their complete labels; only their own strip scrolls. */
.catalog-filtered-total{display:none;}
#all-cards .catalog-pagination>button{min-width:64px;min-height:44px;touch-action:manipulation;}
@media(max-width:600px){
 html body #all-cards .catalog-pagination{display:grid;grid-template-columns:44px auto 44px auto;justify-content:center;align-items:center;gap:5px;padding:0;box-sizing:border-box;}
 html body #all-cards .catalog-pagination>button{width:44px;min-width:44px;min-height:44px;font-size:20px;}
 html body #all-cards .catalog-page-jump{grid-column:4;grid-row:1;justify-content:center;gap:5px;}
 html body #all-cards .catalog-page-jump input{width:32px;}
 html body #all-cards .catalog-pagination>.catalog-filtered-total{display:none;}
 html body #all-cards .catalog-album-filters .album-check{display:flex;align-items:center;width:100%;gap:6px;}
 html body #all-cards .catalog-album-filters .catalog-sub-total{margin-left:auto;flex:0 0 auto;font-size:11px;color:#bcd6c7;}
}
html body :is(#collection-album,.visitor-album) .album-controls>.album-sort { grid-column:1/-1; grid-row:auto; display:flex; align-items:center; gap:8px; min-width:0; }
html body :is(#collection-album,.visitor-album) .album-sort>span { flex:0 0 auto; color:#bed6c7; font-size:12px; }
html body :is(#collection-album,.visitor-album) .album-sort select { flex:1; min-width:0; width:100%; font-size:14px; }
html body :is(#collection-album,.visitor-album) .album-sort-note { margin:4px 0; color:#a5bdaf; font-size:11px; }
:is(#collection-album,.visitor-album) .album-browse h3 .album-filter-toggle { border:0; padding:0; background:transparent; color:inherit; font:inherit; opacity:1; }
:is(#collection-album,.visitor-album) .album-browse h3 .album-filter-toggle { display:flex;align-items:center;gap:7px;min-height:36px;cursor:pointer; }
:is(#collection-album,.visitor-album) .album-filter-toggle::before { content:'▸'; }
:is(#collection-album,.visitor-album) .album-filter-toggle[aria-expanded=true]::before { content:'▾'; }
:is(#collection-album,.visitor-album) .album-browse [data-folded=true] :is(.album-category-buttons,.album-district-buttons) { display:none; }
@media(max-width:650px), (max-width:980px) and (pointer:coarse) {
 /* Player names share one size and a vertically centred tap target, whether
    the server renderer supplies plain text (collection) or strong (Prestige). */
 html body #rankings[data-ranking-tab] :is(.rk-table,.pw-table) :is(th,td):nth-child(2){text-align:left;vertical-align:middle}
 html body #rankings[data-ranking-tab] :is(.rk-table,.pw-table) .rk-player-button{
  display:flex;flex-direction:row;align-items:center;justify-content:flex-start;
  width:100%;max-width:none;min-height:36px;margin:0;padding:0;gap:5px;
  font-family:inherit;font-size:12px;line-height:1.35;font-weight:550;text-align:left;
  white-space:nowrap;overflow-wrap:normal;word-break:normal;
 }
 html body #rankings[data-ranking-tab] :is(.rk-table,.pw-table) .rk-player-button strong{
  font-size:12px!important;line-height:1.35;font-weight:550;max-width:none;white-space:nowrap;overflow-wrap:normal;word-break:normal;
 }
 html body #rankings[data-ranking-tab] :is(.rk-table,.pw-table) .rk-player-button>span:not(.rk-avatar){gap:2px;text-align:left}
 html body :is(#collection-album,.visitor-album) .album-controls>.album-sort { gap:5px; }
 html body :is(#collection-album,.visitor-album) .album-sort>span { font-size:11px; }
 html body :is(#collection-album,.visitor-album) .album-sort select { height:34px; min-height:34px; padding:0 6px; font-size:11px; }
 :is(#collection-album,.visitor-album) .album-browse header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:4px; }
 :is(#collection-album,.visitor-album) .album-browse h3 { margin:0; min-width:0; }
 :is(#collection-album,.visitor-album) .album-browse h3 .album-filter-toggle { display:flex; align-items:center; gap:7px; min-height:36px; white-space:nowrap; cursor:pointer; font-size:13px; }
 :is(#collection-album,.visitor-album) .album-filter-toggle::after { content:none; }
 :is(#collection-album,.visitor-album) .album-filter-toggle::before { content:'▸'; }
 :is(#collection-album,.visitor-album) .album-filter-toggle[aria-expanded=true]::before { content:'▾'; }
 :is(#collection-album,.visitor-album) .album-browse [data-folded=true] :is(.album-category-buttons,.album-district-buttons) { display:none; }
 :is(#collection-album,.visitor-album) .album-browse header>button { white-space:nowrap; font-size:10px; }

 html body :is(.friends-tabs,.exchange-tabs,.market-tabs,.rk-profile-filters) {
  display:flex!important; flex-wrap:nowrap!important; gap:5px; min-width:0; max-width:100%; overflow-x:auto!important; overflow-y:hidden; scrollbar-width:thin; padding:4px 2px 8px; overscroll-behavior-x:contain;
 }
 html body :is(.friends-tabs,.exchange-tabs,.market-tabs,.rk-profile-filters)>button {
  flex:0 0 auto!important; width:auto!important; min-width:max-content!important; max-width:none; min-height:40px; white-space:nowrap!important; overflow-wrap:normal!important; word-break:normal!important; hyphens:none!important; text-overflow:clip; padding:8px 11px!important;
 }
 html body :is(.rk-table-wrap,.rewards-table-scroll) { max-width:100%; overflow-x:auto; }
 html body .rewards-table-scroll table { table-layout:auto!important; width:max-content!important; min-width:100%!important; }
 html body .rewards-table-scroll thead :is(th,button,span) {
  white-space:nowrap!important; overflow-wrap:normal!important; word-break:normal!important; hyphens:none!important; text-overflow:clip; max-width:none;
 }
 html body :is(.account-page-heading,.friends-heading,.market-hero,.exchange-hero,.rewards-hero,.rk-hero)>div { min-width:0; max-width:100%; }
 html body :is(.account-page-heading,.friends-heading,.market-hero,.exchange-hero,.rewards-hero,.rk-hero) h1 {
  font-size:clamp(18px,5vw,24px); line-height:1.3; white-space:nowrap; overflow-wrap:normal; word-break:normal; hyphens:none; max-width:100%; overflow-x:auto; text-overflow:clip;
 }
}
@media(max-width:600px){
 html body :is(#collection-album,.visitor-album) .album-browse{gap:5px;margin:0 0 6px;}
 html body :is(#collection-album,.visitor-album) .album-browse section{padding:6px;border:1px solid #414e46;border-radius:12px;background:linear-gradient(145deg,#232b26,#191f1b);}
 html body :is(#collection-album,.visitor-album) .album-browse header{margin-bottom:0;gap:4px;}
 html body :is(#collection-album,.visitor-album) .album-browse h3 .album-filter-toggle{display:flex;align-items:center;gap:5px;border:0;border-radius:0;background:none;color:#e0f3e7;padding:3px 0;min-height:32px;font-size:12px;font-weight:500;box-shadow:none;}
 html body :is(#collection-album,.visitor-album) .album-browse header>button{min-height:32px;padding:5px 10px;font-size:11px;border-radius:999px;}
}
/* All cards uses the album's filter presentation on phones only. */
.catalog-album-filters[hidden]{display:none!important;}
@media(max-width:600px){
 #all-cards.catalog-uses-album .catalog-filters>label:has(:is(#catalog-category,#catalog-subcategory,#catalog-district,#catalog-rarity)){display:none!important;}
 html:not([data-admin-view="true"]) #all-cards.catalog-uses-album .catalog-filters{display:none;}
 #all-cards .catalog-album-filters{margin:0;width:100%;min-width:0;}
 #all-cards .catalog-album-filters .album-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:6px;margin:6px 0;}
 #all-cards .catalog-album-filters .catalog-search{grid-column:1;grid-row:1;min-width:0;}
 #all-cards .catalog-album-filters .catalog-search>span{display:none;}
 #all-cards .catalog-album-filters #catalog-search{width:100%;min-width:0;height:34px;min-height:34px;padding:5px 8px;font-size:16px;box-sizing:border-box;}
 #all-cards .catalog-album-filters #catalog-reset{grid-column:2;grid-row:1;min-height:34px;padding:5px 8px;font-size:12px;background:#244333;border:1px solid #6c917b;border-radius:10px;color:#e1f0e6;}
 #all-cards .catalog-album-filters .album-multiselect{grid-column:1/-1;grid-row:2;min-width:0;}
 #all-cards .catalog-album-filters .album-multiselect summary{min-height:32px;padding:6px 8px;font-size:12px;box-sizing:border-box;}
 #all-cards .catalog-album-filters .album-check-row{grid-template-columns:minmax(0,1fr);}
 #all-cards .catalog-album-filters .album-status{margin:5px 0;display:block;}
 #all-cards .catalog-album-filters .album-rarity-chips{display:flex;flex-wrap:wrap;gap:4px;}
 #all-cards .catalog-album-filters .album-rarity-chips button{flex:0 0 auto;min-height:30px;padding:5px 7px;font-size:10px;}
 #all-cards .catalog-album-filters [data-clear]{min-height:32px;padding:5px 10px;font-size:11px;border-radius:999px;border:1px solid #3b5345;background:#15251c;color:#bcd6c7;}
 #all-cards .catalog-album-filters [data-clear][aria-pressed=true]{background:#ffe2a0;color:#302819;border-color:#ffe2a0;}
}
/* Full labels on desktop, one complete row of choices on phones. */
@media(max-width:600px){
 html body :is(#collection-album,.visitor-album) .album-status>.album-results{display:none;}
}
html body :is(#collection-album,.visitor-album,#all-cards .catalog-album-filters) .album-rarity-chips button :is(.rarity-label-full,.rarity-label-short){width:auto;height:auto;border-radius:0;background:none;}
html body .album-rarity-chips button .rarity-label-short{display:none;}
@media(min-width:601px){html body .album-rarity-chips button.album-duplicate-chip{display:none!important;}}
@media(max-width:600px){
 html body :is(#collection-album,.visitor-album,#all-cards .catalog-album-filters) .album-status{display:flex;flex-wrap:wrap;}
 html body :is(#collection-album,.visitor-album,#all-cards .catalog-album-filters) .album-rarity-chips{display:flex;flex-wrap:nowrap;gap:3px;width:100%;min-width:0;flex:1 1 100%;overflow:visible;padding:0;}
 html body :is(#collection-album,.visitor-album,#all-cards .catalog-album-filters) .album-rarity-chips button{display:inline-flex;flex:1 1 0;justify-content:center;min-width:0;min-height:36px;padding:4px 2px;gap:0;font-size:11px;white-space:nowrap;}
 html body .album-rarity-chips button>span:not(.rarity-label-short){display:none;}
 html body .album-rarity-chips button .rarity-label-short{display:inline;}
 html body :is(#collection-album,.visitor-album,#all-cards .catalog-album-filters) .album-rarity-chips button[data-album-rarity="ULTRA_LEGENDARY"]{flex-grow:1.8;}
 html body :is(#collection-album,.visitor-album,#all-cards .catalog-album-filters) .album-rarity-chips button.album-duplicate-chip{--rarity-color:#eedcaf;flex-grow:2;}
}
/* Ranking phone refinements: clear column boundaries, no sort-arrow clutter. */
@media(max-width:600px){
 html body #rankings[data-ranking-tab] .rk-server-collection-table :is(th,td):nth-child(1){width:11%!important;}
 html body #rankings[data-ranking-tab] .rk-server-collection-table :is(th,td):nth-child(2){width:calc(89% / 3)!important;}
 html body #rankings[data-ranking-tab] .rk-server-collection-table :is(th,td):nth-child(3){width:calc(89% / 3)!important;}
 html body #rankings[data-ranking-tab] .rk-server-collection-table :is(th,td):nth-child(4){width:calc(89% / 3)!important;}
 html body #rankings[data-ranking-tab] .rk-server-collection-table :is(th,td):nth-child(5){display:none;}
 html body #rankings[data-ranking-tab] :is(.rk-server-collection-table,.pw-table) thead :is(th,button){font-size:12px!important;text-align:center;justify-content:center;}
 html body #rankings[data-ranking-tab] .rk-server-collection-table .rk-progress-journey{padding:0;border:0;min-width:0;width:100%;}
 html body #rankings[data-ranking-tab] .rk-server-collection-table .rk-progress-journey .rk-server-progress{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:2px;min-height:32px;padding:5px 3px;font-size:10px;white-space:nowrap;}
 html body #rankings[data-ranking-tab] .rk-server-collection-table .rk-progress-journey .rk-server-progress>span{min-width:0;max-width:100%;white-space:normal;text-align:left;}
 html body #rankings[data-ranking-tab] .rk-server-collection-table .rk-progress-journey .rk-server-progress strong{font-size:10px!important;white-space:nowrap;}
 html body #rankings[data-ranking-tab] .rk-table.rk-server-collection-table .rk-rank{font-size:12px!important;}
 html body #rankings[data-ranking-tab] :is(.rk-server-collection-table,.pw-table) tbody td{padding-top:4px;padding-bottom:4px;}
 html body #rankings[data-ranking-tab] .pw-table .rk-player-button{min-height:30px;padding-top:0;padding-bottom:0;}
 html body #rankings[data-ranking-tab] .rk-player-button small,html body #rankings[data-ranking-tab] .rk-you-tag{display:none;}
 html body #rankings[data-ranking-tab] :is(.rk-table.rk-server-collection-table,.pw-table.pw-table-compact) thead :is(th,button){font-size:12px!important;text-align:center!important;justify-content:center!important;}
}
@media(max-width:600px){
 html body #rankings[data-ranking-tab] .rk-tabs>button[data-tab]{font-size:11px!important;}
 html body #rankings[data-ranking-tab] .rk-audience-toolbar [data-audience],html body #rankings[data-ranking-tab] .rk-position-button{min-height:32px;padding:5px 6px;line-height:1.3;}
 html body #rankings[data-ranking-tab] :is(.rk-table,.pw-table) thead th+th{border-left:1px solid #6a806d66;}
 html body #rankings[data-ranking-tab="prestige"] .pw-table tbody td:nth-child(5){border-left:1px solid #6a806d66;}
 html body #rankings[data-ranking-tab="prestige"] .pw-table tbody tr.pw-last-qualified>td{border-bottom:1px solid #f3ce6380;}
 html body #rankings[data-ranking-tab] :is(.rk-table,.pw-table) thead button>span[aria-hidden="true"]{display:none;}
 html body #rankings[data-ranking-tab] :is(.rk-table,.pw-table) tbody td{vertical-align:middle;}
 html body #rankings[data-ranking-tab] .pw-table td.rk-rank{display:table-cell;vertical-align:middle;}
 html body #rankings[data-ranking-tab] :is(.rk-table,.pw-table) .rk-player-button,
 html body #rankings[data-ranking-tab] :is(.rk-table,.pw-table) .rk-player-button strong{white-space:normal;overflow-wrap:anywhere;word-break:normal;min-width:0;max-width:100%;}
 html body #rankings[data-ranking-tab] :is(.rk-table,.pw-table) td:nth-child(2){white-space:normal;}
}
@media all{
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .album-browse{grid-template-columns:1fr;margin:0;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .album-browse section>header{margin-bottom:8px;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .rk-selected-scope{background:#ffe2a0;color:#302819;border-color:#ffe2a0;max-width:60%;white-space:normal;line-height:1.25;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .rk-scope-tiles button[aria-pressed=true]{background:#303126;border-color:#ffe2a0;color:#fff7df;box-shadow:inset 0 0 0 1px #ffe2a0;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .album-controls{display:block;margin:0;padding:6px;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .album-controls.rk-subcategory-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;position:relative;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .album-controls.rk-subcategory-controls{padding:8px;border:1px solid #414e46;border-radius:12px;background:linear-gradient(145deg,#232b26,#191f1b);align-items:center;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .rk-subcategory-controls .album-multiselect summary{display:flex;align-items:center;gap:5px;min-height:32px;padding:3px 0;border:0;border-radius:0;box-shadow:none;background:none;color:#e0f3e7;font-size:12px;font-weight:500;list-style:none;}
 html body :is(#rankings,.rk-server-profile) .rk-subcategory-controls summary::-webkit-details-marker{display:none;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .rk-subcategory-controls summary::before{content:'▸';}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .rk-subcategory-controls details[open] summary::before{content:'▾';}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .rk-subcategory-controls summary::after{content:none;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .rk-subcategory-controls summary span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .rk-subcategory-controls>.rk-all-subcategories{min-height:32px;padding:5px 10px;border-radius:999px;font-size:11px;}
 html body :is(#rankings,.rk-server-profile) .rk-subcategory-controls .album-multiselect{position:static;min-width:0;grid-column:1!important;grid-row:1!important;}
 html body :is(#rankings,.rk-server-profile) .rk-subcategory-controls>.rk-all-subcategories{grid-column:2!important;grid-row:1!important;}
 html body :is(#rankings,.rk-server-profile) .rk-subcategory-controls .album-check-list{left:0;right:0;width:auto;max-width:100%;}
 html body :is(#rankings,.rk-server-profile) .rk-all-subcategories{min-height:36px;padding:6px 8px;border:1px solid #e4cc83;border-radius:8px;background:#ffe2a0;color:#302819;font-size:11px;line-height:1.25;cursor:pointer;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .album-multiselect{padding:0;border:0;background:none;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .album-multiselect summary{min-height:34px;margin:0;padding:7px 32px 7px 8px;font-size:12px;line-height:1.4;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album summary span{font-size:10px;margin-left:5px;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .album-check-row{grid-template-columns:1fr;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .album-check-row button{display:flex;align-items:center;gap:7px;width:100%;min-height:26px;padding:2px 4px;text-align:left;font-size:12px;line-height:1.2;border:0;background:none;color:#cce2d3;white-space:normal;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .album-check-list :is(fieldset,legend){margin-block:2px;padding-block:2px;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .album-check-row button::before{content:'';flex:0 0 16px;height:16px;border:1px solid #9bb1a1;border-radius:3px;box-sizing:border-box;}
 html body :is(#rankings,.rk-server-profile) .rk-mobile-album .album-check-row button[aria-pressed=true]::before{content:'✓';background:#ffe2a0;border-color:#ffe2a0;color:#302819;text-align:center;font-size:12px;line-height:14px;}
}
