    .page-hero {
      padding: 0.55rem 0 0.7rem;
    }

    .page-hero h1 {
      font-family: var(--heading-font);
      line-height: 1.04;
      letter-spacing: -0.04em;
      margin: 0.35rem 0 0.45rem;
      max-width: 12ch;
    }

    .page-hero p {
      color: var(--muted);
      max-width: 70ch;
      margin-bottom: 0.4rem;
    }

    .page-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.9rem;
      margin-top: 1.5rem;
    }

    .meta-summary {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      justify-content: start;
      gap: 0.75rem;
      margin-top: 0.75rem;
      max-width: 720px;
    }

    .meta-summary .stat {
      display: block;
      padding: 0.8rem 1rem;
    }

    .meta-summary .stat span {
      display: block;
      line-height: 1.2;
    }

    .meta-summary .stat strong {
      display: block;
      margin: 0.45rem 0 0;
      text-align: left;
      font-size: clamp(1.7rem, 4vw, 2.3rem);
    }

    .meta-summary .stat small {
      display: none;
    }

    .deck-section {
      padding: 0.25rem 0 3rem;
    }

    .filter-panel {
      margin-bottom: 0.7rem;
      width: fit-content;
      max-width: 100%;
      padding: 0.65rem 0.9rem;
      transition: width 0.2s ease, padding 0.2s ease;
    }

    .filter-panel.is-open {
      width: 100%;
      padding: 1rem;
    }

    #filter-panel-toggle-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.8rem;
      width: 100%;
      min-height: 40px;
      border: 0;
      background: transparent;
      color: inherit;
      text-align: left;
      cursor: pointer;
      user-select: none;
    }

    #filter-panel-toggle-head .filter-panel-toggle-title {
      margin: 0;
      font-size: 1rem;
      font-weight: 700;
    }

    .filter-panel-toggle-arrow {
      display: inline-grid;
      place-items: center;
      width: 1.7rem;
      height: 1.7rem;
      border-radius: 999px;
      border: 1px solid rgba(143, 194, 255, 0.45);
      background: rgba(143, 194, 255, 0.2);
      color: #dff0ff;
      font-size: 0.92rem;
      font-weight: 900;
      line-height: 1;
      transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    }

    .filter-panel.is-open .filter-panel-toggle-arrow {
      transform: rotate(180deg);
      color: #ffffff;
      border-color: rgba(143, 194, 255, 0.75);
      background: rgba(143, 194, 255, 0.32);
    }

    .filter-panel-description {
      margin: 0.35rem 0 0.9rem;
      color: var(--muted);
      max-width: 60ch;
    }

    .filter-panel-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;
    }

    .filter-panel-head h2 {
      margin: 0;
      font-size: 1.1rem;
    }

    .filter-panel-head p {
      margin: 0.35rem 0 0;
      color: var(--muted);
      max-width: 60ch;
    }

    .filter-controls {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.75rem;
      margin-top: 1rem;
      align-items: start;
    }

    .filter-group {
      display: contents;
    }

    .filter-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      justify-self: start;
      min-height: 36px;
      width: fit-content;
      max-width: 100%;
      padding: 0.48rem 0.8rem;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.04);
      color: var(--text);
      font-size: 0.84rem;
      font-weight: 700;
      cursor: pointer;
      transition: 0.2s ease;
    }

    #clear-filters-button {
      color: #8fc2ff;
    }

    .open-builder-button {
      color: #ffffff;
    }

    #include-toggle-button {
      grid-column: 1;
    }

    #exclude-toggle-button {
      grid-column: 2;
    }

    .filter-toggle.active {
      box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    }

    .filter-toggle-include.active {
      background: rgba(57, 217, 138, 0.12);
      border-color: rgba(57, 217, 138, 0.4);
    }

    .filter-toggle-exclude.active {
      background: rgba(255, 116, 116, 0.12);
      border-color: rgba(255, 116, 116, 0.38);
    }

    .filter-picker {
      display: grid;
      grid-column: 1 / -1;
      width: 100%;
      gap: 0.75rem;
      padding: 0.9rem;
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .filter-picker.hidden {
      display: none;
    }

    .filter-search {
      width: 100%;
      min-height: 42px;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: rgba(255, 255, 255, 0.05);
      color: var(--text);
      padding: 0.75rem 0.9rem;
      outline: none;
    }

    .filter-search::placeholder {
      color: var(--muted);
    }

    .filter-card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
      gap: 0.55rem;
    }

    .filter-card {
      display: grid;
      justify-items: center;
      gap: 0.35rem;
      padding: 0.55rem 0.45rem;
      border-radius: 14px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.04);
      color: var(--text);
      text-align: center;
      cursor: pointer;
      transition: 0.2s ease;
    }

    .filter-card img {
      width: 100%;
      max-width: 52px;
      aspect-ratio: 1 / 1.2;
      object-fit: contain;
    }

    .filter-card span {
      font-size: 0.66rem;
      line-height: 1.15;
    }

    .filter-card.selected-include,
    .filter-card.selected-exclude {
      border-color: rgba(57, 217, 138, 0.72);
      background: rgba(57, 217, 138, 0.34);
      box-shadow: 0 0 0 1px rgba(57, 217, 138, 0.38) inset;
    }

    .filter-empty-state {
      padding: 1rem;
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.02);
      border: 1px dashed rgba(255, 255, 255, 0.08);
    }

    .filter-empty-state p {
      margin: 0;
      color: var(--muted);
    }

    .active-filter-summary {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.85rem;
      margin-top: 1rem;
    }

    .active-filter-row {
      display: grid;
      gap: 0.55rem;
      min-width: 0;
    }

    .active-filter-label {
      display: inline-flex;
      width: fit-content;
      align-items: center;
      min-height: 28px;
      padding: 0.25rem 0.6rem;
      border-radius: 999px;
      font-size: 0.74rem;
      font-weight: 700;
    }

    .active-filter-label.include {
      color: #baf7d8;
      background: rgba(57, 217, 138, 0.12);
    }

    .active-filter-label.exclude {
      color: #ffc7c7;
      background: rgba(255, 116, 116, 0.12);
    }

    .filter-chip-list {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .filter-chip {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      min-height: 34px;
      padding: 0.45rem 0.7rem;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.04);
      color: var(--text);
      font-size: 0.78rem;
    }

    .filter-chip strong {
      font-size: 0.95rem;
      line-height: 1;
    }

    .filter-chip-include {
      cursor: pointer;
      border-color: rgba(57, 217, 138, 0.36);
      background: rgba(57, 217, 138, 0.14);
    }

    .filter-chip-exclude {
      cursor: pointer;
      border-color: rgba(255, 116, 116, 0.32);
      background: rgba(255, 116, 116, 0.14);
    }

    .filter-chip-empty {
      color: var(--muted);
    }

    .deck-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1rem;
      max-width: 1100px;
      margin: 0 auto;
    }

    .deck-card {
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 0.9rem;
      box-shadow: var(--shadow);
    }

    .deck-card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.6rem;
    }

    .deck-rank-wrap {
      display: flex;
      align-items: flex-start;
      gap: 0.9rem;
    }

    .deck-rank {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      display: grid;
      place-items: center;
      font-weight: 800;
      font-size: 0.84rem;
      background: rgba(94, 162, 255, 0.14);
      color: #dce9ff;
      flex-shrink: 0;
    }

    .deck-score {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      text-align: right;
      line-height: 1;
      white-space: nowrap;
    }

    .deck-score-label {
      margin: 0;
    }

    .deck-score strong {
      display: inline;
      font-size: 1.06rem;
      line-height: 1;
    }

    .deck-score .score-tooltip-trigger {
      align-self: center;
    }

    .deck-metrics {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0.45rem;
      margin-top: 0.6rem;
    }

    .metric-box {
      display: grid;
      align-content: center;
      padding: 0.34rem 0.46rem;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      min-height: 66px;
    }

    .metric-box strong {
      display: block;
      font-size: clamp(0.96rem, 3.9vw, 1.12rem);
      line-height: 1.1;
      margin-bottom: 0.02rem;
    }

    .metric-box .small {
      font-size: clamp(0.9rem, 3.5vw, 1.02rem);
      line-height: 1.1;
      margin-bottom: 0.18rem;
    }

    .deck-metrics span,
    .empty-state p,
    .loading-state p {
      color: var(--muted);
    }

    .tower-troop-metric {
      display: grid;
      justify-items: center;
      align-content: center;
      gap: 0.12rem;
      text-align: center;
    }

    .tower-troop-metric .small {
      font-size: clamp(0.78rem, 3vw, 0.88rem);
      line-height: 1;
    }

    .tower-troop-metric img {
      width: min(100%, clamp(28px, 7vw, 40px));
      height: auto;
      object-fit: contain;
    }

    .deck-cards {
      display: grid;
      grid-template-columns: repeat(4, minmax(64px, 88px));
      justify-content: start;
      gap: 0.45rem;
      margin-top: 0.62rem;
    }

    .deck-tower-troop {
      margin-top: 0.62rem;
      padding: 0.34rem 0.5rem;
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      display: flex;
      align-items: center;
      gap: 0.55rem;
    }

    .tower-troop-chip {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-top: 0;
      min-width: 0;
    }

    .tower-troop-chip img {
      width: 36px;
      max-width: 36px;
      aspect-ratio: 1 / 1;
      object-fit: contain;
      flex: 0 0 auto;
    }

    .tower-troop-chip strong,
    .tower-troop-chip span {
      display: block;
    }

    .tower-troop-chip strong {
      font-size: 0.86rem;
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .tower-troop-chip span {
      font-size: 0.68rem;
      color: var(--muted);
    }

    .deck-action-row {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0.7rem;
      margin-top: 1rem;
      width: 100%;
      position: relative;
      z-index: 1;
    }

    .deck-matchups {
      display: grid;
      gap: 0.65rem;
      margin-top: 1rem;
    }

    .matchup-panel {
      border-radius: 14px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.035);
      overflow: hidden;
    }

    .matchup-panel summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      min-height: 42px;
      padding: 0.7rem 0.85rem;
      cursor: pointer;
      font-weight: 800;
      list-style: none;
    }

    .show-more-button {
      width: 100%;
      min-height: 42px;
      padding: 0.7rem 0.85rem;
      border-radius: 14px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.035);
      color: var(--text);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      cursor: pointer;
      font-weight: 800;
    }

    .show-more-indicator {
      color: var(--muted);
      font-size: 0.9rem;
      line-height: 1;
      transition: transform 0.2s ease;
    }

    .show-more-button.is-open .show-more-indicator {
      transform: rotate(180deg);
    }

    .show-more-stats {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.5rem;
      margin: 0.55rem 0;
    }

    .show-more-stat-box {
      padding: 0.45rem 0.6rem;
      border-radius: 10px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.02);
    }

    .show-more-stat-box strong {
      display: block;
      font-size: 0.86rem;
      margin-top: 0.05rem;
    }

    .matchup-panel summary::-webkit-details-marker {
      display: none;
    }

    .matchup-panel summary::after {
      content: "+";
      color: var(--muted);
      font-size: 1rem;
      line-height: 1;
    }

    .matchup-panel[open] summary::after {
      content: "-";
    }

    .matchup-count {
      margin-left: auto;
      color: #dce9ff;
      font-size: 0.78rem;
    }

    .matchup-list {
      display: grid;
      gap: 0.55rem;
      padding: 0 0.85rem 0.85rem;
    }

    .matchup-card {
      display: grid;
      gap: 0.55rem;
      padding: 0.65rem;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(7, 11, 22, 0.26);
    }

    .matchup-card-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 0.75rem;
    }

    .matchup-card-head strong {
      font-size: 0.98rem;
    }

    .matchup-card-head span,
    .matchup-placeholder,
    .matchup-tower-troop {
      color: var(--muted);
      font-size: 0.78rem;
    }

    .matchup-card-grid {
      display: grid;
      grid-template-columns: repeat(8, minmax(28px, 42px));
      gap: 0.25rem;
    }

    .matchup-card-tile {
      display: grid;
      place-items: center;
      min-height: 42px;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.04);
    }

    .matchup-card-tile img {
      width: 100%;
      max-width: 24px;
      aspect-ratio: 1 / 1.2;
      object-fit: contain;
    }

    .matchup-card-tile small {
      color: var(--muted);
      font-size: 0.48rem;
      line-height: 1;
    }

    .matchup-tower-troop {
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

    .matchup-tower-troop img {
      width: 24px;
      height: 24px;
      object-fit: contain;
    }

    .deck-action-row .btn {
      display: inline-flex;
      width: 100%;
      min-height: 38px;
      padding: 0.6rem 0.9rem;
      color: #ffffff;
    }

    .deck-action-row .btn-primary {
      box-shadow: 0 12px 26px rgba(94, 162, 255, 0.24);
    }

    .card-tile {
      padding: 0.3rem;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      text-align: center;
    }

    .deck-cards .card-tile img {
      display: block;
      width: min(100%, 56px);
      max-width: none;
      aspect-ratio: 1 / 1.2;
      object-fit: contain;
      margin: 0 auto 0.25rem;
    }

    .card-tile span {
      display: block;
      font-size: 0.64rem;
      line-height: 1.15;
      color: var(--text);
    }

    .card-tile small {
      display: block;
      margin-top: 0.15rem;
      color: var(--muted);
      font-size: 0.58rem;
    }

    .loading-state,
    .empty-state {
      padding: 2rem;
      border-radius: 24px;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
      border: 1px solid var(--border);
      box-shadow: var(--shadow);
      text-align: center;
    }

    .load-more-wrap {
      display: flex;
      justify-content: center;
      margin-top: 1.5rem;
    }

    .load-more-wrap .btn,
    #load-more-button {
      color: #ffffff;
    }

    .load-more-wrap .btn {
      min-width: 180px;
    }

    .load-more-wrap.hidden {
      display: none;
    }

    .mobile-filter-button {
      display: none;
    }

    @media (max-width: 1080px) {
      .deck-grid {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 760px) {
      .mobile-filter-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        right: 1rem;
        bottom: 1rem;
        z-index: 70;
        width: 54px;
        height: 54px;
        min-width: 54px;
        padding: 0;
        border-radius: 999px;
        line-height: 0;
      }

      .mobile-filter-button svg {
        width: 44px;
        height: 44px;
      }

      #deck-filter-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 69;
        margin: 0;
        border-radius: 18px 18px 0 0;
        max-height: 82vh;
        overflow: auto;
        transform: translateY(100%);
        transition: transform 0.22s ease;
        background: rgba(20, 31, 56, 0.98) !important;
        border: 1px solid rgba(143, 194, 255, 0.2);
      }

      #deck-filter-panel.is-open {
        transform: translateY(0);
      }

      .filter-panel-head {
        align-items: stretch;
      }

      .filter-toggle {
        width: auto;
      }

      .filter-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
      }

      .deck-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .metric-box {
        min-height: 62px;
        padding: 0.3rem 0.4rem;
      }

      .deck-cards {
        grid-template-columns: repeat(4, minmax(58px, 76px));
        justify-content: start;
        gap: 0.35rem;
      }

      .matchup-card-grid {
        grid-template-columns: repeat(4, minmax(34px, 48px));
      }

      .card-tile {
        padding: 0.25rem;
      }

      .deck-cards .card-tile img {
        width: min(100%, 52px);
      }

      .card-tile span {
        font-size: 0.58rem;
      }

      .card-tile small {
        font-size: 0.54rem;
      }

    }

    @media (max-width: 420px) {
      .meta-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
      }

      .meta-summary .stat {
        padding: 0.62rem 0.72rem;
      }

      .meta-summary .stat span {
        font-size: 0.9rem;
      }

      .meta-summary .stat strong {
        margin-top: 0.32rem;
        font-size: clamp(1.35rem, 7.2vw, 1.75rem);
      }

      .filter-panel {
        padding: 0.9rem;
      }

      .filter-chip-list {
        gap: 0.4rem;
      }
    }


    @media (prefers-color-scheme: dark) {
      .filter-panel,
      .deck-card,
      .loading-state,
      .empty-state {
        background: linear-gradient(180deg, rgba(44, 59, 98, 0.84), rgba(27, 40, 71, 0.92)) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: var(--text) !important;
      }

      .filter-toggle,
      .filter-card,
      .filter-chip,
      .metric-box,
      .card-tile,
      .matchup-panel,
      .matchup-card,
      .matchup-card-tile {
        background: rgba(64, 81, 126, 0.34) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: var(--text) !important;
      }

      .filter-card.selected-include,
      .filter-card.selected-exclude {
        border-color: rgba(57, 217, 138, 0.72) !important;
        background: rgba(57, 217, 138, 0.34) !important;
        box-shadow: 0 0 0 1px rgba(57, 217, 138, 0.38) inset !important;
      }

      .filter-picker {
        background: rgba(32, 45, 78, 0.76) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
      }

      .filter-search {
        background: rgba(19, 29, 54, 0.9) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
        color: var(--text) !important;
      }

      .filter-empty-state {
        background: rgba(64, 81, 126, 0.2) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
      }

      .filter-panel-head p,
      .deck-metrics span,
      .empty-state p,
      .loading-state p,
      .filter-empty-state p,
      .card-tile small {
        color: var(--muted) !important;
      }
    }

.active-filter-banner {
  margin-bottom: 0.9rem;
  display: grid;
  gap: 0.35rem;
}

.active-filter-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.active-filter-banner p strong {
  color: var(--text);
  font-size: 0.92rem;
}

/* Filter UX refresh (mobile-first) */
#deck-filter-panel {
  border-radius: 18px;
}

#filter-panel-toggle-head {
  min-height: 48px;
}

#filter-panel-toggle-head .filter-panel-toggle-title {
  font-size: 1.06rem;
  font-weight: 700;
}

.filter-panel-description {
  font-size: 0.95rem;
  line-height: 1.45;
}

.filter-controls {
  gap: 0.55rem;
}

.filter-toggle {
  width: 100%;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  font-size: 0.92rem;
}

.filter-toggle-include::before,
.filter-toggle-exclude::before {
  font-weight: 800;
  margin-right: 0.38rem;
}

.filter-toggle-include::before {
  content: "+";
}

.filter-toggle-exclude::before {
  content: "-";
}

.filter-picker {
  border-radius: 14px;
  padding: 0.75rem;
}

.filter-search {
  min-height: 34px;
  font-size: 0.97rem;
}

.filter-card {
  min-height: 88px;
}

.active-filter-summary {
  margin-top: 0.75rem;
  gap: 0.65rem;
}

#clear-filters-button {
  min-height: 40px;
  border-radius: 12px;
}

@media (max-width: 760px) {
  #deck-filter-panel {
    padding: 0.9rem 0.85rem 1.2rem;
  }

  .filter-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  #include-toggle-button,
  #exclude-toggle-button {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    font-size: 0.82rem;
    padding-inline: 0.45rem;
  }

  #include-toggle-button {
    grid-column: 1;
  }

  #exclude-toggle-button {
    grid-column: 2;
  }

  .active-filter-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Deck tile image sizing override (kept at file end to win against legacy duplicate blocks) */
.deck-cards .card-tile {
  position: relative;
  min-height: 94px;
  padding: 0 !important;
  overflow: hidden;
}

.deck-cards .card-tile::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: linear-gradient(180deg, rgba(7, 12, 24, 0.02), rgba(7, 12, 24, 0.9));
  z-index: 1;
  pointer-events: none;
}

.deck-cards .card-tile img {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100%;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 !important;
  transform: scale(1.18);
  transform-origin: center;
  z-index: 0;
}

.deck-cards .card-tile.has-banner {
  overflow: visible;
}

.deck-cards .card-tile.has-banner img {
  transform: translateY(-7px) scale(1.18);
}

.deck-cards .card-tile span,
.deck-cards .card-tile small {
  position: absolute;
  left: 0.24rem;
  right: 0.24rem;
  z-index: 2;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.deck-cards .card-tile span {
  bottom: 0.95rem;
  margin: 0;
}

.deck-cards .card-tile small {
  bottom: 0.22rem;
  margin: 0;
}

@media (max-width: 760px) {
  .deck-cards .card-tile img {
    transform: scale(1.14);
  }

  .deck-cards .card-tile.has-banner img {
    transform: translateY(-6px) scale(1.14);
  }
}

/* Matchup/variant tile image sizing override */
.matchup-card-grid {
  grid-template-columns: repeat(8, minmax(36px, 56px));
  gap: 0.32rem;
}

.matchup-card-tile {
  position: relative;
  min-height: 56px;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
}

.matchup-card-tile img {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: scale(1.2) !important;
  transform-origin: center;
  margin: 0 !important;
}

.matchup-card-tile.has-banner {
  overflow: visible;
}

.matchup-card-tile.has-banner img {
  transform: translateY(-6px) scale(1.2) !important;
}

.matchup-card-tile small {
  position: absolute;
  left: 0.2rem;
  right: 0.2rem;
  bottom: 0.16rem;
  z-index: 2;
  text-align: center;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

@media (max-width: 760px) {
  .matchup-card-grid {
    grid-template-columns: repeat(4, minmax(44px, 1fr));
    gap: 0.3rem;
  }

  .matchup-card-tile {
    min-height: 52px;
  }

  .matchup-card-tile img {
    transform: scale(1.15) !important;
  }

  .matchup-card-tile.has-banner img {
    transform: translateY(-5px) scale(1.15) !important;
  }
}
