/* inventory: panel, card list, card detail, wallet, coin redemption, card-wallet, slot, transfer */

    /* ══ INVENTORY SYSTEM ══════════════════════════════════ */

    /* Orders HUD Button — matches hud-btn style, offset right of it */
    .orders-hud-btn {
      position: fixed;
      bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
      left: 82px;
      width: 54px; height: 54px;
      border-radius: 15px;
      background: #0d0d1a;
      border: 1.5px solid rgba(255,107,74,0.5);
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; z-index: 1002;
      box-shadow: 0 0 0 1px rgba(255,107,74,0.15), 0 4px 20px rgba(0,0,0,0.4);
      transition: transform 0.15s;
    }
    .orders-hud-btn:active { transform: scale(0.9); }
    .orders-hud-badge {
      position: absolute; top: -6px; right: -6px;
      width: 20px; height: 20px; border-radius: 50%;
      background: #ff6b4a; color: white;
      font-size: 10px; font-weight: 800;
      display: flex; align-items: center; justify-content: center;
      border: 2px solid #0d0d1a;
    }

    /* Partners screen */
    #partnersScreen { background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .partners-page { padding: 20px 16px 100px; }
    .partners-page h1 { font-size: 22px; font-weight: 900; margin: 0 0 16px; }
    .partners-list { display: flex; flex-direction: column; gap: 10px; }
    .partner-row {
      display: flex; align-items: center; gap: 14px;
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 14px; padding: 14px 16px;
      cursor: pointer; text-align: left; width: 100%;
      font-family: inherit; font-size: 14px; font-weight: 700; color: var(--text);
      box-shadow: 0 1px 4px rgba(0,0,0,0.04);
      -webkit-tap-highlight-color: transparent;
      transition: transform 0.12s;
    }
    .partner-row:active { transform: scale(0.98); }
    .partner-icon {
      width: 44px; height: 44px; border-radius: 10px;
      background: rgba(255,107,74,0.1); border: 1px solid rgba(255,107,74,0.15);
      display: flex; align-items: center; justify-content: center;
      font-size: 20px; flex-shrink: 0; overflow: hidden;
    }
    .partner-icon img { width: 100%; height: 100%; object-fit: contain; }
    .partner-row span { font-size: 12px; color: var(--text3); font-weight: 400; display: block; margin-top: 2px; }

    /* HUD Button */
    .hud-btn {
      position: fixed;
      bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
      left: 16px;
      width: 54px; height: 54px;
      border-radius: 15px;
      background: #0d0d1a;
      border: 1.5px solid rgba(255,107,74,0.5);
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; z-index: 1002; /* above loading overlay (1000) */
      box-shadow: 0 0 0 1px rgba(255,107,74,0.15), 0 4px 20px rgba(0,0,0,0.4);
      transition: transform 0.15s;
    }
    .hud-btn:active { transform: scale(0.9); }
    .hud-btn svg { width: 26px; height: 26px; }
    .hud-badge {
      position: absolute; top: -6px; right: -6px;
      width: 20px; height: 20px; border-radius: 50%;
      background: #ff6b4a; color: white;
      font-size: 10px; font-weight: 800;
      display: flex; align-items: center; justify-content: center;
      border: 2px solid #0d0d1a;
      animation: hudPulse 2s ease-in-out infinite;
    }
    @keyframes hudPulse {
      0%,100% { box-shadow: 0 0 0 0 rgba(255,107,74,0.6); }
      50%      { box-shadow: 0 0 0 7px rgba(255,107,74,0); }
    }

    /* Overlay */
    .inv-overlay {
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.75);
      z-index: 2500;
      opacity: 0; pointer-events: none;
      transition: opacity 0.35s;
      backdrop-filter: blur(4px);
    }
    .inv-overlay.show { opacity: 1; pointer-events: auto; }

/* Panel */
.inv-panel {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 88dvh;
  background:
    radial-gradient(circle at top, rgba(255,233,214,0.7) 0%, rgba(255,255,255,0) 24%),
    linear-gradient(180deg, #ffffff 0%, #faf7f2 100%);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid rgba(232,93,58,0.14);
  z-index: 2501;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.42s cubic-bezier(0.32,0.72,0,1);
  overflow: hidden;
  box-shadow: 0 -10px 48px rgba(91,66,42,0.14);
}
.inv-panel.show { transform: translateY(0); }

/* Handle */
.inv-handle {
  width: 42px; height: 4px;
  background: rgba(122,101,86,0.18);
  border-radius: 999px;
  margin: 12px auto 2px;
  flex-shrink: 0;
}

/* Header */
.inv-header {
  padding: 10px 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.inv-title {
  font-size: 11px; font-weight: 900;
  color: var(--text); letter-spacing: 4px; text-transform: uppercase;
}
.inv-subtitle {
  font-size: 11px; color: rgba(232,93,58,0.78); font-weight: 700;
}
.inv-close-btn {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(216,205,196,0.7);
  color: rgba(107,94,85,0.85);
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(91,66,42,0.08);
}

/* Tabs */
.inv-tabs {
  display: flex;
  padding: 12px 16px 0;
  gap: 6px;
  flex-shrink: 0;
  overflow-x: auto; scrollbar-width: none;
}
.inv-tabs::-webkit-scrollbar { display: none; }
.inv-tab {
  padding: 7px 14px; flex-shrink: 0;
  font-size: 10px; font-weight: 800;
  color: rgba(107,94,85,0.5);
  text-transform: uppercase; letter-spacing: 1.4px;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s;
  background: rgba(255,255,255,0.66);
}
.inv-tab.active {
  color: var(--accent);
  background: rgba(232,93,58,0.08);
  border-color: rgba(232,93,58,0.18);
  box-shadow: 0 6px 16px rgba(232,93,58,0.08);
}

/* Scroll area */
.inv-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 18px 16px 112px;
  scrollbar-width: none;
}
.inv-scroll::-webkit-scrollbar { display: none; }

/* ── Stacked card list ── */
.inv-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 8px;
  padding-bottom: 18px;
}

.inv-card-row {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  height: 220px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid rgba(255, 223, 196, 0.9);
  box-shadow:
    0 18px 40px rgba(54, 32, 15, 0.16),
    0 6px 18px rgba(54, 32, 15, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease;
  transform-origin: center top;
  z-index: 1;
  filter: saturate(0.98);
}
.inv-card-row + .inv-card-row {
  margin-top: -78px;
}
.inv-card-row:first-child {
  z-index: 8;
  transform: scale(1);
}
.inv-card-row:nth-child(2) {
  z-index: 7;
  transform: scale(0.985);
}
.inv-card-row:nth-child(3) {
  z-index: 6;
  transform: scale(0.97);
}
.inv-card-row:nth-child(n+4) {
  transform: scale(0.96);
}
.inv-card-row:active {
  transform: scale(0.985) translateY(2px);
  box-shadow:
    0 12px 26px rgba(54, 32, 15, 0.14),
    0 4px 10px rgba(54, 32, 15, 0.08);
}
.inv-card-row::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  padding: 2px;
  background: linear-gradient(135deg,
    rgba(255,244,228,0.95) 0%,
    rgba(255,219,176,0.85) 28%,
    rgba(255,250,239,0.95) 58%,
    rgba(255,205,153,0.88) 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.55) inset,
    0 0 18px rgba(255,214,165,0.6);
}

.inv-card-art {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.inv-card-art::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.02) 35%, rgba(0,0,0,0.10) 100%),
    linear-gradient(115deg, rgba(11,10,18,0.34) 0%, rgba(11,10,18,0.16) 38%, rgba(11,10,18,0.02) 72%);
}
.inv-card-art.no-art {
  background: linear-gradient(135deg, #eef7ff 0%, #f5eee8 48%, #fff8f0 100%);
}
.inv-card-art.stamp-bg {
  background: linear-gradient(135deg, #eaf8ec 0%, #eef7ff 52%, #fff7eb 100%);
}
.inv-card-art.badge-bg {
  background: linear-gradient(135deg, #edf3ff 0%, #f3f7ff 42%, #fff7ec 100%);
}
.inv-card-art.reward-bg {
  background: linear-gradient(135deg, #fff4d7 0%, #fff2ec 50%, #eef6ff 100%);
}
.inv-card-art.partner-cntr {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.08), rgba(255,255,255,0)),
    url('https://images.unsplash.com/photo-1516280440614-37939bbacd81?auto=format&fit=crop&w=1200&q=80');
}
.inv-card-art.partner-rewind {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.08), rgba(255,255,255,0)),
    url('https://images.unsplash.com/photo-1520523839897-bd0b52f945a0?auto=format&fit=crop&w=1200&q=80');
}
.inv-card-art.partner-otaku {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.12), rgba(0,0,0,0.02)),
    url('https://otakucollective.com/card-art/otaku-collective-card.png') center/cover no-repeat;
}
.inv-card-art.partner-mecca {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.05), rgba(255,255,255,0)),
    url('https://images.unsplash.com/photo-1460317442991-0ec209397118?auto=format&fit=crop&w=1200&q=80');
}

.inv-card-noise {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  background-size: 210px;
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.inv-card-content {
  position: relative; z-index: 2;
  height: 100%;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
}
.inv-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.inv-card-copy {
  min-width: 0;
  max-width: calc(100% - 72px);
}
.inv-card-name {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.4px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.32);
}
.inv-card-subline {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(255,255,255,0.92);
  margin-top: 6px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.28);
  max-width: 230px;
}

.inv-card-logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.32);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
  overflow: hidden;
}
.inv-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.inv-card-logo-text {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.inv-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.inv-card-stamp-wrap {
  flex: 1;
  align-self: flex-end;
}
.inv-stamp-row {
  display: flex; gap: 6px; align-items: center;
  flex-wrap: wrap;
}
.inv-stamp-pip {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.42);
  background: rgba(255,255,255,0.16);
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.inv-stamp-pip.on {
  background: #ffffff;
  border-color: rgba(255,255,255,0.95);
  box-shadow: 0 0 10px rgba(255,255,255,0.75);
}

.inv-card-meta {
  margin-left: auto;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 10px rgba(0,0,0,0.28);
  max-width: 48%;
}
.inv-card-meta span {
  display: block;
}
.inv-card-meta-label {
  color: rgba(255,255,255,0.82);
  font-weight: 600;
}

.inv-card-arrow {
  position: absolute; left: 50%; bottom: 12px;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.82);
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0,0,0,0.18);
  pointer-events: none;
}

.rarity-common,
.rarity-uncommon,
.rarity-rare,
.rarity-epic,
.rarity-legendary {
  background: rgba(255,255,255,0.16);
  color: #ffffff;
}

.inv-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center; gap: 12px;
}
.inv-empty-icon {
  font-size: 48px; margin-bottom: 4px;
  filter: none;
}
.inv-empty-title {
  font-size: 16px; font-weight: 800; color: rgba(26,20,16,0.82);
}
.inv-empty-sub {
  font-size: 12px; color: rgba(107,94,85,0.72);
  line-height: 1.6; max-width: 240px;
}
.inv-empty-cta {
margin-top: 8px;
padding: 10px 22px;
background: rgba(232,93,58,0.08);
border: 1px solid rgba(232,93,58,0.22);
border-radius: 20px;
color: #e85d3a; font-size: 12px; font-weight: 700;
cursor: pointer; letter-spacing: 0.5px;
}

    /* ══ REWARDS WALLET ═══════════════════════════════════════════ */
    .wallet-section {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      margin-bottom: 16px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    }
    .wallet-section-header {
      padding: 14px 16px 10px;
      border-bottom: 1px solid var(--border);
      display: flex; align-items: center; justify-content: space-between;
    }
    .wallet-section-title {
      font-size: 13px; font-weight: 800;
      text-transform: uppercase; letter-spacing: 1px;
      color: var(--text);
    }
    .wallet-oc-hero {
      padding: 20px 16px;
      display: flex; align-items: center; gap: 16px;
      background: linear-gradient(135deg, #1a0a06 0%, #2d1208 60%, #0d0510 100%);
      color: white;
    }
    .wallet-oc-icon {
      width: 52px; height: 52px; border-radius: 50%;
      background: linear-gradient(135deg, #ff9f43, #ff6b4a);
      display: flex; align-items: center; justify-content: center;
      font-size: 24px; flex-shrink: 0;
      box-shadow: 0 4px 16px rgba(255,107,74,0.4);
    }
    .wallet-oc-balance {
      font-size: 36px; font-weight: 900; line-height: 1;
      letter-spacing: -1px;
    }
    .wallet-oc-label {
      font-size: 11px; font-weight: 700;
      text-transform: uppercase; letter-spacing: 1.5px;
      color: rgba(255,255,255,0.6); margin-top: 3px;
    }
    .wallet-oc-value {
      font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 2px;
    }
    .wallet-rate-pill {
      display: inline-flex; align-items: center; gap: 6px;
      background: rgba(255,107,74,0.1);
      border: 1px solid rgba(255,107,74,0.2);
      border-radius: 999px; padding: 6px 12px;
      font-size: 11px; font-weight: 600; color: var(--accent);
      margin: 0 16px 14px;
    }
    .wallet-partner-row {
      padding: 12px 16px;
      border-top: 1px solid var(--border);
      display: flex; flex-direction: column; gap: 8px;
    }
    .wallet-partner-top {
      display: flex; align-items: center; justify-content: space-between;
    }
    .wallet-partner-name {
      font-size: 13px; font-weight: 700;
      display: flex; align-items: center; gap: 6px;
    }
    .wallet-partner-pts {
      font-size: 13px; font-weight: 800; color: var(--accent);
    }
    .wallet-partner-bar-wrap {
      height: 4px; background: var(--border);
      border-radius: 999px; overflow: hidden;
    }
    .wallet-partner-bar {
      height: 100%; border-radius: 999px;
      background: linear-gradient(90deg, #ff6b4a, #ff9473);
      transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
    }
    .wallet-partner-sub {
      display: flex; align-items: center; justify-content: space-between;
    }
    .wallet-partner-hint {
      font-size: 11px; color: var(--text3);
    }
    .wallet-cashin-btn {
      padding: 5px 12px;
      background: linear-gradient(135deg, #ff6b4a, #ff9473);
      color: white; border: none;
      border-radius: 999px; font-size: 11px; font-weight: 700;
      cursor: pointer; font-family: inherit;
      box-shadow: 0 2px 8px rgba(255,107,74,0.35);
      transition: transform 0.15s, opacity 0.15s;
    }
    .wallet-cashin-btn:active { transform: scale(0.93); }
    .wallet-cashin-btn:disabled { opacity: 0.35; cursor: default; }

    /* Activity feed */
    .wallet-activity-row {
      display: flex; align-items: flex-start; gap: 10px;
      padding: 10px 16px;
      border-top: 1px solid var(--border);
      font-size: 13px;
    }
    .wallet-activity-icon {
      width: 30px; height: 30px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 14px; flex-shrink: 0;
    }
    .wallet-activity-icon.credit { background: rgba(74,222,128,0.12); }
    .wallet-activity-icon.debit  { background: rgba(255,107,74,0.1); }
    .wallet-activity-note { flex: 1; color: var(--text); line-height: 1.4; }
    .wallet-activity-time { font-size: 11px; color: var(--text3); white-space: nowrap; margin-top: 2px; }

    /* ══ COIN REDEMPTION IN CHECKOUT ══════════════════════════════ */
    .coin-redeem-row {
      display: flex; align-items: center; gap: 10px;
      padding: 12px 0; border-top: 1px solid var(--border);
      margin-top: 4px;
    }
    .coin-redeem-icon {
      font-size: 20px; flex-shrink: 0;
    }
    .coin-redeem-label {
      flex: 1;
    }
    .coin-redeem-label-title {
      font-size: 13px; font-weight: 700;
    }
    .coin-redeem-label-sub {
      font-size: 11px; color: var(--text3);
    }
    .coin-stepper {
      display: flex; align-items: center; gap: 8px;
    }
    .coin-stepper-btn {
      width: 28px; height: 28px; border-radius: 50%;
      background: var(--surface2); border: 1px solid var(--border);
      font-size: 16px; font-weight: 700; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: background 0.15s;
    }
    .coin-stepper-btn:active { background: var(--border); }
    .coin-stepper-val {
      font-size: 15px; font-weight: 800; min-width: 24px; text-align: center;
    }
    .coin-discount-line {
      display: flex; justify-content: space-between;
      padding: 4px 0;
      font-size: 13px; color: #4ade80;
      font-weight: 600;
    }

    /* Progress bar at bottom of panel */
    .inv-progress {
      position: absolute; bottom: 0; left: 0; right: 0;
      padding: 12px 16px 20px;
      background: linear-gradient(to top, rgba(250,247,242,0.98) 78%, rgba(250,247,242,0));
      flex-shrink: 0;
      z-index: 5;
    }
    .inv-prog-item {
      background: rgba(255,255,255,0.88);
      border: 1px solid rgba(232,93,58,0.12);
      border-radius: 14px; padding: 10px 14px;
      box-shadow: 0 10px 24px rgba(91,66,42,0.08);
    }
    .inv-prog-row {
      display: flex; justify-content: space-between; margin-bottom: 6px;
    }
    .inv-prog-label { font-size: 11px; font-weight: 600; color: rgba(107,94,85,0.72); }
    .inv-prog-val   { font-size: 11px; font-weight: 700; color: #ff6b4a; }
    .inv-prog-bar   { height: 4px; background: rgba(232,93,58,0.08); border-radius: 999px; overflow: hidden; }
    .inv-prog-fill  { height: 100%; border-radius: 3px; background: linear-gradient(90deg,#ff6b4a,#ff9473); transition: width 0.8s cubic-bezier(0.4,0,0.2,1); }

    /* ── Card Detail Full-Screen ── */
    .card-detail-overlay {
      position: fixed; inset: 0;
      z-index: 3500;
      background: rgba(0,0,0,0.95);
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      opacity: 0; pointer-events: none;
      transition: opacity 0.3s;
      padding: 24px;
    }
    .card-detail-overlay.show { opacity: 1; pointer-events: auto; }

    /* Reveal ring — the "caught it" moment */
    .card-reveal-ring {
      position: absolute;
      width: 280px; height: 280px;
      border-radius: 50%;
      border: 2px solid rgba(255,107,74,0.4);
      animation: ringPulse 2.5s ease-in-out infinite;
      pointer-events: none;
    }
    @keyframes ringPulse {
      0%,100% { transform: scale(1);   opacity: 0.4; }
      50%      { transform: scale(1.08); opacity: 0.1; }
    }
    .card-reveal-ring.ring2 {
      width: 320px; height: 320px;
      border-color: rgba(255,107,74,0.15);
      animation-delay: 0.6s;
    }

    /* The big flippable card in detail view */
    .card-detail-inner {
      width: min(260px, 72vw);
      aspect-ratio: 2.25 / 3.14;
      perspective: 1000px;
      position: relative; z-index: 2;
    }
    .cd-inner {
      width: 100%; height: 100%;
      position: relative;
      transform-style: preserve-3d;
      transition: transform 0.8s cubic-bezier(0.4,0,0.2,1);
      border-radius: 16px;
    }
    .card-detail-inner.flipped .cd-inner { transform: rotateY(180deg); }
    .cd-front, .cd-back {
      position: absolute; inset: 0;
      border-radius: 16px;
      backface-visibility: hidden;
      overflow: hidden;
    }
    .cd-back { transform: rotateY(180deg); }

    /* Card front detail */
    .cd-front {
      background: #12121f;
      border: 1px solid rgba(255,255,255,0.1);
      display: flex; flex-direction: column;
    }
    .cd-art {
      flex: 1; overflow: hidden; position: relative;
    }
    .cd-art img {
      width: 100%; height: 100%; object-fit: cover; display: block;
    }
    .cd-art-placeholder {
      width: 100%; height: 100%;
      display: flex; align-items: center; justify-content: center;
      font-size: 72px;
    }
    .cd-foil {
      position: absolute; inset: 0;
      background: linear-gradient(135deg,
        transparent 0%, rgba(255,255,255,0.06) 45%,
        rgba(255,255,255,0.12) 50%,
        rgba(255,255,255,0.06) 55%, transparent 100%);
      pointer-events: none;
    }
    .cd-rarity-badge {
      position: absolute; top: 10px; right: 10px;
      padding: 3px 9px; border-radius: 6px;
      font-size: 9px; font-weight: 800;
      text-transform: uppercase; letter-spacing: 0.8px;
    }
    .cd-bottom {
      padding: 12px 14px;
      background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 100%);
      flex-shrink: 0;
    }
    .cd-name {
      font-size: 14px; font-weight: 900;
      color: white; text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .cd-type { font-size: 10px; color: rgba(255,255,255,0.35); margin-top: 2px; }

    /* Stamp detail */
    .cd-stamps {
      display: flex; flex-wrap: wrap; gap: 6px;
      padding: 16px 14px 8px; justify-content: center;
    }
    .cd-stamp-dot {
      width: 18px; height: 18px; border-radius: 50%;
      border: 1.5px solid rgba(74,222,128,0.2);
      background: rgba(74,222,128,0.06);
      transition: all 0.4s;
    }
    .cd-stamp-dot.filled {
      background: rgba(74,222,128,0.6);
      border-color: rgba(74,222,128,0.9);
      box-shadow: 0 0 8px rgba(74,222,128,0.5);
    }
    .cd-stamp-count {
      text-align: center; font-size: 11px;
      color: rgba(74,222,128,0.6); font-weight: 700;
      letter-spacing: 0.5px; padding-bottom: 8px;
    }

    /* Card back detail */
    .cd-back {
      background: #0a0a16;
      border: 1px solid rgba(255,107,74,0.2);
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      gap: 10px; padding: 24px;
      position: relative;
    }
    .cd-back-pattern {
      position: absolute; inset: 0;
      background-image: repeating-linear-gradient(
        45deg, transparent, transparent 10px,
        rgba(255,107,74,0.03) 10px, rgba(255,107,74,0.03) 11px
      );
    }
    .cd-back-border {
      position: absolute; inset: 8px;
      border: 1px solid rgba(255,107,74,0.08);
      border-radius: 10px;
    }
    .cd-back-logo {
      font-family: 'Noto Sans JP', sans-serif;
      font-weight: 900; font-size: 18px;
      color: white; text-align: center; position: relative;
    }
    .cd-back-logo span { color: #ff6b4a; }
    .cd-back-jp {
      font-size: 11px; color: rgba(255,107,74,0.35);
      letter-spacing: 4px; text-transform: uppercase; position: relative;
    }
    .cd-back-desc {
      font-size: 11px; color: rgba(255,255,255,0.2);
      text-align: center; line-height: 1.7;
      max-width: 180px; position: relative;
    }
    .cd-back-earned {
      font-size: 10px; color: rgba(255,107,74,0.4);
      position: relative;
    }

    /* Below card: info row */
    .card-detail-info {
      margin-top: 20px;
      text-align: center; z-index: 2;
    }
    .card-detail-hint {
      font-size: 11px; color: rgba(255,255,255,0.2);
      letter-spacing: 1px; text-transform: uppercase;
    }
    .card-detail-close {
      margin-top: 20px;
      padding: 12px 32px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 24px;
      color: rgba(255,255,255,0.5);
      font-size: 13px; font-weight: 600;
      cursor: pointer; z-index: 2;
      font-family: inherit;
    }

    /* Reward earned modal */
    .reward-modal-wrap {
      position: fixed; inset: 0; z-index: 4500;
      display: none; align-items: center; justify-content: center;
      background: rgba(0,0,0,0.9); padding: 32px;
    }
    .reward-modal-wrap.show { display: flex; }
    .reward-modal {
      background: #0d0d1a;
      border: 1px solid rgba(255,107,74,0.3);
      border-radius: 22px; padding: 36px 24px;
      text-align: center; max-width: 300px; width: 100%;
      animation: rewardPop 0.4s cubic-bezier(0.34,1.56,0.64,1);
    }
    @keyframes rewardPop {
      from { transform: scale(0.8); opacity: 0; }
      to   { transform: scale(1);   opacity: 1; }
    }
    .reward-ring {
      width: 96px; height: 96px; border-radius: 50%;
      border: 2px solid rgba(255,107,74,0.3);
      margin: 0 auto 16px;
      display: flex; align-items: center; justify-content: center;
      animation: ringPulse 2s ease-in-out infinite;
      font-size: 42px;
    }
    .reward-label {
      font-size: 10px; font-weight: 800;
      color: rgba(255,107,74,0.7);
      letter-spacing: 3px; text-transform: uppercase;
      margin-bottom: 8px;
    }
    .reward-name {
      font-size: 22px; font-weight: 900;
      color: white; margin-bottom: 6px;
    }
    .reward-desc {
      font-size: 12px; color: rgba(255,255,255,0.35);
      margin-bottom: 28px; line-height: 1.6;
    }
    .reward-cta {
      width: 100%; padding: 14px;
      background: #ff6b4a; color: white;
      border: none; border-radius: 12px;
      font-size: 14px; font-weight: 700;
      cursor: pointer; font-family: inherit;
      letter-spacing: 0.3px;
    }

    /* ══ CARD WALLET SYSTEM ════════════════════════════════════ */

    /* Card — full bleed, same style as inv-card-row */
    .wallet-card {
      position: relative;
      border-radius: 24px;
      overflow: hidden;
      cursor: pointer;
      height: 220px;
      flex-shrink: 0;
      background: #ffffff;
      border: 1px solid rgba(255,223,196,0.9);
      box-shadow:
        0 18px 40px rgba(54,32,15,0.16),
        0 6px 18px rgba(54,32,15,0.08);
      transition: transform 0.28s ease, box-shadow 0.28s ease;
      transform-origin: center top;
      margin-bottom: 0;
    }
    .wallet-card + .wallet-card { margin-top: -78px; }
    .wallet-card:first-child  { z-index: 8; transform: scale(1); }
    .wallet-card:nth-child(2) { z-index: 7; transform: scale(0.985); }
    .wallet-card:nth-child(3) { z-index: 6; transform: scale(0.97); }
    .wallet-card:nth-child(n+4) { transform: scale(0.96); }
    .wallet-card:active { transform: scale(0.985) translateY(2px); }
    .wallet-card::before {
      content: '';
      position: absolute; inset: 0;
      border-radius: inherit;
      pointer-events: none;
      padding: 2px;
      background: linear-gradient(135deg,
        rgba(255,244,228,0.95) 0%,
        rgba(255,219,176,0.85) 28%,
        rgba(255,250,239,0.95) 58%,
        rgba(255,205,153,0.88) 100%);
      -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      -webkit-mask-composite: xor;
              mask-composite: exclude;
      z-index: 3;
    }

    /* Full-bleed art background */
    .wc-header {
      position: absolute; inset: 0;
      background-size: cover; background-position: center;
    }
    .wc-header::after {
      content: '';
      position: absolute; inset: 0;
      background:
        linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 35%, rgba(0,0,0,0.12) 100%),
        linear-gradient(115deg, rgba(11,10,18,0.38) 0%, rgba(11,10,18,0.18) 38%, rgba(11,10,18,0.02) 72%);
    }
    .wc-header-art { display: none; } /* art now set directly on .wc-header */
    .wc-header-art.no-art-oc     { background: linear-gradient(135deg,#1a0a08 0%,#2d0f0a 60%,#0d0510 100%); }
    .wc-header-art.no-art-cntr   { background: linear-gradient(135deg,#0a0005 0%,#2d0f0a 60%,#0d0510 100%); }
    .wc-header-art.no-art-rewind { background: linear-gradient(135deg,#06081a 0%,#0d1030 60%,#030618 100%); }
    .wc-header-overlay { display: none; }

    /* Noise layer */
    .wc-noise {
      position: absolute; inset: 0; z-index: 1;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
      background-size: 210px;
      opacity: 0.35;
      pointer-events: none;
      mix-blend-mode: soft-light;
    }

    /* Content layer */
    .wc-header-content {
      position: absolute; inset: 0; z-index: 2;
      padding: 18px;
      display: flex; flex-direction: column;
      justify-content: space-between;
      color: white;
    }
    .wc-content-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
    }
    .wc-content-bottom {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 12px;
    }
    .wc-name {
      font-size: 19px; font-weight: 900;
      line-height: 1.1; letter-spacing: -0.4px;
      text-shadow: 0 2px 10px rgba(0,0,0,0.32);
    }
    .wc-location {
      font-size: 11px; font-weight: 600;
      color: rgba(255,255,255,0.88);
      margin-top: 5px;
      text-shadow: 0 2px 10px rgba(0,0,0,0.28);
    }

    /* Logo badge top-right */
    .wc-logo {
      width: 56px; height: 56px;
      border-radius: 18px;
      flex-shrink: 0;
      background: rgba(255,255,255,0.14);
      border: 1px solid rgba(255,255,255,0.32);
      backdrop-filter: blur(10px) saturate(1.2);
      -webkit-backdrop-filter: blur(10px) saturate(1.2);
      display: flex; align-items: center; justify-content: center;
      color: white;
      box-shadow: 0 12px 24px rgba(0,0,0,0.12);
      overflow: hidden;
      font-size: 11px; font-weight: 900;
      letter-spacing: 1.2px; text-transform: uppercase;
    }
    .wc-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

    /* Progress pips bottom-left */
    .wc-progress-pips {
      display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
      max-width: 60%;
    }
    .wc-pip {
      width: 10px; height: 10px; border-radius: 50%;
      border: 1px solid rgba(255,255,255,0.42);
      background: rgba(255,255,255,0.16);
      flex-shrink: 0;
      box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    }
    .wc-pip.on {
      background: #ffffff;
      border-color: rgba(255,255,255,0.95);
      box-shadow: 0 0 10px rgba(255,255,255,0.75);
    }

    /* Collected date bottom-right */
    .wc-collected {
      text-align: right;
      font-size: 11px; font-weight: 700;
      line-height: 1.45;
      color: rgba(255,255,255,0.95);
      text-shadow: 0 2px 10px rgba(0,0,0,0.28);
    }
    .wc-collected-label {
      color: rgba(255,255,255,0.72); font-weight: 600;
      display: block;
    }
    .wc-slots-count {
      font-size: 12px; font-weight: 800;
      color: rgba(255,255,255,0.95);
      display: block;
    }

    /* Arrow hint */
    .wc-arrow {
      position: absolute; left: 50%; bottom: 10px;
      transform: translateX(-50%);
      z-index: 5;
      pointer-events: none;
      width: 28px; height: 28px;
      display: flex; align-items: center; justify-content: center;
      transition: transform 0.38s cubic-bezier(0.32,0.72,0,1);
    }
    .wc-arrow svg {
      width: 20px; height: 20px;
      stroke: rgba(255,255,255,0.85);
      stroke-width: 2.5;
      fill: none;
      filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4));
    }

    /* Slots drawer — hidden by default, slides up on tap */
    .wc-slots-drawer {
      position: absolute; bottom: 0; left: 0; right: 0;
      z-index: 4;
      background: rgba(255,255,255,0.18);
      backdrop-filter: blur(20px) saturate(1.6);
      -webkit-backdrop-filter: blur(20px) saturate(1.6);
      border-top: 1px solid rgba(255,255,255,0.28);
      box-shadow: 0 -1px 0 rgba(255,255,255,0.12) inset;
      padding: 12px;
      transform: translateY(100%);
      transition: transform 0.38s cubic-bezier(0.32,0.72,0,1);
      border-radius: 0 0 24px 24px;
    }
    .wallet-card.expanded .wc-slots-drawer { transform: translateY(0); }
    .wallet-card.expanded .wc-arrow { transform: translateX(-50%) rotate(180deg); }

    /* Slots grid */
    .wc-slots {
      display: grid;
      grid-template-columns: repeat(4,1fr);
      gap: 8px;
    }
    .wc-slot {
      aspect-ratio: 1;
      border-radius: 10px;
      position: relative;
      overflow: hidden;
      cursor: pointer;
      transition: transform 0.15s;
    }
    .wc-slot:active { transform: scale(0.94); }

    /* Unlocked slot */
    .wc-slot.unlocked {
      background: #12121f;
      border: 1px solid rgba(255,255,255,0.1);
    }
    .wc-slot-art {
      width: 100%; height: 100%;
      object-fit: cover; display: block;
    }
    .wc-slot-emoji {
      width: 100%; height: 100%;
      display: flex; align-items: center;
      justify-content: center; font-size: 28px;
    }
    .wc-slot-rarity {
      position: absolute; bottom: 3px; left: 0; right: 0;
      text-align: center;
      font-size: 7px; font-weight: 800;
      text-transform: uppercase; letter-spacing: 0.5px;
      color: rgba(255,255,255,0.7);
    }
    .wc-slot-new {
      position: absolute; top: 4px; right: 4px;
      width: 6px; height: 6px; border-radius: 50%;
      background: #ff6b4a;
      box-shadow: 0 0 6px rgba(255,107,74,1);
    }

    /* Locked slot — silhouette */
    .wc-slot.locked {
      background: #0a0a14;
      border: 1px solid rgba(255,255,255,0.04);
    }
    .wc-slot-silhouette {
      width: 100%; height: 100%;
      display: flex; align-items: center; justify-content: center;
      font-size: 22px; opacity: 0.12;
      filter: blur(1px) grayscale(1);
    }
    .wc-slot-lock {
      position: absolute; inset: 0;
      display: flex; align-items: center; justify-content: center;
    }
    .wc-slot-lock svg {
      width: 14px; height: 14px;
      color: rgba(255,255,255,0.15);
    }

    /* Stamp slot special */
    .wc-slot.stamp-slot {
      background: #061a06;
      border: 1px solid rgba(74,222,128,0.15);
    }
    .wc-stamp-grid {
      display: grid; grid-template-columns: repeat(3,1fr);
      gap: 3px; padding: 6px;
    }
    .wc-stamp-pip {
      aspect-ratio: 1; border-radius: 50%;
      background: rgba(74,222,128,0.08);
      border: 1px solid rgba(74,222,128,0.15);
    }
    .wc-stamp-pip.on {
      background: rgba(74,222,128,0.6);
      border-color: rgba(74,222,128,0.8);
      box-shadow: 0 0 4px rgba(74,222,128,0.5);
    }

    /* ── SLOT DETAIL PANEL ── */
    .slot-detail-overlay {
      position: fixed; inset: 0; z-index: 3600;
      background: rgba(0,0,0,0.92);
      display: flex; flex-direction: column;
      align-items: center; justify-content: flex-start;
      padding-top: 60px;
      opacity: 0; pointer-events: none;
      transition: opacity 0.3s;
    }
    .slot-detail-overlay.show { opacity: 1; pointer-events: auto; }
    .slot-detail-close {
      position: absolute; top: 16px; right: 16px;
      background: rgba(255,255,255,0.08);
      border: none; color: rgba(255,255,255,0.5);
      width: 32px; height: 32px; border-radius: 50%;
      font-size: 16px; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
    }

    /* Three.js canvas container */
    .threejs-viewer {
      width: 260px; height: 260px;
      border-radius: 16px;
      overflow: hidden;
      background: #ffffff;
      position: relative;
      flex-shrink: 0;
    }
    .threejs-canvas { width: 100%; height: 100%; display: block; }

    /* Asset info below viewer */
    .slot-detail-info {
      margin-top: 20px; text-align: center;
      padding: 0 24px; width: 100%;
    }
    .sd-rarity-badge {
      display: inline-block;
      padding: 3px 10px; border-radius: 6px;
      font-size: 9px; font-weight: 800;
      text-transform: uppercase; letter-spacing: 1px;
      margin-bottom: 10px;
    }
    .sd-name {
      font-size: 22px; font-weight: 900;
      color: white; margin-bottom: 6px;
      letter-spacing: -0.3px;
    }
    .sd-desc {
      font-size: 12px; color: rgba(255,255,255,0.35);
      line-height: 1.7; margin-bottom: 20px;
    }
    .sd-hint {
      font-size: 12px; color: rgba(255,107,74,0.5);
      font-weight: 600; letter-spacing: 0.5px;
      margin-bottom: 20px;
    }

    /* Transfer button */
    .sd-transfer-btn {
      padding: 12px 28px;
      background: rgba(255,107,74,0.1);
      border: 1px solid rgba(255,107,74,0.3);
      border-radius: 24px;
      color: #ff6b4a; font-size: 13px;
      font-weight: 700; cursor: pointer;
      font-family: inherit; letter-spacing: 0.3px;
    }

    /* Transfer modal */
    .transfer-modal-wrap {
      position: fixed; inset: 0; z-index: 4600;
      display: none; align-items: center; justify-content: center;
      background: rgba(0,0,0,0.9); padding: 24px;
    }
    .transfer-modal-wrap.show { display: flex; }
    .transfer-modal {
      background: #0d0d1a;
      border: 1px solid rgba(255,107,74,0.25);
      border-radius: 20px; padding: 28px 20px;
      width: 100%; max-width: 320px;
    }
    .transfer-modal h3 {
      font-size: 16px; font-weight: 900; color: white;
      margin-bottom: 4px;
    }
    .transfer-modal p {
      font-size: 11px; color: rgba(255,255,255,0.3);
      margin-bottom: 18px; line-height: 1.6;
    }
    .transfer-input {
      width: 100%; padding: 11px 14px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 10px; color: white;
      font-size: 13px; font-family: inherit;
      margin-bottom: 10px; box-sizing: border-box;
    }
    .transfer-input::placeholder { color: rgba(255,255,255,0.2); }
    .transfer-row {
      display: flex; gap: 8px; margin-top: 14px;
    }
    .transfer-cancel-btn {
      flex: 1; padding: 12px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 10px; color: rgba(255,255,255,0.4);
      font-size: 13px; font-weight: 600;
      cursor: pointer; font-family: inherit;
    }
    .transfer-send-btn {
      flex: 2; padding: 12px;
      background: #ff6b4a; color: white;
      border: none; border-radius: 10px;
      font-size: 13px; font-weight: 700;
      cursor: pointer; font-family: inherit;
    }

/* ══════════════════════════════════════════════════════════════
   INVENTORY REDESIGN — Game-style collectible system
   All new classes added below; existing classes untouched above.
   ══════════════════════════════════════════════════════════════ */

/* ── Shared section spacing ─────────────────────────────────── */
.inv-featured-section,
.inv-benefits-section,
.inv-partner-section {
  margin-bottom: 4px;
}

/* ── Featured Artifact Hero ──────────────────────────────────── */
.inv-featured-eyebrow {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--accent); padding: 16px 16px 8px;
  display: flex; align-items: center; gap: 6px;
}
.inv-featured-eyebrow::before { content: '✦'; font-size: 8px; }

.inv-featured-card {
  margin: 0 12px 8px;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  height: 260px;
  cursor: pointer;
  background: #0d0d1a;
  border: 1px solid rgba(255,107,74,0.18);
  box-shadow:
    0 20px 48px rgba(54,32,15,0.22),
    0 6px 18px rgba(54,32,15,0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.inv-featured-card:active {
  transform: scale(0.985);
  box-shadow: 0 12px 28px rgba(54,32,15,0.18);
}
.inv-featured-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  padding: 1.5px;
  background: linear-gradient(135deg,
    rgba(255,244,228,0.9) 0%,
    rgba(255,107,74,0.5) 40%,
    rgba(255,250,239,0.9) 70%,
    rgba(255,205,153,0.7) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  z-index: 4;
}

.inv-featured-art {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.inv-featured-art-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.08) 100%);
}
.inv-featured-foil {
  position: absolute; inset: 0;
  background: linear-gradient(135deg,
    transparent 0%, rgba(255,255,255,0.04) 45%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 55%, transparent 100%);
  pointer-events: none;
}

.inv-featured-content {
  position: absolute; inset: 0; z-index: 3;
  padding: 16px;
  display: flex; flex-direction: column;
  justify-content: space-between;
}
.inv-featured-top {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.inv-featured-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.inv-feat-rarity {
  padding: 3px 9px; border-radius: 6px;
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.8px;
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.9);
}
.inv-feat-type {
  padding: 3px 9px; border-radius: 6px;
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  background: rgba(255,107,74,0.18);
  color: rgba(255,107,74,0.95);
  border: 1px solid rgba(255,107,74,0.25);
}
.inv-featured-logo {
  flex-shrink: 0;
}
.inv-featured-logo .inv-card-logo {
  width: 48px; height: 48px;
}

.inv-featured-bottom { display: flex; flex-direction: column; gap: 6px; }
.inv-featured-name {
  font-size: 22px; font-weight: 900;
  color: white; line-height: 1.1;
  letter-spacing: -0.4px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.inv-featured-desc {
  font-size: 12px; color: rgba(255,255,255,0.72);
  line-height: 1.5; max-width: 280px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
.inv-featured-perks {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px;
}
.inv-feat-perk-chip {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.inv-featured-hint {
  font-size: 11px; color: rgba(255,107,74,0.8);
  font-weight: 700; letter-spacing: 0.3px;
  margin-top: 2px;
}

/* Featured empty state */
.inv-featured-empty {
  margin: 0 12px 8px;
  border-radius: 18px;
  border: 1.5px dashed rgba(232,93,58,0.25);
  background: rgba(255,107,74,0.03);
  padding: 28px 20px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.inv-featured-empty .inv-featured-eyebrow {
  padding: 0; justify-content: center;
}
.inv-featured-empty-icon { font-size: 44px; }
.inv-featured-empty-title {
  font-size: 16px; font-weight: 900;
  color: var(--text);
}
.inv-featured-empty-sub {
  font-size: 12px; color: var(--text3);
  line-height: 1.6; max-width: 260px;
}
.inv-featured-empty-cta {
  margin-top: 4px;
  padding: 9px 20px;
  background: rgba(232,93,58,0.08);
  border: 1px solid rgba(232,93,58,0.22);
  border-radius: 20px;
  color: var(--accent); font-size: 12px; font-weight: 700;
  cursor: pointer; letter-spacing: 0.4px;
}

/* ── Active Benefits Section ─────────────────────────────────── */
.inv-benefits-section {
  margin: 0 12px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.inv-benefits-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.inv-benefits-title {
  font-size: 11px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text);
}
.inv-benefits-count {
  font-size: 10px; font-weight: 700;
  color: var(--accent);
  background: rgba(232,93,58,0.08);
  border: 1px solid rgba(232,93,58,0.18);
  border-radius: 99px; padding: 2px 8px;
}

.inv-benefit-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.inv-benefit-row:last-child { border-bottom: none; }
.inv-benefit-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.inv-benefit-info { flex: 1; min-width: 0; }
.inv-benefit-label {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.inv-benefit-source {
  font-size: 11px; color: var(--text3); margin-top: 1px;
}

/* Benefits empty */
.inv-benefits-empty {
  border-style: dashed;
  border-color: rgba(216,205,196,0.5);
}
.inv-benefits-empty .inv-benefits-header {
  border-bottom: none;
}
.inv-benefits-empty-body {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 16px 18px; gap: 6px; text-align: center;
}
.inv-benefits-empty-icon { font-size: 28px; }
.inv-benefits-empty-text {
  font-size: 12px; color: var(--text3); line-height: 1.55; max-width: 240px;
}

/* ── Partner card reward chips ───────────────────────────────── */
.inv-pcd-rewards-row {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 0 13px 13px;
}
.inv-pcd-reward-chip {
  background: rgba(255,107,74,0.08);
  border: 1px solid rgba(255,107,74,0.2);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 10px; font-weight: 700;
  color: var(--accent);
}

/* ── Artifact card row (in-place expand) ─────────────────────── */
.inv-artifact-row {
  height: auto !important;
  min-height: 220px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.inv-artifact-row .inv-card-expand-hint {
  font-size: 11px; color: rgba(255,255,255,0.6);
  font-weight: 600; letter-spacing: 0.3px;
}
.inv-card-expand-chev {
  position: absolute; right: 14px; bottom: 14px;
  color: rgba(255,255,255,0.7);
  transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
  pointer-events: none; z-index: 3;
}
.inv-card-expand-chev.rotated { transform: rotate(180deg); }

/* Drawer — slides down from bottom of card */
.inv-art-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.32,0.72,0,1);
  position: relative; z-index: 3;
}
.inv-art-drawer.open {
  max-height: 320px;
}
.inv-art-drawer-inner {
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-top: 1px solid rgba(255,255,255,0.18);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.inv-art-drawer-section { display: flex; flex-direction: column; gap: 6px; }
.inv-art-drawer-label {
  font-size: 9px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5);
}
.inv-art-drawer-perks {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.inv-art-drawer-no-perks {
  font-size: 11px; color: rgba(255,255,255,0.45); line-height: 1.5;
}
.inv-art-drawer-desc {
  font-size: 12px; color: rgba(255,255,255,0.72); line-height: 1.55;
}
.inv-art-drawer-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 4px; border-top: 1px solid rgba(255,255,255,0.1);
}
.inv-art-drawer-type {
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 2px 8px; border-radius: 5px;
  background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8);
}
.inv-art-drawer-date {
  font-size: 10px; color: rgba(255,255,255,0.45); font-weight: 600;
}

/* ── Artifact grid (Artifacts tab) ───────────────────────────── */
.inv-art-view { padding-bottom: 12px; }
.inv-art-group { margin-bottom: 16px; }
.inv-art-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 8px;
  border-left: 3px solid var(--accent);
  margin: 0 12px 8px;
}
.inv-art-group-name {
  font-size: 13px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 1.2px;
}
.inv-art-group-count {
  font-size: 11px; font-weight: 700;
  color: var(--text3);
  background: var(--surface2);
  border-radius: 99px; padding: 2px 8px;
}

.inv-art-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; padding: 0 12px;
}
.inv-art-thumb {
  border-radius: 14px; padding: 14px 10px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  border: 1.5px solid transparent;
}
.inv-art-thumb:active { transform: scale(0.95); }
.inv-art-thumb.collected {
  background: color-mix(in srgb, var(--art-color) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--art-color) 22%, transparent);
}
.inv-art-thumb.available {
  background: rgba(255,107,74,0.05);
  border-color: rgba(255,107,74,0.18);
  border-style: dashed;
}
.inv-art-thumb.locked {
  background: var(--surface2);
  border-color: var(--border);
  opacity: 0.55;
}
.inv-art-thumb-icon { font-size: 32px; line-height: 1; }
.inv-art-thumb-name {
  font-size: 11px; font-weight: 700; color: var(--text2);
  line-height: 1.3;
}
.inv-art-thumb-status {
  font-size: 10px; font-weight: 800;
  padding: 2px 8px; border-radius: 99px;
}
.inv-art-thumb-status.collected {
  background: rgba(74,222,128,0.12); color: #16a34a;
}
.inv-art-thumb-status.available {
  background: rgba(255,107,74,0.1); color: var(--accent);
}
.inv-art-thumb-status.locked {
  background: var(--surface2); color: var(--text3);
}

/* ── Badges & Rewards empty states ──────────────────────────── */
.inv-section-header-block {
  padding: 16px 16px 8px;
  display: flex; flex-direction: column; gap: 3px;
}
.inv-section-header-title {
  font-size: 13px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text);
  display: flex; align-items: center; gap: 7px;
}
.inv-section-header-sub {
  font-size: 11px; color: var(--text3); line-height: 1.5;
}

/* Ghost/locked preview items */
.inv-ghost-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; padding: 0 12px 16px;
}
.inv-ghost-item {
  border-radius: 12px;
  aspect-ratio: 1;
  background: var(--surface2);
  border: 1.5px dashed var(--border);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; opacity: 0.45;
}
.inv-ghost-item-icon { font-size: 22px; filter: grayscale(1); }
.inv-ghost-item-label {
  font-size: 9px; font-weight: 700;
  color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px;
}

/* ── Artifact progress bar (for future use) ──────────────────── */
.inv-art-prog-wrap {
  height: 4px; background: var(--surface2);
  border-radius: 2px; overflow: hidden;
}
.inv-art-prog-fill {
  height: 100%; border-radius: 2px;
  transition: width 0.7s cubic-bezier(.22,1,.36,1);
}

/* ── Tab dot indicator ───────────────────────────────────────── */
.inv-tab-new-dot {
  display: inline-block;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  margin-left: 4px; vertical-align: middle;
  box-shadow: 0 0 6px rgba(255,107,74,0.7);
}

/* ── Perk chips — value-first visibility ────────────────────────
   Shared by featured card and artifact card rows.              */
.inv-perk-chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: rgba(255, 107, 74, 0.15);
  color: #ff6b4a;
  border: 1px solid rgba(255, 107, 74, 0.30);
  white-space: nowrap;
}

/* Row that holds chips on the featured hero card */
.inv-featured-perk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 4px;
}
.inv-featured-perk-row .inv-perk-chip {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
}

/* Row that holds chips on collapsed artifact card rows */
.inv-card-perk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
}

/* ── Collector Status Panel ─────────────────────────────────────────────── */
.inv-csp {
  margin: 12px 16px 0;
  background: #fff;
  border: 1px solid #ede8e0;
  border-radius: 14px;
  overflow: hidden;
}

/* Status header */
.csp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #f0ebe3;
}
.csp-rank {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #1a1a1a;
}
.csp-summary {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}
.csp-level-badge {
  background: #ff6b4a;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 9px;
  border-radius: 999px;
}

/* Progress bar */
.csp-progress {
  padding: 10px 16px 8px;
  border-bottom: 1px solid #f0ebe3;
}
.csp-progress-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.csp-progress-label {
  font-size: 11px;
  font-weight: 700;
  color: #333;
}
.csp-progress-hint {
  font-size: 10px;
  color: #aaa;
}
.csp-bar-wrap {
  height: 5px;
  background: #f0ebe3;
  border-radius: 999px;
  overflow: hidden;
}
.csp-bar-fill {
  height: 100%;
  background: #ff6b4a;
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* Active benefits */
.csp-benefits {
  padding: 10px 16px 10px;
  border-bottom: 1px solid #f0ebe3;
}
.csp-section-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #bbb;
  margin-bottom: 7px;
}
.csp-benefits-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.csp-no-benefits {
  font-size: 11px;
  color: #aaa;
  font-style: italic;
}

/* Divider */
.csp-divider {
  height: 1px;
  background: #f0ebe3;
}

/* Featured artifact sub-section */
.csp-featured {
  display: flex;
  align-items: stretch;
  cursor: pointer;
  min-height: 80px;
}
.csp-featured:active { opacity: 0.85; }
.csp-featured-art {
  width: 80px;
  min-width: 80px;
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
}
.csp-featured-info {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.csp-featured-eyebrow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #bbb;
}
.csp-featured-name {
  font-size: 13px;
  font-weight: 800;
  color: #1a1a1a;
}
.csp-featured-rarity {
  margin-top: 1px;
}
.csp-featured-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}
.csp-featured-hint {
  font-size: 10px;
  color: #ff6b4a;
  margin-top: 4px;
}
.csp-featured-empty {
  padding: 16px;
  font-size: 12px;
  color: #aaa;
  text-align: center;
}

/* ── CSP bottom block (Your Benefits / Next Unlock) ────────────────────── */
.csp-bottom-block {
  padding: 12px 16px 14px;
}
.csp-bottom-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.csp-bottom-source {
  font-size: 10px;
  color: #aaa;
  margin-top: 6px;
}
.csp-bottom-goal {
  font-size: 12px;
  color: #555;
  margin-top: 4px;
  line-height: 1.4;
}
/* Locked/preview chips in the Next Unlock state */
.inv-perk-chip.csp-locked-chip {
  background: rgba(0,0,0,0.04);
  color: #bbb;
  border-color: #e0dbd3;
}

/* ── Cards tab: artifact preview strip inside expanded partner card ─────── */
.inv-pcd-art-preview {
  padding: 12px 14px 4px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 4px;
}
.inv-pcd-art-preview-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3, #aaa);
  margin-bottom: 10px;
}
.inv-pcd-art-row {
  display: flex;
  gap: 8px;
}
.inv-pcd-art-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 6px;
  border-radius: 10px;
  border: 1.5px solid rgba(0,0,0,0.07);
  background: rgba(255,255,255,0.5);
  position: relative;
  transition: opacity 0.2s;
}
.inv-pcd-art-item.collected {
  border-color: var(--art-accent, #ff6b4a);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--art-accent, #ff6b4a) 15%, transparent);
}
.inv-pcd-art-item.locked {
  opacity: 0.38;
  filter: grayscale(1);
}
.inv-pcd-art-item.available {
  border-color: rgba(0,0,0,0.12);
}
.inv-pcd-art-icon {
  font-size: 22px;
  line-height: 1;
}
.inv-pcd-art-name {
  font-size: 9px;
  font-weight: 600;
  color: var(--text2, #666);
  text-align: center;
  line-height: 1.2;
}
.inv-pcd-art-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--art-accent, #ff6b4a);
  color: white;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid white;
}

/* ── Cards tab: focus / de-emphasis when a card is open ─────────────────── */
.inv-pcd-card.inv-pcd-dimmed {
  opacity: 0.45;
  transform: scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.inv-pcd-card.inv-pcd-focused {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* ═══════════════════════════════════════════════════════════════════════
   COLLECTOR STATUS CARD  (.inv-csc)
   Dark game-style card for the top of the All tab
   ═══════════════════════════════════════════════════════════════════════ */

.inv-csc {
  margin: 12px 16px 16px;
  border-radius: 18px;
  padding: 20px 18px 18px;
  background:
    radial-gradient(ellipse at 80% 10%, rgba(255,107,74,0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(255,107,74,0.10) 0%, transparent 50%),
    linear-gradient(160deg, #1a1210 0%, #0f0d0c 60%, #1c1008 100%);
  border: 1px solid rgba(255,107,74,0.18);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.45),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Subtle top-edge highlight */
.inv-csc::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,107,74,0.5), transparent);
}

/* ── Top row ── */
.csc-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

/* Hexagon-style level badge */
.csc-level-badge {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #2a1a10, #1a0e08);
  border: 2px solid rgba(255,107,74,0.6);
  border-radius: 14px;
  box-shadow:
    0 0 12px rgba(255,107,74,0.25),
    0 0 0 1px rgba(255,107,74,0.12) inset;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  line-height: 1;
}

.csc-lv-text {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255,107,74,0.85);
  text-transform: uppercase;
  margin-bottom: 1px;
}

.csc-lv-num {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}

.csc-identity {
  flex: 1;
  min-width: 0;
}

.csc-rank {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 3px;
}

.csc-org {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ff6b4a;
  text-transform: uppercase;
}

/* ── Progress block ── */
.csc-progress-block {
  margin-bottom: 18px;
}

.csc-progress-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}

.csc-prog-count {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}

.csc-prog-label {
  font-size: 14px;
  font-weight: 800;
  color: rgba(255,255,255,0.7);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  flex: 1;
}

.csc-prog-pct {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,107,74,0.85);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.csc-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}

.csc-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b4a, #ff9a6a);
  border-radius: 99px;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(255,107,74,0.5);
}

/* Tick marks at 25 / 50 / 75% */
.csc-bar-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 0; right: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0%,
      transparent calc(25% - 1px),
      rgba(0,0,0,0.35) calc(25% - 1px),
      rgba(0,0,0,0.35) 25%
    );
  border-radius: 99px;
}

.csc-prog-hint {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.1px;
}

/* ── Reward preview block ── */
.csc-rewards-block {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 14px;
}

.csc-rewards-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(255,107,74,0.7);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 10px;
}

.csc-chips-row {
  display: flex;
  gap: 8px;
}

.csc-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 6px;
  border-radius: 10px;
  min-width: 0;
}

.csc-chip-locked {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}

.csc-chip-active {
  background: rgba(255,107,74,0.18);
  border: 1px solid rgba(255,107,74,0.35);
}

.csc-chip-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.csc-chip-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.csc-chip-label {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

.csc-chip-sub {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════════
   CARD ARTIFACT TILES  (.cpa-*)
   Shown inside the expanded partner card on the Cards tab
   ═══════════════════════════════════════════════════════════════════════ */

.cpa-section {
  margin: 4px 0 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.07);
}

.cpa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cpa-header-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text2, #555);
  text-transform: uppercase;
}

.cpa-header-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text3, #888);
}

/* 2-column grid */
.cpa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Base tile */
.cpa-tile {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1.5px solid rgba(0,0,0,0.07);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Art area */
.cpa-tile-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f5f0eb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.cpa-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cpa-tile-emoji {
  font-size: 38px;
  line-height: 1;
}

/* Owned state */
.cpa-tile-owned {
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Owned check badge */
.cpa-tile-check {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ff6b4a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(255,107,74,0.4);
  z-index: 2;
}

/* Locked art area */
.cpa-tile-art-locked {
  background: #e8e3de;
  filter: grayscale(1);
}

.cpa-lock-icon {
  font-size: 28px;
  opacity: 0.45;
}

/* Locked tile overall */
.cpa-tile-locked {
  opacity: 0.7;
}

/* Name + rarity labels */
.cpa-tile-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text1, #1a1a1a);
  padding: 7px 8px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cpa-tile-name-muted {
  color: var(--text3, #888);
}

.cpa-tile-rarity {
  font-size: 10px;
  font-weight: 600;
  color: var(--text3, #888);
  padding: 0 8px 7px;
  text-transform: capitalize;
}

/* Rarity colour overrides (reuse existing rarity- classes if defined) */
.cpa-tile-rarity.rarity-rare       { color: #3b82f6; }
.cpa-tile-rarity.rarity-epic       { color: #8b5cf6; }
.cpa-tile-rarity.rarity-legendary  { color: #f59e0b; }
.cpa-tile-rarity.rarity-uncommon   { color: #10b981; }

/* editorial wallet card styles */
.wallet-card-editorial {
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(209,225,230,0.86) 0%, rgba(243,212,191,0.88) 100%);
  border: 1px solid rgba(241,215,196,0.95);
  box-shadow: 0 16px 36px rgba(74,53,34,0.10);
}

.wc-hero {
  position: relative;
  min-height: 460px;
  background-size: cover;
  background-position: center;
}

.wc-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.02) 38%, rgba(255,255,255,0.00) 100%);
}

.wc-header-content-editorial {
  position: relative;
  z-index: 2;
  padding: 34px 30px 24px;
}

.wc-name-lg {
  font-size: 28px;
  line-height: 1.05;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,0.18);
}

.wc-location-lg {
  margin-top: 10px;
  max-width: 360px;
  font-size: 15px;
  line-height: 1.35;
  color: rgba(255,255,255,0.92);
  font-weight: 600;
  text-shadow: 0 2px 18px rgba(0,0,0,0.12);
}

.wc-hint {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.92);
  font-weight: 700;
}

.wc-logo-soft {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  background: rgba(235,242,238,0.72);
  border: 1px solid rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
}

.wc-logo-soft img {
  width: 58%;
  height: 58%;
  object-fit: contain;
}

.wc-arrow-editorial {
  position: absolute;
  right: 22px;
  bottom: 18px;
  z-index: 2;
  color: rgba(255,255,255,0.94);
}

.wc-slots-drawer-editorial {
  display: block;
  padding: 20px 28px 24px;
  background:
    linear-gradient(135deg, rgba(173,205,215,0.34) 0%, rgba(247,229,206,0.58) 48%, rgba(237,187,164,0.44) 100%);
  border-top: 1px solid rgba(255,255,255,0.45);
}

.wc-detail-block + .wc-detail-block {
  margin-top: 24px;
}

.wc-detail-label,
.wc-objects-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.6px;
  color: rgba(255,255,255,0.84);
  text-transform: uppercase;
}

.wc-detail-text {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255,255,255,0.92);
  font-weight: 500;
}

.wc-divider {
  margin: 24px 0;
  height: 1px;
  background: rgba(255,255,255,0.34);
}

.wc-divider-bottom {
  margin-top: 18px;
  margin-bottom: 20px;
}

.wc-objects-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.wc-objects-count {
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,0.96);
}

.wc-slots-editorial {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.wc-slot-editorial {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(255,255,255,0.44);
  box-shadow: 0 8px 18px rgba(78,58,41,0.08);
}

.wc-slot-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: rgba(255,255,255,0.52);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wc-slot-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wc-slot-emoji-fallback {
  width: 100%;
  height: 100%;
  font-size: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wc-slot-check {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ff7a52;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,0.85);
  box-shadow: 0 6px 14px rgba(255,122,82,0.35);
}

.wc-slot-info {
  padding: 12px 12px 14px;
  background: rgba(248,243,236,0.86);
}

.wc-slot-title {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  color: #5b4a40;
}

.wc-slot-title-muted {
  color: rgba(110,100,92,0.68);
}

.wc-slot-rarity-text {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.wc-slot-rarity-muted {
  color: rgba(136,124,115,0.68);
}

.wc-slot-rarity-text.rarity-common { color: #9a8f86; }
.wc-slot-rarity-text.rarity-uncommon { color: #8bc5a5; }
.wc-slot-rarity-text.rarity-rare { color: #6fa7ff; }
.wc-slot-rarity-text.rarity-epic { color: #a07bff; }
.wc-slot-rarity-text.rarity-legendary { color: #f4b35e; }

.wc-slot-editorial.locked {
  opacity: 0.78;
}

.wc-slot-media-locked {
  background: rgba(110,102,95,0.15);
  filter: grayscale(1);
}

.wc-slot-lock-shell {
  position: absolute;
  inset: 14px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.30), rgba(0,0,0,0.10));
}

.wc-slot-lock {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 34px;
  color: rgba(255,255,255,0.96);
}

.wc-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.wc-footer-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.48);
  color: rgba(255,255,255,0.98);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.1px;
}

.wc-footer-date {
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,0.95);
}

.cpa-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.20);
}

.cpa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cpa-header-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
}

.cpa-header-count {
  font-size: 12px;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
}

.cpa-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.cpa-tile {
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255,255,255,0.52);
  border: 1px solid rgba(255,255,255,0.24);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.cpa-tile-art {
  position: relative;
  aspect-ratio: 1 / 1;
  background: rgba(255,255,255,0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cpa-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cpa-tile-emoji {
  font-size: 36px;
  line-height: 1;
}

.cpa-tile-check {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ff7a52;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 4px 10px rgba(255,122,82,0.35);
}

.cpa-tile-locked {
  background: rgba(255,255,255,0.28);
}

.cpa-tile-art-locked {
  background: rgba(70,70,70,0.22);
  filter: grayscale(1);
}

.cpa-lock-icon {
  font-size: 34px;
  line-height: 1;
  color: rgba(255,255,255,0.92);
}

.cpa-tile-name,
.cpa-tile-name-muted {
  padding: 10px 10px 2px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
}

.cpa-tile-name {
  color: #4f4038;
}

.cpa-tile-name-muted {
  color: rgba(79,64,56,0.72);
}

.cpa-tile-rarity {
  padding: 0 10px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  color: rgba(79,64,56,0.70);
}

.cpa-tile-rarity.rarity-common { color: #9b9187; }
.cpa-tile-rarity.rarity-uncommon { color: #7ec59a; }
.cpa-tile-rarity.rarity-rare { color: #67a7ff; }
.cpa-tile-rarity.rarity-epic { color: #9a7cff; }
.cpa-tile-rarity.rarity-legendary { color: #f0b35e; }

@media (max-width: 640px) {

}

.cpa-stage-row {
  padding: 4px 10px 2px;
  font-size: 10px;
  font-weight: 800;
  color: rgba(255,107,74,0.82);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cpa-stage-muted {
  color: rgba(90,80,74,0.52);
  text-transform: none;
}

.cpa-progress {
  margin: 4px 10px 10px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);
}

.cpa-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6b4a, #ff9a76);
}

.cpa-stage-row {
  padding: 4px 10px 0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: rgba(79,64,56,.72);
}

.cpa-progress {
  margin: 5px 10px 0;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(79,64,56,.12);
}

.cpa-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg,#ff6b4a,#ff9473);
}

.cpa-perk-summary {
  padding: 5px 10px 10px;
  font-size: 10px;
  font-weight: 800;
  color: rgba(79,64,56,.58);
}
    /* Card artifact emoji fallback (All tab) */
    .inv-item-emoji {
      width: 100%; height: 100%; min-height: 72px;
      display: flex; align-items: center; justify-content: center;
      font-size: 42px;
    }
    /* ALL TAB — wider collector card, no shadow */
    .inv-all-summary-card,
    .inv-collector-card,
    .inv-progress-card,
    .inv-collector-status-panel,
    .inv-csc {
      width: calc(100% - 24px) !important;
      max-width: none !important;
      margin-left: 12px !important;
      margin-right: 12px !important;
      box-shadow: none !important;
    }

    /* ALL TAB — collected section */
    .inv-all-collected-head {
      width: calc(100% - 24px);
      margin: 22px 12px 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      color: #312925;
      font-size: 14px;
      font-weight: 900;
      letter-spacing: .18em;
    }
    .inv-all-collected-head span {
      color: #4a403a;
      font-size: 13px;
      font-weight: 850;
      letter-spacing: .14em;
    }
    .inv-all-collected-head b {
      color: #f05a3b;
      font-size: 18px;
      line-height: 0;
    }
    .inv-all-owned-list {
      width: calc(100% - 24px);
      margin: 0 12px;
      display: grid;
      gap: 12px;
      padding-bottom: 10px;
    }
    .inv-all-owned-tile {
      width: 100%;
      border-radius: 22px;
      background: rgba(255,255,255,.96);
      border: 1px solid rgba(220,184,156,.72);
      box-shadow: none !important;
      overflow: hidden;
    }
    .inv-all-owned-main {
      display: grid;
      grid-template-columns: 92px 1fr 20px;
      align-items: center;
      gap: 14px;
      padding: 18px 16px 14px;
    }
    .inv-all-owned-icon {
      width: 86px; height: 86px; border-radius: 999px;
      background: #fff3ee;
      border: 1px solid rgba(232,203,187,.9);
      display: flex; align-items: center; justify-content: center;
      overflow: hidden;
    }
    .inv-all-item-img { width:100%; height:100%; object-fit:cover; }
    .inv-all-item-emoji { font-size:52px; line-height:1; }
    .inv-all-owned-info { min-width: 0; }
    .inv-all-owned-title {
      font-size: 25px; line-height: 1.02; font-weight: 900;
      letter-spacing: -.035em; color: #211815;
    }
    .inv-all-owned-sub {
      margin-top: 6px; font-size: 18px; line-height: 1.1;
      font-weight: 520; color: #7f746d; text-transform: lowercase;
    }
    .inv-all-owned-pill {
      width: fit-content; margin-top: 14px;
      padding: 8px 14px; border-radius: 999px;
      background: #eef8e9; border: 1px solid rgba(87,137,73,.14);
      color: #456f3c; font-size: 13px; font-weight: 850; letter-spacing: .08em;
    }
    .inv-all-owned-chevron {
      color: #4b403a; font-size: 36px; line-height: 1; font-weight: 300;
    }
    .inv-all-owned-meta {
      border-top: 1px solid rgba(120,90,70,.12);
      margin: 0 16px; padding: 14px 0 16px;
      display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    }
    .inv-all-owned-meta-block {
      display: grid; grid-template-columns: 28px 1fr;
      align-items: center; gap: 10px; min-width: 0;
    }
    .inv-all-owned-meta-icon {
      width: 26px; height: 26px; border-radius: 8px;
      color: #9a918c; display: flex; align-items: center;
      justify-content: center; font-size: 18px;
    }
    .inv-all-owned-meta-label {
      color: #aaa19a; font-size: 13px; line-height: 1.1; font-weight: 650;
    }
    .inv-all-owned-meta-value {
      margin-top: 3px; color: #3c332e; font-size: 14px;
      line-height: 1.15; font-weight: 650;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .inv-all-footer-note {
      margin: 22px 12px 8px; color: #6f655f;
      text-align: center; font-size: 15px; font-weight: 560;
    }
    .inv-all-item, .inv-all-item-icon, .inv-all-item-info, .inv-all-item-status {
      box-shadow: none !important;
    }
