:root {
  --text-xs: clamp(0.75rem,0.7rem + 0.25vw,0.875rem);
  --text-sm: clamp(0.875rem,0.8rem + 0.35vw,1rem);
  --text-base: clamp(1rem,0.9rem + 0.5vw,1.125rem);
  --text-lg: clamp(1.125rem,0.95rem + 0.85vw,1.5rem);
  --text-xl: clamp(1.5rem,1rem + 1.5vw,2.25rem);
  --text-2xl: clamp(2rem,1.2rem + 2.5vw,3.5rem);
  --text-3xl: clamp(2.5rem,1rem + 4vw,5rem);
  --text-hero: clamp(3rem,0.5rem + 7vw,8rem);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --font-display: 'Clash Display','Inter',sans-serif;
  --font-body: 'Satoshi','Inter',sans-serif;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  --transition-interactive: 180ms cubic-bezier(0.16,1,0.3,1);
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* ── Card condition colors ── */
  --cond-nm: #22c55e;
  --cond-lp: #3b82f6;
  --cond-mp: #f59e0b;
  --cond-hp: #f97316;
  --cond-dmg: #ef4444;

  /* ── MTG format colors ── */
  --fmt-standard: #22c55e;
  --fmt-modern: #3b82f6;
  --fmt-pioneer: #f59e0b;
  --fmt-commander: #a855f7;
  --fmt-pauper: #64748b;
  --fmt-legacy: #ef4444;
  --fmt-vintage: #ec4899;
  --fmt-default: #6b7280;

  /* ── Mana colors ── */
  --mana-w: #F9FAF4;
  --mana-u: #0E68AB;
  --mana-b: #150B00;
  --mana-r: #D3202A;
  --mana-g: #00733E;
}

:root,
[data-theme="light"] {
  --color-bg: #F0EDE8;
  --color-surface: #F5F2ED;
  --color-surface-2: #FAF8F5;
  --color-surface-offset: #E8E4DE;
  --color-surface-offset-2: #DDD9D2;
  --color-surface-dynamic: #D4D0C9;
  --color-divider: #CCC8C0;
  --color-border: #B8B4AC;
  --color-text: #1A1714;
  --color-text-muted: #6B6860;
  --color-text-faint: #A8A49C;
  --color-text-inverse: #F0EDE8;
  --color-primary: #B8912E;
  --color-primary-hover: #9A7825;
  --color-primary-active: #7C5F1C;
  --color-primary-highlight: #E8DCC4;
  --color-secondary: #2E7AB8;
  --color-secondary-hover: #256498;
  --color-success: #2A9E48;
  --color-success-hover: #228838;
  --color-success-highlight: #D0E8D4;
  --color-error: #D42B4A;
  --color-error-hover: #B82240;
  --color-error-highlight: #E8CED4;
  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);
}

[data-theme="dark"] {
  --color-bg: #0D0F12;
  --color-surface: #111318;
  --color-surface-2: #161A22;
  --color-surface-offset: #1A1E27;
  --color-surface-offset-2: #1E2330;
  --color-surface-dynamic: #252A36;
  --color-divider: #2A2F3A;
  --color-border: #2A2F3A;
  --color-text: #E8E6E1;
  --color-text-muted: #8B8D94;
  --color-text-faint: #52545A;
  --color-text-inverse: #0D0F12;
  --color-primary: #D4A843;
  --color-primary-hover: #E8B84A;
  --color-primary-active: #C09838;
  --color-primary-highlight: #2A2418;
  --color-secondary: #4A9FD9;
  --color-secondary-hover: #5BB0E8;
  --color-success: #34C759;
  --color-success-hover: #40D466;
  --color-success-highlight: #1A2E1E;
  --color-error: #FF3B5C;
  --color-error-hover: #FF5070;
  --color-error-highlight: #2E1A1E;
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme:dark) {
  :root:not([data-theme]) {
    --color-bg: #0D0F12;
    --color-surface: #111318;
    --color-surface-2: #161A22;
    --color-surface-offset: #1A1E27;
    --color-surface-offset-2: #1E2330;
    --color-surface-dynamic: #252A36;
    --color-divider: #2A2F3A;
    --color-border: #2A2F3A;
    --color-text: #E8E6E1;
    --color-text-muted: #8B8D94;
    --color-text-faint: #52545A;
    --color-text-inverse: #0D0F12;
    --color-primary: #D4A843;
    --color-primary-hover: #E8B84A;
    --color-primary-active: #C09838;
    --color-primary-highlight: #2A2418;
    --color-secondary: #4A9FD9;
    --color-secondary-hover: #5BB0E8;
    --color-success: #34C759;
    --color-success-hover: #40D466;
    --color-success-highlight: #1A2E1E;
    --color-error: #FF3B5C;
    --color-error-hover: #FF5070;
    --color-error-highlight: #2E1A1E;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
  }
}

/* Global heading font — all headers use display font (Clash Display) */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg,var(--color-surface-offset) 25%,var(--color-surface-dynamic) 50%,var(--color-surface-offset) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 1em;
  margin-bottom: var(--space-2);
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-heading {
  height: 1.5em;
  width: 40%;
  margin-bottom: var(--space-4);
}

.skeleton-image {
  aspect-ratio: 745/1040;
  width: 100%;
  border-radius: var(--radius-lg);
}

.skeleton-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,15,18,0.85);
  background: oklch(from var(--color-bg) l c h / 0.85);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  max-width: var(--content-wide);
  margin-inline: auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
  cursor: pointer;
}

.logo-link:hover {
  color: var(--color-primary);
}

.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-text span {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive),background var(--transition-interactive);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

.nav-links a.active {
  color: var(--color-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cart-badge {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  line-height: 1;
}

.cart-count:empty,
.cart-count[data-count="0"] {
  display: none;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive),background var(--transition-interactive);
}

.icon-btn:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.mobile-menu-btn {
  display: none;
}

@media (max-width:767px) {
  .mobile-menu-btn {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
  }
}

.ticker-strip {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  white-space: nowrap;
  height: 36px;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: inline-flex;
  gap: var(--space-8);
  animation: ticker 60s linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--color-text-muted);
}

.ticker-item .ticker-name {
  font-weight: 600;
  color: var(--color-text);
}

.ticker-item .ticker-price {
  color: var(--color-accent,var(--color-primary));
  font-weight: 500;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.hero {
  padding: clamp(var(--space-12),8vw,var(--space-24)) var(--space-4) clamp(var(--space-8),5vw,var(--space-16));
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('./images/hero-bg.webp') center / cover no-repeat;
  z-index: -2;
  opacity: 0.35;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient( to bottom,oklch(from var(--color-bg) l c h / 0.55) 0%,oklch(from var(--color-bg) l c h / 0.4) 30%,oklch(from var(--color-bg) l c h / 0.6) 60%,var(--color-bg) 100% );
  z-index: -1;
  pointer-events: none;
}

@keyframes heroPulse {
  0%,
  100% {
    opacity: 0.6;
    transform: translateX(-50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.08);
  }
}

[data-theme="light"] .hero::after {
  opacity: 0.15;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg,#D4A843 0%,#E8B84A 40%,#D4A843 60%,#C09838 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: goldShimmer 4s ease-in-out infinite;
}

@keyframes goldShimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-inline: auto;
}

.hero-search {
  max-width: 600px;
  margin: 0 auto var(--space-8);
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: var(--space-3) 110px var(--space-3) var(--space-12);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: border-color var(--transition-interactive),box-shadow var(--transition-interactive);
}

.hero-search input::placeholder {
  color: var(--color-text-faint);
}

.hero-search .search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  pointer-events: none;
}

.hero-search .search-icon svg {
  width: 20px;
  height: 20px;
}

.hero-search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-primary);
  color: #000;
  font-weight: 700;
  font-size: var(--text-sm);
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
}

.hero-search-btn:hover {
  background: var(--color-primary-hover);
}

.hero-search-wrapper {
  position: relative;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.hero-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
  padding: var(--space-1) 0;
}

.hero-autocomplete-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-3) var(--space-4);
  background: none;
  border: none;
  color: var(--color-text);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background 0.1s;
}

.hero-autocomplete-item:hover {
  background: var(--color-surface-2);
  color: var(--color-primary);
}

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + var(--space-1));
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 300px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}

.autocomplete-dropdown.open {
  display: block;
}

.autocomplete-item {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition-interactive);
}

.autocomplete-item:hover {
  background: var(--color-surface-offset);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
  padding: var(--space-3) var(--space-5);
  background: oklch(from var(--color-surface) l c h / 0.5);
  border: 1px solid oklch(from var(--color-border) l c h / 0.4);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.events-section {
  margin-bottom: var(--space-12);
  padding-top: var(--space-4);
}

/* ── Hero CTA Row — Stitch-inspired vertical layout ── */
.hero-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  max-width: 1200px;
  margin: var(--space-10) auto 0;
  padding: 0 var(--space-4);
}

.hero-cta-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.hero-cta-card:hover {
  transform: translateY(-4px);
}

.hero-cta-buyer:hover {
  box-shadow: 0 0 24px rgba(212, 168, 67, 0.12);
  border-color: var(--color-primary);
}

.hero-cta-seller:hover {
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.12);
  border-color: var(--color-success);
}

.hero-cta-ghost-icon {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  font-size: 4rem;
  opacity: 0.08;
  transition: opacity 0.2s;
  pointer-events: none;
}

.hero-cta-card:hover .hero-cta-ghost-icon {
  opacity: 0.15;
}

.hero-cta-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.hero-cta-badge--buy {
  background: rgba(212, 168, 67, 0.15);
  color: var(--color-primary);
}

.hero-cta-badge--sell {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-success);
}

.hero-cta-body {
  position: relative;
  z-index: 1;
}

.hero-cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.hero-cta-buyer:hover .hero-cta-title { color: var(--color-primary); }
.hero-cta-seller:hover .hero-cta-title { color: var(--color-success); }

.hero-cta-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 340px;
}

.hero-cta-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: var(--text-sm);
  margin-top: var(--space-5);
  position: relative;
  z-index: 1;
}

.hero-cta-link--buy { color: var(--color-primary); }
.hero-cta-link--sell { color: var(--color-success); }

@media (max-width: 600px) {
  .hero-cta-row {
    grid-template-columns: 1fr;
  }
  .hero-cta-card { min-height: 200px; }
}

/* ── How It Works ── */
.how-it-works {
  padding: var(--space-16) 0 var(--space-12);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-8);
  background: linear-gradient(180deg, rgba(26,26,26,0.3) 0%, transparent 100%);
}

.section-header {
  margin-bottom: var(--space-10);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.section-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.hiw-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.hiw-step {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: border-color 0.2s, transform 0.2s;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.hiw-step:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.hiw-bg-number {
  position: absolute;
  right: -8px;
  bottom: -16px;
  font-size: 5rem;
  font-weight: 900;
  color: var(--color-border);
  opacity: 0.3;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  transition: opacity 0.2s;
}

.hiw-step:hover .hiw-bg-number {
  opacity: 0.5;
}

.hiw-icon-box {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font-size: 1.1rem;
}

.hiw-icon-box svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
}

.hiw-step h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
  position: relative;
  z-index: 1;
}

.hiw-step p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.hiw-step--seller {
  border-color: rgba(34, 197, 94, 0.3);
}

.hiw-seller-link {
  display: inline-block;
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-success);
  text-decoration: none;
  transition: opacity 0.15s;
}

.hiw-seller-link:hover {
  opacity: 0.8;
}

@media (max-width: 767px) {
  .hiw-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.events-section-header {
  margin-bottom: var(--space-8);
}

.events-section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.events-section-header h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: linear-gradient(180deg,var(--color-primary) 0%,oklch(from var(--color-primary) l c h / 0.3) 100%);
  border-radius: 2px;
  flex-shrink: 0;
}

.events-section-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-left: calc(4px + var(--space-3));
}

.events-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.events-grid-sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width:640px) {
  .events-grid-sub {
    grid-template-columns: 1fr;
  }
}

.event-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: #F0EDE8;
  position: relative;
  overflow: hidden;
  border: 1px solid oklch(from var(--color-border) l c h / 0.4);
  transition: border-color 300ms cubic-bezier(0.16,1,0.3,1),box-shadow 300ms cubic-bezier(0.16,1,0.3,1),transform 300ms cubic-bezier(0.16,1,0.3,1);
}

.event-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: transform 600ms cubic-bezier(0.16,1,0.3,1);
}

.event-card:hover .event-card-bg {
  transform: scale(1.04);
}

.event-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient( to top,rgba(0,0,0,0.88) 0%,rgba(0,0,0,0.55) 40%,rgba(0,0,0,0.3) 100% );
  z-index: 1;
}

.event-card > *:not(.event-card-bg):not(.event-card-overlay) {
  position: relative;
  z-index: 2;
}

.event-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 30px oklch(from var(--color-primary) l c h / 0.15),0 8px 32px rgba(0,0,0,0.3);
  transform: translateY(-3px);
}

.event-card--featured {
  min-height: 340px;
}

.event-card--small {
  min-height: 260px;
}

.event-date-chip {
  align-self: flex-start;
  z-index: 3;
  background: oklch(from var(--color-primary) l c h / 0.9);
  color: #0D0F12;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  margin-bottom: var(--space-2);
}

.event-badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 3;
  background: oklch(from var(--color-primary) l c h / 0.2);
  color: var(--color-primary);
  font-size: 10px;
  font-weight: 700;
  padding: 3px var(--space-2);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid oklch(from var(--color-primary) l c h / 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.event-card--small .event-badge {
  top: var(--space-3);
  right: var(--space-3);
}

.event-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0 0 var(--space-1);
  line-height: 1.2;
  color: #F0EDE8;
  text-align: left;
}

.event-card--featured .event-title {
  font-size: var(--text-xl);
}

.event-desc {
  font-size: var(--text-sm);
  color: rgba(240,237,232,0.7);
  margin: 0 0 var(--space-3);
  line-height: 1.5;
  text-align: left;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.event-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: rgba(240,237,232,0.6);
}

.event-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.event-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.event-host {
  font-size: var(--text-xs);
  color: rgba(240,237,232,0.5);
}

.event-admission {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
}

.event-tags {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

.event-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px var(--space-2);
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  color: rgba(240,237,232,0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background var(--transition-interactive),color var(--transition-interactive),box-shadow var(--transition-interactive),transform var(--transition-interactive);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-surface-offset);
  border-color: var(--color-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}

.btn-danger {
  background: var(--color-error);
  color: #fff;
}

.btn-danger:hover {
  background: var(--color-error-hover);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
}

.search-page {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-6);
  padding: var(--space-6) 0;
}

@media (max-width:767px) {
  .search-page {
    grid-template-columns: 1fr;
  }
}

.filter-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (max-width:767px) {
  .filter-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-3);
  }
}

.filter-group h3 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.filter-group {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}

.color-filters {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.color-filter-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  transition: border-color var(--transition-interactive),transform var(--transition-interactive);
  cursor: pointer;
}

.color-filter-btn:hover,
.color-filter-btn.active {
  border-color: var(--color-primary);
  transform: scale(1.1);
}

.color-filter-btn.white-btn {
  background: #F9FAF4;
  color: #333;
}

.color-filter-btn.blue-btn {
  background: #0E68AB;
  color: #fff;
}

.color-filter-btn.black-btn {
  background: #150B00;
  color: #999;
}

.color-filter-btn.red-btn {
  background: #D3202A;
  color: #fff;
}

.color-filter-btn.green-btn {
  background: #00733E;
  color: #fff;
}

.filter-select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--color-text);
  cursor: pointer;
}

.price-range-row {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.price-input {
  width: 100%;
  padding: var(--space-1) var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums lining-nums;
}

.price-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.search-bar-wrapper {
  margin-bottom: var(--space-6);
}

.search-bar {
  position: relative;
  max-width: 100%;
}

.search-bar input {
  width: 100%;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-10);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: border-color var(--transition-interactive),box-shadow var(--transition-interactive);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}

.search-bar .search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  pointer-events: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(220px,100%),1fr));
  gap: var(--space-4);
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

.mtg-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  perspective: 800px;
  transition: box-shadow var(--transition-interactive),border-color var(--transition-interactive),transform var(--transition-interactive);
}

.mtg-card:hover {
  box-shadow: 0 0 20px oklch(from var(--color-primary) l c h / 0.15);
  border-color: oklch(from var(--color-primary) l c h / 0.4);
  transform: translateY(-2px) rotateX(1deg) rotateY(-1deg);
}

.mtg-card-image {
  aspect-ratio: 745/1040;
  background: var(--color-surface-offset);
  overflow: hidden;
  position: relative;
}

.mtg-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,var(--color-surface-offset) 0%,var(--color-surface-dynamic) 100%);
  z-index: 0;
}

.mtg-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.mtg-card-info {
  padding: var(--space-3);
}

.mtg-card-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mtg-card-set {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.mtg-card-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mtg-card-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  font-size: var(--text-sm);
}

.mtg-card-foil {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums lining-nums;
}

/* Price change badges on grid cards */
.mtg-card-change {
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.mtg-card-source {
  font-size: 10px;
  color: var(--color-text-faint);
  margin-top: 2px;
  letter-spacing: 0.03em;
}

/* Price change badges on carousel cards */
.carousel-card-change {
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* Shared change colors */
.pr-change-up {
  color: var(--color-success, #22c55e);
  background: oklch(from #22c55e l c h / 0.12);
}

.pr-change-down {
  color: var(--color-error, #ef4444);
  background: oklch(from #ef4444 l c h / 0.12);
}

.price-up {
  color: var(--color-success);
}

.price-down {
  color: var(--color-error);
}

.card-detail {
  padding: var(--space-6) 0;
}

.card-detail-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: var(--space-8);
  align-items: start;
}

@media (max-width:767px) {
  .card-detail-grid {
    grid-template-columns: 1fr;
  }
}

.card-detail-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 80px;
}

.card-detail-image img {
  width: 100%;
  display: block;
}

.card-detail-info h1 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.card-detail-set {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.price-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(140px,1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.price-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}

.price-box-label {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.price-box-value {
  font-size: var(--text-lg);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--color-text);
}

.price-box-sub {
  font-size: 10px;
  color: var(--color-text-faint);
  margin-top: 2px;
}

.price-box--up .price-box-value {
  color: var(--color-success, #22c55e);
}

.price-box--down .price-box-value {
  color: var(--color-error, #ef4444);
}

.price-source {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
}

.price-source a {
  color: var(--color-accent,var(--color-primary));
  text-decoration: underline;
  text-underline-offset: 2px;
}

.purchase-links {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
}

.purchase-links h3 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
}

.purchase-links-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.card-actions .btn {
  white-space: nowrap;
}

.legality-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.legality-badge {
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
}

.legality-legal {
  background: var(--color-success-highlight);
  color: var(--color-success);
}

.legality-not-legal {
  background: var(--color-surface-offset);
  color: var(--color-text-faint);
}

.portfolio-page {
  padding: var(--space-6) 0;
}

.portfolio-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.kpi-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.kpi-value {
  font-size: var(--text-xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--color-text);
  line-height: 1.2;
}

.kpi-delta {
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
}

.portfolio-table-wrapper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.portfolio-table {
  width: 100%;
  border-collapse: collapse;
}

.portfolio-table thead {
  border-bottom: 1px solid var(--color-border);
}

.portfolio-table th {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  text-align: left;
  white-space: nowrap;
}

.portfolio-table td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums lining-nums;
  border-bottom: 1px solid var(--color-divider);
  white-space: nowrap;
}

.portfolio-table tbody tr:hover {
  background: var(--color-surface-offset);
}

.portfolio-table .card-name-cell {
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}

.portfolio-table .card-name-cell:hover {
  color: var(--color-primary);
}

.pf-thumb-cell {
  width: 48px;
  padding: var(--space-1) !important;
  text-align: center;
  vertical-align: middle;
}

.pf-card-thumb {
  width: 36px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-interactive);
}

.pf-card-thumb:hover {
  transform: scale(2.5);
  z-index: 10;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-8);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  color: var(--color-text-faint);
}

.empty-state h3 {
  font-family: var(--font-display);
  color: var(--color-text);
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.empty-state p {
  max-width: 36ch;
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
}

/* ═══════════════════════════════════════════════════════════════
   Cart Page — restored v29 structure with v32 enhancements
   ═══════════════════════════════════════════════════════════════ */

.cart-page {
  padding: var(--space-6) 0;
}

.cart-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.cart-clear-btn {
  opacity: 0.7;
}

.cart-clear-btn:hover {
  opacity: 1;
}

.cart-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-6);
  align-items: start;
}

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

.cart-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ── Seller groups ── */
.cart-seller-group {
  margin-bottom: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cart-seller-header {
  background: var(--color-surface-offset);
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.cart-seller-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cart-seller-group .cart-item {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--color-border);
}

.cart-seller-group .cart-item:last-child {
  border-bottom: none;
}

/* ── Cart item ── */
.cart-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
}

.cart-item-top {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
}

.cart-item-image {
  width: 60px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
  transition: transform 180ms ease;
}

.cart-item-image:hover {
  transform: scale(1.05);
}

.cart-item-image img {
  width: 100%;
  display: block;
}

.cart-item-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--color-surface-offset);
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: 2px;
}

.cart-item-link {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-interactive);
  cursor: pointer;
}

.cart-item-link:hover {
  text-decoration: underline;
  color: var(--color-primary-hover);
}

a.cart-item-name {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
}

a.cart-item-set.cart-item-link {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

a.cart-item-set.cart-item-link:hover {
  color: var(--color-primary);
}

.cart-item-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin: var(--space-1) 0;
}

.cart-item-set {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.cart-item-cond-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
}

.cart-item-unit-price {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.cart-item-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  font-size: var(--text-sm);
  min-width: 70px;
  text-align: right;
}

.cart-item-remove {
  color: var(--color-text-faint);
  transition: color var(--transition-interactive);
}

.cart-item-remove:hover {
  color: var(--color-error);
}

.cart-item.cart-item--needs-condition {
  border: 2px solid var(--color-error) !important;
  box-shadow: 0 0 0 3px rgba(212, 43, 74, 0.15) !important;
}

.cart-seller-group .cart-item.cart-item--needs-condition {
  border: 2px solid var(--color-error) !important;
  box-shadow: 0 0 0 3px rgba(212, 43, 74, 0.15) !important;
  border-radius: var(--radius-md) !important;
}

/* ── Condition selector section ── */
.cart-condition-section {
  padding: var(--space-3) var(--space-4) var(--space-4);
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface-offset);
}

.cart-condition-section--alert {
  background: rgba(212, 43, 74, 0.06);
  border-top-color: var(--color-error);
}

[data-theme="dark"] .cart-condition-section--alert {
  background: rgba(212, 43, 74, 0.1);
}

.cart-condition-header {
  margin-bottom: var(--space-3);
}

.cart-condition-prompt {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-error);
  animation: condPromptPulse 2s ease-in-out infinite;
}

@keyframes condPromptPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.cart-condition-chosen {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.cart-condition-chosen strong {
  color: var(--color-text);
  font-weight: 700;
}

.cart-condition-chips {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* ── Condition card buttons ── */
.cart-cond-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
  transition: border-color var(--transition-interactive), background var(--transition-interactive), box-shadow var(--transition-interactive);
}

.cart-cond-card:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-offset-2);
}

.cart-cond-card--active {
  border-color: var(--color-success);
  background: var(--color-success-highlight);
  box-shadow: 0 0 0 2px oklch(from var(--color-success) l c h / 0.25);
}

.cond-card-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.cond-card-label {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}

.cond-card-abbr {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text);
  flex-shrink: 0;
}

.cond-card-full {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cond-card-price {
  font-weight: 600;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--color-text);
  margin-left: auto;
  flex-shrink: 0;
}

/* Condition savings badge (v32) */
.cond-card-save {
  font-size: 0.65rem;
  font-weight: 600;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.5;
  flex-shrink: 0;
}

/* ── Order summary sidebar ── */
.order-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: sticky;
  top: 80px;
}

.order-summary h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums lining-nums;
}

.summary-row.total {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  font-weight: 700;
  font-size: var(--text-base);
}

.summary-row.shipping-estimate span:last-child {
  color: var(--color-text-muted);
  font-style: italic;
}

.cart-jtcg-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-2) 0;
}

.cart-jtcg-note.loading {
  opacity: 0.6;
  font-style: italic;
}

.cart-jtcg-note a {
  color: var(--color-primary);
}

.cart-fulfillment-preview {
  margin: var(--space-3) 0;
  padding: var(--space-3);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.cart-fulfillment-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.cart-fulfillment-row svg {
  flex-shrink: 0;
}

/* ── Checkout gate & buttons ── */
.cart-checkout-blocked {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: rgba(212, 43, 74, 0.08);
  border: 1px solid rgba(212, 43, 74, 0.25);
  border-radius: var(--radius-md);
  color: var(--color-error);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

[data-theme="dark"] .cart-checkout-blocked {
  background: rgba(212, 43, 74, 0.12);
}

.cart-checkout-blocked--loading {
  border-color: var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
}

.cart-checkout-btn {
  width: 100%;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.cart-checkout-btn--disabled {
  opacity: 0.35 !important;
  filter: grayscale(0.5);
  cursor: not-allowed !important;
  pointer-events: auto !important;
}

.cart-checkout-btn--disabled:hover {
  transform: none !important;
  box-shadow: none !important;
  opacity: 0.35 !important;
}

.cart-continue-btn {
  width: 100%;
  text-align: center;
  display: block;
  margin-bottom: var(--space-3);
}

/* ── Trust & security badges (v32) ── */
.cart-trust-badges {
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.cart-trust-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.cart-trust-row svg {
  flex-shrink: 0;
  color: var(--color-primary);
}

/* ── Package count (v32) ── */
.cart-packages-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}

.cart-packages-info svg {
  flex-shrink: 0;
  color: var(--color-primary);
}

/* ── Local pickup note ── */
.cart-local-pickup-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-primary-highlight);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.15);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}

.cart-local-pickup-note svg {
  flex-shrink: 0;
}

/* ── Cart responsive ── */
@media (max-width: 767px) {
  .cart-cond-card {
    padding: var(--space-2);
    gap: var(--space-2);
  }

  .cond-card-full {
    display: none;
  }
}

@media (max-width: 640px) {
  .cart-item-top {
    flex-wrap: wrap;
    gap: var(--space-3);
  }
}

/* SumUp widget dark theme override */
[data-sumup-id="widget__container"] {
  background-color: var(--color-surface) !important;
  color: var(--color-text) !important;
  border-radius: var(--radius-lg) !important;
}

[data-sumup-id="input__container"] {
  background-color: var(--color-bg) !important;
  border-color: var(--color-border) !important;
}

[data-sumup-id="submit-button"] {
  background-color: var(--color-primary) !important;
  color: var(--color-bg) !important;
  border-radius: var(--radius-md) !important;
}

[data-sumup-id="submit-button"]:hover {
  opacity: 0.9;
}

/* ── Shared quantity stepper (used by cart + portfolio) ── */
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-offset);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition-interactive);
}

.qty-btn:hover {
  background: var(--color-surface-dynamic);
}

.qty-value {
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
  font-size: var(--text-sm);
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-8) var(--space-4);
  text-align: center;
}

.footer-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.footer-links a {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-credit {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer-credit a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

.footer-credit a:hover {
  color: var(--color-primary);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  margin-bottom: var(--space-4);
  cursor: pointer;
  transition: color var(--transition-interactive);
}

.back-link:hover {
  color: var(--color-primary);
}

.page-heading {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-6);
}

@keyframes revealFade {
  to {
    opacity: 1;
  }
}

@media (max-width:767px) {
  .hero-stats {
    gap: var(--space-4);
  }

  .card-detail-image {
    position: static;
  }

  .price-breakdown {
    grid-template-columns: repeat(2,1fr);
  }
}

.chatbot-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg,#D4A843,#C09838);
  color: #0D0F12;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px oklch(from var(--color-primary) l c h / 0.35);
  box-shadow: 0 4px 20px oklch(from var(--color-primary) l c h / 0.35);
  z-index: 200;
  transition: transform var(--transition-interactive),box-shadow var(--transition-interactive);
}

.chatbot-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px oklch(from var(--color-primary) l c h / 0.5);
  box-shadow: 0 6px 28px oklch(from var(--color-primary) l c h / 0.5);
}

.chatbot-fab.hidden {
  display: none;
}

.chatbot-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 100px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-panel.open {
  display: flex;
  animation: chatSlideUp 300ms cubic-bezier(0.16,1,0.3,1);
}

@keyframes chatSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-offset);
}

.chatbot-header-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
}

.chatbot-close {
  color: var(--color-text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: background var(--transition-interactive),color var(--transition-interactive);
}

.chatbot-close:hover {
  background: var(--color-surface-dynamic);
  color: var(--color-text);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chat-msg {
  display: flex;
  max-width: 85%;
}

.chat-msg.bot-msg {
  align-self: flex-start;
}

.chat-msg.user-msg {
  align-self: flex-end;
}

.chat-bubble {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
  word-break: break-word;
}

.bot-msg .chat-bubble {
  background: var(--color-surface-offset);
  color: var(--color-text);
  border-bottom-left-radius: var(--radius-sm);
}

.user-msg .chat-bubble {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-bottom-right-radius: var(--radius-sm);
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: var(--space-2) var(--space-3);
}

.chat-typing span {
  width: 6px;
  height: 6px;
  background: var(--color-text-faint);
  border-radius: var(--radius-full);
  animation: typingDot 1.2s ease-in-out infinite;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingDot {
  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  30% {
    opacity: 1;
    transform: scale(1);
  }
}

.chatbot-input-area {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-offset);
}

.chatbot-input-area input {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: border-color var(--transition-interactive);
}

.chatbot-input-area input::placeholder {
  color: var(--color-text-faint);
}

.chatbot-input-area input:focus {
  outline: none;
  border-color: var(--color-primary);
}

#chatbot-send {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  transition: background var(--transition-interactive);
}

#chatbot-send:hover {
  background: var(--color-primary-hover);
}

#chatbot-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width:480px) {
  .chatbot-panel {
    bottom: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
}

.stores-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: var(--space-6);
}

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

.store-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color 300ms cubic-bezier(0.16,1,0.3,1),box-shadow 300ms cubic-bezier(0.16,1,0.3,1);
}

.store-card:hover {
  border-color: oklch(from var(--color-primary) l c h / 0.5);
  box-shadow: 0 0 24px oklch(from var(--color-primary) l c h / 0.12),inset 0 1px 0 oklch(from var(--color-primary) l c h / 0.08);
  border-color: oklch(from var(--color-primary) l c h / 0.5);
  box-shadow: 0 0 24px oklch(from var(--color-primary) l c h / 0.12),inset 0 1px 0 oklch(from var(--color-primary) l c h / 0.08);
}

.store-card-header {
  padding: var(--space-5) var(--space-5) var(--space-3);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.store-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px var(--space-2);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.2);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.store-card-body {
  padding: 0 var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.store-detail {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.store-detail a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

.store-detail a:hover {
  color: var(--color-primary-hover);
}

.store-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--color-primary);
  margin-top: 2px;
}

.store-card-footer {
  padding: var(--space-3) var(--space-5) var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  border-top: 1px solid var(--color-divider);
}

.store-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-divider);
}

.store-page {
  padding: var(--space-6) 0 var(--space-16);
}

.store-page-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.store-page-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  background: linear-gradient(135deg,#D4A843 0%,#E8B84A 40%,#D4A843 60%,#C09838 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.store-page-intro {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: var(--space-6);
}

.store-page-links {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.store-page .stores-grid {
  margin-bottom: var(--space-10);
}

.store-card-detailed {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color 300ms cubic-bezier(0.16,1,0.3,1),box-shadow 300ms cubic-bezier(0.16,1,0.3,1);
}

.store-card-detailed:hover {
  border-color: oklch(from var(--color-primary) l c h / 0.5);
  box-shadow: 0 0 24px oklch(from var(--color-primary) l c h / 0.12);
  border-color: oklch(from var(--color-primary) l c h / 0.5);
  box-shadow: 0 0 24px oklch(from var(--color-primary) l c h / 0.12);
}

.store-card-detailed .store-card-header {
  padding: var(--space-6) var(--space-6) var(--space-4);
}

.store-card-detailed .store-name {
  font-size: var(--text-xl);
}

.store-card-detailed .store-card-body {
  padding: 0 var(--space-6) var(--space-5);
  gap: var(--space-4);
}

.store-card-detailed .store-detail {
  font-size: var(--text-sm);
}

.store-card-detailed .store-description {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}

.store-card-detailed .store-card-footer {
  padding: var(--space-4) var(--space-6) var(--space-6);
  border-top: none;
}

.store-card-detailed .store-tag {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
}

.store-community-note {
  text-align: center;
  padding: var(--space-6);
  background: var(--color-primary-highlight);
  border-radius: var(--radius-xl);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.15);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.15);
}

.store-community-note p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 500px;
  margin-inline: auto;
}

.store-community-note strong {
  color: var(--color-primary);
}

.footer-guam {
  font-size: var(--text-xs);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.hero-search input:focus {
  border-color: transparent;
  background-image: linear-gradient(var(--color-surface),var(--color-surface)),linear-gradient(135deg,#D4A843,#E8B84A,#C09838,#D4A843);
  background-origin: border-box;
  background-clip: padding-box,border-box;
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15),0 0 20px oklch(from var(--color-primary) l c h / 0.08);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15),0 0 20px oklch(from var(--color-primary) l c h / 0.08);
}

@media (max-width:767px) {
  .nav-links.open {
    animation: slideDown 300ms cubic-bezier(0.16,1,0.3,1);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.back-to-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms cubic-bezier(0.16,1,0.3,1),transform 300ms cubic-bezier(0.16,1,0.3,1),background 180ms cubic-bezier(0.16,1,0.3,1),color 180ms cubic-bezier(0.16,1,0.3,1);
  transform: translateY(10px);
  box-shadow: var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  animation: heroFadeIn 600ms cubic-bezier(0.16,1,0.3,1) both;
}

.hero-tagline {
  animation: heroFadeIn 600ms cubic-bezier(0.16,1,0.3,1) 100ms both;
}

.hero-sub {
  animation: heroFadeIn 600ms cubic-bezier(0.16,1,0.3,1) 200ms both;
}

.hero-search {
  animation: heroFadeIn 600ms cubic-bezier(0.16,1,0.3,1) 300ms both;
}

.hero-stats {
  animation: heroFadeIn 600ms cubic-bezier(0.16,1,0.3,1) 400ms both;
}

.store-card {
  opacity: 0;
  animation: revealFade linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 80%;
}

.mp-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.mp-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.mp-stats-bar {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.mp-stats-bar .mp-stat-highlight {
  color: var(--color-primary);
  font-weight: 600;
}

.mp-top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  gap: var(--space-3);
  flex-wrap: wrap;
}

.mp-filters {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.mp-filter-search {
  flex: 1;
  min-width: 180px;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: border-color var(--transition-interactive);
}

.mp-filter-search::placeholder {
  color: var(--color-text-faint);
}

.mp-filter-search:focus {
  outline: none;
  border-color: var(--color-primary);
}

.mp-filter-select {
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--color-text);
  cursor: pointer;
  min-width: 120px;
}

.mp-type-toggles {
  display: flex;
  gap: 2px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  padding: 2px;
  border: 1px solid var(--color-border);
}

.mp-type-toggle {
  padding: var(--space-1) var(--space-3);
  border-radius: calc(var(--radius-md) - 2px);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: background var(--transition-interactive),color var(--transition-interactive);
  white-space: nowrap;
}

.mp-type-toggle:hover {
  color: var(--color-text);
}

.mp-type-toggle.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

@media (max-width:767px) {
  .mp-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .mp-filter-search {
    min-width: 100%;
  }

  .mp-type-toggles {
    justify-content: center;
  }

  .mp-top-actions {
    flex-direction: column;
  }
}

.mp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(260px,100%),1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.mp-listing-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-interactive),border-color var(--transition-interactive),transform var(--transition-interactive);
}

.mp-listing-card:hover {
  box-shadow: 0 0 20px oklch(from var(--color-primary) l c h / 0.15);
  border-color: oklch(from var(--color-primary) l c h / 0.4);
  transform: translateY(-2px);
}

.mp-listing-image {
  aspect-ratio: 745/1040;
  background: linear-gradient(135deg, var(--color-surface-offset) 0%, var(--color-surface-dynamic) 100%);
  overflow: hidden;
}

.mp-listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mp-listing-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  padding: var(--space-2);
  text-align: center;
}

/* ── Metadata strip — sits between image and info, never overlaps ── */
.mp-listing-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px var(--space-2);
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-border);
}

.mp-meta-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.5;
  white-space: nowrap;
}

/* Condition colors */
.mp-meta-cond.cond-nm {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
}

.mp-meta-cond.cond-lp {
  background: rgba(74, 159, 217, 0.15);
  color: #4a9fd9;
}

.mp-meta-cond.cond-mp {
  background: oklch(from var(--color-primary) l c h / 0.15);
  color: var(--color-primary);
}

.mp-meta-cond.cond-hp {
  background: rgba(255, 59, 92, 0.15);
  color: #ff3b5c;
}

/* Type — sale vs trade */
.mp-meta-type.type-sale {
  background: oklch(from var(--color-primary) l c h / 0.12);
  color: var(--color-primary);
}

.mp-meta-type.type-trade {
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
}

/* Availability */
.mp-meta-avail.avail--available {
  background: rgba(52, 199, 89, 0.12);
  color: #34c759;
}

.mp-meta-avail.avail--low-stock {
  background: rgba(255, 159, 10, 0.15);
  color: #ff9f0a;
}

.mp-meta-avail.avail--sold-out {
  background: rgba(255, 59, 92, 0.15);
  color: #ff3b5c;
}

/* Owner tag */
.mp-meta-owner {
  background: oklch(from var(--color-primary) l c h / 0.15);
  color: var(--color-primary);
  margin-left: auto;
}

/* ── Light theme adjustments ── */
[data-theme="light"] .mp-meta-cond.cond-nm {
  background: rgba(52, 199, 89, 0.12);
  color: #1b8a37;
}

[data-theme="light"] .mp-meta-cond.cond-lp {
  background: rgba(74, 159, 217, 0.12);
  color: #2874a6;
}

[data-theme="light"] .mp-meta-cond.cond-hp {
  background: rgba(255, 59, 92, 0.12);
  color: #c0253e;
}

[data-theme="light"] .mp-meta-type.type-trade {
  background: rgba(167, 139, 250, 0.12);
  color: #6d28d9;
}

[data-theme="light"] .mp-meta-avail.avail--available {
  color: #1b8a37;
}

[data-theme="light"] .mp-meta-avail.avail--low-stock {
  color: #b86e00;
}

[data-theme="light"] .mp-meta-avail.avail--sold-out {
  color: #c0253e;
}

/* ── Shared condition/type badge utilities (used in SearchView, SellerDashboard) ── */
.mp-badge-condition {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.5;
}

.mp-badge-condition.cond-nm {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
}

.mp-badge-condition.cond-lp {
  background: rgba(74, 159, 217, 0.15);
  color: #4a9fd9;
}

.mp-badge-condition.cond-mp {
  background: oklch(from var(--color-primary) l c h / 0.15);
  color: var(--color-primary);
}

.mp-badge-condition.cond-hp {
  background: rgba(255, 59, 92, 0.15);
  color: #ff3b5c;
}

.mp-badge-type {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.5;
}

.mp-badge-type.type-sale {
  background: oklch(from var(--color-primary) l c h / 0.12);
  color: var(--color-primary);
}

.mp-badge-type.type-trade {
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
}

[data-theme="light"] .mp-badge-condition.cond-nm { color: #1b8a37; }
[data-theme="light"] .mp-badge-condition.cond-lp { color: #2874a6; }
[data-theme="light"] .mp-badge-condition.cond-hp { color: #c0253e; }
[data-theme="light"] .mp-badge-type.type-trade { color: #6d28d9; }

/* ── Finish badges ── */
.finish-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(120, 120, 130, 0.6);
  color: var(--color-text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.finish-foil {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.85), rgba(255, 215, 0, 0.7));
  color: #1A1714;
}

.finish-etched {
  background: linear-gradient(135deg, rgba(168, 169, 173, 0.85), rgba(192, 192, 192, 0.7));
  color: #1A1714;
}

/* ── Language badge ── */
.language-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(99, 102, 241, 0.6);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── Finish selector chips ── */
.finish-selector {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.finish-chip {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border, rgba(255, 255, 255, 0.12));
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-interactive);
}

.finish-chip:hover:not(:disabled) {
  border-color: var(--color-primary);
  background: oklch(from var(--color-primary) l c h / 0.1);
}

.finish-chip--active {
  border-color: var(--color-primary);
  background: oklch(from var(--color-primary) l c h / 0.15);
  color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.finish-chip--foil.finish-chip--active {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
  box-shadow: 0 0 0 1px #d4af37;
}

.finish-chip--etched.finish-chip--active {
  border-color: #a8a9ad;
  background: rgba(168, 169, 173, 0.15);
  color: #c0c0c0;
  box-shadow: 0 0 0 1px #a8a9ad;
}

.finish-chip--disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

[data-theme="light"] .finish-badge {
  background: rgba(120, 120, 130, 0.2);
  color: var(--color-text);
}

[data-theme="light"] .finish-foil {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.7), rgba(255, 215, 0, 0.5));
  color: #1A1714;
}

[data-theme="light"] .finish-etched {
  background: linear-gradient(135deg, rgba(168, 169, 173, 0.7), rgba(192, 192, 192, 0.5));
  color: #1A1714;
}

[data-theme="light"] .language-badge {
  background: rgba(99, 102, 241, 0.25);
  color: #4338ca;
}

.mp-listing-info {
  padding: var(--space-3);
}

.mp-listing-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-listing-set {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.mp-listing-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.mp-listing-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  font-size: var(--text-base);
  color: var(--color-primary);
}

.mp-listing-seller {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.mp-listing-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.mp-listing-actions .btn {
  flex: 1;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
}

.mp-btn-buylocal {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.mp-btn-buylocal:hover {
  background: var(--color-primary-hover);
}

.mp-btn-msg {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.mp-btn-msg:hover {
  background: var(--color-surface-offset);
  border-color: var(--color-primary);
  color: var(--color-text);
}

/* Owner controls on listing cards */
.mp-listing-owned {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-sm);
}

/* mp-owner-badge removed — replaced by inline .mp-meta-owner tag in metadata strip */

.mp-owner-controls {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.mp-btn-edit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  padding: 4px 10px;
}

.mp-btn-edit:hover {
  background: var(--color-surface-offset);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.mp-btn-remove {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  padding: 4px 10px;
}

.mp-btn-remove:hover {
  background: oklch(0.55 0.22 25 / 0.1);
  border-color: oklch(0.65 0.22 25);
  color: oklch(0.65 0.22 25);
}

/* Inline edit form */
.mp-edit-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) 0;
}

.mp-edit-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: -4px;
}

.mp-edit-input {
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: var(--text-sm);
  padding: 6px 10px;
  width: 100%;
  transition: border-color var(--transition-interactive);
}

.mp-edit-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.mp-edit-textarea {
  resize: vertical;
  min-height: 48px;
}

.mp-edit-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

/* Flash message */
.mp-flash {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-primary);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  animation: flashIn 300ms cubic-bezier(0.16,1,0.3,1);
}

@keyframes flashIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.65);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: modalFadeIn 200ms cubic-bezier(0.16,1,0.3,1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp 250ms cubic-bezier(0.16,1,0.3,1);
}

@keyframes modalSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: background var(--transition-interactive);
}

.modal-close:hover {
  background: var(--color-surface-offset);
}

.modal-body {
  padding: var(--space-5);
}

.modal-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.form-input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  font-family: inherit;
  transition: border-color var(--transition-interactive),box-shadow var(--transition-interactive);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.12);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9500;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  min-width: 240px;
  max-width: 360px;
  text-align: center;
  animation: toastIn 300ms cubic-bezier(0.16,1,0.3,1);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Share Button ── */

.share-wrap {
  position: relative;
  display: inline-flex;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.share-btn svg {
  width: 16px;
  height: 16px;
}

.share-btn--sm {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
}

.share-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 500;
  margin-top: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  overflow: hidden;
  animation: shareMenuIn 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes shareMenuIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.share-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: none;
  border: none;
  color: var(--color-text);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--transition-interactive);
  white-space: nowrap;
}

.share-menu-item:hover {
  background: var(--color-border);
}

.share-menu-item svg {
  width: 15px;
  height: 15px;
  opacity: 0.7;
}

/* Page header row — title + share in flex row */
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.checkout-page {
  padding-block: var(--space-8);
}

.checkout-header {
  margin-bottom: var(--space-8);
}

.checkout-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: var(--space-4);
  max-width: 560px;
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  position: relative;
}

.checkout-step:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: calc(100% - 28px);
  height: 2px;
  background: var(--color-border);
  margin-left: 28px;
  z-index: 0;
}

.checkout-step.done:not(:last-child)::after {
  background: var(--color-primary);
}

.checkout-step-num {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
  z-index: 1;
  transition: all var(--transition-interactive);
}

.checkout-step.active .checkout-step-num {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.checkout-step.done .checkout-step-num {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.checkout-step-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.checkout-step.active .checkout-step-label {
  color: var(--color-text);
}

.checkout-step.done .checkout-step-label {
  color: var(--color-success);
}

.checkout-body {
  max-width: 760px;
}

.checkout-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.checkout-section-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.checkout-section-sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  margin-top: calc(-1 * var(--space-2));
}

.checkout-seller-group {
  margin-bottom: var(--space-4);
}

.checkout-seller-label {
  margin-bottom: var(--space-2);
}

.checkout-seller-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--color-primary-highlight);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.checkout-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.checkout-item:last-child {
  border-bottom: none;
}

.checkout-item-img {
  width: 52px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface-offset);
}

.checkout-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkout-item-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.checkout-item-details {
  flex: 1;
  min-width: 0;
}

.checkout-item-name {
  font-weight: 600;
  font-size: var(--text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkout-item-meta {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.checkout-item-cond {
  font-weight: 600;
  color: var(--color-primary);
}

.checkout-item-right {
  text-align: right;
  flex-shrink: 0;
}

.checkout-item-qty {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.checkout-item-price {
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--color-primary);
}

.checkout-order-summary {
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin: var(--space-4) 0;
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  padding: var(--space-1) 0;
  color: var(--color-text-muted);
}

.checkout-summary-total {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-2);
  margin-top: var(--space-1);
}

.checkout-summary-mini {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: var(--space-3) 0;
}

.checkout-summary-mini strong {
  color: var(--color-text);
}

.checkout-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.checkout-actions .btn {
  flex: 1;
  min-width: 140px;
  justify-content: center;
}

.fulfillment-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.fulfillment-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color var(--transition-interactive),background var(--transition-interactive);
}

.fulfillment-option input[type="radio"] {
  margin-top: 2px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}

.fulfillment-option:hover {
  border-color: var(--color-primary);
}

.fulfillment-option.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
}

.fulfillment-option-content {
  flex: 1;
}

.fulfillment-option-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.fulfillment-option-title {
  font-weight: 700;
  font-size: var(--text-sm);
}

.fulfillment-option-price {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 600;
}

.fulfillment-option-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

.pickup-store-selector {
  margin-bottom: var(--space-4);
}

.pickup-store-title {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.pickup-store-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.pickup-store-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-interactive),background var(--transition-interactive);
}

.pickup-store-option input[type="radio"] {
  margin-top: 2px;
  accent-color: var(--color-primary);
}

.pickup-store-option:hover {
  border-color: var(--color-primary);
}

.pickup-store-option.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
}

.pickup-store-info {
  flex: 1;
}

.pickup-store-name {
  font-weight: 600;
  font-size: var(--text-sm);
}

.pickup-store-address {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-1);
}

.checkout-form .form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.form-input.error {
  border-color: var(--color-error);
}

.form-input.error:focus {
  box-shadow: 0 0 0 3px oklch(from var(--color-error) l c h / 0.12);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: var(--space-1);
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.form-input-prefix {
  display: flex;
  align-items: center;
  position: relative;
}

.form-prefix-symbol {
  position: absolute;
  left: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  pointer-events: none;
}

.form-input-prefixed {
  padding-left: var(--space-8);
}

.checkout-payment-recap {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
}

.payment-recap-contact,
.payment-recap-fulfillment {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  flex: 1;
  min-width: 160px;
  font-size: var(--text-sm);
}

.payment-recap-contact svg,
.payment-recap-fulfillment svg {
  flex-shrink: 0;
  color: var(--color-primary);
}

.btn-lg {
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.btn.loading {
  opacity: 0.8;
  cursor: not-allowed;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.checkout-payment-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
}

.order-confirmation-page {
  padding-block: var(--space-8);
}

.order-success-banner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-6);
  background: var(--color-success-highlight);
  border: 1px solid oklch(from var(--color-success) l c h / 0.3);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-8);
}

.order-success-icon {
  width: 56px;
  height: 56px;
  background: var(--color-success);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.order-success-icon svg {
  width: 28px;
  height: 28px;
}

.order-success-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 var(--space-1);
}

.order-success-sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.order-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.order-items-card {
  grid-column: 1 / -1;
}

.order-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.order-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.order-card-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  margin: 0;
}

.order-card-header svg {
  color: var(--color-primary);
}

.order-info-table {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.order-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  font-size: var(--text-sm);
}

.order-info-label {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.order-info-value {
  text-align: right;
  word-break: break-word;
}

.order-id {
  font-family: monospace;
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.order-link {
  color: var(--color-secondary);
  text-decoration: underline;
}

.order-status-badge {
  background: var(--color-success-highlight);
  color: var(--color-success);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.order-status--reserved {
  background: oklch(from var(--color-primary) l c h / 0.15);
  color: var(--color-primary);
}
.order-status--pending {
  background: oklch(0.85 0.15 85 / 0.15);
  color: oklch(0.75 0.15 85);
}
.order-status--paid,
.order-status--fulfilled {
  background: var(--color-success-highlight);
  color: var(--color-success);
}
.order-status--failed {
  background: oklch(0.45 0.2 25 / 0.15);
  color: oklch(0.65 0.2 25);
}
.order-status--expired {
  background: oklch(0.5 0 0 / 0.15);
  color: var(--color-text-muted);
}

/* Banner variants for payment states */
.order-success-banner--pending {
  background: oklch(0.85 0.15 85 / 0.08);
  border-color: oklch(0.75 0.15 85 / 0.3);
}
.order-success-banner--pending .order-success-icon {
  background: oklch(0.75 0.15 85);
}
.order-success-banner--failed {
  background: oklch(0.45 0.2 25 / 0.08);
  border-color: oklch(0.65 0.2 25 / 0.3);
}
.order-success-banner--failed .order-success-icon {
  background: oklch(0.55 0.2 25);
}

.order-fulfillment-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
}

.order-items-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.order-item-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.order-item-row:last-child {
  border-bottom: none;
}

.order-item-img {
  width: 44px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface-offset);
}

.order-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-item-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.order-item-details {
  flex: 1;
  min-width: 0;
}

.order-item-name {
  font-weight: 600;
  font-size: var(--text-sm);
}

.order-item-meta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.order-item-cond {
  font-weight: 600;
  color: var(--color-primary);
}

.order-item-right {
  text-align: right;
  flex-shrink: 0;
}

.order-item-qty {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.order-item-price {
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--color-primary);
}

.order-totals {
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.order-grand-total {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-2);
  margin-top: var(--space-1);
}

.order-grand-total span:last-child {
  color: var(--color-primary);
}

.order-confirmation-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.order-confirmation-actions .btn {
  flex: 1;
  min-width: 140px;
  text-align: center;
}

.order-save-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
}

.seller-dashboard {
  padding-block: var(--space-8);
}

.seller-registration {
  padding-block: var(--space-8);
  display: flex;
  justify-content: center;
}

.seller-reg-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 520px;
  width: 100%;
}

.seller-reg-icon {
  width: 56px;
  height: 56px;
  background: var(--color-primary-highlight);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--color-primary);
}

.seller-reg-icon svg {
  width: 24px;
  height: 24px;
}

.seller-reg-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.seller-reg-sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  line-height: 1.5;
}

.seller-trust-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-3);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.seller-trust-row svg {
  flex-shrink: 0;
  color: var(--color-success);
}

.seller-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-5);
}

.seller-profile-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.seller-avatar {
  width: 56px;
  height: 56px;
  background: var(--color-primary-highlight);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
}

.seller-name-heading {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 var(--space-1);
}

.seller-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.seller-store-tag {
  font-size: var(--text-xs);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  color: var(--color-text-muted);
}

.seller-since {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.seller-rep-badge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-success-highlight);
  border: 1px solid oklch(from var(--color-success) l c h / 0.3);
  border-radius: var(--radius-lg);
  color: var(--color-success);
}

.seller-rep-badge svg {
  width: 20px;
  height: 20px;
}

.seller-rep-score {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1;
}

.seller-rep-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.seller-tab {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  transition: color var(--transition-interactive),border-color var(--transition-interactive);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.seller-tab:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

.seller-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.seller-tab-content {
  padding-top: var(--space-2);
}

.seller-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
  gap: var(--space-4);
}

.seller-listing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  transition: border-color var(--transition-interactive);
}

.seller-listing-card:hover {
  border-color: var(--color-primary);
}

.seller-listing-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.seller-listing-name {
  font-weight: 600;
  font-size: var(--text-sm);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seller-listing-set {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.seller-listing-badges {
  display: flex;
  gap: var(--space-1);
  flex-shrink: 0;
}

.seller-listing-price {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.seller-listing-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.seller-listing-actions .btn-sm {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.seller-delete-btn {
  color: var(--color-error);
  border-color: var(--color-error-highlight);
  background: var(--color-error-highlight);
}

.seller-delete-btn:hover {
  background: var(--color-error);
  color: #fff;
}

.listing-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  max-width: 600px;
}

.listing-form-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-5);
}

.listing-form .form-group {
  margin-bottom: var(--space-4);
  position: relative;
}

.listing-form-autocomplete {
  position: relative;
}

.listing-form-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.listing-form-actions .btn {
  flex: 1;
}

.sales-history-table {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.sales-history-header,
.sales-history-row,
.sales-history-total-row {
  display: grid;
  grid-template-columns: 2fr 80px 1fr 100px 1fr;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  align-items: center;
}

.sales-history-header {
  background: var(--color-surface-offset);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sales-history-row {
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.sales-price {
  font-weight: 700;
  color: var(--color-success);
  font-family: var(--font-display);
}

.sales-history-total-row {
  border-top: 2px solid var(--color-border);
  background: var(--color-surface-offset);
  font-weight: 700;
  font-size: var(--text-sm);
}

.sales-grand-total {
  color: var(--color-success);
  font-size: var(--text-base);
}

.seller-flash {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-success-highlight);
  border: 1px solid oklch(from var(--color-success) l c h / 0.3);
  color: var(--color-success);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-4);
  animation: toastIn 300ms cubic-bezier(0.16,1,0.3,1);
}

.seller-danger-zone {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-error);
}

.seller-danger-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-error);
  margin-bottom: var(--space-2);
}

.seller-danger-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.seller-rep-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-success);
  font-weight: 700;
}

.seller-rep-inline svg {
  width: 14px;
  height: 14px;
}

/* ===== Profile Page (inline-edit UX) ===== */
.pf-page {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.pf-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.pf-section-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.pf-section-header > svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.pf-section-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
}

.pf-section-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: var(--space-1) 0 0;
}

.pf-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Editable field — read-only state */
.pf-field {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-interactive);
  position: relative;
}

.pf-field:hover {
  background: var(--color-surface-offset);
}

.pf-field:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.pf-field + .pf-field {
  border-top: 1px solid var(--color-border);
}

.pf-field-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  grid-column: 1 / -1;
  margin-bottom: var(--space-1);
}

.pf-required {
  color: var(--color-error);
  margin-left: var(--space-1);
}

.pf-field-value {
  font-size: var(--text-sm);
  color: var(--color-text);
  grid-column: 1;
  grid-row: 2;
  line-height: 1.5;
  word-break: break-word;
}

.pf-field-value--empty {
  color: var(--color-text-muted);
  font-style: italic;
}

.pf-field-desc {
  font-size: 11px;
  color: var(--color-text-muted);
  grid-column: 1 / -1;
  margin-top: var(--space-1);
  opacity: 0;
  transition: opacity var(--transition-interactive);
}

.pf-field:hover .pf-field-desc {
  opacity: 1;
}

.pf-field-edit-hint {
  grid-column: 2;
  grid-row: 2;
  color: var(--color-text-muted);
  opacity: 0;
  transition: opacity var(--transition-interactive);
}

.pf-field:hover .pf-field-edit-hint {
  opacity: 0.6;
}

.pf-field-edit-hint svg {
  width: 14px;
  height: 14px;
}

/* Editable field — editing state */
.pf-field--editing {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  cursor: default;
}

.pf-field--editing .pf-field-label {
  grid-column: unset;
}

.pf-edit-input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-interactive);
}

.pf-edit-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px oklch(from var(--color-primary) l c h / 0.2);
}

.pf-edit-textarea {
  resize: vertical;
  min-height: 60px;
}

.pf-field-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  margin: 0;
}

.pf-field-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

/* Read-only fields (Account Details) */
.pf-readonly-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pf-readonly-field {
  padding: var(--space-3);
}

.pf-readonly-field + .pf-readonly-field {
  border-top: 1px solid var(--color-border);
}

.pf-readonly-field .pf-field-value {
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-top: var(--space-1);
}

/* Session row */
.pf-session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) 0;
}

/* Danger Zone */
.pf-danger {
  border: 1px solid var(--color-error);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pf-danger-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  transition: background var(--transition-interactive);
}

.pf-danger-header:hover {
  background: oklch(from var(--color-error) l c h / 0.05);
}

.pf-danger-header .seller-danger-title {
  margin-bottom: 0;
}

.pf-danger-header .seller-danger-text {
  margin-bottom: 0;
}

.pf-danger-chevron {
  font-size: var(--text-xs);
  color: var(--color-error);
  transition: transform 0.2s ease;
}

.pf-danger-chevron--open {
  transform: rotate(180deg);
}

.pf-danger-body {
  padding: 0 var(--space-5) var(--space-5);
  border-top: 1px solid var(--color-error);
}

.pf-danger-warning {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: var(--space-4) 0 var(--space-3);
  line-height: 1.5;
}

.pf-danger-warning strong {
  color: var(--color-error);
}

.btn-danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .pf-page {
    gap: var(--space-4);
  }

  .pf-section {
    padding: var(--space-4);
  }

  .pf-field {
    padding: var(--space-3) var(--space-2);
  }

  .pf-field-desc {
    opacity: 1;
  }

  .pf-field-edit-hint {
    opacity: 0.5;
  }

  .pf-session-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
}

.btn-seller-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: linear-gradient(135deg,var(--color-primary-highlight),var(--color-surface-offset));
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: background var(--transition-interactive),color var(--transition-interactive);
}

.btn-seller-cta:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.mp-seller-badge {
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.store-seller-cta {
  margin-top: var(--space-6);
  background: var(--color-primary-highlight);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.store-seller-cta-inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.store-seller-cta-inner svg {
  color: var(--color-primary);
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.store-seller-cta-inner > div {
  flex: 1;
  min-width: 200px;
}

.store-seller-cta-inner h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  margin: 0 0 var(--space-1);
}

.store-seller-cta-inner p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.nav-sell-link {
  color: var(--color-primary) !important;
}

.nav-sell-link:hover {
  background: var(--color-primary-highlight) !important;
}

@media (max-width:767px) {
  .checkout-steps {
    gap: var(--space-1);
  }

  .checkout-step-label {
    display: none;
  }

  .checkout-step:not(:last-child)::after {
    display: none;
  }

  .checkout-actions .btn {
    min-width: 100px;
  }

  .order-details-grid {
    grid-template-columns: 1fr;
  }

  .order-success-banner {
    flex-direction: column;
    text-align: center;
  }

  .seller-profile-header {
    flex-direction: column;
  }

  .sales-history-header,
  .sales-history-row,
  .sales-history-total-row {
    grid-template-columns: 2fr 70px 1fr 80px;
  }

  .sales-history-header span:last-child,
  .sales-history-row span:last-child {
    display: none;
  }

  .form-row-2col {
    grid-template-columns: 1fr;
  }

  .payment-recap-contact,
  .payment-recap-fulfillment {
    min-width: 100%;
  }

  .store-page-links {
    flex-wrap: wrap;
  }

  .checkout-payment-recap {
    flex-direction: column;
  }
}

.checkout-payment-info {
  margin-top: var(--space-4);
}

.payment-security-badges {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-surface-elevated);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.payment-security-badges {
  justify-content: center;
}

.period-btn {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition-interactive);
}

.period-btn:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

.period-btn.active {
  background: var(--color-accent,#2dd4bf);
  border-color: var(--color-accent,#2dd4bf);
  color: #000;
}

.market-movers-view h1 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.market-subtitle {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}

.market-period-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.market-source {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-8);
  text-align: center;
}

.market-source a {
  color: var(--color-accent,#2dd4bf);
}

/* ═══════════════════════════════════════
   DECK BROWSER — dk-* namespace
   ═══════════════════════════════════════ */

.decklist-view h1 {
  margin-bottom: var(--space-2);
}

.decklist-subtitle {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
  max-width: 640px;
}

/* ── Search bar ── */
.decklist-search {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.decklist-input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface,rgba(255,255,255,0.05));
  color: var(--color-text);
  font-family: var(--font-body);
}

.decklist-input:focus {
  outline: none;
  border-color: var(--color-accent,#2dd4bf);
  box-shadow: 0 0 0 3px rgba(45,212,191,0.12);
}

.decklist-error {
  padding: var(--space-3) var(--space-4);
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-md);
  color: var(--color-red,#ef4444);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

/* ── Format filter tabs ── */
/* ── Browse grid ── */
.dk-browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
  gap: var(--space-3);
}

.dk-browse-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-elevated,rgba(255,255,255,0.03));
  cursor: pointer;
  transition: var(--transition-interactive);
  text-align: left;
  font-family: var(--font-body);
  color: var(--color-text);
}

.dk-browse-card:hover {
  border-color: var(--color-accent,#2dd4bf);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.dk-browse-card--skeleton {
  min-height: 80px;
  pointer-events: none;
}

.dk-browse-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.dk-format-badge {
  display: inline-block;
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: capitalize;
  border-radius: var(--radius-full);
  border: 1px solid;
  line-height: 1.4;
}

.dk-views {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.dk-browse-name {
  font-weight: 600;
  font-size: var(--text-base);
  line-height: 1.3;
}

.dk-browse-meta {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ── Detail header ── */
.dk-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.dk-detail-info {
  flex: 1;
  min-width: 0;
}

.dk-detail-info h1 {
  margin-bottom: var(--space-2);
  word-break: break-word;
}

.dk-detail-meta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.dk-detail-meta span {
  text-transform: capitalize;
}

.dk-detail-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.dk-price-badge {
  text-align: center;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-elevated,rgba(255,255,255,0.03));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.dk-price-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.dk-price-value {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-accent,#2dd4bf);
  font-family: var(--font-display);
}

/* ── Card sections ── */
.dk-section {
  margin-bottom: var(--space-6);
}

.dk-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.dk-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: 0;
}

.dk-section-cost {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent,#2dd4bf);
}

.dk-card-list {
  display: flex;
  flex-direction: column;
}

/* ── Card rows ── */
.dk-card-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text);
  text-decoration: none;
  transition: var(--transition-interactive);
}

.dk-card-row:hover {
  background: var(--color-surface-elevated,rgba(255,255,255,0.05));
}

.dk-qty {
  font-weight: 700;
  color: var(--color-text-muted);
  min-width: 28px;
  font-size: var(--text-xs);
  flex-shrink: 0;
}

.dk-card-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dk-card-price {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  min-width: 52px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Mana symbols ── */
.mana-cost {
  display: inline-flex;
  gap: 2px;
  flex-shrink: 0;
}

.mana-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

/* Mana color circles */
.mana-w { background: #f9faf4; color: #333; border-color: #d4c98a; }
.mana-u { background: #0e68ab; color: #fff; border-color: #0a4f82; }
.mana-b { background: #150b00; color: #ccc; border-color: #4a3728; }
.mana-r { background: #d3202a; color: #fff; border-color: #a01a22; }
.mana-g { background: #00733e; color: #fff; border-color: #005c31; }

/* ── Card image hover preview ── */
.dk-img-preview {
  position: fixed;
  right: var(--space-6);
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  pointer-events: none;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
}

.dk-img-preview img {
  width: 240px;
  border-radius: var(--radius-lg);
}

/* ── Source attribution ── */
.decklist-source {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.decklist-source a {
  color: var(--color-accent,#2dd4bf);
}

/* ── Responsive ── */
@media (max-width:767px) {
  .decklist-search {
    flex-direction: column;
  }

  .dk-browse-grid {
    grid-template-columns: 1fr;
  }

  .dk-detail-header {
    flex-direction: column;
  }

  .dk-detail-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dk-img-preview {
    display: none;
  }

}

.set-link {
  color: var(--color-accent,#2dd4bf);
  text-decoration: none;
  transition: var(--transition-interactive);
}

.set-link:hover {
  text-decoration: underline;
  color: var(--color-accent-hover,#5eead4);
}

.other-printings {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.other-printings-title {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.other-printings-count {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-muted);
  background: var(--color-surface-elevated,rgba(255,255,255,0.05));
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
}

.printings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(140px,1fr));
  gap: var(--space-3);
}

.printing-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  transition: var(--transition-interactive);
  background: var(--color-surface-elevated,rgba(255,255,255,0.02));
}

.printing-card:hover {
  border-color: var(--color-accent,#2dd4bf);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.printing-card.printing-current {
  border-color: var(--color-accent,#2dd4bf);
  background: rgba(45,212,191,0.05);
}

.printing-img-wrap {
  width: 100%;
  aspect-ratio: 488 / 680;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-2);
  position: relative;
}

.printing-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.printing-info {
  padding: 0 var(--space-1);
}

.printing-set {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.printing-number {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.printing-price {
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--color-accent,#2dd4bf);
}

.printings-show-all {
  margin-top: var(--space-3);
  width: 100%;
}

.market-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

aa.market-cat-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* ── Market Movers Sortable Table ── */

.mv-table-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mv-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.mv-table thead {
  border-bottom: 1px solid var(--color-border);
}

.mv-th {
  padding: var(--space-3) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.mv-th:hover {
  color: var(--color-text);
}

.mv-th-active {
  color: var(--color-primary);
}

.mv-th-name {
  width: auto;
}

.mv-th-chart {
  text-align: center;
  cursor: default;
}

.mv-sort-arrow {
  display: inline-block;
  margin-left: 2px;
  font-size: 10px;
  color: var(--color-text-muted);
  opacity: 0.4;
}

.mv-sort-active {
  color: var(--color-primary);
  opacity: 1;
}

.mv-row {
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--color-border);
}

.mv-row:last-child {
  border-bottom: none;
}

.mv-row:hover {
  background: var(--color-surface-elevated, rgba(255,255,255,0.03));
}

.mv-td {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  vertical-align: middle;
  white-space: nowrap;
  font-variant-numeric: tabular-nums lining-nums;
}

.mv-td-rank {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
}

.mv-td-card {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: normal;
  min-width: 160px;
}

.mv-card-img {
  width: 36px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.mv-card-info {
  min-width: 0;
}

.mv-card-name {
  font-weight: 600;
  font-size: var(--text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.mv-card-set {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.mv-td-price {
  font-weight: 700;
  font-family: var(--font-display);
}

.mv-td-change {
  text-align: right;
}

.mv-td-chart {
  text-align: center;
  padding: var(--space-2) var(--space-2);
}

.mv-change {
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.mv-change-up {
  color: var(--color-success, #22c55e);
}

.mv-change-down {
  color: var(--color-error, #ef4444);
}

.mv-change-flat {
  color: var(--color-text-muted);
}

.mv-change-na {
  color: var(--color-text-muted);
  opacity: 0.5;
}

.mv-sparkline {
  display: block;
  margin: 0 auto;
}

.mv-empty {
  padding: var(--space-8) var(--space-4);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ── Card Detail JustTCG Section ── */

.cd-jtcg-section {
  margin-top: var(--space-6);
  margin-bottom: var(--space-4);
}

.cd-jtcg-title {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.cd-jtcg-loading {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-4) 0;
}

.cd-jtcg-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.cd-jtcg-empty {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-4) 0;
}

.cd-cond-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-2);
  text-align: center;
  transition: var(--transition-interactive);
}

.cd-cond-card:hover {
  border-color: var(--color-primary);
}

.cd-cond-na {
  opacity: 0.45;
}

.cd-cond-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
}

.cd-cond-price {
  font-size: var(--text-base);
  font-weight: 700;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums lining-nums;
  margin-bottom: 2px;
}

.cd-cond-change {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cd-change-up {
  color: var(--color-success, #22c55e);
}

.cd-change-down {
  color: var(--color-error, #ef4444);
}

.cd-change-flat {
  color: var(--color-text-muted);
}

.cd-trend-row {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
}

.cd-trend-item {
  text-align: center;
  flex: 1;
}

.cd-trend-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.cd-trend-val {
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cd-chart-wrap {
  margin-bottom: var(--space-4);
}

.cd-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.cd-chart-range {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.cd-chart-svg {
  display: block;
  width: 100%;
  border-radius: var(--radius-sm);
}

.cd-alltime {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.cd-alltime-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cd-alltime-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.cd-alltime-val {
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── EchoMTG Graded Prices ── */

.cd-echo-section {
  margin-top: var(--space-4);
}

.cd-echo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.cd-echo-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: center;
  transition: border-color var(--transition-interactive);
}

.cd-echo-card:hover {
  border-color: var(--color-primary);
}

.cd-echo-label {
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.cd-echo-price {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.cd-echo-buylist {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  margin-top: var(--space-2);
}

/* ── Portfolio Sortable Headers ── */

.pf-sortable-th {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.pf-sortable-th:hover {
  color: var(--color-text);
}

.pf-th-active {
  color: var(--color-primary);
}

@media (max-width:767px) {
  .printings-grid {
    grid-template-columns: repeat(3,1fr);
  }

  .market-period-tabs {
    flex-wrap: wrap;
  }

  /* Market Movers responsive */
  .mv-table-wrap {
    margin: 0 calc(-1 * var(--space-4));
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .mv-th,
  .mv-td {
    padding: var(--space-2);
    font-size: 12px;
  }

  .mv-card-name,
  .mv-card-set {
    max-width: 120px;
  }

  .mv-card-img {
    width: 28px;
    height: 40px;
  }

  .mv-th-chart,
  .mv-td-chart {
    display: none;
  }

  /* Card Detail JustTCG responsive */
  .cd-jtcg-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cd-trend-row {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .cd-trend-item {
    flex: 0 0 calc(50% - var(--space-1));
  }

  .cd-alltime {
    flex-wrap: wrap;
    gap: var(--space-3);
  }
}

.meta-page {
  padding-bottom: var(--space-8);
}

.meta-page-header {
  margin-bottom: var(--space-4);
}

.meta-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.meta-tab {
  padding: 8px 16px;
  border: none;
  background: none;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
}

.meta-tab:hover {
  background: rgba(255,255,255,0.06);
  color: var(--color-text);
}

.meta-tab--active {
  background: var(--color-accent,var(--color-primary));
  color: #000;
}

.meta-tab--active:hover {
  background: var(--color-accent,var(--color-primary));
  color: #000;
}

.meta-filters {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.meta-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-filter-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.meta-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--color-text);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-family: inherit;
  cursor: pointer;
  min-width: 140px;
}

.meta-select:focus {
  outline: 2px solid var(--color-accent,var(--color-primary));
  outline-offset: 1px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.meta-color-pips {
  display: inline-flex;
  gap: 2px;
  font-size: 12px;
}

.meta-pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
}

.meta-table-wrapper {
  overflow-x: auto;
}

.meta-commanders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.meta-commanders-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}

.meta-commander-row {
  transition: background 0.12s ease;
}

.meta-commander-row:hover {
  background: rgba(255,255,255,0.04);
}

.meta-commander-row td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.meta-rank {
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  width: 40px;
  text-align: center;
}

.meta-cmd-cell {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 240px;
}

.meta-cmd-thumb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}

.meta-cmd-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-cmd-name {
  font-weight: 600;
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.3;
}

.meta-stat {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: rgba(255,255,255,0.7);
}

.meta-stat-wr {
  font-weight: 600;
  color: var(--color-accent,var(--color-primary));
}

.meta-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-6) var(--space-3);
  overflow-y: auto;
  backdrop-filter: blur(4px);
}

.meta-detail-container {
  background: var(--color-surface,#1a1b1e);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg,12px);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.meta-detail-panel {
  padding: var(--space-4);
}

.meta-detail-header {
  margin-bottom: var(--space-4);
}

.meta-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}

.meta-detail-name {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 var(--space-1);
  line-height: 1.3;
}

.meta-detail-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.meta-detail-close:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.meta-detail-link {
  display: inline-block;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-accent,var(--color-primary));
  text-decoration: none;
}

.meta-detail-link:hover {
  text-decoration: underline;
}

.meta-detail-section {
  margin-bottom: var(--space-4);
}

.meta-detail-section h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin: 0 0 var(--space-2);
  color: var(--color-text);
}

.meta-staples-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-staple-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  font-size: 12px;
  color: var(--color-text-secondary,#ccc);
  text-decoration: none;
  transition: all 0.15s ease;
}

.meta-staple-chip:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
  transform: translateY(-1px);
}

.meta-staple-name {
  font-weight: 600;
}

.meta-staple-pct {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
}

.meta-entries-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-entry-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: rgba(255,255,255,0.02);
}

.meta-entry-row:hover {
  background: rgba(255,255,255,0.05);
}

.meta-entry-standing {
  font-weight: 700;
  color: var(--color-accent,var(--color-primary));
  min-width: 28px;
}

.meta-entry-player {
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-entry-record {
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
}

.meta-entry-tourney {
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-entry-deck-link {
  font-size: 11px;
  color: var(--color-accent,var(--color-primary));
  text-decoration: none;
  white-space: nowrap;
}

.meta-entry-deck-link:hover {
  text-decoration: underline;
}

.meta-tournaments-list {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(320px,1fr));
  gap: var(--space-3);
}

.meta-tournament-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md,8px);
  padding: var(--space-3);
  transition: border-color 0.15s ease;
}

.meta-tournament-card:hover {
  border-color: rgba(255,255,255,0.15);
}

.meta-tournament-header {
  margin-bottom: var(--space-2);
}

.meta-tournament-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.3;
}

.meta-tournament-name a {
  color: var(--color-text);
  text-decoration: none;
}

.meta-tournament-name a:hover {
  color: var(--color-accent,var(--color-primary));
}

.meta-tournament-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-source-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.meta-tournament-meta {
  display: flex;
  gap: var(--space-2);
  font-size: 11px;
  color: rgba(255,255,255,0.45);
}

.meta-tournament-meta span::before {
  content: '\00B7';
  margin-right: var(--space-2);
}

.meta-tournament-meta span:first-child::before {
  content: none;
}

.meta-tournament-top {
  margin-top: var(--space-2);
}

.meta-tournament-entry {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 3px 0;
  font-size: 12px;
}

.meta-tournament-cmd {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,0.7);
}

.meta-staples-table {
  overflow-x: auto;
}

.meta-staples-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.meta-staples-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.meta-staple-row td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.meta-staple-row:hover {
  background: rgba(255,255,255,0.03);
}

.meta-staple-link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}

.meta-staple-link:hover {
  color: var(--color-accent,var(--color-primary));
}

.meta-attribution {
  text-align: center;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35);
  margin-top: var(--space-6);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.meta-attribution a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
}

.meta-attribution a:hover {
  color: var(--color-accent,var(--color-primary));
}

@media (max-width:767px) {
  .meta-commanders-table th:nth-child(n+5),
  .meta-commanders-table td:nth-child(n+5) {
    display: none;
  }

  .meta-cmd-cell {
    min-width: 180px;
  }

  .meta-entry-tourney {
    display: none;
  }

  .meta-tournaments-list {
    grid-template-columns: 1fr;
  }

  .meta-filters {
    gap: var(--space-2);
  }

  .meta-select {
    min-width: 110px;
  }
}

.skip-to-content {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent,var(--color-primary));
  color: #000;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md,8px);
  z-index: 10000;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: var(--space-2);
  outline: 2px solid var(--color-accent,var(--color-primary));
  outline-offset: 2px;
}

.legal-page {
  max-width: 800px;
  padding: var(--space-8) var(--space-4);
}

.legal-page .page-heading {
  margin-bottom: var(--space-2);
}

.legal-updated {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}

.legal-section {
  margin-bottom: var(--space-8);
}

.legal-section h2 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.legal-section h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.legal-section p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary,#aaa);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}

.legal-section ul {
  padding-left: var(--space-6);
  margin-bottom: var(--space-3);
}

.legal-section li {
  font-size: var(--text-sm);
  color: var(--color-text-secondary,#aaa);
  line-height: 1.7;
  margin-bottom: var(--space-1);
}

.legal-section a {
  color: var(--color-accent,var(--color-primary));
  text-decoration: underline;
}

.legal-section a:hover {
  opacity: 0.8;
}

.footer-legal-links {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin: var(--space-3) 0;
}

.footer-legal-links a {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-legal-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-accessibility {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  opacity: 0.5;
  line-height: 1.5;
  max-width: 600px;
  margin: var(--space-3) auto 0;
  text-align: center;
}

.footer-accessibility a {
  color: var(--color-text-muted);
  text-decoration: underline;
}

.footer-wotc-disclaimer {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  opacity: 0.5;
  line-height: 1.5;
  max-width: 600px;
  margin: var(--space-3) auto 0;
  text-align: center;
}

.footer-wotc-disclaimer a {
  color: var(--color-text-muted);
  text-decoration: underline;
}

.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface-1,#1a1c22);
  border-top: 1px solid var(--color-border,#2a2c34);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  z-index: 9000;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.cookie-notice p {
  margin: 0;
  max-width: 600px;
  line-height: 1.5;
}

.cookie-notice a {
  color: var(--color-accent,var(--color-primary));
  text-decoration: underline;
}

.cookie-notice button {
  background: var(--color-accent,var(--color-primary));
  color: #000;
  border: none;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm,4px);
  cursor: pointer;
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}

.cookie-notice button:hover {
  opacity: 0.9;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@supports (animation-timeline:scroll()) {
  .scroll-reveal {
    opacity: 0;
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}

@supports not (animation-timeline:scroll()) {
  .scroll-reveal {
    opacity: 0;
    animation: fadeUp 600ms cubic-bezier(0.16,1,0.3,1) both;
  }

  .scroll-reveal:nth-child(2) {
    animation-delay: 100ms;
  }

  .scroll-reveal:nth-child(3) {
    animation-delay: 200ms;
  }
}

/* ===== Auth UI — Sign-in button, User avatar, Dropdown ===== */

.btn-sign-in {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: background var(--transition-interactive),border-color var(--transition-interactive),color var(--transition-interactive);
}

.btn-sign-in:hover {
  background: var(--color-surface-offset);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.user-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.user-avatar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--color-border);
  transition: border-color var(--transition-interactive);
}

.user-avatar-btn:hover {
  border-color: var(--color-primary);
}

.user-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

.user-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: var(--radius-full);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  width: 240px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 150;
  overflow: hidden;
  animation: slideUp 0.15s ease;
}

.user-dropdown-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: none;
}

.user-dropdown-name {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.3;
}

.user-dropdown-email {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-divider {
  border: none;
  border-top: 1px solid var(--color-divider);
  margin: 0;
}

.user-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition-interactive),color var(--transition-interactive);
}

.user-dropdown-item:hover {
  background: var(--color-surface-offset);
  color: var(--color-primary);
}

.user-dropdown-signout {
  color: var(--color-error);
}

.user-dropdown-signout:hover {
  background: var(--color-error-highlight);
  color: var(--color-error);
}

/* ===== ListingModal — mp-modal ===== */

.mp-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mp-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mp-modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: calc(100% - 2rem);
  max-width: 520px;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}

.mp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}

.mp-modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
}

.mp-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: background var(--transition-interactive),color var(--transition-interactive);
}

.mp-modal-close:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

.mp-listing-form {
  padding: var(--space-4) var(--space-6) var(--space-6);
}

.mp-form-row {
  margin-bottom: var(--space-4);
}

.mp-form-row label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mp-form-row input,
.mp-form-row select,
.mp-form-row textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-interactive);
  box-sizing: border-box;
}

.mp-form-row input:focus,
.mp-form-row select:focus,
.mp-form-row textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.mp-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.mp-radio-group {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.mp-radio-label {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  cursor: pointer;
  color: var(--color-text);
}

@media(max-width:480px) {
  .mp-form-grid-2 {
    grid-template-columns: 1fr;
  }

  .mp-modal {
    max-width: 100%;
    border-radius: var(--radius-lg);
  }
}

/* Auth prompt on seller page */

.seller-auth-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  max-width: 500px;
  margin: var(--space-12) auto;
}

.seller-auth-prompt h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.seller-auth-prompt p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: 36ch;
  margin-bottom: var(--space-6);
  line-height: 1.5;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: #fff;
  color: #1A1714;
  border: 1px solid #ddd;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow var(--transition-interactive),background var(--transition-interactive);
}

.btn-google:hover {
  background: #f8f8f8;
  box-shadow: var(--shadow-md);
}

.btn-google svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ===== Set Picker Dropdown ===== */

.set-code-badge {
  font-weight: 700;
  text-transform: uppercase;
  background: var(--color-surface-offset);
  padding: 0 var(--space-1);
  border-radius: var(--radius-sm);
}

.set-price-usd {
  font-weight: 700;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.set-price-foil {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}

.set-price-na {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ===== Listing Card Preview ===== */

.listing-card-preview {
  display: flex;
  justify-content: center;
  margin: var(--space-3) 0;
}

.listing-preview-img {
  width: 120px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.mp-form-row input[readonly] {
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  cursor: default;
  border-color: transparent;
}

/* ===== Seller Listing Thumbnail ===== */

.seller-listing-card {
  position: relative;
  overflow: hidden;
}

.seller-listing-thumb {
  width: 72px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  float: left;
  margin-right: var(--space-3);
  margin-bottom: var(--space-2);
}

/* ===== Empty State Actions ===== */

.empty-state-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== Bulk Import Styles ===== */

.bulk-import-form {
  padding: var(--space-2) 0;
}

.bulk-import-form .listing-form-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.bulk-import-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  line-height: 1.5;
}

.bulk-upload-zone {
  position: relative;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  transition: border-color var(--transition-interactive),background var(--transition-interactive);
}

.bulk-upload-zone:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
}

.bulk-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.bulk-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  pointer-events: none;
  color: var(--color-text-muted);
}

.bulk-upload-label svg {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
}

.bulk-upload-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.bulk-divider {
  text-align: center;
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  margin: var(--space-4) 0;
  position: relative;
}

.bulk-divider::before,
.bulk-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 60px);
  height: 1px;
  background: var(--color-divider);
}

.bulk-divider::before {
  left: 0;
}

.bulk-divider::after {
  right: 0;
}

.bulk-csv-textarea {
  font-family: 'Courier New',monospace;
  font-size: var(--text-xs);
  line-height: 1.5;
}

.bulk-preview {
  margin-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-4);
}

.bulk-warnings {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-error-highlight);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}

.bulk-warnings svg {
  color: var(--color-error);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.bulk-warning-text {
  font-size: var(--text-xs);
  color: var(--color-error);
  margin: 0;
}

.bulk-preview-summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-success);
  margin-bottom: var(--space-3);
}

.bulk-preview-summary svg {
  width: 18px;
  height: 18px;
}

.bulk-preview-table-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.bulk-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-xs);
}

.bulk-preview-table th {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--color-surface-offset);
  border-bottom: 1px solid var(--color-border);
}

.bulk-preview-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}

.bulk-preview-table tbody tr:hover {
  background: var(--color-surface-offset);
}

.bulk-settings {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.bulk-settings h4 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.bulk-progress {
  margin-top: var(--space-4);
}

.bulk-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.bulk-progress-fill {
  height: 100%;
  background: linear-gradient(90deg,var(--color-primary),var(--color-success));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.bulk-progress-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  text-align: center;
}

/* ===== Step-Based Listing Form (lf-*) ===== */

.lf {
  padding: var(--space-2) 0;
  max-width: 720px;
}

.lf-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-4);
}

.lf-step-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.lf-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: var(--text-sm);
  border: 2px solid var(--color-border);
  transition: all var(--transition-interactive);
}

.lf-step-num.done {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
}

.lf-step-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 2px;
}

.lf-step-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Step 1: Search row */

.lf-search-row {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}

.lf-search-input {
  font-size: var(--text-base);
}

.lf-confirmed-card {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-success-highlight);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
}

.lf-confirmed-check {
  color: var(--color-success);
  font-weight: 700;
  font-size: var(--text-base);
}

/* Step 2: Printings */

.lf-printings-wrap {
  margin-top: var(--space-3);
}

.lf-printings-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-divider);
}

.lf-printings-count {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
}

.lf-view-toggle {
  display: flex;
  gap: var(--space-1);
}

.lf-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-interactive);
}

.lf-view-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.lf-view-btn.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.lf-view-btn svg {
  width: 14px;
  height: 14px;
}

/* Grid view */

.lf-pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(130px,1fr));
  gap: var(--space-3);
}

.lf-pgrid-card {
  background: var(--color-surface-2);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-interactive),box-shadow var(--transition-interactive),transform var(--transition-interactive);
  position: relative;
}

.lf-pgrid-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.lf-pgrid-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.lf-pgrid-img {
  width: 100%;
  aspect-ratio: 745/1040;
  object-fit: cover;
  display: block;
}

.lf-pgrid-img-ph {
  width: 100%;
  aspect-ratio: 745/1040;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-offset);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-faint);
}

.lf-pgrid-body {
  padding: var(--space-2);
}

.lf-pgrid-set {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lf-pgrid-meta {
  display: flex;
  gap: var(--space-1);
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 2px;
  flex-wrap: wrap;
}

.lf-pgrid-price {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.lf-pgrid-check {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: 10px;
  font-weight: 700;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
}

/* List view */

.lf-plist {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lf-plist-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  transition: background var(--transition-interactive);
  border-bottom: 1px solid var(--color-divider);
  position: relative;
}

.lf-plist-row:last-child {
  border-bottom: none;
}

.lf-plist-row:hover {
  background: var(--color-surface-offset);
}

.lf-plist-row.selected {
  background: var(--color-primary-highlight);
}

.lf-plist-thumb {
  width: 32px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.lf-plist-info {
  flex: 1;
  min-width: 0;
}

.lf-plist-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lf-plist-meta {
  display: flex;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.lf-plist-prices {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
  min-width: 60px;
}

.lf-plist-check {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-primary);
  font-weight: 700;
  font-size: var(--text-sm);
}

/* Step 3: Selected card summary */

.lf-selected-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3);
  background: var(--color-primary-highlight);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.lf-selected-img {
  width: 80px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.lf-selected-info {
  flex: 1;
  min-width: 0;
}

.lf-selected-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
}

.lf-selected-set {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1);
}

/* Actions row */

.lf-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
}

/* Loading / error states */

.lf-printings-loading {
  padding: var(--space-6) var(--space-4);
  text-align: center;
}

.lf-loading-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}

.lf-printings-error {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  color: var(--color-error);
  font-size: var(--text-sm);
  margin-top: var(--space-3);
}

.lf-printings-error svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* Responsive: tighter padding on mobile */

@media(max-width:600px) {
  .lf-section {
    padding: var(--space-3);
  }

  .lf-pgrid {
    grid-template-columns: repeat(auto-fill,minmax(100px,1fr));
  }

  .lf-selected-card {
    flex-direction: column;
    text-align: center;
  }

  .lf-selected-img {
    width: 120px;
  }
}

/* ==============================
   ORDERS PAGE (My Orders list)
   ============================== */

.orders-page {
  padding-block: var(--space-8);
}

.orders-header {
  margin-bottom: var(--space-6);
}

.orders-subheading {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: calc(-1 * var(--space-4));
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.order-list-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: border-color var(--transition-interactive),box-shadow var(--transition-interactive),transform var(--transition-interactive);
  color: var(--color-text);
}

.order-list-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.order-list-card-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.order-list-card-left {
  flex-shrink: 0;
  min-width: 160px;
}

.order-list-card-id {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.order-list-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

.order-list-id-value {
  font-family: monospace;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.03em;
}

.order-list-card-date {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-1);
}

.order-list-card-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.order-list-card-items {
  font-size: var(--text-sm);
  font-weight: 500;
}

.order-list-card-fulfillment {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.order-list-card-right {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}

.order-list-card-total {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
}

.order-list-card-arrow {
  font-size: var(--text-xl);
  color: var(--color-text-faint);
  flex-shrink: 0;
  margin-left: var(--space-2);
  transition: color var(--transition-interactive);
}

.order-list-card:hover .order-list-card-arrow {
  color: var(--color-primary);
}

/* Order status badges (used in OrdersView + OrderConfirmation) */

.order-status-reserved {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}

.order-status-confirmed {
  background: var(--color-success-highlight);
  color: var(--color-success);
}

.order-status-completed {
  background: var(--color-success-highlight);
  color: var(--color-success);
}

.order-status-cancelled {
  background: var(--color-error-highlight);
  color: var(--color-error);
}

/* ==============================
   CHECKOUT CONFIRM MODAL
   ============================== */

.checkout-confirm-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.65);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: modalFadeIn 200ms cubic-bezier(0.16,1,0.3,1);
}

.checkout-confirm-modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-8);
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp 250ms cubic-bezier(0.16,1,0.3,1);
}

.checkout-confirm-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-3);
}

.checkout-confirm-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.checkout-confirm-message {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-2);
}

.checkout-confirm-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
  font-size: var(--text-sm);
}

.checkout-confirm-total strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-primary);
}

.checkout-confirm-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.checkout-confirm-actions .btn {
  flex: 1;
}

/* ==============================
   CHECKOUT RESERVE INFO BOX
   ============================== */

.checkout-reserve-info {
  background: var(--color-primary-highlight);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.checkout-reserve-info-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.checkout-reserve-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: var(--space-1);
}

.checkout-reserve-title {
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
}

.checkout-reserve-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Mobile adjustments for Orders */

@media (max-width:767px) {
  .order-list-card-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .order-list-card-left {
    min-width: unset;
  }

  .order-list-card-right {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    justify-content: space-between;
  }

  .order-list-card-arrow {
    display: none;
  }

  .checkout-confirm-modal {
    padding: var(--space-5);
  }
}

/* SumUp checkout + payment method selector */

.checkout-payment-methods {
  margin-bottom: var(--space-6);
}

.checkout-payment-methods-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
}

#sumup-card-container {
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ── PayPal Checkout Styles ── */
.spinner-light {
  border-color: rgba(255,255,255,0.3);
  border-top-color: #fff;
}

/* ── Stripe Checkout Styles ── */
.checkout-stripe-section {
  margin-top: var(--space-5);
  padding: var(--space-5);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.checkout-stripe-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.checkout-stripe-error {
  padding: var(--space-4);
  background: rgba(220,38,38,0.08);
  border-radius: var(--radius-md);
  color: var(--color-error);
  font-size: var(--text-sm);
  margin-top: var(--space-3);
}

.checkout-stripe-submit {
  margin-top: var(--space-5);
  width: 100%;
}

#stripe-payment-element {
  min-height: 200px;
}

/* ── Seller Stripe Card ── */
.seller-stripe-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.seller-stripe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.seller-stripe-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.seller-stripe-connected {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Seller payouts / analytics */
/* ===== Card Section + Carousel ===== */

.card-section {
  margin-bottom: var(--space-10);
  padding-top: var(--space-2);
}

.card-section-header {
  margin-bottom: var(--space-5);
}

.card-section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
}

.card-section-header h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: linear-gradient(180deg,var(--color-primary) 0%,oklch(from var(--color-primary) l c h / 0.3) 100%);
  border-radius: 2px;
  flex-shrink: 0;
}

.card-section-header h2 svg {
  width: 22px;
  height: 22px;
  color: var(--color-primary);
}

.card-section-sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-left: calc(4px + var(--space-3));
}

/* Carousel wrapper */

.carousel-wrap {
  position: relative;
}

/* Scroll track */

.carousel-track {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--space-2);
  scroll-padding-left: var(--space-1);
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track--skeleton {
  scrollbar-width: none;
  overflow: hidden;
}

.carousel-track--skeleton::-webkit-scrollbar {
  display: none;
}

/* Individual card in carousel */

.carousel-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  perspective: 800px;
  transition: box-shadow var(--transition-interactive),border-color var(--transition-interactive),transform var(--transition-interactive);
}

.carousel-card:hover {
  box-shadow: 0 0 20px oklch(from var(--color-primary) l c h / 0.15);
  border-color: oklch(from var(--color-primary) l c h / 0.4);
  transform: translateY(-3px);
}

/* Card image */

.carousel-card-image {
  aspect-ratio: 745/1040;
  background: var(--color-surface-offset);
  overflow: hidden;
  position: relative;
}

.carousel-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,var(--color-surface-offset) 0%,var(--color-surface-dynamic) 100%);
  z-index: 0;
}

.carousel-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

/* Card info */

.carousel-card-info {
  padding: var(--space-3);
}

.carousel-card-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  min-height: calc(var(--text-sm) * 1.3 * 2);
}

.carousel-card-set {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carousel-card-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}

.carousel-card-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  font-size: var(--text-sm);
}

.carousel-card-foil {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums lining-nums;
}

/* Arrow buttons */

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background var(--transition-interactive),border-color var(--transition-interactive),color var(--transition-interactive),box-shadow var(--transition-interactive),transform var(--transition-interactive);
}

.carousel-arrow:hover {
  background: var(--color-surface-offset);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-lg);
}

.carousel-arrow--left {
  left: calc(-1 * var(--space-5));
}

.carousel-arrow--right {
  right: calc(-1 * var(--space-5));
}

/* Skeleton in carousel track */

.carousel-track .skeleton-card {
  flex: 0 0 200px;
}

/* Edge fade hints */

.carousel-wrap::before,
.carousel-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: var(--space-2);
  width: 24px;
  z-index: 3;
  pointer-events: none;
}

.carousel-wrap::before {
  left: 0;
  background: linear-gradient(to right,var(--color-bg),transparent);
  opacity: 0;
}

.carousel-wrap::after {
  right: 0;
  background: linear-gradient(to left,var(--color-bg),transparent);
}

@media(max-width:767px) {
  .carousel-arrow {
    display: none;
  }

  .carousel-card {
    flex: 0 0 170px;
  }

  .carousel-arrow--left,
  .carousel-arrow--right {
    display: none;
  }

  .card-section-header h2 {
    font-size: var(--text-lg);
  }
}

@media(min-width:1024px) {
  .carousel-card {
    flex: 0 0 220px;
  }
}

/* ===== ToS Gate ===== */

/* ===== ToS Banner (browsewrap notice) ===== */

.tos-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

.tos-banner-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0;
}

.tos-banner-link {
  color: var(--color-primary);
  text-decoration: underline;
}

.tos-banner-btn {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .tos-banner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-2);
    padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
  }
}

/* ===== ToS Checkbox ===== */

.tos-checkbox-group {
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

.tos-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.tos-checkbox-input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--color-brand);
  flex-shrink: 0;
}

.tos-checkbox-text a {
  color: var(--color-brand);
  text-decoration: underline;
}

.tos-checkbox-text a:hover {
  opacity: 0.8;
}

/* ── Import Tabs ── */
.import-tabs {
  display: flex;
  gap: var(--space-1);
  padding: 0 0 var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
}

.import-tab {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: var(--transition-interactive);
}

.import-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.import-tab--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-bg);
  font-weight: 600;
}

/* ── Portfolio Import Button ── */
.portfolio-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-2);
}

.portfolio-header-row .page-heading {
  margin-bottom: 0;
}

.portfolio-import-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.portfolio-import-btn svg {
  width: 16px;
  height: 16px;
}

.portfolio-empty-import-btn {
  background: var(--color-primary);
  color: var(--color-bg);
  font-weight: 600;
  font-size: var(--text-base);
  padding: var(--space-3) var(--space-6);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border-radius: var(--radius-md);
  transition: var(--transition-interactive);
}

.portfolio-empty-import-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.portfolio-empty-import-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Import Modal ── */
.import-modal-overlay {
  z-index: 10000;
  padding: max(var(--space-4), env(safe-area-inset-top)) var(--space-4) max(var(--space-4), env(safe-area-inset-bottom));
  -webkit-backdrop-filter: blur(4px);
  overscroll-behavior: contain;
}

.import-modal {
  width: min(100%, 600px);
  max-width: 600px;
  max-height: min(85vh, calc(100dvh - 2 * var(--space-4)));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateZ(0);
}

.import-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.import-modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
}

.import-modal-close {
  color: var(--color-text-muted);
}

.import-modal-close:hover {
  color: var(--color-text);
}

.import-modal-body {
  padding: var(--space-6);
}

.import-modal-body .import-tabs {
  margin-bottom: var(--space-4);
}

.import-modal-body .form-group {
  margin-bottom: var(--space-4);
}

.import-modal-body .bulk-preview {
  margin-top: var(--space-4);
}

.import-modal-body .listing-form-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

@media (max-width: 767px) {
  .import-modal-overlay {
    align-items: flex-start;
    padding-top: max(var(--space-6), env(safe-area-inset-top));
  }

  .import-modal {
    width: 100%;
    max-width: 100%;
    max-height: min(90vh, calc(100dvh - var(--space-8)));
    border-radius: var(--radius-lg);
  }

  .import-modal-header {
    padding: var(--space-4);
  }

  .import-modal-body {
    padding: var(--space-4);
  }

}

/* ══════════════════════════════════════════════
   PORTFOLIO v58 — Binders, Conditions, Lists
   ══════════════════════════════════════════════ */

/* ── Portfolio Tabs (Collection / Lists) ── */
/* ── Header actions row ── */
.pf-header-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

/* ── Toolbar: binder chips + group-by ── */
.pf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.pf-binder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.pf-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-xs);
  font-family: var(--font-body);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition-interactive);
  white-space: nowrap;
}

.pf-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.pf-chip--active {
  background: var(--color-primary);
  color: var(--color-bg);
  border-color: var(--color-primary);
  font-weight: 600;
}

.pf-chip--add {
  border-style: dashed;
  color: var(--color-primary);
}

.pf-chip-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

.pf-chip-delete {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 0 0 var(--space-1);
  opacity: 0.6;
}

.pf-chip-delete:hover {
  opacity: 1;
  color: var(--color-danger);
}

/* ── Group-by control ── */
.pf-group-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.pf-group-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ── Condition select ── */
.cond-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px 20px 2px 6px;
  font-size: var(--text-xs);
  font-family: var(--font-body);
  color: var(--color-text);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  min-width: 52px;
}

.cond-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.binder-select {
  min-width: 100px;
}

.cond-select-inline {
  height: 36px;
  font-size: var(--text-sm);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left: none;
}

/* ── Condition badges ── */
.cond-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.cond-badge--nm  { background: rgba(34,197,94,0.15); color: #22c55e; }
.cond-badge--lp  { background: rgba(234,179,8,0.15); color: #eab308; }
.cond-badge--mp  { background: rgba(249,115,22,0.15); color: #f97316; }
.cond-badge--hp  { background: rgba(239,68,68,0.15); color: #ef4444; }
.cond-badge--dmg { background: rgba(239,68,68,0.25); color: #dc2626; }

/* ── Grouped tables ── */
.pf-grouped-tables {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.pf-group-section {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.pf-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.pf-group-name {
  font-size: var(--text-sm);
  font-weight: 600;
  margin: 0;
}

.pf-group-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.pf-group-section .portfolio-table-wrapper {
  overflow-x: auto;
}

.pf-group-section .portfolio-table {
  border-radius: 0;
}

/* ── Card detail track group ── */
.card-track-group {
  display: inline-flex;
  align-items: stretch;
}

.card-track-group .btn {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

/* ── Card detail list dropdown ── */
.card-list-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: var(--space-1) 0;
  margin-top: var(--space-1);
}

.card-list-dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-interactive);
}

.card-list-dropdown-item:hover {
  background: var(--color-primary);
  color: var(--color-bg);
}

/* ── Lists panel ── */
.pf-lists-panel,
.pf-lists-detail {
  margin-top: var(--space-4);
}

.pf-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.pf-panel-header h3 {
  margin: 0;
  font-size: var(--text-lg);
}

.pf-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-3);
}

.pf-list-card {
  position: relative;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-interactive);
}

.pf-list-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.pf-list-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.pf-list-card-name {
  font-weight: 600;
  font-size: var(--text-sm);
}

.pf-list-type-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: rgba(212, 168, 67, 0.15);
  color: var(--color-primary);
}

.pf-list-card-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.pf-list-delete {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  opacity: 0;
  transition: var(--transition-interactive);
}

.pf-list-card:hover .pf-list-delete {
  opacity: 1;
}

.pf-list-name {
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}

/* ── List type selector buttons ── */
.pf-type-selector {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.pf-type-btn {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-xs);
  font-family: var(--font-body);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition-interactive);
}

.pf-type-btn:hover {
  border-color: var(--color-primary);
}

.pf-type-btn--active {
  background: var(--color-primary);
  color: var(--color-bg);
  border-color: var(--color-primary);
}

/* ── Mobile responsive ── */
@media (max-width: 767px) {
  .pf-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .pf-binder-chips {
    overflow-x: auto;
    flex-wrap: nowrap;
    max-width: 100%;
    padding-bottom: var(--space-2);
    -webkit-overflow-scrolling: touch;
  }

  .portfolio-table th:nth-child(n+4),
  .portfolio-table td:nth-child(n+4) {
    /* Keep first 3 columns visible on mobile */
  }

  .card-track-group {
    flex-wrap: wrap;
  }

  .card-track-group .btn {
    border-radius: var(--radius-sm);
  }

  .cond-select-inline {
    border-radius: var(--radius-sm);
    border-left: 1px solid var(--color-border);
    margin-top: var(--space-1);
  }

  .pf-list-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   SCANNER VIEW
   ======================================== */

.scanner-page {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
  min-height: 60vh;
}

/* --- Hero / Landing --- */
.scanner-hero {
  text-align: center;
  padding: var(--space-12) 0 var(--space-8);
}

.scanner-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  background: oklch(from var(--color-primary) l c h / 0.12);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.scanner-hero-icon svg {
  width: 36px;
  height: 36px;
}

.scanner-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.scanner-subtitle {
  color: var(--color-text-secondary);
  font-size: var(--text-md);
  max-width: 480px;
  margin: 0 auto var(--space-8);
  line-height: 1.6;
}

/* --- Action Buttons --- */
.scanner-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.scanner-start-btn,
.scanner-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-md);
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-interactive);
}

.scanner-start-btn {
  background: var(--color-primary);
  color: var(--color-bg);
  border: none;
}

.scanner-start-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.scanner-start-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.scanner-start-btn svg,
.scanner-upload-btn svg {
  width: 20px;
  height: 20px;
}

.scanner-upload-btn {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.scanner-upload-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* --- Tips --- */
.scanner-tips {
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
  padding: var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.scanner-tips h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.scanner-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.scanner-tips li {
  position: relative;
  padding-left: var(--space-5);
  padding-bottom: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.scanner-tips li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

/* --- Camera View --- */
.scanner-camera-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #000;
  aspect-ratio: 3 / 4;
}

.scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Guide Overlay --- */
.scanner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.scanner-guide {
  position: relative;
  width: 80%;
  aspect-ratio: 5 / 7;
  max-height: 70%;
}

.scanner-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--color-primary);
  border-style: solid;
  border-width: 0;
}

.scanner-corner-tl {
  top: 0;
  left: 0;
  border-top-width: 3px;
  border-left-width: 3px;
  border-top-left-radius: 8px;
}

.scanner-corner-tr {
  top: 0;
  right: 0;
  border-top-width: 3px;
  border-right-width: 3px;
  border-top-right-radius: 8px;
}

.scanner-corner-bl {
  bottom: 0;
  left: 0;
  border-bottom-width: 3px;
  border-left-width: 3px;
  border-bottom-left-radius: 8px;
}

.scanner-corner-br {
  bottom: 0;
  right: 0;
  border-bottom-width: 3px;
  border-right-width: 3px;
  border-bottom-right-radius: 8px;
}

.scanner-guide-text {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* --- Camera Controls --- */
.scanner-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.scanner-control-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-interactive);
}

.scanner-control-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.scanner-capture-btn {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 4px solid #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-interactive);
}

.scanner-capture-ring {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: #fff;
  transition: var(--transition-interactive);
}

.scanner-capture-btn:hover .scanner-capture-ring {
  background: var(--color-primary);
}

.scanner-capture-btn:active .scanner-capture-ring {
  transform: scale(0.9);
}

/* --- Processing State --- */
.scanner-processing {
  position: relative;
  max-width: 400px;
  margin: var(--space-8) auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.scanner-captured-img {
  width: 100%;
  display: block;
  border-radius: var(--radius-xl);
}

.scanner-processing-overlay {
  position: absolute;
  inset: 0;
  background: oklch(from var(--color-bg) l c h / 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

.scanner-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: var(--radius-full);
  animation: scanner-spin 0.8s linear infinite;
}

@keyframes scanner-spin {
  to { transform: rotate(360deg); }
}

.scanner-status {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* --- Error State --- */
.scanner-error {
  text-align: center;
  padding: var(--space-12) var(--space-4);
}

.scanner-error-icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
}

.scanner-error h2 {
  font-family: var(--font-display);
  margin-bottom: var(--space-2);
}

.scanner-error p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.scanner-error-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Results State --- */
.scanner-results {
  padding: var(--space-6) 0;
}

.scanner-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.scanner-results-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
}

.scanner-results-actions {
  display: flex;
  gap: var(--space-2);
}

.scanner-results-actions .btn-primary,
.scanner-results-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-interactive);
}

.scanner-results-actions .btn-primary {
  background: var(--color-primary);
  color: var(--color-bg);
  border: none;
  font-weight: 600;
}

.scanner-results-actions .btn-primary:hover {
  background: var(--color-primary-hover);
}

.scanner-results-actions .btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.scanner-results-actions .btn-secondary:hover {
  border-color: var(--color-primary);
}

.scanner-results-actions svg {
  width: 16px;
  height: 16px;
}

/* --- Match Strategy Badge --- */
.scanner-strategy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: oklch(from var(--color-primary) l c h / 0.12);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.25);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.scanner-strategy-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}

.scanner-status-msg {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

/* --- Preview Thumbnail --- */
.scanner-preview-row {
  margin-bottom: var(--space-5);
}

.scanner-preview-thumb {
  width: 120px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

/* --- Match Cards --- */
.scanner-match-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.scanner-match-grid {
  display: grid;
  gap: var(--space-4);
}

.scanner-match-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-interactive);
}

.scanner-match-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.scanner-match-card--best {
  border-color: oklch(from var(--color-primary) l c h / 0.4);
  background: oklch(from var(--color-primary) l c h / 0.05);
}

.scanner-match-img {
  width: 120px;
  height: auto;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.scanner-match-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.scanner-match-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0;
}

.scanner-match-set {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

.scanner-match-details {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin: 0;
}

.scanner-match-price {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  margin: var(--space-1) 0 0;
}

.scanner-match-link {
  font-size: var(--text-sm);
  color: var(--color-primary);
  margin-top: auto;
}

/* --- Scan History --- */
.scanner-history {
  margin-top: var(--space-8);
}

.scanner-history h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.scanner-history--compact {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.scanner-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
}

.scanner-history-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-interactive);
}

.scanner-history-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.scanner-history-card img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  display: block;
}

.scanner-history-info {
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scanner-history-name {
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scanner-history-price {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 600;
}

/* --- Mobile Responsive --- */
@media (max-width: 767px) {
  .scanner-page {
    padding: var(--space-4) var(--space-3);
  }

  .scanner-hero {
    padding: var(--space-6) 0 var(--space-4);
  }

  .scanner-camera-container {
    border-radius: var(--radius-lg);
    max-width: 100%;
  }

  .scanner-match-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .scanner-match-img {
    width: 160px;
  }

  .scanner-match-info {
    align-items: center;
  }

  .scanner-results-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .scanner-history-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

/* ── Utility classes (added v64 — replaces repeated inline styles) ── */
.u-link-primary { color: var(--color-primary); text-decoration: underline; }
.u-flex-shrink-0 { flex-shrink: 0; }
/* ═══════════════════════════════════════════
   FAQ Page
   ═══════════════════════════════════════════ */
.faq-page {
  max-width: 780px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-4);
}
.faq-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.faq-intro {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-8);
  line-height: 1.6;
}
.faq-section {
  margin-bottom: var(--space-8);
}
.faq-section-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
  color: var(--color-primary);
}
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-interactive);
}
.faq-item:hover {
  border-color: var(--color-primary);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4);
  font-weight: 600;
  font-size: var(--text-sm);
  user-select: none;
}
.faq-chevron {
  font-size: 10px;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}
.faq-chevron--open {
  transform: rotate(90deg);
}
.faq-answer {
  padding: 0 var(--space-4) var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.7;
}
.faq-footer {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.faq-footer a {
  color: var(--color-primary);
  text-decoration: underline;
}
.cd-jtcg-fallback {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}
@media (max-width: 767px) {
  .faq-page { padding: var(--space-4) var(--space-3); }
  .faq-title { font-size: var(--text-xl); }
}

/* ── Legal table (Privacy Policy cookie table) ── */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
  font-size: var(--text-sm);
}

.legal-table th,
.legal-table td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.legal-table th {
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.legal-table td {
  color: var(--color-text);
}

.legal-table tr:last-child td {
  border-bottom: none;
}

/* ── Checkout dispute notice ── */
.checkout-dispute-notice {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.checkout-dispute-notice a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ══════════════════════════════════════════════
   Skeleton shimmer animation for card images
   ══════════════════════════════════════════════ */

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.mtg-card-image::before,
.carousel-card-image::before,
.card-detail-image::before,
.printing-img-wrap::before {
  background: linear-gradient(
    90deg,
    var(--color-surface-offset) 25%,
    var(--color-surface-dynamic) 50%,
    var(--color-surface-offset) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

.card-detail-image::before,
.printing-img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}

.card-detail-image {
  position: relative;
  overflow: hidden;
}

/* ── Image fallback placeholder (when Scryfall is unreachable) ── */

.img-fallback-name {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-surface-offset);
  z-index: 2;
  word-break: break-word;
  line-height: 1.3;
}

/* ── v94: Reserved List Badge ── */

.rl-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  vertical-align: middle;
  margin-left: 6px;
  line-height: 1.4;
  white-space: nowrap;
}

.rl-badge--detail {
  font-size: var(--text-xs);
  padding: 2px 10px;
  margin-left: 8px;
  letter-spacing: 0.06em;
}

/* ── v94: Price Alert Form (Card Detail) ── */

.cd-alert-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-top: var(--space-3);
}

.cd-alert-title {
  font-size: var(--text-sm);
  font-weight: 600;
  margin: 0 0 var(--space-3) 0;
  color: var(--color-text);
}

.cd-alert-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.cd-alert-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.cd-alert-select {
  padding: 4px 8px;
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-offset);
  color: var(--color-text);
}

.cd-alert-input-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-offset);
  padding: 0 8px;
}

.cd-alert-dollar {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.cd-alert-input {
  border: none;
  background: transparent;
  font-size: var(--text-sm);
  color: var(--color-text);
  width: 80px;
  padding: 4px 0;
  outline: none;
}

.cd-alert-input:focus {
  outline: none;
}

.cd-alert-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: var(--space-2) 0 0 0;
}

.cd-alert-hint--warn {
  color: var(--color-warning, #f59e0b);
}

.cd-alert-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

.btn-alert-active {
  color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

/* ── v94: Ticker Percentage Change ── */

.ticker-change {
  font-size: 0.65rem;
  font-weight: 600;
  margin-left: 4px;
  white-space: nowrap;
}

.ticker-up {
  color: var(--color-success, #22c55e);
}

.ticker-down {
  color: var(--color-error, #ef4444);
}

/* ── v94: Market Movers Reserved List Filter ── */

.mv-filters {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.mv-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--text-sm);
  user-select: none;
}

.mv-filter-toggle input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.mv-filter-label {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ══════════════════════════════════════════
 * Shop / Storefront Page
 * ══════════════════════════════════════════ */

.shop-page {
  max-width: 900px;
  padding-top: var(--space-8);
  padding-bottom: var(--space-12);
}

.shop-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.shop-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.shop-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}

.shop-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-interactive);
}

.shop-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.shop-card-body {
  flex: 1;
  margin-bottom: var(--space-4);
}

.shop-card-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.shop-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}

.shop-card-price {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-success);
}

.shop-buy-btn {
  width: 100%;
}

.shop-footer {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.shop-link-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

@media (max-width: 767px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }
  .shop-link-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Availability badges */
.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.avail-badge--available {
  background: color-mix(in srgb, var(--color-success) 15%, transparent);
  color: var(--color-success);
}

.avail-badge--low-stock {
  background: color-mix(in srgb, var(--color-warning) 15%, transparent);
  color: var(--color-warning);
}

.avail-badge--sold-out {
  background: color-mix(in srgb, var(--color-error) 15%, transparent);
  color: var(--color-error);
}

/* Stock inline editor */
.stock-editor {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
}

.stock-editor input {
  width: 50px;
  padding: 2px 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-xs);
  text-align: center;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Waitlist inline form */
.waitlist-form {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.waitlist-form input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
}

.waitlist-form button {
  white-space: nowrap;
}

.waitlist-success {
  font-size: var(--text-xs);
  color: var(--color-success);
  margin-top: var(--space-1);
}

/* Waitlist tab table */
.waitlist-table {
  width: 100%;
  border-collapse: collapse;
}

.waitlist-table th,
.waitlist-table td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.waitlist-table th {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Search page — in-stock listings grid */
.search-instock {
  margin-bottom: var(--space-6);
}

.search-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
}

.search-listing-card {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: var(--transition-interactive);
}

.search-listing-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.search-listing-img {
  width: 80px;
  height: 112px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.search-listing-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.search-listing-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-listing-set {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.search-listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: auto;
}

.search-listing-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: var(--space-1);
}

.search-listing-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-success);
}

.search-listing-seller {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

@media (max-width: 767px) {
  .search-listings-grid {
    grid-template-columns: 1fr;
  }
}

/* Modal — sticky footer for mobile */
.modal-box {
  display: flex;
  flex-direction: column;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding-bottom: var(--space-2);
}

.modal-footer {
  position: sticky;
  bottom: 0;
  background: var(--color-surface);
  z-index: 2;
  padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
}

/* ══════════════════════════════════════════════════
 * Utility classes — replace inline styles in JS
 * ══════════════════════════════════════════════════ */

/* ── Text ── */
.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }
.text-primary { color: var(--color-primary); }
.text-error { color: var(--color-error); }
.text-center { text-align: center; }
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.underline { text-decoration: underline; }

/* ── Spacing: margin ── */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.ml-1 { margin-left: var(--space-1); }
.ml-2 { margin-left: var(--space-2); }
.ml-auto { margin-left: auto; }

/* ── Spacing: padding ── */
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

/* ── Flex ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* ── Layout ── */
.w-full { width: 100%; }
.hidden { display: none; }
