/* Six cards per row on desktop. Keep phone/tablet and single-card views intact. */
.market-rarity-sort-row { display:contents; }
html body #auctions .market-searchbar>[data-market="reset"]{background:#17231c;color:#c1d0c6;border:1px solid #344a3c;font-weight:400;box-shadow:none;}
html body #auctions .market-searchbar>[data-market="reset"]:is(:hover,:active){background:#203329;border-color:#526b59;color:#d5e4da;}
html body #auctions .market-sub-row{grid-template-columns:minmax(0,1fr) auto;}
html body #auctions .market-sub-count{justify-self:end;text-align:right;white-space:nowrap;font-size:11px;color:#bad5c5;padding-right:6px;}
@media (min-width:981px) {
  html body #auctions .market-sub-list{width:max(100%,440px);padding:8px;background:#14231b;border:1px solid #47644f;border-radius:12px;}
  html body #auctions .market-sub-list legend{padding:8px;font-size:12px;font-weight:500;background:#223429;border:1px solid #3c5043;border-radius:5px;margin-bottom:6px;}
  html body #auctions .market-sub-row{min-height:26px;margin-left:7px;padding-left:10px;gap:8px;border-left:2px solid #69716c;}
  html body #auctions .market-sub-row label{font-size:11px;min-height:26px;cursor:pointer;}
  html body #collection-album .album-status{display:flex;flex-wrap:wrap;align-items:center;gap:10px;}
  html body #collection-album .album-status .album-results{display:none;}
  html body #collection-album .album-status .album-sort{display:flex;align-items:center;gap:7px;margin-left:auto;flex:0 1 280px;}
  html body #collection-album .album-status .album-sort select{min-width:0;width:100%;height:34px;padding:0 6px;border:1px solid #3a4b3d;border-radius:10px;color:#edf5ef;background:#101b14;font:inherit;font-size:11px;}
  html body #auctions .market-favorites{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:11px;color:#e5d2a2;}
  html body #auctions .market-favorites button{min-height:30px;padding:5px 10px;border:1px solid #776744;border-radius:999px;background:#28291f;color:#e5d2a2;font-size:11px;}
  html body #auctions .market-favorites button[aria-pressed=true]{background:#ffe2a0;border-color:#ffe2a0;color:#292418;}
  html body #auctions .market-rarities{display:flex;flex-wrap:wrap;gap:6px;}
  html body #auctions .market-rarities button{min-height:30px;padding:5px 10px;border:1px solid color-mix(in srgb,var(--rarity) 45%,#25362b);border-radius:999px;background:#19291f;color:var(--rarity);font-size:11px;}
  html body #auctions .market-rarities button[aria-pressed=true]{box-shadow:inset 0 0 0 1px var(--rarity);}
  #auctions .market-facet-panels { grid-template-columns:1.25fr 1fr; align-items:stretch; }
  #auctions .market-facet-menu>summary { box-sizing:border-box; height:44px; }
  #auctions .market-facet-menu[open]>.market-facet-dropdown { box-sizing:border-box; height:calc(100% - 51px); }
  #auctions :is(.market-categories,.market-districts) button { position:relative; }
  #auctions .market-categories button[aria-pressed=true] { padding-left:26px; }
  #auctions :is(.market-categories,.market-districts) button[aria-pressed=true]::after {
    content:'✓'; position:absolute; left:6px; top:50%; transform:translateY(-50%);
    width:14px; height:14px; display:grid; place-items:center; border-radius:50%;
    background:#ffe2a0; color:#262417; font:700 11px/1 sans-serif; pointer-events:none;
  }
  #auctions .market-districts button[aria-pressed=true]::after { left:3px; top:3px; transform:none; width:11px; height:11px; font-size:9px; }
  :is(#collection-album,.visitor-album) .album-browse section { padding:6px 12px; }
  :is(#collection-album,.visitor-album) .album-browse header { margin-bottom:6px; }
  :is(#collection-album,.visitor-album) .album-browse [data-folded=true] header { margin-bottom:0; }
  :is(#collection-album,.visitor-album) .album-browse h3 .album-filter-toggle { min-height:30px; }
  :is(#collection-album,.visitor-album) .album-grid,
  #all-cards #all-cards-grid,
  #auctions .market-grid,
  .exchange-picker-grid,
  .exchange-wishlist-grid,
  .reward-missing-dialog .reward-missing-grid {
    grid-template-columns:repeat(6,minmax(0,1fr));
  }
  #auctions .market-grid { gap:12px; }
  .sale-picker-results { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .market-dialog.is-sale-form>.market-eyebrow,
  .market-dialog.is-sale-form .market-sale-heading>span { display:none; }
  .market-dialog.is-sale-form .market-sale-heading h2 { font-size:22px; margin:0 0 5px; }
  .market-dialog.is-sale-form .market-sale-demo-note { font-size:12px; line-height:1.4; margin:0 0 8px; }
  .market-dialog.is-sale-form #market-sell-form { margin-top:8px; }
  .market-dialog.is-sale-form[open]:has(.sale-picker) { display:flex;flex-direction:column;height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);padding:20px; }
  .market-dialog.is-sale-form:has(.sale-picker)>:not(form) { flex-shrink:0; }
  .market-dialog.is-sale-form #market-sell-form:has(.sale-picker) { flex:1;min-height:400px;grid-template-rows:auto minmax(0,1fr) 16px auto auto;gap:7px;margin-bottom:0; }
  .market-dialog.is-sale-form label[for="market-sell-search"] { display:none; }
  .market-dialog.is-sale-form .sale-picker { display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;min-height:0; }
  .market-dialog.is-sale-form .sale-picker-results { height:100%;max-height:none;min-height:0;box-sizing:border-box;grid-auto-rows:calc((100% - 16px)/2);align-content:start; }
  .market-dialog.is-sale-form .sale-picker-card { min-height:0;overflow:hidden; }
  .market-dialog.is-sale-form .sale-picker-card .card-shell { width:auto;height:100%;max-width:100%;aspect-ratio:2/3;margin:0 auto; }
  .market-dialog.is-sale-form .sale-picker-selection { display:block;height:16px;margin:0;font-size:11px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
  .market-dialog.is-sale-form .market-dialog-message:empty { display:none; }
  #auctions .market-lot-price { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:start; gap:6px; }
  #auctions .market-lot-price>div { min-width:0; }
  #auctions .market-lot-price .market-time { align-items:flex-end; text-align:right; }
  #auctions .market-lot-price .market-clock { white-space:pre-line; }
  #auctions .market-hero { margin-bottom:8px; }
  #auctions .market-tabs { margin:6px 0 10px; padding-bottom:6px; }
  #auctions .market-message:empty { display:none; }
  #auctions .market-searchbar { grid-template-columns:1fr 1.4fr 1fr auto; gap:8px; }
  #auctions .market-rarity-sort-row { display:flex;align-items:center;justify-content:space-between;gap:14px;margin:12px 0; }
  #auctions .market-rarity-sort-row .market-rarities { flex:1;min-width:0;margin:0; }
  #auctions .market-rarity-sort-row #market-sort { flex:0 0 190px;width:190px;min-height:38px;padding:8px 10px;border:1px solid #526f5b;border-radius:9px;background:#101d15;color:#d5e7dc;font:inherit;font-size:12px; }
  #auctions .market-searchbar>[data-market=reset] { background:#2b513e;color:#eef8f0;border-color:#8cbaa0;font-weight:600;min-width:112px; }
  #auctions .market-searchbar>[data-market=reset]:hover { background:#39694f;border-color:#b0e2c4; }
  #auctions .market-results-bar { margin:4px 0; }
  #auctions .market-results-bar [data-result-count],
  #auctions .market-results-bar label[for="market-budget"],
  #auctions #market-budget { display:none; }
  #auctions .market-results-bar:not(:has(.market-buy-filter:not([hidden]),#market-offer-status:not([hidden]))) { display:none; }
  #auctions .market-favorites { margin-block:6px 14px; }
  #auctions .market-facet-panels.album-browse{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:14px;align-items:stretch;margin:0 0 16px;}
  #auctions .market-facet-panels.album-browse>section{margin-top:0;border-radius:18px;border-color:#414e46;background:linear-gradient(145deg,#232b26,#191f1b);}
  #auctions .market-facet-panels.album-browse>details[hidden]{display:none;}
  #auctions .market-facet-panels.album-browse header{flex-wrap:wrap;gap:8px;}
  #auctions .market-facet-panels.album-browse h3{font-size:18px;font-weight:500;margin:0;color:#e0f3e7;}
}
html body #auctions .market-card-preview {position:relative;}
@media(min-width:981px) {
 html body #auctions .market-card-preview .card-name { font-size:6.45cqw; font-weight:700; line-height:1; white-space:normal; overflow-wrap:anywhere; -webkit-line-clamp:2; }
}
html body #auctions .market-wish-new {position:absolute;top:6px;right:6px;z-index:2;padding:3px 6px;border-radius:5px;background:#af263c;color:#fff;font:700 10px/1.2 system-ui,sans-serif;letter-spacing:.03em;pointer-events:none;box-shadow:0 1px 4px #0005;}
