/**
 * V3.2 UI revamp — trunk + hub chrome.
 * Less is more on discovery; data stays dense inside Market Watch.
 * Matches Magical Meta matte + brand green tokens.
 */

/* ── Homepage trunk (T0) ───────────────────────────────────────── */
body.mm-trunk-page {
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(0, 179, 55, 0.12), transparent 60%),
    radial-gradient(900px 400px at 100% 20%, rgba(59, 130, 246, 0.06), transparent 55%),
    #0f0f0f;
}

.mm-trunk-hero {
  max-width: 920px;
  margin: 1.25rem auto 1.75rem;
  text-align: center;
  padding: 0 1rem;
}

.mm-trunk-hero .main-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #00e045;
  margin: 0 0 0.5rem;
  text-shadow: none;
}

.mm-trunk-hero .main-subtitle {
  margin: 0 auto 1.25rem !important;
  max-width: 36rem !important;
  color: var(--mm-text-sec, #c0c0c0) !important;
  font-size: 1rem !important;
  line-height: 1.45 !important;
}

.mm-trunk-page .mm-home-search {
  max-width: 640px;
  margin: 0 auto;
}

.mm-trunk-page .mm-home-search-form {
  padding: 0.35rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(26, 26, 26, 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.mm-trunk-page .mm-home-search-form select,
.mm-trunk-page .mm-home-search-form input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.mm-trunk-page .mm-home-search-form button {
  background: #00b337;
  border-radius: 10px;
}

.mm-trunk-page .mm-home-search-form button:hover {
  background: #00e045;
  color: #041208;
}

.mm-trunk-page .mm-home-search-hint {
  color: rgba(255, 255, 255, 0.5);
}

/* Game chooser: big tiles, not tool-button soup */
.mm-trunk-page .tcg-games-section {
  margin-top: 0.5rem !important;
}

.mm-trunk-page .tcg-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

.mm-trunk-page .tcg-game-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #141414;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.mm-trunk-page .tcg-game-card:hover,
.mm-trunk-page .tcg-game-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(0, 179, 55, 0.55);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}

.mm-trunk-page .tcg-banner {
  flex: 1;
  min-height: 140px;
  background-size: cover;
  background-position: center 30%;
  position: relative;
}

/* Gundam source art is portrait — bias crop into the suit, not black letterbox */
.mm-trunk-page .tcg-game-card:has([data-game="gundam"]) .tcg-banner {
  background-position: center 42%;
}

.mm-trunk-page .tcg-banner a.mm-tile-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  color: #fff;
  padding: 0.85rem 0.9rem;
  background: linear-gradient(transparent 20%, rgba(0, 0, 0, 0.78) 78%);
}

.mm-trunk-page .tcg-banner h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.mm-trunk-page .tcg-overlay {
  opacity: 0.35;
}

/* Legacy tool markup: keep for SEO crawl, hide visual duplicate */
.mm-trunk-page .tcg-tools,
.mm-trunk-page .mm-seo-tools {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
}

/* Layout A — 3 job CTAs per game (Prices / Build / Collect) */
.mm-trunk-page .mm-tile-jobs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.55rem 0.7rem 0.35rem;
  background: #111;
}

.mm-trunk-page .mm-tile-job {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-height: 3.1rem;
  padding: 0.4rem 0.3rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 179, 55, 0.35);
  background: rgba(0, 179, 55, 0.07);
  color: #e8eef3;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.mm-trunk-page .mm-tile-job i {
  color: #00e045;
  font-size: 0.9rem;
}

.mm-trunk-page .mm-tile-job:hover {
  border-color: #00e045;
  background: rgba(0, 179, 55, 0.16);
  color: #fff;
}

.mm-trunk-page .mm-tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem 0.65rem;
  background: #111;
}

.mm-trunk-page .mm-tile-count {
  font-size: 0.7rem;
  color: #9aa0a8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mm-trunk-page .mm-tile-enter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #00e045;
  text-decoration: none;
}

.mm-trunk-page .mm-tile-enter:hover {
  color: #fff;
}

/* One legend under search — not repeated per tile */
.mm-job-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.85rem;
  max-width: 720px;
  margin: 0.85rem auto 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.78rem;
  color: #c5ccd4;
}

.mm-job-legend-title {
  font-weight: 700;
  color: #9aa0a8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  width: 100%;
  text-align: center;
  margin-bottom: 0.1rem;
}

.mm-job-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: #e8eef3;
}

.mm-job-legend-item i {
  color: #00b337;
  font-size: 0.75rem;
}

.mm-job-legend-item.muted {
  color: #9aa0a8;
  font-weight: 500;
}

.mm-job-legend-item.muted i {
  color: #6b7280;
}

.mm-trunk-page .mm-continue-strip:not([hidden]) {
  max-width: 640px;
}

.mm-trunk-page .mm-sync-optin-wrap {
  max-width: 640px;
  margin: 0.75rem auto 1.5rem;
  opacity: 0.65;
  font-size: 0.8rem;
}

.mm-trunk-page .mm-ad-after-choice {
  max-width: 1180px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
  min-height: var(--mm-ad-incontent-min, 250px);
}

@media (max-width: 1100px) {
  .mm-trunk-page .tcg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .mm-trunk-page .tcg-grid {
    grid-template-columns: 1fr;
  }
  .mm-trunk-page .tcg-game-card {
    min-height: 180px;
  }
}

/* ── MW hub shell (T1 + T5) ─────────────────────────────────────── */
.mm-game-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.mm-game-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #a8b0ba;
  font: 600 0.78rem/1 var(--mm-font, Roboto, sans-serif);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

.mm-game-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.mm-game-tab.is-active {
  color: #041208;
  background: #00b337;
  border-color: #00b337;
}

/* Compact sideways tool rail — discovery without burying market data */
.mm-hub-landing {
  margin: 0.35rem 0 0.75rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.mm-hub-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
}

.mm-hub-rail-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #00e045;
  margin-right: 0.15rem;
}

.mm-hub-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  flex: 1;
  min-width: 0;
}

.mm-hub-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #d5dbe3;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.mm-hub-chip:hover {
  border-color: rgba(0, 179, 55, 0.55);
  color: #00e045;
  background: rgba(0, 179, 55, 0.08);
}

.mm-hub-chip[data-tool="market"] {
  border-color: rgba(0, 179, 55, 0.4);
  color: #00e045;
}

.mm-hub-more {
  margin: 0;
}

.mm-hub-more > summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: #9aa0a8;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
}

.mm-hub-more > summary::-webkit-details-marker {
  display: none;
}

.mm-hub-more[open] > summary {
  color: #fff;
  border-style: solid;
}

.mm-hub-chips--more {
  width: 100%;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mm-hub-dismiss {
  appearance: none;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 0.72rem;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  margin-left: auto;
}
.mm-hub-dismiss:hover {
  color: #fff;
}

/* Quieter chrome: tuck SEO intro + beta so data leads */
.app-content .seo-intro {
  margin: 0 0 0.4rem;
  border-color: rgba(255, 255, 255, 0.08);
  background: transparent;
}
.app-content .seo-intro summary {
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  color: #9aa0a8;
}
.app-content .collection-beta-notice {
  margin: 0 0 0.5rem;
  opacity: 0.9;
}

.mm-watch-section {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.55rem 0.75rem 0.75rem;
  margin: 0.65rem 0 0.85rem;
  background: rgba(0, 0, 0, 0.2);
}

.mm-watch-section-title {
  font-size: 0.85rem !important;
  letter-spacing: 0.02em;
}

.summary-cards-grid {
  gap: 0.55rem !important;
  margin-top: 0.15rem !important;
}

/* Filters after data — keep summary row tight */
#view-dashboard .dash-filters-collapsible {
  margin: 0.35rem 0 0.75rem;
}
#view-dashboard .dash-filters-collapsible > summary {
  font-size: 0.82rem;
  color: #9aa0a8;
}

/* Topbar continue strip: compact chip */
.app-content .mm-continue-strip:not([hidden]) {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
}

.app-content .mm-continue {
  font-size: 0.75rem;
  gap: 0.35rem 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
}

.app-content .mm-continue-name {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 840px) {
  .mm-game-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .mm-hub-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
  }
}

/* ── Unified sidebar (one list, all tools) ───────────────────────── */
body.mm-v32-shell #mm-hub-groups {
  display: none !important;
}

/* Desktop: sidebar is the tool directory — hide redundant top group tabs */
@media (min-width: 901px) {
  body.mm-v32-shell .mm-game-tabs--mobile {
    display: none !important;
  }
}

.sidebar-nav.mm-unified-sidebar {
  flex: 1;
  overflow-y: auto;
  padding: 0.35rem 0 0.75rem;
  scrollbar-width: thin;
}

.sidebar-nav.mm-unified-sidebar .mm-unified-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-nav.mm-unified-sidebar .mm-nav-group-label {
  margin: 0.55rem 1.25rem 0.2rem;
  padding: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
  list-style: none;
}

.sidebar-nav.mm-unified-sidebar a {
  padding: 0.58rem 1.15rem;
  font-size: 0.86rem;
}

/* Primary jobs — Prices / Build / Collect */
.sidebar-nav.mm-unified-sidebar a.mm-nav-job {
  font-weight: 700;
  color: #e8eef3;
}
.sidebar-nav.mm-unified-sidebar a.mm-nav-job i {
  color: #00e045;
}
.sidebar-nav.mm-unified-sidebar a.mm-nav-job.active {
  background: rgba(0, 179, 55, 0.16);
  border-left: 3px solid #00b337;
  padding-left: calc(1.15rem - 3px);
}

.sidebar-nav.mm-unified-sidebar a .nav-ext-icon {
  margin-left: auto;
  font-size: 0.65rem;
  opacity: 0.45;
}

.sidebar-nav.mm-unified-sidebar a:hover .nav-ext-icon {
  opacity: 0.85;
}

.sidebar-nav.mm-unified-sidebar .nav-divider {
  height: 1px;
  margin: 0.45rem 1.15rem;
  background: rgba(255, 255, 255, 0.08);
  list-style: none;
}

/* ── Cross-view MW polish (local V3.2 only) ──────────────────────── */
body.mm-v32-shell .app-content {
  background:
    radial-gradient(900px 320px at 0% 0%, rgba(0, 179, 55, 0.05), transparent 55%),
    var(--bg, #0f0f0f);
}

body.mm-v32-shell .topbar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

body.mm-v32-shell .summary-card {
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(18, 18, 18, 0.92) !important;
  box-shadow: none !important;
}

body.mm-v32-shell .summary-card:hover {
  border-color: rgba(0, 179, 55, 0.35) !important;
}

body.mm-v32-shell .tier-column,
body.mm-v32-shell .dash-tier-col,
body.mm-v32-shell .price-tier-card {
  border-radius: 12px;
}

body.mm-v32-shell #view-cards .cards-toolbar,
body.mm-v32-shell #view-sets .sets-toolbar,
body.mm-v32-shell #view-sealed .sealed-toolbar,
body.mm-v32-shell .view-toolbar,
body.mm-v32-shell .cards-controls,
body.mm-v32-shell .filter-bar {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

body.mm-v32-shell .card-grid .card-tile,
body.mm-v32-shell .cards-grid .card-item,
body.mm-v32-shell .set-card,
body.mm-v32-shell .sealed-card {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 16, 16, 0.95);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

body.mm-v32-shell .card-grid .card-tile:hover,
body.mm-v32-shell .cards-grid .card-item:hover,
body.mm-v32-shell .set-card:hover,
body.mm-v32-shell .sealed-card:hover {
  border-color: rgba(0, 179, 55, 0.45);
  transform: translateY(-1px);
}

body.mm-v32-shell .dash-filters-collapsible,
body.mm-v32-shell .dash-load-scope-details {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

body.mm-v32-shell .breadcrumb {
  opacity: 0.85;
  font-size: 0.8rem;
}

body.mm-v32-shell .collection-beta-notice {
  border-radius: 10px;
}

/* Deckbuilder / collection pages that load mm-v32-ui: quieter chrome */
body.mm-v32-shell .db-header,
.deckbuilder-page .top-nav,
.collection-app .app-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Leaf tools (deckbuilder + collection) ───────────────────────── */
html.mm-v32-leaf body {
  background:
    radial-gradient(1000px 420px at 10% -5%, rgba(0, 179, 55, 0.07), transparent 55%),
    #0f0f0f;
}

html.mm-v32-leaf .top-bar,
html.mm-v32-leaf .db-topbar,
html.mm-v32-leaf header.site-header,
html.mm-v32-leaf .ct-header,
html.mm-v32-leaf .collection-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(12, 12, 12, 0.92) !important;
  backdrop-filter: blur(8px);
}

html.mm-v32-leaf .panel,
html.mm-v32-leaf .card-panel,
html.mm-v32-leaf .deck-panel,
html.mm-v32-leaf .ct-panel,
html.mm-v32-leaf .binder-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(16, 16, 16, 0.94);
}

html.mm-v32-leaf .btn-primary,
html.mm-v32-leaf button.primary,
html.mm-v32-leaf .ct-btn-primary {
  background: #00b337;
  border-color: #00b337;
  color: #041208;
  border-radius: 10px;
}

html.mm-v32-leaf .btn-primary:hover,
html.mm-v32-leaf button.primary:hover {
  background: #00e045;
}

html.mm-v32-leaf input,
html.mm-v32-leaf select,
html.mm-v32-leaf textarea {
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.14);
}

html.mm-v32-leaf .search-results .card,
html.mm-v32-leaf .card-result,
html.mm-v32-leaf .ct-card-tile {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.15s ease;
}

html.mm-v32-leaf .search-results .card:hover,
html.mm-v32-leaf .card-result:hover,
html.mm-v32-leaf .ct-card-tile:hover {
  border-color: rgba(0, 179, 55, 0.45);
}

/* ═══════════════════════════════════════════════════════════════════
   Layout D — Market Watch research density (MTGGoldfish / Limitless)
   ═══════════════════════════════════════════════════════════════════ */

body.mm-v32-shell .app-content details.seo-intro:not([open]) {
  margin: 0 0 0.25rem;
  opacity: 0.55;
}
body.mm-v32-shell .app-content details.seo-intro:not([open]) summary {
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
}
body.mm-v32-shell .collection-beta-notice {
  margin: 0 0 0.4rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  max-height: 2.6rem;
  overflow: hidden;
}

/* Freshness + compact KPI strip */
body.mm-v32-shell .mm-dash-head {
  margin: 0 0 0.45rem;
}
body.mm-v32-shell .mm-freshness {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  color: #8b949e;
}
body.mm-v32-shell .mm-freshness-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #00b337;
}
body.mm-v32-shell .mm-freshness-value {
  color: #c0c0c0;
}
body.mm-v32-shell #view-dashboard #dash-summary {
  min-height: 0 !important;
  padding: 0 !important;
}
body.mm-v32-shell #view-dashboard .summary-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 0.4rem !important;
  margin: 0 !important;
}
body.mm-v32-shell #view-dashboard .summary-card {
  padding: 0.45rem 0.55rem !important;
  min-height: 0 !important;
  border-radius: 10px !important;
  gap: 0.45rem !important;
}
body.mm-v32-shell #view-dashboard .summary-card .sc-icon {
  width: 1.6rem !important;
  height: 1.6rem !important;
  font-size: 0.8rem !important;
}
body.mm-v32-shell #view-dashboard .summary-card .sc-label {
  font-size: 0.65rem !important;
  letter-spacing: 0.02em;
}
body.mm-v32-shell #view-dashboard .summary-card .sc-value {
  font-size: 1.05rem !important;
  line-height: 1.15 !important;
}
body.mm-v32-shell #view-dashboard .summary-card .sc-sub {
  font-size: 0.68rem !important;
}

/* Sticky Limitless-style jump nav */
body.mm-v32-shell .mm-dash-jump.dash-section-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 0.55rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(12, 12, 12, 0.94);
  backdrop-filter: blur(10px);
  scrollbar-width: thin;
}
body.mm-v32-shell .mm-dash-jump .dsn-link {
  flex: 0 0 auto;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  color: #a8b0ba;
  text-decoration: none;
  white-space: nowrap;
}
body.mm-v32-shell .mm-dash-jump .dsn-link:hover {
  color: #00e045;
  border-color: rgba(0, 179, 55, 0.35);
  background: rgba(0, 179, 55, 0.08);
}

/* Compact watchlist row */
body.mm-v32-shell .mm-watch-compact {
  margin: 0 0 0.5rem !important;
  padding: 0.35rem 0.55rem 0.45rem !important;
  border-radius: 10px !important;
}
body.mm-v32-shell .mm-watch-compact .mm-watch-section-head {
  margin-bottom: 0.2rem;
}
body.mm-v32-shell .mm-watch-compact .mm-watch-section-title {
  font-size: 0.75rem !important;
}
body.mm-v32-shell .mm-watch-compact .mm-watch-empty,
body.mm-v32-shell .mm-watch-compact .mm-watch-ticker {
  font-size: 0.75rem;
  margin: 0;
}

body.mm-v32-shell #view-dashboard .dash-filters-collapsible {
  margin: 0 0 0.65rem;
  opacity: 0.92;
}
body.mm-v32-shell #view-dashboard .dash-filters-collapsible > summary {
  padding: 0.4rem 0.65rem;
  font-size: 0.78rem;
}

/* Dense market sections */
body.mm-v32-shell #view-dashboard .dash-section {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}
body.mm-v32-shell #view-dashboard .section-heading-bar {
  margin-bottom: 0.4rem;
  gap: 0.35rem;
}
body.mm-v32-shell #view-dashboard .section-heading-bar h3,
body.mm-v32-shell #view-dashboard .dash-section h3 {
  font-size: 0.9rem !important;
}
body.mm-v32-shell #view-dashboard .section-explainer,
body.mm-v32-shell #view-dashboard .mom-hint {
  font-size: 0.72rem;
  margin: 0.2rem 0 0.45rem;
  color: #8b949e;
}
body.mm-v32-shell #view-dashboard .peek-movers,
body.mm-v32-shell #view-dashboard .peek-sellers {
  --peek-height: 28rem;
}
body.mm-v32-shell #view-dashboard .mover-item {
  padding: 0.35rem 0.45rem !important;
  gap: 0.45rem !important;
  border-radius: 8px;
}
body.mm-v32-shell #view-dashboard .mover-img-wrap {
  width: 36px;
  aspect-ratio: 63 / 88;
}
body.mm-v32-shell #view-dashboard .mover-item > .mover-img {
  width: 36px !important;
  height: auto !important;
  aspect-ratio: 63 / 88;
  object-fit: contain !important;
}
body.mm-v32-shell #view-dashboard .tsc-card {
  padding: 0.4rem !important;
  border-radius: 10px;
}
body.mm-v32-shell #view-dashboard .tmover-card {
  padding: 0.3rem 0.35rem !important;
  gap: 0.35rem !important;
}
body.mm-v32-shell #view-dashboard .tmover-img-wrap,
body.mm-v32-shell #view-dashboard .pulse-card-img-wrap,
body.mm-v32-shell #view-dashboard .pulse-card-img-wrap--battlefield {
  width: 32px;
  aspect-ratio: 63 / 88;
}
body.mm-v32-shell #view-dashboard .tmover-card > img,
body.mm-v32-shell #view-dashboard .pulse-card > .pulse-card-img {
  width: 32px !important;
  height: auto !important;
  aspect-ratio: 63 / 88;
  object-fit: contain !important;
}
body.mm-v32-shell #view-dashboard .pulse-cards-grid {
  gap: 0.4rem !important;
}
body.mm-v32-shell #view-dashboard .pulse-card {
  padding: 0.4rem 0.5rem !important;
  border-radius: 10px;
}
body.mm-v32-shell #view-dashboard .tier-3col {
  gap: 0.5rem !important;
}
body.mm-v32-shell #view-dashboard .tier-column {
  padding: 0.45rem !important;
}

@media (max-width: 1100px) {
  body.mm-v32-shell #view-dashboard .summary-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 700px) {
  body.mm-v32-shell #view-dashboard .summary-cards-grid {
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem !important;
    padding-bottom: 0.2rem;
  }
  body.mm-v32-shell #view-dashboard .summary-card {
    flex: 0 0 9.5rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   Cards / Sets / Sealed — Scryfall Layout B (filter rail | results)
   ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 1200px) {
  body.mm-v32-shell #view-cards:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    column-gap: 0.85rem;
    align-items: start;
  }

  body.mm-v32-shell #view-cards .cv-header {
    grid-column: 1 / -1;
  }

  body.mm-v32-shell #view-cards .mm-filter-rail {
    grid-column: 1;
    position: sticky;
    top: 0.5rem;
    max-height: calc(100vh - 1rem);
    overflow: auto;
    align-self: start;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
  }

  body.mm-v32-shell #view-cards .mm-results-pane {
    grid-column: 2;
    min-width: 0;
  }

  body.mm-v32-shell #view-cards .cv-filters-wrap,
  body.mm-v32-shell #view-cards #cv-adv-filters {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    position: static;
    max-height: none;
  }

  body.mm-v32-shell #view-cards .cv-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  body.mm-v32-shell #view-cards .cv-sort-group,
  body.mm-v32-shell #view-cards .cv-filter-group,
  body.mm-v32-shell #view-cards #cv-ms-filters {
    flex-wrap: wrap;
    width: 100%;
  }

  /* Sets / Sealed: toolbar strip + denser results (same chrome language) */
  body.mm-v32-shell #view-sets .sv-controls,
  body.mm-v32-shell #view-sealed .sl-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    padding: 0.45rem 0.65rem;
    margin: 0 0 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
  }
}

body.mm-v32-shell #view-cards .cv-header-row {
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}
body.mm-v32-shell #view-cards .view-title {
  font-size: 1.05rem !important;
}
body.mm-v32-shell #view-cards .cards-grid {
  gap: 0.45rem !important;
}
body.mm-v32-shell #view-cards .card-tile,
body.mm-v32-shell #view-cards .cards-grid > article,
body.mm-v32-shell #view-cards .cards-grid > a,
body.mm-v32-shell #view-cards .cards-grid .card-item {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 14, 14, 0.95);
}
body.mm-v32-shell #view-cards .cv-results-bar {
  margin: 0.25rem 0 0.45rem;
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
}

body.mm-v32-shell #view-sets .sets-grid,
body.mm-v32-shell #view-sets .set-grid,
body.mm-v32-shell #view-sealed .sealed-grid {
  gap: 0.45rem !important;
}
body.mm-v32-shell #view-sets .set-card,
body.mm-v32-shell #view-sealed .sealed-card {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 14, 14, 0.95);
}

/* Layout D density polish — movers / sellers tighter */
body.mm-v32-shell #view-dashboard .peek-movers,
body.mm-v32-shell #view-dashboard .peek-sellers {
  --peek-height: 24rem;
}
body.mm-v32-shell #view-dashboard .movers-grid {
  gap: 0.45rem !important;
}
body.mm-v32-shell #view-dashboard .mover-item {
  padding: 0.28rem 0.4rem !important;
  gap: 0.35rem !important;
}
body.mm-v32-shell #view-dashboard .seller-item,
body.mm-v32-shell #view-dashboard .tsc-card {
  padding: 0.35rem !important;
}

/* ═══════════════════════════════════════════════════════════════════
   Deckbuilder Layout C — library | deck | inspector (≥1200px)
   ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 1200px) {
  html.mm-v32-leaf .workspace {
    display: grid;
    grid-template-columns: minmax(260px, 22vw) 6px minmax(0, 1fr) 6px minmax(260px, 22vw);
    gap: 0;
    background: transparent;
  }
  html.mm-v32-leaf .app-shell {
    --browser-width: 300px;
    --tools-width: 300px;
  }
  html.mm-v32-leaf .workspace-panel {
    border-radius: 12px;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(12, 12, 12, 0.92);
    box-shadow: none;
  }
  html.mm-v32-leaf #browserPanel {
    border-color: rgba(0, 179, 55, 0.22);
  }
  html.mm-v32-leaf #deckPanel {
    border-color: rgba(255, 255, 255, 0.12);
  }
  html.mm-v32-leaf #toolsPanel {
    border-color: rgba(255, 255, 255, 0.1);
  }
  html.mm-v32-leaf .panel-splitter {
    opacity: 0.45;
  }
}

@media (max-width: 899px) {
  html.mm-v32-leaf .workspace {
    display: block;
  }
  html.mm-v32-leaf .mobile-action-strip {
    position: sticky;
    bottom: 0;
    z-index: 30;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 10, 10, 0.96);
  }
}

html.mm-v32-leaf .workspace-panel .panel-title-row,
html.mm-v32-leaf .deck-toolbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
html.mm-v32-leaf .deck-toolbar-btn--ghost:hover,
html.mm-v32-leaf .icon-button:hover {
  border-color: rgba(0, 179, 55, 0.45);
  color: #00e045;
}
html.mm-v32-leaf .ad-slot,
html.mm-v32-leaf [data-mm-ad],
html.mm-v32-leaf .adsbygoogle {
  max-height: 0;
  overflow: hidden;
  margin: 0 !important;
  opacity: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════
   Collection — task modes + denser inventory
   ═══════════════════════════════════════════════════════════════════ */

html.mm-v32-leaf .ct-collection-nav.ct-task-tabs,
html.mm-v32-leaf .ct-task-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  padding: 0.3rem;
  margin-bottom: 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  overflow-x: auto;
}

html.mm-v32-leaf .ct-collection-nav__tab {
  flex: 1 1 0;
  min-width: 4.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  color: #a8b0ba;
  text-decoration: none;
  border: 1px solid transparent;
}

html.mm-v32-leaf .ct-collection-nav__tab:hover {
  color: #00e045;
  background: rgba(0, 179, 55, 0.08);
}

html.mm-v32-leaf .ct-collection-nav__tab.is-active {
  color: #041208;
  background: #00b337;
  border-color: #00b337;
}

html.mm-v32-leaf .ct-nav__item--primary {
  font-weight: 700;
}
html.mm-v32-leaf .ct-nav__item--primary .ct-nav__icon {
  color: #00e045;
}
html.mm-v32-leaf .ct-nav__item.is-active.ct-nav__item--primary,
html.mm-v32-leaf .ct-nav__item--primary[aria-current="page"] {
  background: rgba(0, 179, 55, 0.14);
}

html.mm-v32-leaf .ct-card-tile,
html.mm-v32-leaf .ct-set-row,
html.mm-v32-leaf .ct-inventory-row,
html.mm-v32-leaf .ct-owned-row {
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.08);
}
html.mm-v32-leaf .ct-card-grid,
html.mm-v32-leaf .ct-cards-grid {
  gap: 0.4rem !important;
}
html.mm-v32-leaf .ct-binder-list,
html.mm-v32-leaf .ct-dboard-list {
  gap: 0.55rem !important;
}
html.mm-v32-leaf .collection-header,
html.mm-v32-leaf .ct-topbar,
html.mm-v32-leaf .ct-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
