:root {
  --bg: #09090b;
  --surface: #121216;
  --surface2: #1a1a20;
  --border: #2a2a33;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --yellow: #f9e547;
  --yellow-dim: #c4b030;
  --red: #ef4444;
  --blue: #3b82f6;
  --purple: #a855f7;
  --gold: #fbbf24;
  --silver: #d4d4d8;
  --radius: 12px;
  --shadow: 0 10px 40px rgba(0,0,0,0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9,9,11,0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--yellow);
  text-decoration: none !important;
  letter-spacing: 0.4px;
}
.logo span { color: var(--text); }
.nav-links {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--yellow); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none !important;
}
.btn-primary {
  background: var(--yellow);
  color: #111;
}
.btn-primary:hover { background: #ffe566; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
.btn-whatnot {
  background: #7c3aed;
  color: white;
}
.btn-whatnot:hover { background: #6d28d9; }
.btn-ebay {
  background: #0064d2;
  color: white;
}
.btn-ebay:hover { background: #0052a8; }

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 4rem 1.25rem 3.5rem;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../xmen-team.jpg') center/cover no-repeat;
  opacity: 0.11;
  z-index: 0;
}
.hero-content { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }
.badge {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--yellow);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  letter-spacing: 0.4px;
  margin-bottom: 1.1rem;
}
h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.7rem, 4.8vw, 2.7rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.9rem;
}
h1 .accent { color: var(--yellow); }
.hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 1.8rem;
}
.cta-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
section {
  padding: 3.2rem 0;
}
h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.4rem;
  color: var(--yellow);
  margin-bottom: 0.4rem;
}
.section-sub {
  color: var(--muted);
  margin-bottom: 1.8rem;
  max-width: 580px;
}

/* ===== CARDS ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.4rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--yellow-dim); transform: translateY(-3px); }
.card-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: var(--surface2);
}
.card-body { padding: 1.15rem; }
.card h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.card p { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.9rem; }
.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.35rem;
  margin-bottom: 0.45rem;
}
.tag-gold { background: rgba(251,191,36,0.15); color: var(--gold); }
.tag-silver { background: rgba(212,212,216,0.12); color: var(--silver); }
.tag-rare { background: rgba(168,85,247,0.15); color: var(--purple); }
.tag-live { background: rgba(239,68,68,0.15); color: var(--red); }
.price { font-weight: 700; font-size: 1.1rem; color: var(--yellow); }
.status { font-size: 0.78rem; color: var(--muted); margin-top: 0.25rem; }

/* ===== INFO BOXES ===== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}
.info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
}
.info-box h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yellow);
  margin-bottom: 0.45rem;
}
.info-box p, .info-box li { font-size: 0.88rem; color: var(--muted); }
.info-box ul { padding-left: 1.05rem; }

/* ===== TIERS TABLE ===== */
.table-wrap { overflow-x: auto; }
.tiers {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.tiers th, .tiers td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.tiers th {
  background: var(--surface2);
  color: var(--yellow);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.tiers tr:hover td { background: rgba(249,229,71,0.03); }
.odds { font-weight: 600; }

/* ===== MARKETPLACE CTAs ===== */
.market-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}
.market-banner {
  background: linear-gradient(135deg, #1a1a20 0%, #2a1a40 100%);
  border: 1px solid #4c1d95;
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.market-banner h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.market-banner p { color: var(--muted); font-size: 0.9rem; }

/* ===== MEMBERS AREA ===== */
.members-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  min-height: 70vh;
}
@media (max-width: 800px) {
  .members-layout { grid-template-columns: 1fr; }
}
.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  height: fit-content;
}
.sidebar h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 0.8rem;
}
.sidebar a, .sidebar button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 0.25rem;
  text-decoration: none;
}
.sidebar a:hover, .sidebar button:hover,
.sidebar a.active, .sidebar button.active {
  background: var(--surface2);
  color: var(--yellow);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: none;
}
.panel.active { display: block; }
.panel h2 { margin-bottom: 1rem; }

/* Collection grid & views */
.collection-grouped {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.group-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.group-header {
  position: sticky;
  top: 56px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.group-header .count {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}
.group-items {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem;
}
/* Row layout inside groups — cleaner for scanning */
.foil-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  text-align: left;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}
.foil-card .thumb-wrap {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.foil-card .thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.char-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #111;
  letter-spacing: 0.5px;
}
.char-avatar.sm {
  width: 36px;
  height: 36px;
  font-size: 0.75rem;
  border-radius: 8px;
}
.foil-card .foil-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.foil-card .char { font-weight: 700; font-size: 0.9rem; }
.foil-card .tier { font-size: 0.72rem; color: var(--muted); margin: 0; }
.foil-card .num { font-size: 0.95rem; font-weight: 700; color: var(--yellow); margin: 0; }
.foil-card .num.missing { font-size: 0.72rem; color: var(--muted); font-weight: 500; }
.foil-card .actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
  margin-top: 0;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.foil-card .actions .btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
}

/* Grid view keeps compact cards */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.9rem;
}
.collection-grid .foil-card {
  flex-direction: column;
  text-align: center;
  padding: 0.85rem 0.7rem;
  gap: 0.25rem;
}
.collection-grid .foil-card .thumb-wrap,
.collection-grid .char-avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.35rem;
}
.collection-grid .foil-card .foil-info {
  align-items: center;
}
.collection-grid .foil-card .actions {
  justify-content: center;
  margin-top: 0.45rem;
  width: 100%;
}

@media (max-width: 560px) {
  .foil-card {
    flex-wrap: wrap;
  }
  .foil-card .actions {
    width: 100%;
    justify-content: flex-start;
    margin-top: 0.35rem;
  }
}
.view-toggle {
  display: flex;
  gap: 0.35rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.2rem;
}
.view-toggle button {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
}
.view-toggle button.active {
  background: var(--yellow);
  color: #111;
}
.photo-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* Stats strip + export */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.stat-pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--yellow);
  font-family: 'Orbitron', sans-serif;
}
.stat-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.export-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
  padding: 0.7rem 0.9rem;
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.export-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-right: 0.3rem;
}
.premium-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--yellow);
  color: #111;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  vertical-align: middle;
  letter-spacing: 0.3px;
}

/* Progress dashboard */
.progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}
.progress-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
}
.progress-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}
.progress-name { font-weight: 600; font-size: 0.9rem; }
.progress-meta { font-size: 0.75rem; color: var(--muted); }
.progress-pct {
  margin-left: auto;
  font-weight: 700;
  color: var(--yellow);
  font-size: 0.95rem;
}
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.progress-fill {
  height: 100%;
  background: var(--yellow);
  border-radius: 999px;
  transition: width 0.25s;
}
.tier-dots {
  display: flex;
  gap: 0.35rem;
}
.tier-dot {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
}
.tier-dot.on {
  background: var(--yellow);
  color: #111;
  border-color: var(--yellow);
}
.serial-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
}
.serial-card-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Edit modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-box h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--yellow);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* Trade board */
.trade-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.95rem 1.1rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}
.trade-item strong { color: var(--text); }
.trade-item span { color: var(--muted); font-size: 0.88rem; }

/* Messages mock */
.message-thread {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.msg {
  max-width: 80%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
}
.msg.them {
  background: var(--surface2);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg.me {
  background: #3b2a00;
  border: 1px solid #5c4500;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.msg .meta { font-size: 0.7rem; color: var(--muted); margin-bottom: 0.2rem; }

/* Login gate */
.login-gate {
  max-width: 400px;
  margin: 4rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}
.login-gate input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  margin: 0.5rem 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}
.login-gate .hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1rem;
}

/* Forms */
.form-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
.form-row input, .form-row select, .form-row textarea {
  flex: 1;
  min-width: 140px;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}
.form-row textarea { min-height: 80px; width: 100%; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2rem;
}
footer a { color: var(--yellow); }

/* Notes */
.note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1.3rem;
  padding: 0.8rem 1rem;
  background: var(--surface2);
  border-radius: 8px;
  border-left: 3px solid var(--yellow);
}

/* ===== LANGUAGE + CURRENCY CONTROLS ===== */
.locale-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.locale-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}
.locale-select {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.45rem;
  font-size: 0.8rem;
  cursor: pointer;
  min-width: 0;
}
.locale-select:hover,
.locale-select:focus {
  border-color: var(--yellow);
  outline: none;
}

/* Responsive */
@media (max-width: 800px) {
  .nav {
    flex-wrap: wrap;
  }
  .locale-controls {
    order: 3;
    width: 100%;
    justify-content: flex-end;
    margin-top: 0.4rem;
  }
}
@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
  .hero { padding: 3rem 1rem 2.5rem; }
  section { padding: 2.4rem 0; }
  .locale-label span { display: none; } /* hide "Language"/"Currency" text on very small screens */
}

/* ===== Membership page ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  align-items: stretch;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.35rem;
  position: relative;
  display: flex;
  flex-direction: column;
}
.pricing-card-premium {
  border-color: var(--yellow);
  box-shadow: 0 0 0 1px rgba(249, 229, 71, 0.25);
}
.premium-ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--yellow);
  color: #111;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}
.pricing-card h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--text);
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}
.pricing-card-premium h3 { color: var(--yellow); }
.price-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--yellow);
  margin: 0.3rem 0;
}
.price-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}
.feature-list li {
  font-size: 0.88rem;
  color: var(--text);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
.feature-list li:last-child { border-bottom: none; }
.auth-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}
.auth-method {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.auth-method p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.auth-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.auth-icon.google { background: #fff; color: #4285f4; }
.auth-icon.apple { background: #111; color: #fff; font-size: 1.2rem; }
.auth-icon.email { background: var(--yellow); color: #111; }
.auth-icon.other { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.compare-table td:nth-child(2),
.compare-table td:nth-child(3),
.compare-table th:nth-child(2),
.compare-table th:nth-child(3) {
  text-align: center;
  width: 18%;
}

/* Social login on members gate */
.social-login {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: opacity 0.15s;
}
.btn-social:hover { opacity: 0.9; }
.btn-google {
  background: #fff;
  color: #1f1f1f;
}
.btn-apple {
  background: #111;
  color: #fff;
  border-color: #333;
}
.social-g {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #4285f4;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}
.social-a { font-size: 1.1rem; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.9rem 0 1rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Trade board filters & sections */
.deal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0.9rem;
}
.deal-filter {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}
.deal-filter:hover { border-color: var(--yellow); color: var(--text); }
.deal-filter.active {
  background: var(--yellow);
  color: #111;
  border-color: var(--yellow);
}
.deal-section {
  margin-bottom: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.deal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
}
.deal-section-header .count {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}
.deal-section-body {
  padding: 0.6rem 0.75rem;
}
.deal-section-body .trade-item {
  margin-bottom: 0.55rem;
}
.deal-section-body .trade-item:last-child {
  margin-bottom: 0;
}
.deal-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  margin-right: 0.35rem;
  vertical-align: middle;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.deal-trade .deal-badge { background: #7c3aed33; border-color: #7c3aed; color: #c4b5fd; }
.deal-sell .deal-badge { background: #22c55e33; border-color: #22c55e; color: #86efac; }
.deal-have .deal-badge { background: #3b82f633; border-color: #3b82f6; color: #93c5fd; }
.deal-want .deal-badge { background: #f59e0b33; border-color: #f59e0b; color: #fcd34d; }

/* Collapsible stacks (multiples of same tier/character) */
.collection-scroll {
  max-height: min(70vh, 720px);
  overflow-y: auto;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.collection-scroll::-webkit-scrollbar {
  width: 8px;
}
.collection-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.group-stacks {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem !important;
}
.stack-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  overflow: hidden;
}
.stack-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.8rem;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-size: 0.88rem;
}
.stack-toggle:hover {
  background: rgba(255,255,255,0.03);
}
.stack-chevron {
  color: var(--yellow);
  font-size: 0.75rem;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.stack-row.open .stack-chevron {
  transform: rotate(90deg);
}
.stack-label {
  font-weight: 600;
  flex-shrink: 0;
}
.stack-meta {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  text-align: right;
}
.stack-body {
  display: none;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0 0.55rem 0.65rem;
  border-top: 1px solid var(--border);
}
.stack-row.open .stack-body {
  display: flex;
  padding-top: 0.55rem;
}
.stack-body .foil-card {
  background: var(--surface);
}

/* Collection toolbar + flat list */
.collection-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.2rem 0 0.75rem;
}
.toolbar-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.toolbar-select {
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.82rem;
  max-width: 11rem;
}
.collection-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.collection-list .foil-card {
  flex-direction: row;
  text-align: left;
  padding: 0.65rem 0.8rem;
  gap: 0.75rem;
  align-items: center;
}

/* Trade detail + actions */
.trade-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  flex-shrink: 0;
}
.trade-closed {
  opacity: 0.75;
}
.deal-status-sold {
  background: #22c55e33 !important;
  border-color: #22c55e !important;
  color: #86efac !important;
}
.deal-status-retracted,
.deal-status-closed {
  background: #64748b33 !important;
  border-color: #64748b !important;
  color: #94a3b8 !important;
}
.detail-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-key {
  width: 6.5rem;
  flex-shrink: 0;
  color: var(--muted);
  font-weight: 500;
}
.detail-val {
  color: var(--text);
  word-break: break-word;
}

/* Membership tier badge */
.tier-badge {
  display: inline-block;
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.45rem;
  text-transform: uppercase;
}
.tier-free { background: #334155; color: #cbd5e1; }
.tier-premium { background: #f9e547; color: #111; }
.tier-dealer { background: #3b82f6; color: #fff; }
.tier-admin { background: #a855f7; color: #fff; }

#registerPanel input {
  width: 100%;
  margin-bottom: 0.45rem;
}
