.tcg-market-overview-page .mt-tools {
  --ink:#f6f6f7;--field:#18191b;--edge:#424448;--panel:#202123;
  --mt-search-bg:#252525;--mt-search-ink:#f6f6f7;--mt-search-placeholder:#d4d6da;
  --mt-search-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23bfc3c9' stroke-width='1.6'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 5 5'/%3E%3C/svg%3E");
  position:relative;z-index:20;box-sizing:border-box;width:var(--mt-rail);margin:0 auto;
  display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:16px 24px;
  color:var(--ink);background:linear-gradient(105deg,#191a1c,#121315);border:1px solid #393b3e;border-radius:16px;
}

/* ── Mobile (≤700px) search + filter UI. Everything here is inert above 700px. ── */
.mt-tools-head,.mt-chips,.mt-search-count,.mt-search-clear,.mt-filter-more>svg,.mt-filter-badge,.mt-sort-open,.mt-empty,.mt-sheet,.mt-sheet-backdrop{display:none}
@media(max-width:700px){
/* colour tokens: dark page (default) and light page */
body.tcg-market-overview-page{
--mtm-text:#f2f3f5;--mtm-muted:#9da4b0;--mtm-faint:#6f7682;--mtm-line:rgba(255,255,255,.10);--mtm-line-strong:rgba(255,255,255,.2);
--mtm-field:rgba(255,255,255,.07);--mtm-field-on:rgba(255,255,255,.11);--mtm-raise:#20222c;
--mtm-brand:#e2231a;--mtm-brand-ink:#ff9d94;--mtm-brand-soft:rgba(226,35,26,.2);--mtm-brand-line:rgba(255,110,98,.6);
--mtm-hot:#ff5a4d;--mtm-warm:#ffb454;--mtm-cold:#53caff;
--mtm-glass:rgba(9,10,13,.8);--mtm-sheet:#15171d;--mtm-scrim:rgba(0,0,0,.6);--mtm-focus:#ffb454;
--mtm-search-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%239da4b0' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6'/%3E%3Cpath d='m14 14 4 4'/%3E%3C/svg%3E");
}
html[data-tcg-mi-theme="light"] body.tcg-market-overview-page{
--mtm-text:#15171c;--mtm-muted:#5a616e;--mtm-faint:#8b919c;--mtm-line:rgba(14,16,22,.10);--mtm-line-strong:rgba(14,16,22,.22);
--mtm-field:rgba(14,16,22,.06);--mtm-field-on:rgba(14,16,22,.09);--mtm-raise:#fff;
--mtm-brand:#d51f16;--mtm-brand-ink:#b0160f;--mtm-brand-soft:rgba(213,31,22,.10);--mtm-brand-line:rgba(213,31,22,.5);
--mtm-hot:#d6291f;--mtm-warm:#a86400;--mtm-cold:#0a74a8;
--mtm-glass:rgba(255,255,255,.84);--mtm-sheet:#fff;--mtm-scrim:rgba(18,20,26,.42);--mtm-focus:#b86a00;
--mtm-search-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%235a616e' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6'/%3E%3Cpath d='m14 14 4 4'/%3E%3C/svg%3E");
}
.mt-tools-head [hidden],.mt-tools .mt-search-count[hidden],.mt-tools .mt-search-clear[hidden],.mt-filter-badge[hidden],.mt-empty[hidden],.mt-sheet [hidden]{display:none!important}

/* title row + result count (scrolls away with the page) */
.mt-tools-head{display:flex;align-items:baseline;gap:10px;box-sizing:border-box;width:var(--mt-rail);margin:0 auto;padding:18px 0 4px}
.mt-tools-title{font:700 20px/1.3 system-ui,sans-serif;color:var(--mtm-text)}
.mt-result-count{margin-left:auto;font:400 14px/1.3 system-ui,sans-serif;color:var(--mtm-muted);font-variant-numeric:tabular-nums;white-space:nowrap}
html body .tcg-mi-container .mt-clear-all{display:inline-block;margin:-8px -8px -8px 0;padding:8px;min-width:0;border:0;border-radius:8px!important;background:transparent;box-shadow:none;color:var(--mtm-brand-ink);font:600 13px/1.3 system-ui,sans-serif;white-space:nowrap;cursor:pointer}

/* the bar: one search row + one chip row; flat in the page, glass once docked */
html body.tcg-market-overview-page .tcg-mi-container .mt-tools{
--ink:var(--mtm-text);--edge:var(--mtm-line-strong);--mt-search-bg:var(--mtm-field);--mt-search-ink:var(--mtm-text);--mt-search-placeholder:var(--mtm-muted);--mt-search-icon:var(--mtm-search-icon);
display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 0 0;background:none;border:0;border-radius:0;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}
html body.tcg-market-overview-page .tcg-mi-container .mt-tools.is-docked{padding:8px 12px 0;background:var(--mtm-glass);-webkit-backdrop-filter:blur(14px) saturate(1.4);backdrop-filter:blur(14px) saturate(1.4);border:0;border-bottom:1px solid var(--mtm-line);box-shadow:0 10px 26px rgba(0,0,0,.28)}
html body .tcg-mi-container .mt-tools :is(.tcg-mi-sort,.mt-filter-menus),html body .tcg-mi-container .mt-tools>:is(.mt-theme-switch,.tcg-mi-filter-reset){display:none!important}
html body .tcg-mi-container .mt-tools .tcg-mi-search{position:relative;flex:1 1 0;min-width:0}
html body.tcg-market-overview-page .tcg-mi-container .mt-tools .tcg-mi-search input{height:44px;padding:0 44px 0 40px;border:1px solid var(--mtm-line);border-radius:12px;background-color:var(--mtm-field);color:var(--mtm-text);font:400 16px/1.3 system-ui,sans-serif}
html body.tcg-market-overview-page .tcg-mi-container .mt-tools .tcg-mi-search input:focus{background-color:var(--mtm-field-on);border-color:var(--mtm-line-strong)}
.mt-tools .mt-search-count{display:block;position:absolute;right:44px;top:50%;transform:translateY(-50%);font:400 12px/1 system-ui,sans-serif;color:var(--mtm-muted);font-variant-numeric:tabular-nums;pointer-events:none}
html body .tcg-mi-container .mt-tools .mt-search-clear{display:grid;place-items:center;position:absolute;right:4px;top:4px;width:36px;height:36px;min-width:0;margin:0;padding:0;border:0;border-radius:50%!important;background:transparent;box-shadow:none;color:var(--mtm-muted);cursor:pointer}
.mt-tools .mt-search-clear span{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--mtm-field-on);color:var(--mtm-muted)}
html body .tcg-mi-container .mt-tools .mt-filter-more{display:inline-flex;align-items:center;gap:6px;flex:none;height:44px;min-width:0;padding:0 12px 0 11px;border:1px solid var(--mtm-line-strong);border-radius:12px!important;background:transparent;box-shadow:none;color:var(--mtm-text);font:600 15px/1 system-ui,sans-serif;white-space:nowrap}
html body .tcg-mi-container .mt-tools .mt-filter-more[data-active="true"]{border-color:var(--mtm-brand-line);background:var(--mtm-brand-soft)}
.mt-filter-more>svg{display:block;flex:none}
.mt-filter-badge{display:inline-block;min-width:18px;height:18px;box-sizing:border-box;padding:0 5px;border-radius:9px;background:var(--mtm-brand);color:#fff;font:700 11px/18px system-ui,sans-serif;text-align:center;font-variant-numeric:tabular-nums}

/* quick filter chips */
.mt-tools .mt-chips{display:flex;align-items:center;gap:8px;flex:0 0 calc(100% + 24px);box-sizing:border-box;max-height:52px;margin:0 -12px;padding:0 12px 10px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 30px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 30px),transparent);transition:max-height .2s ease,opacity .16s ease,padding .2s ease}
.mt-tools .mt-chips::-webkit-scrollbar{display:none}
.mt-tools .mt-chips.mt-at-end{-webkit-mask-image:none;mask-image:none}
.mt-tools.is-docked .mt-chips{margin:0 -12px}
.mt-tools.is-docked.mt-chips-hidden .mt-chips{max-height:0;padding-bottom:0;opacity:0;visibility:hidden;pointer-events:none}
html body .tcg-mi-container .mt-chip{display:inline-flex;align-items:center;gap:5px;flex:none;height:34px;min-width:0;margin:0;padding:0 12px;border:1px solid var(--mtm-line-strong);border-radius:10px!important;background:transparent;box-shadow:none;color:var(--mtm-text);font:400 15px/1 system-ui,sans-serif;white-space:nowrap;cursor:pointer}
html body .tcg-mi-container .mt-chip[aria-pressed="true"]{border-color:var(--mtm-brand-line);background:var(--mtm-brand-soft);color:var(--mtm-brand-ink);font-weight:600}
html body .tcg-mi-container .mt-chip[data-type="band"][data-value="hot"][aria-pressed="true"]{border-color:color-mix(in srgb,var(--mtm-hot) 60%,transparent);background:color-mix(in srgb,var(--mtm-hot) 16%,transparent);color:var(--mtm-hot)}
html body .tcg-mi-container .mt-chip[data-type="band"][data-value="warm"][aria-pressed="true"]{border-color:color-mix(in srgb,var(--mtm-warm) 60%,transparent);background:color-mix(in srgb,var(--mtm-warm) 15%,transparent);color:var(--mtm-warm)}
html body .tcg-mi-container .mt-chip[data-type="band"][data-value="cold"][aria-pressed="true"]{border-color:color-mix(in srgb,var(--mtm-cold) 60%,transparent);background:color-mix(in srgb,var(--mtm-cold) 15%,transparent);color:var(--mtm-cold)}
.mt-chip svg{flex:none;margin-right:-4px;opacity:.8}
.mt-chip-sep{flex:none;width:1px;height:18px;background:var(--mtm-line-strong)}
.mt-chips::after{content:"";flex:none;width:14px;height:1px}

/* the hidden Market panel between the bar and the rail: no extra gap on phones */
html body.tcg-market-overview-page .tcg-mi-market-tools[data-mt-enhanced]{padding:0;margin-bottom:2px}
/* results rail: sort button on the left; the view switch itself is untouched */
.tcg-mi-container .mt-result-rail .mt-view-caption{display:none}
html body .tcg-mi-container .mt-sort-open{display:inline-flex;align-items:center;gap:6px;min-width:0;height:40px;margin:0 auto 0 -8px;padding:0 10px 0 8px;border:0;border-radius:10px!important;background:transparent;box-shadow:none;color:var(--mtm-text);font:600 15px/1 system-ui,sans-serif;cursor:pointer}
.mt-sort-open svg{flex:none;color:var(--mtm-muted)}
.mt-sort-open span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* empty state */
.tcg-mi-container.mt-empty-on #tcg-mi-nomatch{display:none!important}
.mt-empty{display:block;box-sizing:border-box;width:var(--mt-rail);margin:8px auto;padding:28px 18px;border:1px dashed var(--mtm-line-strong);border-radius:14px;text-align:center}
.mt-empty strong{display:block;font:600 16px/1.4 system-ui,sans-serif;color:var(--mtm-text)}
.mt-empty p{margin:6px 0 0;padding:0;font:400 13.5px/1.5 system-ui,sans-serif;color:var(--mtm-muted)}
html body .tcg-mi-container .mt-empty button{margin:16px 0 0;height:44px;padding:0 18px;border:0;border-radius:12px!important;background:var(--mtm-brand);box-shadow:none;color:#fff;font:600 14px/1 system-ui,sans-serif;cursor:pointer}
html body .tcg-mi-container .mt-empty button.mt-ghost{background:transparent;border:1px solid var(--mtm-line-strong);color:var(--mtm-text)}

/* bottom sheet (lives in <body>, above the pin bar) */
html.mt-sheet-open{overflow:hidden}
html.mt-sheet-open #__replain_widget{display:none!important} /* 客服浮鈕 z-index 2147000000，會蓋住面板的按鈕 */
html body .mt-sheet-backdrop{display:block;position:fixed;inset:0;z-index:100000;width:auto;height:auto;margin:0;padding:0;border:0;border-radius:0!important;background:var(--mtm-scrim);box-shadow:none;opacity:0;pointer-events:none;transition:opacity .22s ease;cursor:default}
html body .mt-sheet-backdrop.mt-open{opacity:1;pointer-events:auto}
.mt-sheet{display:flex;flex-direction:column;position:fixed;left:0;right:0;bottom:0;z-index:100001;max-height:88%;max-height:88dvh;background:var(--mtm-sheet);color:var(--mtm-text);border-radius:18px 18px 0 0;box-shadow:0 -1px 0 var(--mtm-line-strong),0 -24px 60px rgba(0,0,0,.45);transform:translateY(103%);visibility:hidden;transition:transform .3s cubic-bezier(.2,.8,.2,1),visibility 0s .3s;outline:0;font:400 14px/1.5 system-ui,sans-serif;text-align:left}
.mt-sheet.mt-open{transform:translateY(var(--mt-drag,0px));visibility:visible;transition:transform .3s cubic-bezier(.2,.8,.2,1)}
.mt-sheet.mt-dragging{transition:none}
.mt-sheet-drag{flex:none;touch-action:none}
.mt-sheet-grab{height:18px;display:grid;place-items:center}
.mt-sheet-grab i{width:36px;height:4px;border-radius:2px;background:var(--mtm-line-strong)}
.mt-sheet-head{display:flex;align-items:center;gap:8px;padding:0 10px 10px 16px}
html body .mt-sheet-title{flex:1;min-width:0;display:flex;align-items:center;gap:8px;margin:0;color:var(--mtm-text);font:600 17px/1.3 system-ui,sans-serif;letter-spacing:0}
html body .mt-sheet-close{display:grid;place-items:center;width:40px;height:40px;min-width:0;margin:0 0 0 auto;padding:0;border:0;border-radius:50%!important;background:transparent;box-shadow:none;color:var(--mtm-muted);cursor:pointer}
.mt-sheet-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;border-top:1px solid var(--mtm-line);padding-bottom:8px}
.mt-sheet[data-tab="filter"] [data-pane="sort"],.mt-sheet[data-tab="sort"] [data-pane="filter"]{display:none}
.mt-sheet[data-tab="filter"] .mt-sheet-done,.mt-sheet[data-tab="sort"] :is(.mt-sheet-reset,.mt-sheet-apply){display:none}
.mt-sheet-note{margin:12px 16px 0;padding:10px 12px;border-radius:10px;background:var(--mtm-field);color:var(--mtm-muted);font-size:13px}
.mt-sheet-sec{padding:16px 16px 4px}
.mt-sheet-sec h3{display:flex;align-items:baseline;gap:8px;margin:0 0 10px;padding:0;font:600 14px/1.4 system-ui,sans-serif;color:var(--mtm-text);letter-spacing:0;text-transform:none}
.mt-sheet-sec h3 small{font:400 12px/1.4 system-ui,sans-serif;color:var(--mtm-faint)}
.mt-opts{display:grid;gap:8px}
.mt-opts-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.mt-opts-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.mt-opt{position:relative;display:block;margin:0;padding:0;cursor:pointer}
.mt-opt input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;appearance:none;-webkit-appearance:none}
.mt-opt-face{display:flex;align-items:center;justify-content:space-between;gap:8px;box-sizing:border-box;min-height:46px;padding:6px 12px;border:1px solid var(--mtm-line-strong);border-radius:11px;color:var(--mtm-text);font:400 14px/1.35 system-ui,sans-serif}
.mt-opt-face small{font-size:12px;color:var(--mtm-muted);font-variant-numeric:tabular-nums}
.mt-opt input:checked+.mt-opt-face{border-color:var(--mtm-brand-line);background:var(--mtm-brand-soft);color:var(--mtm-brand-ink);font-weight:600}
.mt-opt input:checked+.mt-opt-face small{color:inherit;opacity:.85}
.mt-opt input:focus-visible+.mt-opt-face{outline:2px solid var(--mtm-focus);outline-offset:2px}
.mt-opt input:disabled{cursor:default}
.mt-opt input:disabled+.mt-opt-face{opacity:.38}
.mt-opt-band .mt-opt-face{flex-direction:column;align-items:flex-start;justify-content:space-between;gap:2px;min-height:76px;padding:10px 10px 9px;border-top-width:3px}
.mt-opt-band .mt-opt-face b{font-size:16px;font-weight:600}
.mt-opt-band .mt-opt-face em{font-style:normal;font-size:12px;color:var(--mtm-muted)}
.mt-opt-band[data-band="hot"] .mt-opt-face{border-top-color:var(--mtm-hot)}
.mt-opt-band[data-band="warm"] .mt-opt-face{border-top-color:var(--mtm-warm)}
.mt-opt-band[data-band="cold"] .mt-opt-face{border-top-color:var(--mtm-cold)}
.mt-opt-band[data-band="hot"] input:checked+.mt-opt-face{border-color:var(--mtm-hot);background:color-mix(in srgb,var(--mtm-hot) 14%,transparent);color:var(--mtm-hot)}
.mt-opt-band[data-band="warm"] input:checked+.mt-opt-face{border-color:var(--mtm-warm);background:color-mix(in srgb,var(--mtm-warm) 13%,transparent);color:var(--mtm-warm)}
.mt-opt-band[data-band="cold"] input:checked+.mt-opt-face{border-color:var(--mtm-cold);background:color-mix(in srgb,var(--mtm-cold) 13%,transparent);color:var(--mtm-cold)}
.mt-opt-band input:checked+.mt-opt-face em{color:inherit;opacity:.8}
.mt-opt-status .mt-opt-face{justify-content:flex-start;gap:10px;min-height:56px;padding:8px 12px;border:0;border-radius:10px}
.mt-opt-status+.mt-opt-status{border-top:1px solid var(--mtm-line)}
.mt-opts:has(.mt-opt-status){gap:0}
.mt-opt-text{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.35}
.mt-opt-text b{font-size:14.5px;font-weight:600;color:var(--mtm-text)}
.mt-opt-text i{font-style:normal;font-size:12.5px;color:var(--mtm-muted)}
.mt-opt-box{flex:none;display:grid;place-items:center;width:22px;height:22px;box-sizing:border-box;border:1.5px solid var(--mtm-line-strong);border-radius:6px;color:transparent}
.mt-opt-status input:checked+.mt-opt-face{background:var(--mtm-brand-soft);color:var(--mtm-text);font-weight:400}
.mt-opt-status input:checked+.mt-opt-face .mt-opt-box{background:var(--mtm-brand);border-color:var(--mtm-brand);color:#fff}
.mt-opt-radio .mt-opt-face{justify-content:flex-start}
.mt-opt-dot{flex:none;display:grid;place-items:center;width:20px;height:20px;box-sizing:border-box;border:1.5px solid var(--mtm-line-strong);border-radius:50%}
.mt-opt-radio input:checked+.mt-opt-face .mt-opt-dot{border-color:var(--mtm-brand)}
.mt-opt-radio input:checked+.mt-opt-face .mt-opt-dot::after{content:"";width:10px;height:10px;border-radius:50%;background:var(--mtm-brand)}
.mt-sheet-foot{flex:none;display:flex;gap:10px;padding:10px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--mtm-line);background:var(--mtm-sheet)}
html body .mt-sheet-foot button{height:48px;min-width:0;margin:0;padding:0 12px;border-radius:12px!important;box-shadow:none;font:600 15px/1 system-ui,sans-serif;cursor:pointer}
html body .mt-sheet-foot .mt-sheet-reset{flex:0 0 92px;border:1px solid var(--mtm-line-strong);background:transparent;color:var(--mtm-text)}
html body .mt-sheet-foot .mt-sheet-reset:disabled{opacity:.38;cursor:default}
html body .mt-sheet-foot :is(.mt-sheet-apply,.mt-sheet-done){flex:1;border:0;background:var(--mtm-brand);color:#fff}
html body .mt-sheet-foot .mt-sheet-apply[data-zero="true"]{background:var(--mtm-field-on);color:var(--mtm-muted)}
:is(.mt-tools-head,.mt-tools,.mt-empty,.mt-sheet,.mt-result-rail) :is(button,input):focus-visible{outline:2px solid var(--mtm-focus);outline-offset:2px}
}
@media(max-width:700px) and (prefers-reduced-motion:reduce){.mt-tools .mt-chips,.mt-sheet,.mt-sheet.mt-open,html body .mt-sheet-backdrop{transition:none}}
@media(max-width:700px){
  /* Match Salient's header slide, including when reduced motion is enabled. */
  .tcg-market-overview-page .mt-tools.is-docked{transition:top .3s ease}
  html body .tcg-mi-container .mt-tools h2{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  html body .tcg-mi-container .mt-result-rail{flex-wrap:nowrap;gap:8px}
  html body .tcg-mi-container .mt-result-rail .mt-sort-open{flex:1 1 0;margin:0;padding-inline:0 4px}
  .mt-result-rail .mt-view-switch{flex:none}
  html body .tcg-mi-container .mt-tools:not(.mt-chips-hidden){padding-bottom:0}
  html body .tcg-mi-container .mt-tools.is-docked.mt-chips-hidden{row-gap:0;padding-bottom:8px}
  html body .tcg-mi-container .mt-tools:has(.mt-search-count:not([hidden])) .tcg-mi-search input{padding-right:94px}
  html body .mt-sheet[hidden],html body .mt-sheet-backdrop[hidden]{display:none!important}
}
.tcg-market-overview-page .mt-tools.is-docked {
  position:fixed;top:var(--mt-dock-top,0);left:0;right:0;width:auto;z-index:990;
  --ink:#1d1d1f;--field:rgba(255,255,255,.12);--edge:rgba(0,0,0,.23);--panel:#f8f8fa;
  --mt-search-bg:rgb(255 255 255 / 30%);--mt-search-ink:#1d1d1f;--mt-search-placeholder:#41454b;
  --mt-search-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2352565d' stroke-width='1.6'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 5 5'/%3E%3C/svg%3E");
  background:rgb(255 255 255 / 57%);backdrop-filter:blur(6px) saturate(156%);-webkit-backdrop-filter:blur(6px) saturate(156%);
  border:0;border-bottom:1px solid rgba(255,255,255,.55);border-radius:0;box-shadow:0 8px 40px #0003,0 2px 8px #0000001a,inset 0 1px 0 #fffc;padding-block:10px;
}
.mt-tools h2 {margin:0;color:var(--ink);font:650 19px/1.3 system-ui,sans-serif;white-space:nowrap}
.mt-tools .tcg-mi-search {flex:1 1 0;min-width:240px;display:block;margin:0} /* 放不下時把篩選選單換到第二行，不再壓縮搜尋框 */
.mt-tools .tcg-mi-control-label,.mt-tools .tcg-mi-sort-label,.mt-tools .tcg-mi-legend-title {display:none}
.mt-tools .tcg-mi-sort {position:relative;display:block;margin:0;min-width:0}
.mt-tools .tcg-mi-search input,.mt-tools .tcg-mi-sort select,.mt-tools summary,.mt-tools .mt-filter-more {
  box-sizing:border-box;height:46px;margin:0;border:1px solid var(--edge);border-radius:10px;padding:0 13px;
  background-color:var(--field);color:var(--ink);font:550 14px/1.3 system-ui,sans-serif;
}
.tcg-market-overview-page .mt-tools .tcg-mi-search input {width:100%;padding-left:39px;background-color:var(--mt-search-bg);border:0;box-shadow:none;color:var(--mt-search-ink);background-image:var(--mt-search-icon);background-repeat:no-repeat;background-position:12px center}
.tcg-market-overview-page .mt-tools .tcg-mi-search input::placeholder {color:var(--mt-search-placeholder);opacity:1}
.mt-tools .tcg-mi-sort select {width:100%;appearance:none;-webkit-appearance:none;background-image:none;padding-right:36px;color-scheme:dark}
.mt-tools.is-docked .tcg-mi-sort select {color-scheme:light}
.mt-filter-menus {display:flex;gap:12px}
.mt-filter-menu {position:relative;margin:0}
.mt-tools summary {display:flex;align-items:center;cursor:pointer;white-space:nowrap;list-style:none}
.mt-tools summary::-webkit-details-marker {display:none}
.mt-tools summary:after {content:"";width:7px;height:7px;box-sizing:border-box;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);pointer-events:none}
.mt-tools summary:after {margin:-3px 1px 0 12px}
.mt-tools .tcg-mi-sort select[hidden]{display:none!important}
.mt-tools .mt-sort-menu>summary{justify-content:space-between}
.mt-tools .mt-filter-footer.mt-sort-footer{justify-content:flex-end}
.tcg-market-overview-page .mt-tools .mt-filter-pop :is(.mt-filter-row,.mt-filter-row span,.mt-filter-heading strong,.mt-filter-heading small,.mt-filter-clear){color:var(--ink)!important;-webkit-text-fill-color:currentColor}
.mt-tools .mt-filter-menu[open]>summary {border-color:#db685f}
.mt-tools .mt-filter-menu[open]>summary:after{transform:rotate(225deg);margin-top:4px}
.mt-tools .mt-filter-pop{box-sizing:border-box;position:absolute;top:calc(100% + 7px);right:0;z-index:3;width:min(300px,82vw);padding:12px 14px;border:1px solid var(--edge);background:var(--panel);color:var(--ink);border-radius:16px;box-shadow:0 10px 24px #0004;display:flex;flex-direction:column;max-height:min(58vh,530px);overflow:auto}
.mt-tools .mt-filter-heading,.mt-tools .mt-filter-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none}
.mt-tools .mt-filter-heading{padding:5px 7px 12px}.mt-tools .mt-filter-heading small{opacity:.76}
.mt-tools .mt-filter-choices{min-height:0;overflow:auto;overscroll-behavior:contain}
.mt-tools .mt-filter-row{box-sizing:border-box;display:flex;align-items:center;gap:12px;padding:9px 8px;min-height:42px;margin:0;border-radius:7px;color:inherit;cursor:pointer;font:500 15px/1.4 system-ui,sans-serif}
.mt-tools .mt-filter-row input{appearance:auto;width:18px;height:18px;flex:none;margin:0;accent-color:#c52c22;cursor:pointer}
.mt-tools .mt-filter-footer{margin-top:8px;border-top:1px solid var(--edge);padding-top:12px}
.mt-tools .mt-filter-footer button{padding:8px 16px;font:600 14px/1.4 system-ui,sans-serif;border:0;border-radius:9px;cursor:pointer}
.mt-tools .mt-filter-clear{color:var(--ink);background:transparent}
.mt-tools .mt-filter-done{color:white;background:linear-gradient(150deg,#ec4436,#ad2118 65%,#e43c30);box-shadow:inset 0 0 0 1px #fc8178}
.mt-tools :is(summary,button,select,input):focus-visible{outline:2px solid #e65c50;outline-offset:2px}
/* Keep the search field's focus quiet, without removing its keyboard cue. */
html body.tcg-market-overview-page .tcg-mi-container .mt-tools .tcg-mi-search input:focus{
  outline:none!important;border-color:#8190a4!important;
  box-shadow:inset 0 0 0 1px #8190a4!important
}
html body.tcg-market-overview-page .tcg-mi-container .mt-tools .tcg-mi-search input:focus-visible{
  box-shadow:inset 0 0 0 2px #8190a4!important
}
@media(hover:hover){.mt-tools :is(summary,.mt-filter-more,select):hover{border-color:#de6156}.mt-tools :is(.mt-filter-row,.mt-filter-clear):hover{background:rgba(160,135,135,.18)}.mt-tools .mt-filter-done:hover{filter:brightness(1.18)}}
.tcg-mi-market-tools[data-mt-enhanced] .tcg-mi-filter-section[hidden]{display:none}
.mt-tools .mt-filter-more {display:none}
.tcg-market-overview-page .tcg-mi-market-tools[data-mt-enhanced] {background:none;border:0;box-shadow:none;padding:8px 0;margin-bottom:8px}
.tcg-mi-market-tools[data-mt-enhanced] :is(.tcg-mi-market-tools-heading,.tcg-mi-controls),.tcg-mi-market-tools[data-mt-enhanced] .tcg-mi-legend-actions{display:none}
.tcg-mi-market-tools[data-mt-enhanced] .tcg-mi-market-tools-head {justify-content:flex-end;margin:0}
.tcg-mi-market-tools[data-mt-enhanced] .tcg-mi-legend {border:0;padding:0;background:none;margin:0;display:block}
@media(max-width:1050px){
  .tcg-market-overview-page .mt-tools {display:grid;grid-template-columns:auto 1fr;gap:9px;padding:12px 16px}
  .mt-tools .mt-filter-more {display:block}
  .mt-tools .tcg-mi-sort {grid-row:2;grid-column:2}
  .mt-tools .tcg-mi-sort:has(.mt-sort-menu){position:static}
  .mt-tools .tcg-mi-sort select {width:100%}
  .mt-tools .mt-filter-menus {display:none;grid-column:1/-1;grid-row:3;flex-wrap:wrap}
  .mt-tools .mt-filter-more[aria-expanded="true"]+.mt-filter-menus {display:flex}
  .mt-tools .mt-filter-menu {position:static}
  .mt-tools .mt-filter-pop {left:0;right:0;width:100%}
}
