@media (max-width: 768px) {

/* =========================
   1. MOBILE WALLET TOKENS
========================= */

#cc-wallet {
  --mw-gold: #b88b4f;
  --mw-gold-deep: #9a6d34;

  --mw-stage-bg:
    radial-gradient(circle at 50% -14%, rgba(184, 139, 79, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(20, 19, 17, 0.98), rgba(7, 7, 6, 1));

  --mw-card-bg:
    radial-gradient(circle at 18% 0%, rgba(184, 139, 79, 0.11), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.065));

  --mw-card-empty-bg:
    radial-gradient(circle at 18% 0%, rgba(184, 139, 79, 0.09), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.055));

  --mw-image-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.07));

  --mw-picker-bg:
    linear-gradient(180deg, rgba(248, 244, 237, 0.97), rgba(232, 227, 217, 0.96));

  --mw-picker-row-bg: rgba(255, 255, 255, 0.50);

  --mw-card-shadow:
    0 22px 58px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.055);

  --mw-text-main: rgba(255, 255, 255, 0.92);
  --mw-text-muted: rgba(255, 255, 255, 0.58);
}

body:not(.dark-mode) #cc-wallet {
  --mw-stage-bg:
    radial-gradient(circle at 50% -14%, rgba(184, 139, 79, 0.16), transparent 42%),
    linear-gradient(180deg, #f4eee3 0%, #e7ddcc 100%);

  --mw-card-bg:
    radial-gradient(circle at 18% 0%, rgba(184, 139, 79, 0.12), transparent 44%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(245, 238, 225, 0.54));

  --mw-card-empty-bg:
    radial-gradient(circle at 18% 0%, rgba(184, 139, 79, 0.10), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(242, 234, 220, 0.50));

  --mw-image-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(224, 214, 198, 0.42));

  --mw-card-shadow:
    0 18px 42px rgba(108, 82, 46, 0.14),
    inset 0 0 0 1px rgba(154, 109, 52, 0.08);

  --mw-text-main: #2a241d;
  --mw-text-muted: rgba(42, 36, 29, 0.58);
}

body.dark-mode #cc-wallet {
  --mw-gold: #e8c47f;
  --mw-gold-deep: #e8c47f;
}

/* =========================
   2. WALLET PANEL
========================= */

#cc-wallet {
  position: relative;
  z-index: 2000;
  background: var(--mw-stage-bg) !important;
}

body:not(.dark-mode) #cc-wallet,
body:not(.dark-mode) #cc-wallet.is-mobile-tool-active {
  background:
    radial-gradient(circle at 50% -14%, rgba(184, 139, 79, 0.16), transparent 42%),
    linear-gradient(180deg, #f4eee3 0%, #e7ddcc 100%) !important;
}

body.dark-mode #cc-wallet,
body.dark-mode #cc-wallet.is-mobile-tool-active {
  background:
    radial-gradient(circle at 50% -14%, rgba(232, 196, 127, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(20, 19, 17, 0.98), rgba(7, 7, 6, 1)) !important;
}

#cc-wallet > .cc-collapsible-header {
  display: none !important;
}

#cc-wallet.is-mobile-tool-active .cc-collapsible-content {
  padding: 18px 0 34px !important;
  background: transparent !important;
}

/* =========================
   3. HIDE DESKTOP CLUTTER
========================= */

.wallet-optimizer-controls,
.wallet-optimizer-controls-copy,
.wallet-optimizer-note,
.wallet-optimizer-controls-head,
.wallet-optimizer-controls-head h3,
.wallet-optimizer-toggle,
.card-gotchas,
.wallet-card-rewards-shell,
.card-economics,
.credit-details,
.welcome-bonus-preview,
.custom-controls,
.economics-title,
.economics-row,
.economics-row-net,
.net-fixed-cost,
.card-credits,
.credits-list,
.wallet-card-credits,
.credit-item,
.credit-detail-list,
.platform-cost-row,
.wallet-card-top,
.card-select,
.wallet-card-remove {
  display: none !important;
}

/* =========================
   4. WALLET STACK
========================= */

.wallet-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;

  padding: 6px 18px 32px !important;
  margin: 0 !important;

  overflow: visible !important;
}

.wallet-card-hidden {
  display: none !important;
}

/* =========================
   4B. WALLET PROGRESS
========================= */

.mobile-wallet-progress {
  padding: 8px 18px 0;
  margin: 0;
}

.mobile-wallet-progress-text {
  display: inline-flex;
  align-items: center;

  color: var(--mw-text-muted);
  font-size: 10.5px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.095em;
  text-transform: uppercase;
  opacity: 0.82;
}

/* =========================
   5. BASE WALLET CARD
========================= */

.wallet-card {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;

  display: block !important;

  border: none !important;
  border-radius: 26px !important;
  overflow: hidden;

  background: var(--mw-card-bg) !important;
  box-shadow: var(--mw-card-shadow);

  transform: translateZ(0);
}

/* =========================
   6. EMPTY CARD STATE — HIERARCHY
========================= */

/* Shared empty slot styling */
.wallet-card[data-card-name=""],
.wallet-card:not([data-card-name]) {
  display: grid !important;
  align-items: center !important;
  background: var(--mw-card-empty-bg) !important;
}

/* Shared empty slot inner layout */
.wallet-card[data-card-name=""] .wallet-card-main,
.wallet-card:not([data-card-name]) .wallet-card-main {
  width: 100%;
  min-height: 0 !important;
  display: grid !important;
  align-items: center !important;
  padding: 0 !important;
}

/* FIRST EMPTY SLOT — PRIMARY CTA */
.wallet-card[data-card-name=""]:first-child,
.wallet-card:not([data-card-name]):first-child {
  height: 108px !important;
  min-height: 108px !important;
  max-height: 108px !important;
  padding: 15px !important;

  background:
    radial-gradient(circle at 18% 0%, rgba(184, 139, 79, 0.18), transparent 44%),
    linear-gradient(145deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06)) !important;

  box-shadow:
    inset 0 0 0 1px rgba(184, 139, 79, 0.17),
    0 14px 34px rgba(0, 0, 0, 0.18) !important;
}

.wallet-card[data-card-name=""]:first-child .wallet-card-main,
.wallet-card:not([data-card-name]):first-child .wallet-card-main {
  height: 78px !important;
  grid-template-columns: 108px minmax(0, 1fr) !important;
  column-gap: 15px;
}

.wallet-card[data-card-name=""]:first-child .card-image,
.wallet-card:not([data-card-name]):first-child .card-image {
  width: 108px !important;
  height: 78px !important;
  min-height: 78px !important;
}

.wallet-card[data-card-name=""]:first-child .wallet-card-main::after,
.wallet-card:not([data-card-name]):first-child .wallet-card-main::after {
  content: "Add your first card";
  grid-column: 2;

  color: var(--mw-text-main);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.045em;
}

/* NEXT EMPTY SLOT — SECONDARY CTA */
.wallet-card[data-card-name=""]:not(:first-child),
.wallet-card:not([data-card-name]):not(:first-child) {
  height: 76px !important;
  min-height: 76px !important;
  max-height: 76px !important;
  padding: 12px !important;
  opacity: 0.84;
}

.wallet-card[data-card-name=""]:not(:first-child) .wallet-card-main,
.wallet-card:not([data-card-name]):not(:first-child) .wallet-card-main {
  height: 52px !important;
  grid-template-columns: 88px minmax(0, 1fr) !important;
  column-gap: 13px;
}

.wallet-card[data-card-name=""]:not(:first-child) .card-image,
.wallet-card:not([data-card-name]):not(:first-child) .card-image {
  width: 88px !important;
  height: 52px !important;
  min-height: 52px !important;
  border-radius: 16px !important;
}

.wallet-card[data-card-name=""]:not(:first-child) .wallet-card-main::after,
.wallet-card:not([data-card-name]):not(:first-child) .wallet-card-main::after {
  content: "Add another card";
  grid-column: 2;

  color: var(--mw-text-main);
  font-size: 14.5px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.035em;
}

/* =========================
   EMPTY SLOT VISIBILITY
   Keep only the next available
   empty slot visible unless JS
   intentionally reveals more.
========================= */

.wallet-card[data-card-name=""] ~ .wallet-card[data-card-name=""]:not(.wallet-card-mobile-revealed),
.wallet-card[data-card-name=""] ~ .wallet-card:not([data-card-name]):not(.wallet-card-mobile-revealed),
.wallet-card:not([data-card-name]) ~ .wallet-card[data-card-name=""]:not(.wallet-card-mobile-revealed),
.wallet-card:not([data-card-name]) ~ .wallet-card:not([data-card-name]):not(.wallet-card-mobile-revealed) {
  display: none !important;
}

/* JS override for newly revealed slots */
.wallet-card.wallet-card-mobile-revealed {
  display: block !important;
}

/* Prevent old pseudo labels from leaking */
.wallet-card[data-card-name=""]::after,
.wallet-card:not([data-card-name])::after {
  content: none !important;
  display: none !important;
}

/* =========================
   7. SELECTED CARD — PREMIUM SUMMARY
========================= */

.wallet-card:has(.mobile-wallet-summary) {
  min-height: 188px !important;
  max-height: 218px !important;

  padding: 16px !important;

  background:
    radial-gradient(circle at 18% 0%, rgba(184, 139, 79, 0.15), transparent 44%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.07)) !important;
}

.wallet-card:has(.mobile-wallet-summary) .wallet-card-main {
  width: 100%;
  min-height: 0 !important;
  padding: 0 !important;

  display: grid !important;
  grid-template-columns: 136px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 14px;
  align-items: center !important;
}

.wallet-card:has(.mobile-wallet-summary) .card-image {
  grid-column: 1;
  grid-row: 1;

  width: 136px !important;
  height: 86px !important;
  min-height: 86px !important;
}

.wallet-card:has(.mobile-wallet-summary) .mobile-wallet-summary {
  grid-column: 2;
  grid-row: 1;

  min-width: 0;

  display: grid;
  gap: 10px;

  align-self: center;
}

.wallet-card:has(.mobile-wallet-summary) .mobile-wallet-top-categories {
  grid-column: 1 / -1;
  grid-row: 2;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;

  width: 100% !important;
  margin: 0;
  padding: 0;
  transform: none !important;
}

/* =========================
   8. CARD IMAGE
========================= */

.card-image {
  position: relative;

  margin: 0 !important;
  border: none !important;
  border-radius: 18px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  background: var(--mw-image-bg) !important;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 26px rgba(0, 0, 0, 0.18);

  overflow: hidden;
  cursor: pointer;
}

/* Empty add-card icon */
.card-image:empty::before {
  content: "+";

  display: flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  border-radius: 999px;

  color: var(--mw-gold-deep);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;

  background: rgba(184, 139, 79, 0.12);
  box-shadow: inset 0 0 0 1px rgba(184, 139, 79, 0.18);

  opacity: 0.95;
}

/* Loaded card image */
.card-image img {
  width: 96% !important;
  height: 96% !important;
  max-width: 96% !important;
  max-height: 96% !important;
  object-fit: contain !important;
}

/* Light mode empty icon */
body:not(.dark-mode) .card-image:empty::before {
  background: rgba(154, 109, 52, 0.11);
  box-shadow: inset 0 0 0 1px rgba(154, 109, 52, 0.18);
}

/* =========================
   9. FEE / CREDIT VALUES — PREMIUM STRIP
========================= */

.mobile-wallet-economics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;

  margin: 0;
  padding: 12px 12px;

  border-radius: 16px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.14),
      rgba(255, 255, 255, 0.04)
    );

  box-shadow:
    inset 0 0 0 1px rgba(184, 139, 79, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.10);
}

/* INDIVIDUAL STAT BLOCK */
.mobile-wallet-economics div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;

  min-height: 46px;
}

/* LABEL */
.mobile-wallet-economics span {
  color: var(--mw-text-muted);
  font-size: 9.75px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

/* VALUE */
.mobile-wallet-economics strong {
  color: var(--mw-gold-deep);
  font-size: 21px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.035em;
}

/* =========================
   LIGHT MODE TUNING
========================= */

body:not(.dark-mode) .mobile-wallet-economics {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.65),
      rgba(242, 234, 220, 0.45)
    );

  box-shadow:
    inset 0 0 0 1px rgba(154, 109, 52, 0.14),
    0 8px 18px rgba(108, 82, 46, 0.08);
}

/* =========================
   DARK MODE TUNING
========================= */

body.dark-mode .mobile-wallet-economics {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.015)
    );

  box-shadow:
    inset 0 0 0 1px rgba(232, 196, 127, 0.16),
    0 10px 22px rgba(0, 0, 0, 0.26);
}

/* =========================
   10. CATEGORY CHIPS — PREMIUM REWARD TILES
========================= */

.mobile-wallet-top-categories div {
  position: relative;
  min-height: 52px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;

  padding: 10px 12px;
  border-radius: 16px;

  background:
    radial-gradient(circle at 18% 0%, rgba(184, 139, 79, 0.11), transparent 46%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.032)) !important;

  box-shadow:
    inset 0 0 0 1px rgba(184, 139, 79, 0.14),
    0 8px 18px rgba(0, 0, 0, 0.08) !important;

  overflow: hidden;
}

.mobile-wallet-top-categories div::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 1px;

  background: linear-gradient(
    to right,
    transparent,
    rgba(184, 139, 79, 0.34),
    transparent
  );

  opacity: 0.75;
}

.mobile-wallet-top-categories span {
  position: relative;
  z-index: 1;

  color: var(--mw-text-muted);
  font-size: 9.75px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.065em;
  text-transform: uppercase;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-wallet-top-categories strong {
  position: relative;
  z-index: 1;

  color: var(--mw-gold-deep);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.035em;
}

body:not(.dark-mode) .mobile-wallet-top-categories div {
  background:
    radial-gradient(circle at 18% 0%, rgba(154, 109, 52, 0.10), transparent 46%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(242, 234, 220, 0.42)) !important;

  box-shadow:
    inset 0 0 0 1px rgba(154, 109, 52, 0.13),
    0 8px 18px rgba(108, 82, 46, 0.07) !important;
}

body.dark-mode .mobile-wallet-top-categories div {
  background:
    radial-gradient(circle at 18% 0%, rgba(232, 196, 127, 0.08), transparent 46%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)) !important;

  box-shadow:
    inset 0 0 0 1px rgba(232, 196, 127, 0.13),
    0 10px 22px rgba(0, 0, 0, 0.24) !important;
}

/* =========================
   11. ADD CARD TILE
========================= */

.wallet-add-tile {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 48px !important;

  border-radius: 999px !important;
  padding: 12px 16px !important;

  display: flex !important;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 9px;

  border: none !important;

  background:
    linear-gradient(145deg, rgba(184, 139, 79, 0.14), rgba(184, 139, 79, 0.045));

  box-shadow:
    inset 0 0 0 1px rgba(184, 139, 79, 0.18),
    0 10px 26px rgba(0, 0, 0, 0.18);
}

.wallet-add-plus {
  font-size: 21px !important;
  line-height: 1;
  color: var(--mw-gold-deep);
}

.wallet-add-text {
  margin-top: 0;
  color: var(--mw-text-main);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* =========================
   12. CARD PICKER OVERLAY
========================= */

.mobile-card-picker {
  position: fixed;
  inset: 0;
  z-index: 3000;

  display: none;
  align-items: flex-end;

  padding: 82px 16px 18px;

  background:
    radial-gradient(circle at 50% 0%, rgba(184, 139, 79, 0.18), transparent 42%),
    rgba(0, 0, 0, 0.72);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.mobile-card-picker.is-open {
  display: flex;
}

/* =========================
   13. CARD PICKER SHEET
========================= */

.mobile-card-picker-panel {
  position: relative;

  width: 100%;
  height: min(76svh, 680px);
  max-height: min(76svh, 680px);

  overflow: hidden;

  border: none;
  border-radius: 34px 34px 28px 28px;

  background:
    radial-gradient(circle at 18% 0%, rgba(184, 139, 79, 0.16), transparent 44%),
    linear-gradient(180deg, rgba(244, 239, 229, 0.98), rgba(223, 216, 203, 0.96));

  box-shadow:
    0 36px 100px rgba(0, 0, 0, 0.46),
    inset 0 0 0 1px rgba(184, 139, 79, 0.16);
}

.mobile-card-picker-panel::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;

  width: 42px;
  height: 4px;

  border-radius: 999px;
  background: rgba(154, 109, 52, 0.28);

  transform: translateX(-50%);
  z-index: 3;
}

.mobile-card-picker-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 54px;

  background: linear-gradient(
    to bottom,
    transparent,
    rgba(223, 216, 203, 0.96)
  );

  pointer-events: none;
  z-index: 2;
}

.mobile-card-picker-head {
  position: relative;
  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 30px 22px 16px;
}

.mobile-card-picker-head::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 1px;

  background: linear-gradient(
    to right,
    transparent,
    rgba(154, 109, 52, 0.22),
    transparent
  );
}

.mobile-card-picker-head h3 {
  margin: 0;

  color: #211f1c;
  font-size: 27px;
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.mobile-card-picker-close {
  width: 40px;
  height: 40px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 999px;

  background: rgba(184, 139, 79, 0.14);
  color: #211f1c;

  font-size: 28px;
  font-weight: 650;
  line-height: 1;

  box-shadow: inset 0 0 0 1px rgba(154, 109, 52, 0.08);
}

/* =========================
   14. CARD PICKER LIST
========================= */

.mobile-card-picker-list {
  position: relative;
  z-index: 1;

  height: calc(min(76svh, 680px) - 92px);
  max-height: calc(min(76svh, 680px) - 92px);

  overflow-y: auto;
  overflow-x: hidden;

  display: flex;
  flex-direction: column;
  gap: 10px;

  padding: 14px 14px 26px;

  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.mobile-card-picker-option {
  width: 100%;
  min-height: 58px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 13px 16px;

  border: none;
  border-radius: 21px;

  text-align: left;

  background: rgba(255, 255, 255, 0.58);
  color: #211f1c;

  box-shadow:
    inset 0 0 0 1px rgba(154, 109, 52, 0.13),
    0 8px 20px rgba(47, 43, 39, 0.065);
}

.mobile-card-picker-option-name {
  min-width: 0;

  color: inherit;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.mobile-card-picker-option-action {
  flex: 0 0 auto;

  color: var(--mw-gold-deep);
  font-size: 10.5px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  opacity: 0.86;
}

.mobile-card-picker-option-action::after {
  content: " →";
  letter-spacing: 0;
}

.mobile-card-picker-option.is-selected {
  background: rgba(184, 139, 79, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(154, 109, 52, 0.26),
    0 10px 26px rgba(47, 43, 39, 0.09);
}

/* =========================
   15. SMALL PHONE
========================= */

@media (max-width: 390px) {
  .wallet-grid {
    padding: 10px 14px 30px !important;
    gap: 12px !important;
  }

  .wallet-card:has(.mobile-wallet-summary) {
    min-height: 180px !important;
  }

  .wallet-card:has(.mobile-wallet-summary) .wallet-card-main {
    grid-template-columns: 124px minmax(0, 1fr);
    column-gap: 14px;
  }

  .wallet-card:has(.mobile-wallet-summary) .card-image {
    width: 124px !important;
    height: 78px !important;
    min-height: 78px !important;
  }

  .wallet-card:not(:has(.mobile-wallet-summary)) .wallet-card-main {
    grid-template-columns: 98px minmax(0, 1fr) !important;
    column-gap: 12px;
  }

  .wallet-card:not(:has(.mobile-wallet-summary)) .card-image {
    width: 98px !important;
    height: 62px !important;
    min-height: 62px !important;
  }

  .mobile-wallet-economics strong {
    font-size: 15px;
  }

  .mobile-wallet-top-categories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .mobile-wallet-top-categories div {
    padding: 7px 8px;
  }

  .mobile-card-picker {
    padding: 84px 14px 18px;
  }

  .mobile-card-picker-head h3 {
    font-size: 24px;
  }
}

/* =========================
   16. REMOVE DUPLICATE ADD CARD CTA
========================= */

.wallet-add-tile {
  display: none !important;
}

/* =========================
   17. CARD PICKER VISIBILITY + SCROLL LOCK
========================= */

.mobile-card-picker {
  align-items: flex-end !important;
  padding: 82px 16px 18px !important;

  background:
    radial-gradient(circle at 50% 0%, rgba(184, 139, 79, 0.18), transparent 42%),
    rgba(0, 0, 0, 0.72) !important;
}

.mobile-card-picker-panel {
  height: min(76svh, 680px) !important;
  max-height: min(76svh, 680px) !important;

  background:
    radial-gradient(circle at 18% 0%, rgba(184, 139, 79, 0.16), transparent 44%),
    linear-gradient(180deg, rgba(244, 239, 229, 0.98), rgba(223, 216, 203, 0.96)) !important;

  color: #211f1c !important;
  overflow: hidden !important;
}

.mobile-card-picker-list {
  height: calc(min(76svh, 680px) - 92px) !important;
  max-height: calc(min(76svh, 680px) - 92px) !important;

  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
}

.mobile-card-picker-head h3,
.mobile-card-picker-option,
.mobile-card-picker-option-name {
  color: #211f1c !important;
}

.mobile-card-picker-close {
  color: #211f1c !important;
  background: rgba(184, 139, 79, 0.14) !important;
}

.mobile-card-picker-option {
  background: rgba(255, 255, 255, 0.58) !important;

  box-shadow:
    inset 0 0 0 1px rgba(154, 109, 52, 0.13),
    0 8px 20px rgba(47, 43, 39, 0.065) !important;
}

/* =========================
   17B. DARK MODE CARD PICKER
========================= */

body.dark-mode .mobile-card-picker-panel {
  background:
    radial-gradient(circle at 18% 0%, rgba(232, 196, 127, 0.14), transparent 44%),
    linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(6, 6, 6, 0.98)) !important;

  color: rgba(255, 255, 255, 0.92) !important;

  box-shadow:
    0 36px 100px rgba(0, 0, 0, 0.68),
    inset 0 0 0 1px rgba(232, 196, 127, 0.16) !important;
}

body.dark-mode .mobile-card-picker-head h3 {
  color: rgba(255, 255, 255, 0.94) !important;
}

body.dark-mode .mobile-card-picker-close {
  background: rgba(232, 196, 127, 0.12) !important;
  color: rgba(255, 255, 255, 0.92) !important;

  box-shadow: inset 0 0 0 1px rgba(232, 196, 127, 0.16) !important;
}

body.dark-mode .mobile-card-picker-option {
  background: rgba(255, 255, 255, 0.045) !important;

  box-shadow:
    inset 0 0 0 1px rgba(232, 196, 127, 0.14),
    0 10px 24px rgba(0, 0, 0, 0.32) !important;
}

body.dark-mode .mobile-card-picker-option-name {
  color: rgba(255, 255, 255, 0.92) !important;
}

body.dark-mode .mobile-card-picker-option-action {
  color: #e8c47f !important;
}

body.dark-mode .mobile-card-picker-option.is-selected {
  background: rgba(232, 196, 127, 0.14) !important;

  box-shadow:
    inset 0 0 0 1px rgba(232, 196, 127, 0.28),
    0 12px 28px rgba(0, 0, 0, 0.38) !important;
}

/* =========================
   18. SELECTED CARD LAYOUT — PREMIUM DASHBOARD
========================= */

.wallet-card:has(.mobile-wallet-summary) {
  min-height: 0 !important;
  max-height: none !important;
  padding: 18px !important;
  overflow: visible !important;

  background:
    radial-gradient(circle at 18% 0%, rgba(184, 139, 79, 0.17), transparent 44%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.065)) !important;

  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(184, 139, 79, 0.14) !important;
}

.wallet-card:has(.mobile-wallet-summary) .wallet-card-main {
  width: 100%;
  display: grid !important;
  grid-template-columns: 132px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 18px;
  row-gap: 14px;
  align-items: start !important;
  padding: 0 !important;
}

.wallet-card:has(.mobile-wallet-summary) .card-image {
  grid-column: 1;
  grid-row: 1;

  width: 132px !important;
  height: 84px !important;
  min-height: 84px !important;
  border-radius: 18px !important;

  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

.wallet-card:has(.mobile-wallet-summary) .mobile-wallet-summary {
  grid-column: 1 / -1;
  grid-row: 1 / span 2;

  width: 100%;
  min-width: 0;

  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  grid-template-rows: 84px auto auto;
  column-gap: 18px;
  row-gap: 14px;
}

.mobile-wallet-card-identity {
  grid-column: 2;
  grid-row: 1;

  display: grid;
  gap: 6px;
  align-content: center;

  min-height: 84px;
  padding-right: 40px;
}

.mobile-wallet-card-issuer {
  color: var(--mw-gold-deep);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  opacity: 0.9;
}

.mobile-wallet-card-name {
  color: var(--mw-text-main);
  font-size: 19px;
  font-weight: 950;
  line-height: 1.03;
  letter-spacing: -0.055em;
}

/* =========================
   18.1 FEE / CREDIT SUMMARY STRIP
========================= */

.mobile-wallet-economics {
  grid-column: 1 / -1;
  grid-row: 2;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;

  margin: 0;
  padding: 12px;

  border-radius: 18px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.13),
      rgba(255, 255, 255, 0.04)
    ) !important;

  box-shadow:
    inset 0 0 0 1px rgba(184, 139, 79, 0.15),
    0 8px 20px rgba(0, 0, 0, 0.08) !important;
}

.mobile-wallet-economics div {
  min-height: 44px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;

  padding: 0;

  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.mobile-wallet-economics span {
  color: var(--mw-text-muted);
  font-size: 9.75px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-wallet-economics strong {
  color: var(--mw-gold-deep);
  font-size: 21px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* =========================
   18.2 CATEGORY REWARD GRID
========================= */

.wallet-card:has(.mobile-wallet-summary) .mobile-wallet-top-categories {
  grid-column: 1 / -1;
  grid-row: 3;

  width: 100% !important;
  margin: 0;
  padding: 0;

  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;

  transform: none !important;
}

.mobile-wallet-top-categories div {
  min-width: 0;
  min-height: 52px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;

  padding: 10px 12px;
  border-radius: 16px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.035)
    ) !important;

  box-shadow:
    inset 0 0 0 1px rgba(184, 139, 79, 0.13),
    0 8px 18px rgba(0, 0, 0, 0.08) !important;

  overflow: hidden;
}

.mobile-wallet-top-categories span {
  color: var(--mw-text-muted);
  font-size: 9.75px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.065em;
  text-transform: uppercase;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-wallet-top-categories strong {
  color: var(--mw-gold-deep);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.035em;
}

.mobile-wallet-top-categories div:last-child:nth-child(3n + 1) {
  grid-column: 1 / -1;
}

/* =========================
   18.3 LIGHT / DARK TUNING
========================= */

body:not(.dark-mode) .wallet-card:has(.mobile-wallet-summary) {
  background:
    radial-gradient(circle at 18% 0%, rgba(154, 109, 52, 0.13), transparent 44%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(242, 234, 220, 0.54)) !important;

  box-shadow:
    0 22px 48px rgba(108, 82, 46, 0.13),
    inset 0 0 0 1px rgba(154, 109, 52, 0.12) !important;
}

body:not(.dark-mode) .mobile-wallet-economics,
body:not(.dark-mode) .mobile-wallet-top-categories div {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.58),
      rgba(242, 234, 220, 0.42)
    ) !important;

  box-shadow:
    inset 0 0 0 1px rgba(154, 109, 52, 0.12),
    0 8px 18px rgba(108, 82, 46, 0.07) !important;
}

body.dark-mode .mobile-wallet-economics,
body.dark-mode .mobile-wallet-top-categories div {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.055),
      rgba(255, 255, 255, 0.018)
    ) !important;

  box-shadow:
    inset 0 0 0 1px rgba(232, 196, 127, 0.13),
    0 10px 22px rgba(0, 0, 0, 0.24) !important;
}

/* =========================
   19. MOBILE ROTATIONAL TOGGLE — GOLD PREMIUM CONTROL
========================= */

#cc-wallet .wallet-optimizer-controls {
  display: flex !important;
  justify-content: center !important;
  margin: 8px 0 12px !important;
  padding: 0 18px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#cc-wallet .wallet-optimizer-controls-head {
  display: block !important;
  width: 100%;
}

#cc-wallet .wallet-optimizer-controls-copy,
#cc-wallet .wallet-optimizer-note,
#cc-wallet .wallet-optimizer-controls-head h3 {
  display: none !important;
}

#cc-wallet .wallet-optimizer-toggle {
  position: relative;
  width: 100%;
  max-width: 520px;

  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;

  margin: 0 auto !important;
  padding: 11px 14px;

  border: none !important;
  border-radius: 999px;

  background:
    radial-gradient(circle at 18% 0%, rgba(232, 196, 127, 0.24), transparent 46%),
    linear-gradient(135deg, rgba(184, 139, 79, 0.28), rgba(255, 255, 255, 0.055)) !important;

  box-shadow:
    0 0 24px rgba(184, 139, 79, 0.16),
    inset 0 0 0 1px rgba(232, 196, 127, 0.22),
    0 12px 28px rgba(0, 0, 0, 0.18) !important;

  color: var(--mw-text-main);
  overflow: hidden;
}

#cc-wallet .wallet-optimizer-toggle::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.13), transparent 52%);
  pointer-events: none;
  opacity: 0.68;
}

#cc-wallet .wallet-optimizer-toggle span {
  position: relative;
  z-index: 1;

  color: var(--mw-text-main) !important;
  font-size: 10.5px !important;
  font-weight: 950 !important;
  line-height: 1.15;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  opacity: 0.92;
}

/* Switch track */
#cc-wallet .wallet-optimizer-toggle input {
  appearance: none;
  -webkit-appearance: none;

  position: relative;
  z-index: 1;

  flex: 0 0 auto;
  width: 38px;
  height: 22px;

  border: none;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.18);

  box-shadow:
    inset 0 0 0 1px rgba(232, 196, 127, 0.20),
    inset 0 2px 5px rgba(0,0,0,0.22);

  transition:
    background 0.22s ease,
    box-shadow 0.22s ease;
}

/* Switch knob */
#cc-wallet .wallet-optimizer-toggle input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;

  width: 16px;
  height: 16px;

  border-radius: 999px;

  background:
    linear-gradient(
      135deg,
      rgba(255, 250, 235, 0.98),
      rgba(232, 196, 127, 0.72)
    );

  box-shadow:
    0 3px 8px rgba(0,0,0,0.24),
    0 0 8px rgba(232, 196, 127, 0.18);

  transition:
    transform 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

/* Checked state */
#cc-wallet .wallet-optimizer-toggle input:checked {
  background:
    linear-gradient(
      135deg,
      rgba(232, 196, 127, 0.95),
      rgba(184, 139, 79, 0.84)
    );

  box-shadow:
    0 0 18px rgba(232, 196, 127, 0.36),
    inset 0 0 0 1px rgba(255,255,255,0.25);
}

#cc-wallet .wallet-optimizer-toggle input:checked::before {
  transform: translateX(16px);

  background:
    linear-gradient(
      135deg,
      rgba(255, 246, 222, 1),
      rgba(232, 196, 127, 0.9)
    );

  box-shadow:
    0 4px 10px rgba(0,0,0,0.22),
    0 0 12px rgba(232, 196, 127, 0.38);
}

/* Light mode */
body:not(.dark-mode) #cc-wallet .wallet-optimizer-toggle {
  background:
    radial-gradient(circle at 18% 0%, rgba(154, 109, 52, 0.18), transparent 46%),
    linear-gradient(135deg, rgba(184, 139, 79, 0.20), rgba(255,255,255,0.72)) !important;

  box-shadow:
    0 0 22px rgba(154, 109, 52, 0.12),
    inset 0 0 0 1px rgba(154, 109, 52, 0.18),
    0 10px 22px rgba(108, 82, 46, 0.10) !important;
}

body:not(.dark-mode) #cc-wallet .wallet-optimizer-toggle span {
  color: #241f18 !important;
}

body:not(.dark-mode) #cc-wallet .wallet-optimizer-toggle input {
  background: rgba(154, 109, 52, 0.18) !important;
}

body:not(.dark-mode) #cc-wallet .wallet-optimizer-toggle input::before {
  background:
    linear-gradient(
      135deg,
      rgba(255, 250, 235, 0.98),
      rgba(224, 198, 150, 0.78)
    ) !important;

  box-shadow:
    0 3px 8px rgba(47, 43, 39, 0.16),
    0 0 8px rgba(184, 139, 79, 0.20) !important;
}

body:not(.dark-mode) #cc-wallet .wallet-optimizer-toggle input:checked {
  background:
    linear-gradient(
      135deg,
      rgba(184, 139, 79, 0.92),
      rgba(154, 109, 52, 0.82)
    ) !important;

  box-shadow:
    0 0 16px rgba(154, 109, 52, 0.22),
    inset 0 0 0 1px rgba(255,255,255,0.24) !important;
}

body:not(.dark-mode) #cc-wallet .wallet-optimizer-toggle input:checked::before {
  transform: translateX(16px);

  background:
    linear-gradient(
      135deg,
      rgba(255, 250, 235, 0.98),
      rgba(232, 196, 127, 0.88)
    ) !important;

  box-shadow:
    0 4px 10px rgba(47, 43, 39, 0.18),
    0 0 10px rgba(184, 139, 79, 0.30) !important;
}

/* =========================
   20. MOBILE REMOVE CARD — EXISTING BUTTON
========================= */

.wallet-card {
  position: relative !important;
}

.wallet-card:has(.mobile-wallet-summary) .wallet-card-top {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 50 !important;
  pointer-events: none !important;
}

.wallet-card:has(.mobile-wallet-summary) .wallet-card-topbar {
  display: block !important;
}

.wallet-card:has(.mobile-wallet-summary) .wallet-card-label {
  display: none !important;
}

.wallet-card:has(.mobile-wallet-summary) .wallet-card-remove {
  display: flex !important;
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;

  pointer-events: auto !important;

  width: 30px !important;
  height: 30px !important;

  align-items: center;
  justify-content: center;

  border: none !important;
  border-radius: 999px !important;

  background: rgba(0, 0, 0, 0.36) !important;
  color: rgba(255, 255, 255, 0.86) !important;

  font-size: 0 !important;
  line-height: 1 !important;

  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.22);
}

.wallet-card:has(.mobile-wallet-summary) .wallet-card-remove::before {
  content: "×";
  font-size: 19px;
  font-weight: 800;
}

.wallet-card:not(:has(.mobile-wallet-summary)) .wallet-card-top {
  display: none !important;
}

/* =========================
   21. WALLET TOOL FULL-SCREEN FIX
========================= */

body.mobile-wallet-open #cc-wallet.is-mobile-tool-active {
  top: 0 !important;
  height: 100svh !important;
}

body.mobile-wallet-open #cc-wallet.is-mobile-tool-active .cc-collapsible-content {
  padding-top: 72px !important;
}

/* eliminate top bleed / sliver */
body.mobile-wallet-open #cc-wallet.is-mobile-tool-active {
  top: 0 !important;
  height: 100dvh !important; /* more reliable than svh on mobile */
}

/* extend background slightly past top */
body.mobile-wallet-open #cc-wallet.is-mobile-tool-active::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;

  background: inherit;
}

/* =========================
   MOBILE TOOL BACK BUTTON
========================= */

.mobile-tool-back-button {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  z-index: 9000;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  width: fit-content;
  margin: 0 0 12px 18px;
  padding: 10px 14px;

  border: 1px solid rgba(184, 139, 79, 0.28) !important;
  border-radius: 999px;

  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.16), transparent 45%),
    linear-gradient(145deg, rgba(184, 139, 79, 0.34), rgba(90, 63, 31, 0.92)) !important;

  color: #fff7e8 !important;
  -webkit-text-fill-color: #fff7e8;

  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.075em;
  text-transform: uppercase;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.055),
    0 10px 26px rgba(0, 0, 0, 0.24);

  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.mobile-tool-back-button:active {
  transform: scale(0.98);
}

}