/* /styles.css */
:root {
  color-scheme: dark;
  --bg: #0a0a0d;
  --bg-elevated: #131318;
  --bg-soft: #181820;
  --bg-card: #1a1a22;
  --bg-chip: #24242e;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --text-soft: #c4c4cc;
  --text-muted: #7e7e8a;
  --accent: #b667ff;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.16);
  --accent-glow: rgba(168, 85, 247, 0.45);
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #ff6b6b;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --header-height: 64px;
  --nav-height: 82px;
  --max-width: 1320px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 18% -10%, rgba(168, 85, 247, 0.18), transparent 40%),
    radial-gradient(circle at 90% 8%, rgba(124, 58, 237, 0.14), transparent 38%),
    linear-gradient(180deg, #08080b 0%, #0a0a0d 100%);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body {
  display: flex;
  justify-content: center;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(100%, var(--max-width));
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-height);
  padding: calc(var(--safe-top) + 16px) 18px 14px;
  background: linear-gradient(
    180deg,
    rgba(8, 8, 11, 0.96) 0%,
    rgba(8, 8, 11, 0.82) 68%,
    rgba(8, 8, 11, 0) 100%
  );
  backdrop-filter: blur(18px);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 200, 255, 0.25);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#header-title {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 22, 36, 0.82);
  color: var(--text-soft);
  font-size: 0.84rem;
  white-space: nowrap;
}

.sync-indicator::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 16px rgba(104, 211, 145, 0.4);
}

.sync-indicator.offline::before {
  background: var(--warning);
  box-shadow: 0 0 16px rgba(246, 199, 96, 0.35);
}

.icon-button,
.ghost-button,
.primary-button,
.secondary-button,
.segment-button,
.chip-button,
.inline-action,
.modal-link,
.stepper-button {
  transition:
    transform 0.14s ease,
    background 0.14s ease,
    border-color 0.14s ease,
    opacity 0.14s ease;
}

.icon-button:active,
.ghost-button:active,
.primary-button:active,
.secondary-button:active,
.segment-button:active,
.chip-button:active,
.inline-action:active,
.modal-link:active,
.stepper-button:active {
  transform: scale(0.98);
}

.icon-button,
.ghost-button,
.secondary-button,
.inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 22, 36, 0.84);
  color: var(--text);
}

.icon-button {
  width: 42px;
  padding: 0;
  font-size: 1.2rem;
}

.ghost-button:hover,
.secondary-button:hover,
.inline-action:hover,
.icon-button:hover {
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(36, 28, 52, 0.95);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #b667ff 0%, #8b5cf6 100%);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 28px var(--accent-glow);
}

.primary-button:hover {
  filter: brightness(1.08);
}

.secondary-button {
  padding: 0 18px;
}

.main-content {
  padding: 0 16px 30px;
}

.view {
  display: block;
}

.page-grid {
  display: grid;
  gap: 16px;
}

.hero-card,
.panel,
.stat-card,
.set-card,
.card-item,
.empty-state,
.settings-panel,
.detail-panel,
.missing-card,
.metric-card,
.summary-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.hero-card,
.panel,
.settings-panel {
  padding: 18px;
}

.hero-card {
  display: grid;
  gap: 16px;
  background:
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.18), transparent 42%),
    radial-gradient(circle at bottom left, rgba(124, 58, 237, 0.14), transparent 40%),
    linear-gradient(160deg, #1f1530 0%, #15131c 100%);
  border-color: rgba(168, 85, 247, 0.18);
}

.hero-card h2,
.panel-title-row h2,
.settings-panel h2,
.detail-panel h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  letter-spacing: -0.03em;
}

.hero-copy,
.muted,
.panel-copy,
.field-hint,
.empty-state p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.hero-actions,
.inline-actions,
.filter-stack,
.topline-actions,
.set-actions,
.settings-actions,
.modal-actions,
.export-actions,
.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stat-grid,
.metric-grid,
.summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card,
.metric-card,
.summary-card {
  padding: 16px;
}

.stat-label,
.metric-label,
.summary-label,
.field-label,
.modal-label {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-value,
.metric-value,
.summary-value {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.045em;
}

.progress-shell {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.panel-title-row,
.settings-head,
.set-head,
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.collection-grid,
.set-grid,
.card-grid,
.tracked-grid,
.missing-grid {
  display: grid;
  gap: 14px;
}

/* Perf: skip rendering offscreen tiles in long card/set grids */
.card-grid > *,
.set-grid > *,
.missing-grid > *,
.tracked-grid > * {
  content-visibility: auto;
  contain-intrinsic-size: 280px 240px;
}
.card-grid > * { contain-intrinsic-size: 240px 320px; }

.collection-grid,
.tracked-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.set-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

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

.missing-grid {
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

.set-card {
  padding: 16px;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.set-card-header,
.missing-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.set-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.set-logo {
  width: 78px;
  height: 42px;
  object-fit: contain;
  object-position: left center;
}

.set-symbol {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}

.set-name {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.set-subtitle,
.meta-line,
.card-rarity,
.card-setline,
.modal-meta,
.modal-updated,
.empty-kicker {
  color: var(--text-soft);
}

.set-subtitle,
.meta-line,
.card-rarity,
.card-setline,
.modal-meta,
.modal-updated {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.badge,
.pill,
.collection-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-chip);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.badge.badge-success {
  background: rgba(104, 211, 145, 0.16);
  color: #aaf2c3;
}

.badge.badge-warning {
  background: rgba(246, 199, 96, 0.16);
  color: #ffe5a6;
}

.badge.badge-danger {
  background: rgba(255, 122, 122, 0.14);
  color: #ffcbcb;
}

.collection-tag {
  background: rgba(168, 85, 247, 0.16);
  color: #d8b4fe;
}

.segmented-control,
.toolbar-grid,
.settings-grid,
.field-grid {
  display: grid;
  gap: 10px;
}

.segmented-control {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.segment-button {
  min-height: 44px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 700;
}

.segment-button.active {
  background: linear-gradient(135deg, #b667ff, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 6px 18px var(--accent-glow);
}

.toolbar-grid {
  grid-template-columns: 1.8fr 1fr 1fr;
}

.search-input,
.select-input,
.text-input,
.textarea-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(10, 15, 25, 0.78);
  color: var(--text);
  outline: none;
}

.textarea-input {
  min-height: 130px;
  padding-top: 14px;
  padding-bottom: 14px;
  resize: vertical;
}

.search-input:focus,
.select-input:focus,
.text-input:focus,
.textarea-input:focus {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.card-item {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.card-item.owned {
  background:
    radial-gradient(circle at top right, rgba(104, 211, 145, 0.12), transparent 30%),
    rgba(16, 22, 36, 0.9);
}

.card-item.missing {
  opacity: 1;
}

.card-art-button {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.card-art {
  width: 100%;
  aspect-ratio: 0.72;
  object-fit: cover;
  border-radius: 18px;
  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    opacity 0.18s ease;
}

.card-art-button:hover .card-art {
  transform: translateY(-2px);
}

.card-item.missing .card-art {
  filter: none;
  opacity: 1;
  mix-blend-mode: normal;
}

.card-check {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(104, 211, 145, 0.92);
  color: #04130a;
  font-size: 1rem;
  font-weight: 900;
}

.card-item.selectable {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-item.selectable .card-art-button,
.card-item.selectable .owned-toggle {
  pointer-events: none;
}

.card-item.selected {
  outline: 2px solid rgba(168, 85, 247, 0.9);
  outline-offset: -2px;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.25);
  transform: scale(0.98);
}

.card-select-mark {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(15, 22, 36, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
}

.card-select-mark.on {
  background: rgba(168, 85, 247, 0.95);
  border-color: rgba(168, 85, 247, 0.95);
}

.selection-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.selection-bar-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #ede9fe;
}

.selection-bar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.selection-link {
  background: transparent;
  border: none;
  padding: 4px 6px;
  color: #c4b5fd;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.selection-bar-sticky {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--nav-height, 82px) + var(--safe-bottom, 0px) + 12px);
  z-index: 60;
  margin: 0;
  backdrop-filter: blur(18px);
  background: rgba(30, 14, 55, 0.96);
  border: 1px solid rgba(168, 85, 247, 0.55);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.7);
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  max-width: 720px;
  margin-inline: auto;
}

.selection-bar-sticky .selection-bar-actions {
  justify-content: stretch;
}

.selection-bar-sticky .selection-bar-actions > button {
  flex: 1 1 auto;
  min-width: 0;
}

.selection-hint {
  margin: 8px 2px 0;
  font-size: 0.85rem;
  color: #c4b5fd;
  line-height: 1.4;
}

.selection-hint strong {
  color: #ede9fe;
}

body.selection-active {
  padding-bottom: 140px;
}

.card-content {
  display: grid;
  gap: 6px;
}

.card-title {
  margin: 0;
  font-size: 0.97rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.card-number-row,
.card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-number {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.85rem;
}

.card-price {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card-price-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.owned-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.18);
  color: #ede9fe;
  font-weight: 800;
}

.owned-toggle.owned {
  background: rgba(74, 222, 128, 0.18);
  color: #bbf7d0;
}

.owned-toggle.missing {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-soft);
}

.set-hero {
  display: grid;
  gap: 16px;
}

.set-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.set-hero-logo {
  width: 120px;
  max-width: 38vw;
  object-fit: contain;
  object-position: left center;
}

.set-headline {
  min-width: 0;
}

.set-headline h2 {
  margin: 0 0 6px;
  letter-spacing: -0.03em;
}

.set-info-row,
.quick-pills,
.modal-links,
.variant-list,
.small-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-pills {
  margin-top: 6px;
}

.missing-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.missing-card-body {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
}

.missing-thumb {
  width: 92px;
  aspect-ratio: 0.72;
  border-radius: 16px;
  object-fit: cover;
}

.price-emphasis {
  color: #ffd38b;
}

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

.settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.field-group {
  display: grid;
  gap: 8px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(10, 15, 25, 0.78);
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.empty-state {
  display: grid;
  gap: 12px;
  padding: 24px 20px;
  text-align: left;
}

.empty-state h3 {
  margin: 0;
  font-size: 1.1rem;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(14px + var(--safe-bottom));
  z-index: 30;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: min(calc(100% - 8px), 620px);
  padding: 6px 4px;
  transform: translateX(-50%) translateY(0);
  background: rgba(16, 16, 22, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 26px;
  backdrop-filter: blur(24px);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.bottom-nav.has-admin {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  width: min(calc(100% - 6px), 700px);
}

.bottom-nav.is-hidden {
  transform: translateX(-50%) translateY(calc(100% + 24px + var(--safe-bottom)));
  opacity: 0;
  pointer-events: none;
}

.nav-button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 48px;
  padding: 5px 2px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  transition: background-color 0.12s ease, color 0.12s ease, transform 0.08s ease;
}

.nav-button:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.05);
}

.nav-icon {
  display: inline-flex;
  width: 19px;
  height: 19px;
  line-height: 0;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
}

.nav-button.active {
  color: #5eead4;
  background: rgba(94, 234, 212, 0.14);
}

.nav-button.active .nav-icon {
  color: #5eead4;
}

.nav-dot {
  position: absolute;
  top: 4px;
  right: 8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.95);
  pointer-events: none;
  letter-spacing: 0;
}

@media (max-width: 480px) {
  .nav-button { font-size: 0.5rem; padding: 4px 1px; gap: 1px; }
  .nav-icon { width: 16px; height: 16px; }
  .nav-avatar { width: 22px; height: 22px; }
  .nav-avatar svg { width: 14px; height: 14px; }
  .bottom-nav { padding: 5px 3px; gap: 0; }
  .bottom-nav.has-admin .nav-button { font-size: 0.44rem; padding: 4px 0; }
  .bottom-nav.has-admin .nav-icon { width: 14px; height: 14px; }
}
@media (max-width: 380px) {
  .nav-button { font-size: 0.46rem; }
  .nav-icon { width: 14px; height: 14px; }
  .bottom-nav.has-admin .nav-button { font-size: 0.4rem; }
  .bottom-nav.has-admin .nav-icon { width: 13px; height: 13px; }
}

.card-modal {
  width: min(760px, calc(100vw - 24px));
  max-width: 760px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(9, 14, 24, 0.98);
  color: var(--text);
  box-shadow: var(--shadow);
}

.card-modal::backdrop {
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(8px);
}

.modal-close-x {
  position: sticky;
  top: 8px;
  margin-left: auto;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 22, 36, 0.85);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
}
.modal-close-x:hover,
.modal-close-x:focus-visible {
  background: rgba(30, 42, 66, 0.95);
  outline: none;
}

.modal-layout {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.modal-layout img {
  width: 100%;
  max-width: 280px;
  border-radius: 22px;
  justify-self: center;
}

.detail-panel {
  padding: 18px;
}

.variant-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

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

.variant-table th,
.variant-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.variant-table th {
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-link {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
}

.modal-link.primary-link {
  background: rgba(100, 215, 255, 0.14);
  border: 1px solid rgba(100, 215, 255, 0.2);
}

.toast-container {
  position: fixed;
  right: 16px;
  bottom: calc(92px + var(--safe-bottom));
  z-index: 40;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(16, 22, 36, 0.96);
  box-shadow: var(--shadow);
  color: var(--text);
}

.toast.toast-error {
  border-color: rgba(255, 122, 122, 0.3);
}

.toast.toast-success {
  border-color: rgba(104, 211, 145, 0.3);
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
}

@media (min-width: 720px) {
  .main-content {
    padding: 4px 24px 40px;
  }

  .modal-layout {
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: start;
  }

  .stat-grid,
  .metric-grid,
  .summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .field-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  .toolbar-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .header-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .sync-indicator {
    min-height: 36px;
    padding: 0 12px;
  }

  .set-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-title-row,
  .set-head,
  .settings-head,
  .modal-header {
    flex-direction: column;
  }
}

@media (max-width: 499px) {
  .app-header {
    padding-left: 14px;
    padding-right: 14px;
  }

  .main-content {
    padding-left: 12px;
    padding-right: 12px;
  }

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

  .stat-grid,
  .metric-grid,
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .missing-grid {
    grid-template-columns: 1fr;
  }

  .missing-card-body {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .missing-thumb {
    width: 74px;
  }
}

/* ===== Portfolio snapshot (Collectr-style home) ===== */
.portfolio-snapshot {
  background: linear-gradient(180deg, #0d1117 0%, #0a0d12 100%);
  border-radius: 22px;
  padding: 22px 20px 18px;
  color: #f1f5f9;
  border: 1px solid rgba(123, 231, 214, 0.08);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.6);
}
.portfolio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.portfolio-title {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
}
.portfolio-label { color: #f1f5f9; }
.portfolio-label-accent { color: #7be7d6; margin-left: 4px; }
.portfolio-currency {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255,255,255,0.06);
  padding: 4px 10px;
  border-radius: 999px;
}
.portfolio-value {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-top: 2px;
}
.portfolio-delta {
  color: #7be7d6;
  font-size: 13px;
  margin-top: 4px;
}
.portfolio-chart {
  margin: 14px -4px 8px;
  height: 160px;
  position: relative;
}
.portfolio-chart-inner {
  position: relative;
  width: 100%;
  height: 100%;
}
.portfolio-sparkline {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
  cursor: crosshair;
}
.portfolio-tooltip {
  position: absolute;
  top: -4px;
  transform: translate(-50%, -100%);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 10px;
  padding: 6px 10px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  z-index: 2;
}
.portfolio-tooltip[hidden] { display: none; }
.portfolio-tooltip-value {
  color: #f1f5f9;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
}
.portfolio-tooltip-label {
  color: #94a3b8;
  font-size: 11px;
  margin-top: 2px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.portfolio-chart-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
  padding: 0 24px;
}
.portfolio-range-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 4px;
  margin: 6px 0 14px;
  font-size: 13px;
  color: #94a3b8;
}
.portfolio-range {
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}
.portfolio-range:hover { color: #f1f5f9; }
.portfolio-range:active { transform: scale(0.96); }
.portfolio-range.active {
  background: linear-gradient(135deg, #b667ff, #8b5cf6);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.portfolio-most-valuable {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 14px 14px 6px;
}
.portfolio-most-valuable h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
}
/* Clickable metric / summary cards on dashboard */
button.metric-card,
button.summary-card {
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
button.metric-card:hover,
button.summary-card:hover,
button.metric-card:focus-visible,
button.summary-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(123,231,214,0.45);
  outline: none;
}
button.metric-card:active,
button.summary-card:active { transform: translateY(0); }

/* Make the mv-row a real button so it's tappable on mobile */
button.mv-row {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
button.mv-row:last-of-type { border-bottom: none; }

/* Tappable portfolio value block */
.portfolio-value-button {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.portfolio-value-button:focus-visible { outline: 2px solid rgba(123,231,214,0.55); outline-offset: 4px; border-radius: 12px; }

/* ============== Auth gate ============== */
.auth-root {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 30% 10%, #1d2740 0%, #0b1020 60%, #07091a 100%);
  z-index: 1000;
  overflow-y: auto;
}
.auth-root.hidden { display: none; }
#app-shell.hidden { display: none; }

.auth-card {
  width: 100%;
  max-width: 380px;
  background: rgba(20, 26, 46, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  color: #e8ecf6;
  backdrop-filter: blur(8px);
}
.auth-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.auth-sub {
  margin: 0 0 20px;
  color: rgba(232,236,246,0.7);
  font-size: 14px;
  line-height: 1.5;
}
.auth-tabs {
  display: flex;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: rgba(232,236,246,0.65);
  font-weight: 600;
  font-size: 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.auth-tab.active {
  background: rgba(123,231,214,0.18);
  color: #b6f3e3;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: rgba(232,236,246,0.8); }
.auth-label input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.25);
  color: #fff;
  font-size: 15px;
  transition: border-color 0.15s ease;
}
.auth-label input:focus {
  outline: none;
  border-color: rgba(123,231,214,0.55);
}
.auth-error {
  margin: 0;
  padding: 10px 12px;
  background: rgba(255, 90, 90, 0.12);
  border: 1px solid rgba(255, 90, 90, 0.3);
  color: #ffb4b4;
  font-size: 13px;
  border-radius: 9px;
}
.auth-submit {
  margin-top: 4px;
  padding: 12px;
  border-radius: 11px;
  border: none;
  background: linear-gradient(135deg, #7be7d6 0%, #5fb6ff 100%);
  color: #0b1020;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.auth-submit:hover { transform: translateY(-1px); }
.auth-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }
.auth-link {
  background: none;
  border: none;
  color: rgba(123,231,214,0.85);
  font-size: 13px;
  cursor: pointer;
  align-self: flex-start;
  padding: 4px 0;
}
.auth-link:hover { text-decoration: underline; }

.settings-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Collection Summary (Collectr-style dashboard) */
.collection-summary {
  background: linear-gradient(160deg, var(--bg-elevated) 0%, color-mix(in oklab, var(--accent) 8%, var(--bg-elevated)) 100%);
  border: 1px solid color-mix(in oklab, var(--accent) 18%, transparent);
  border-radius: var(--radius-xl, 22px);
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 12px 40px -20px var(--accent-glow, rgba(168,85,247,0.4));
}
.cs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cs-currency {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, rgba(255,255,255,0.55));
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  padding: 4px 10px;
  border-radius: 999px;
}
.cs-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cs-stat {
  appearance: none;
  border: 1px solid color-mix(in oklab, var(--accent) 14%, transparent);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  color: inherit;
  text-align: left;
  padding: 16px 14px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.cs-stat:hover { transform: translateY(-1px); border-color: color-mix(in oklab, var(--accent) 35%, transparent); }
.cs-stat-hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 22%, var(--bg-elevated)), color-mix(in oklab, var(--accent-2, var(--accent)) 18%, var(--bg-elevated)));
  border-color: color-mix(in oklab, var(--accent) 40%, transparent);
}
.cs-stat-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.cs-stat-value-lg { font-size: 36px; }
.cs-stat-sub { font-size: 16px; font-weight: 500; color: var(--text-muted, rgba(255,255,255,0.5)); }
.cs-stat-label {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, rgba(255,255,255,0.55));
}
.cs-cta {
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
}

/* Scrollable segmented control for set filters */
.segmented-scroll {
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
}
.segmented-scroll::-webkit-scrollbar { display: none; }
.segmented-scroll > * { flex: 0 0 auto; white-space: nowrap; }

/* ============ Collectr-style dashboard ============ */
.dash-hero {
  padding: 4px 4px 8px;
}
.dash-tabs {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 8px 4px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.dash-tab {
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 17px;
  padding: 6px 0;
  position: relative;
  letter-spacing: -0.01em;
}
.dash-tab.is-active {
  color: var(--text);
}
.dash-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -15px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.dash-tabs-spacer { flex: 1; }
.currency-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 15px;
  padding: 4px 4px;
}
.currency-pill-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.portfolio-header { padding: 4px 4px 12px; }
.portfolio-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.portfolio-label-accent { color: var(--accent); }
.portfolio-value-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.portfolio-value {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.05;
}
.eye-button {
  background: var(--bg-chip);
  color: var(--text-muted);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.portfolio-delta {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
}
.portfolio-delta.is-up { color: var(--success); }
.portfolio-delta.is-down { color: var(--danger); }

.dash-hero .portfolio-chart {
  margin-top: 6px;
  height: 200px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.dash-hero .portfolio-chart-inner svg { height: 200px; }

.range-pills {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
}
.range-pill {
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.range-pill.is-active {
  background: #2a2a35;
  color: #fff;
}

/* Most Valuable card */
.mv-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 18px 6px;
  box-shadow: var(--shadow-card);
}
.mv-card-head { margin-bottom: 8px; }
.mv-card-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
.mv-list {
  display: flex;
  flex-direction: column;
}
.mv-row {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  width: 100%;
}
.mv-row:last-child { border-bottom: 0; }
.mv-row-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.mv-row-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}
.mv-row-price { text-align: right; }
.mv-row-value {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.mv-row-change {
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}
.mv-row-change.is-up { color: var(--success); }
.mv-row-change.is-down { color: var(--danger); }
.mv-view-all {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 0 10px;
  text-align: center;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.mv-empty {
  padding: 16px 0 22px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}


.refresh-pill {
  background: var(--bg-chip);
  color: var(--text-soft);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-right: 8px;
}
.refresh-pill:hover { color: var(--accent); }

/* ============= Trade tab ============= */
.trade-shell { display: flex; flex-direction: column; gap: 16px; padding-bottom: 24px; }
.trade-tabs {
  display: flex; gap: 6px; padding: 6px; overflow-x: auto;
  background: var(--surface-1, rgba(255,255,255,0.04));
  border-radius: 14px; border: 1px solid var(--border, rgba(255,255,255,0.08));
}
.trade-tab {
  flex: 1 1 auto; padding: 10px 12px; border: none; border-radius: 10px;
  background: transparent; color: var(--text-muted, #b8b3d4);
  font-weight: 600; cursor: pointer; white-space: nowrap; font-size: 14px;
}
.trade-tab.active { background: var(--accent, #8b5cf6); color: #fff; }
.trade-body { display: flex; flex-direction: column; gap: 12px; }

.trade-post-card, .trade-match-card {
  background: var(--surface-1, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.trade-post-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14px;
}
.trade-meta { color: var(--text-muted, #9b95bf); font-size: 12px; }
.trade-post-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 600px) { .trade-post-grid { grid-template-columns: 1fr 1fr; } }
.trade-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  margin: 0 0 6px; color: var(--text-muted, #9b95bf);
}
.trade-label-have { color: #34d399; }
.trade-label-want { color: #f472b6; }
.trade-text { margin: 0 0 8px; font-size: 14px; line-height: 1.4; }
.trade-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.trade-card-thumb {
  width: 56px; height: 78px; border-radius: 6px; object-fit: cover;
  background: rgba(255,255,255,0.06);
}
.trade-card-thumb-missing {
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--text-muted); padding: 4px; text-align: center;
}
.trade-thumb-wrap { position: relative; }
.trade-thumb-x {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  border-radius: 50%; border: none; background: rgba(0,0,0,0.7); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer;
}
.trade-post-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.trade-match-score {
  background: var(--accent, #8b5cf6); color: #fff;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}

.trade-threads { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.trade-thread-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px; border: 1px solid var(--border, rgba(255,255,255,0.08));
  background: var(--surface-1, rgba(255,255,255,0.04)); border-radius: 12px;
  color: inherit; cursor: pointer; text-align: left;
}
.trade-thread-name { font-weight: 600; }

.trade-thread-view {
  display: flex; flex-direction: column; gap: 12px;
  height: calc(100vh - 220px); min-height: 420px;
}
.trade-thread-header { display: flex; align-items: center; gap: 12px; }
.trade-msg-list {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 12px; background: var(--surface-1, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08)); border-radius: 12px;
}
.trade-msg {
  max-width: 80%; padding: 8px 12px; border-radius: 14px;
  background: rgba(255,255,255,0.06); align-self: flex-start;
  display: flex; flex-direction: column; gap: 2px;
}
.trade-msg-mine { align-self: flex-end; background: var(--accent, #8b5cf6); color: #fff; }
.trade-msg-body { word-wrap: break-word; font-size: 14px; line-height: 1.35; }
.trade-msg-time { font-size: 10px; opacity: 0.7; }
.trade-msg-form { display: flex; gap: 8px; }
.trade-msg-form input {
  flex: 1; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  background: var(--surface-1, rgba(255,255,255,0.04)); color: inherit; font-size: 14px;
}
.trade-warning { font-size: 11px; color: var(--text-muted, #9b95bf); text-align: center; margin: 0; }

.trade-compose, .trade-profile-form {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface-1, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 16px; padding: 16px;
}
.trade-compose textarea, .trade-compose input,
.trade-profile-form textarea, .trade-profile-form input {
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  background: rgba(0,0,0,0.2); color: inherit; font: inherit; resize: vertical;
}
.trade-flags-summary {
  margin-top: 14px; padding: 14px; border-radius: 12px;
  background: var(--surface-1, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  display: flex; flex-direction: column; gap: 6px;
}
.trade-flag-btn.active {
  background: var(--accent, #8b5cf6); color: #fff; border-color: transparent;
}

.trade-identity {
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 12px;
}
.trade-identity-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
}
.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: #5eead4;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Avatar tab */
.nav-avatar-button {
  padding: 4px;
  align-items: center;
  justify-items: center;
}
.nav-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  overflow: hidden;
  border: 1.5px solid transparent;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.nav-avatar svg { width: 18px; height: 18px; }
.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nav-button.active .nav-avatar {
  border-color: #5eead4;
  background: rgba(94,234,212,0.14);
  color: #5eead4;
}

/* Settings: avatar editor */
.avatar-editor {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 12px;
}
.avatar-editor-thumb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--text-muted);
}
.avatar-editor-thumb svg { width: 28px; height: 28px; }
.avatar-editor-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-editor-actions { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.avatar-editor-actions strong { font-size: 0.95rem; color: var(--text-primary, #fff); }
.avatar-editor-actions .field-hint { margin: 0; font-size: 0.75rem; }
.avatar-upload-btn {
  align-self: flex-start;
  background: rgba(94,234,212,0.14);
  color: #5eead4;
  border: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* ============ Portfolio view ============ */
.portfolio-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 1rem;
}
.portfolio-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.55rem 1rem;
}
.portfolio-search-icon {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.55);
  margin-right: 0.6rem;
  flex-shrink: 0;
}
.portfolio-search-icon svg { width: 100%; height: 100%; }
.portfolio-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
}
.portfolio-search-input::placeholder { color: rgba(255, 255, 255, 0.4); }

.portfolio-summary {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}
.portfolio-summary-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.portfolio-summary-accent { color: #4fd1c5; font-weight: 600; }
.portfolio-summary-value {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.portfolio-summary-delta {
  font-size: 0.85rem;
  margin-top: 0.35rem;
  font-weight: 500;
}
.portfolio-summary-delta.is-up { color: #4fd1c5; }
.portfolio-summary-delta.is-down { color: #ff6b8a; }

.portfolio-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 0.25rem 0 0.5rem;
}
.pq-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: #4fd1c5;
  cursor: pointer;
  padding: 0.25rem;
}
.pq-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid rgba(79, 209, 197, 0.55);
  color: #4fd1c5;
}
.pq-icon svg { width: 22px; height: 22px; }
.pq-icon-ring {
  border: none;
  background:
    conic-gradient(from 180deg, #ff5dd1, #ffb84f, #4fd1c5, #5d8bff, #ff5dd1);
  padding: 2px;
}
.pq-icon-ring svg {
  background: #0a0a0d;
  border-radius: 50%;
  padding: 8px;
  width: 100%;
  height: 100%;
}
.pq-label {
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.15;
  color: #4fd1c5;
  font-weight: 500;
}

.portfolio-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.portfolio-tile {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.85rem;
  text-align: left;
  cursor: pointer;
  color: #fff;
  transition: transform 0.15s, border-color 0.15s;
}
.portfolio-tile:active { transform: scale(0.98); }
.portfolio-tile:hover { border-color: rgba(79, 209, 197, 0.4); }
.portfolio-tile-image {
  display: grid;
  place-items: center;
  margin-bottom: 0.65rem;
}
.portfolio-tile-image img {
  max-width: 100%;
  max-height: 180px;
  width: auto;
  height: auto;
  border-radius: 6px;
}
.portfolio-tile-info { display: flex; flex-direction: column; gap: 0.15rem; }
.portfolio-tile-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}
.portfolio-tile-set {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}
.portfolio-tile-meta {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}
.portfolio-tile-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.5rem;
}
.portfolio-tile-qty {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
}
.portfolio-tile-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.portfolio-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
}

.export-set-select {
  flex: 1;
  min-width: 160px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font-size: 0.95rem;
}
.export-menu-section h3 {
  font-size: 1rem;
  font-weight: 600;
}

/* Sets v2 layout */
.sets-page-v2 {
  padding: 16px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sets-header-v2 {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
}
.sets-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sets-back-btn svg { width: 18px; height: 18px; }
.sets-back-spacer { display: block; }
.sets-title-v2 {
  margin: 0;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
}
.sets-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 10px 14px;
}
.sets-search-icon { display: inline-flex; opacity: 0.7; }
.sets-search-icon svg { width: 18px; height: 18px; }
.sets-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: inherit;
  font-size: 0.95rem;
}
.sets-search-input::placeholder { color: rgba(255, 255, 255, 0.5); }
.sets-search-clear {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.sets-tabs {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}
.sets-tabs::-webkit-scrollbar { display: none; }
.sets-tab {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 2px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.sets-tab.is-active {
  color: var(--brand-accent, #5eead4);
}
.sets-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand-accent, #5eead4);
  border-radius: 2px;
}
.sets-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.set-tile-v2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.set-tile-v2-art {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow: hidden;
}
.set-tile-v2-date {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.set-tile-v2-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.set-tile-v2-name-fallback {
  font-weight: 700;
  text-align: center;
  font-size: 0.95rem;
}
.set-tile-v2-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
}
.set-tile-v2-row { display: flex; gap: 6px; }
.set-tile-v2-label { font-weight: 600; }
.sets-empty-lang {
  text-align: center;
  padding: 32px 16px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
}

/* ============= Pikachu Running Loader ============= */
.pika-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 8px;
  width: 100%;
}
.pika-loader-track {
  position: relative;
  width: min(280px, 80%);
  height: 56px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid var(--line);
  overflow: hidden;
}
.pika-loader-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(246, 199, 96, 0.0), rgba(246, 199, 96, 0.35), rgba(246, 199, 96, 0.0));
  background-size: 200% 100%;
  animation: pikaShine 1.6s linear infinite;
}
.pika-loader-sprite {
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 44px;
  height: 44px;
  animation: pikaRun 1.8s linear infinite, pikaBob 0.22s steps(2, end) infinite alternate;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transform-origin: center bottom;
}
.pika-loader-frame {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform: scaleX(-1);
}
.pika-loader-frame-a { background-image: url("/pikachu-run.png"); }
.pika-loader-frame-b { background-image: url("/pikachu-run-2.png"); opacity: 0; }
.pika-loader-sprite .pika-loader-frame-a {
  animation: pikaFrameA 0.18s steps(1, end) infinite;
}
.pika-loader-sprite .pika-loader-frame-b {
  animation: pikaFrameB 0.18s steps(1, end) infinite;
}
.pika-loader-label {
  font-size: 0.85rem;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}
.pika-loader.pika-loader-inline {
  flex-direction: row;
  gap: 12px;
  padding: 8px 12px;
  width: auto;
}
.pika-loader.pika-loader-inline .pika-loader-track {
  width: 140px;
  height: 36px;
}
.pika-loader.pika-loader-inline .pika-loader-sprite {
  width: 30px;
  height: 30px;
  bottom: 3px;
}
@keyframes pikaRun {
  0%   { left: -15%; }
  100% { left: 100%; }
}
@keyframes pikaBob {
  from { translate: 0 0; }
  to   { translate: 0 -4px; }
}
@keyframes pikaFrameA {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes pikaFrameB {
  0%, 49%   { opacity: 0; }
  50%, 100% { opacity: 1; }
}
@keyframes pikaShine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.sets-section-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  margin: 14px 4px 8px;
}
.sets-section-label:first-child { margin-top: 4px; }

/* ============= Admin dashboard ============= */
.admin-shell { display: flex; flex-direction: column; gap: 16px; padding-bottom: 24px; }

.admin-live {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(110, 231, 183, 0.12), rgba(59, 130, 246, 0.10));
  border: 1px solid var(--line);
}
.admin-live-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: adminPulse 1.6s ease-out infinite;
}
@keyframes adminPulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70%  { box-shadow: 0 0 0 12px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.admin-live-count { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.admin-live-label { font-size: 0.85rem; color: var(--text-soft); margin-top: 2px; }
.admin-refresh { margin-left: auto; }

.admin-stat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.admin-stat {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
}
.admin-stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.admin-stat-label { font-size: 0.78rem; color: var(--text-soft); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.admin-stat-sub { font-size: 0.78rem; color: var(--text-soft); margin-top: 4px; opacity: 0.8; }

.admin-section { display: flex; flex-direction: column; gap: 8px; }
.admin-section-title { font-size: 0.95rem; font-weight: 600; margin: 6px 4px; }
.admin-empty { color: var(--text-soft); font-size: 0.9rem; padding: 8px 4px; }
.admin-section-sub { color: var(--text-soft); font-size: 0.8rem; margin: 0 4px 8px; }
.admin-visitor-cell { display: flex; align-items: center; gap: 8px; }
.admin-visitor-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: 0 0 28px; }
.admin-visitor-avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2, rgba(255,255,255,0.08)); color: var(--text, #fff); font-weight: 600; font-size: 0.8rem; }

.admin-table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td {
  padding: 10px 12px; text-align: left;
}
.admin-table thead th {
  font-weight: 600; color: var(--text-soft); text-transform: uppercase;
  font-size: 0.72rem; letter-spacing: 0.06em;
  background: rgba(255,255,255,0.03);
}
.admin-table tbody tr + tr { border-top: 1px solid var(--line); }
.admin-table td:not(:first-child), .admin-table th:not(:first-child) { text-align: right; }
.admin-table-wrap { overflow-x: auto; }
.admin-table-sessions { min-width: 720px; font-size: 0.85rem; }
.admin-table-sessions td, .admin-table-sessions th { white-space: nowrap; padding: 8px 10px; }
.admin-tag {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  border-radius: 999px; background: rgba(255,255,255,0.08); color: var(--text-soft);
}
.admin-path {
  display: inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis;
  vertical-align: bottom; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem; color: var(--text-soft);
}

/* Splash screen with spinning logo */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background:
    radial-gradient(circle at 18% -10%, rgba(168, 85, 247, 0.18), transparent 40%),
    radial-gradient(circle at 90% 8%, rgba(124, 58, 237, 0.14), transparent 38%),
    linear-gradient(180deg, #08080b 0%, #0a0a0d 100%);
  transition: opacity 0.4s ease;
}
.splash-screen.fade-out { opacity: 0; pointer-events: none; }
.splash-logo {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  box-shadow: 0 10px 40px rgba(0, 200, 255, 0.35);
  animation: splashSpin 1.6s linear infinite;
}
.splash-text {
  margin: 0;
  color: var(--text-muted, #b9b9c6);
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}
@keyframes splashSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------- Scan FAB + Scan Modal ---------- */
/* Compact circular button, anchored above the bottom nav. We align it to the
   right edge of the bottom-nav's max-width track (min(100% - 12px, 560px))
   so it never overlaps the nav and never floats off into the gutter on
   tablet/desktop widths. */
.scan-fab {
  position: fixed;
  /* Anchor to the LEFT edge of the centered bottom-nav track so the FAB
     never overlaps the right-side Admin nav button. */
  left: max(18px, calc(50% - min(50% - 6px, 280px) + 6px));
  right: auto;
  /* Bottom nav + its offset + safe-area + clearance gap. */
  bottom: calc(14px + var(--nav-height) + 24px + var(--safe-bottom, 0px));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #3ddc97, #1abc9c);
  box-shadow: 0 12px 32px -8px rgba(26, 188, 156, 0.55), 0 4px 12px rgba(0,0,0,0.35);
  transition: transform 0.28s ease, box-shadow 0.15s ease, opacity 0.28s ease, bottom 0.28s ease;
}
.scan-fab:hover { transform: translateY(-1px); box-shadow: 0 16px 36px -8px rgba(26, 188, 156, 0.65), 0 6px 14px rgba(0,0,0,0.4); }
.scan-fab:active { transform: translateY(0); }
.scan-fab svg { width: 24px; height: 24px; }
.scan-fab span { display: none; }

/* When the bottom nav auto-hides on scroll, slide the scan FAB down to the
   bottom edge so it stays accessible without floating in mid-screen. */
.scan-fab.is-nav-hidden {
  bottom: calc(18px + var(--safe-bottom, 0px));
}

.scan-modal {
  border: none;
  background: transparent;
  padding: 0;
  max-width: min(520px, calc(100vw - 24px));
  width: 100%;
}
.scan-modal::backdrop {
  background: rgba(5, 8, 18, 0.78);
  backdrop-filter: blur(6px);
}
.scan-card {
  background: linear-gradient(180deg, #161a2e, #0e1122);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  padding: 18px 18px 22px;
  color: #fff;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7);
}
.scan-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.scan-title { font-size: 18px; font-weight: 700; margin: 0; }
.scan-close {
  background: rgba(255,255,255,0.08);
  border: none; color: #fff; width: 34px; height: 34px;
  border-radius: 999px; cursor: pointer; font-size: 18px; line-height: 1;
}
.scan-stage {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #0a0d1a;
  border-radius: 16px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed rgba(255,255,255,0.12);
}
.scan-stage video, .scan-stage img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.scan-stage-empty {
  text-align: center; padding: 24px; color: rgba(255,255,255,0.6); font-size: 14px;
}
.scan-stage-empty svg { width: 48px; height: 48px; margin-bottom: 10px; opacity: 0.5; }
.scan-overlay-frame {
  position: absolute; inset: 12%;
  border: 2px solid rgba(61, 220, 151, 0.6);
  border-radius: 12px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.25);
}
.scan-actions {
  display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap;
}
.scan-btn {
  flex: 1 1 auto;
  padding: 12px 16px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: #fff; font-weight: 600; cursor: pointer; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.scan-btn-primary {
  background: linear-gradient(135deg, #3ddc97, #1abc9c);
  border-color: transparent;
}
.scan-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.scan-status {
  margin-top: 12px; font-size: 13px; color: rgba(255,255,255,0.7); min-height: 18px;
  text-align: center;
}
.scan-result {
  margin-top: 14px; padding: 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
}
.scan-result-row { display: flex; gap: 12px; align-items: center; }
.scan-result-img {
  width: 78px; height: 108px; border-radius: 8px; object-fit: cover;
  background: #0a0d1a;
}
.scan-result-info h3 { margin: 0 0 4px; font-size: 16px; }
.scan-result-info p { margin: 2px 0; font-size: 13px; color: rgba(255,255,255,0.7); }
.scan-result-confidence {
  display: inline-block; margin-top: 6px; padding: 2px 8px;
  border-radius: 999px; font-size: 11px; font-weight: 600;
}
.scan-conf-high { background: rgba(61,220,151,0.18); color: #3ddc97; }
.scan-conf-med  { background: rgba(255,200,80,0.18); color: #ffc850; }
.scan-conf-low  { background: rgba(255,90,90,0.18); color: #ff7a7a; }
.scan-no-match {
  margin-top: 14px; padding: 14px; border-radius: 12px;
  background: rgba(255,90,90,0.08); border: 1px solid rgba(255,90,90,0.2);
  font-size: 13px; color: #ffb4b4;
}

/* ========== Portfolios ========== */
.portfolio-switcher {
  display: flex; flex-direction: column; gap: 10px;
  margin: 12px 0 4px;
}
.portfolio-chip-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.portfolio-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #e7e7ee; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.18s ease;
}
.portfolio-chip:hover { background: rgba(255,255,255,0.09); }
.portfolio-chip.is-active {
  background: linear-gradient(135deg, rgba(168,85,247,0.35), rgba(124,58,237,0.35));
  border-color: rgba(168,85,247,0.6);
  color: #fff;
}
.portfolio-chip-count {
  font-size: 0.72rem; padding: 2px 7px; border-radius: 999px;
  background: rgba(0,0,0,0.25); font-weight: 700;
}
.portfolio-manage-btn { align-self: flex-start; font-size: 0.82rem; }

.card-portfolio-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.portfolio-tag {
  font-size: 0.7rem; padding: 3px 8px; border-radius: 999px;
  background: rgba(168,85,247,0.18); color: #d8b4fe;
  border: 1px solid rgba(168,85,247,0.3);
}

.portfolio-list { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.portfolio-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.portfolio-row-info { display: flex; flex-direction: column; gap: 2px; }
.portfolio-row-meta { font-size: 0.75rem; opacity: 0.65; }
.portfolio-row-actions { display: flex; gap: 6px; }
.portfolio-row-empty { padding: 12px; opacity: 0.7; font-size: 0.9rem; text-align: center; }
.ghost-button.danger { color: #ff8a8a; }

.portfolio-create-row { display: flex; gap: 8px; margin-top: 12px; }
.portfolio-create-row .search-input { flex: 1; }

.portfolio-assign-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.portfolio-assign-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer; font-size: 0.92rem;
}
.portfolio-assign-row input { width: 18px; height: 18px; accent-color: #a855f7; }

/* ==================== Friends ==================== */
.friends-shell { display: flex; flex-direction: column; gap: 16px; }
.friends-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
}
.friends-card-muted { opacity: 0.85; }
.friends-section-title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.friends-count {
  font-size: 0.78rem;
  background: rgba(255,255,255,0.08);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
}
.friends-divider {
  height: 1px; background: rgba(255,255,255,0.06);
  margin: 18px 0 14px;
}
.friend-search-row, .invite-link-row, .username-input-row {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 6px 10px;
}
.friend-search-row .text-input,
.invite-link-row .text-input,
.username-input-row .text-input {
  flex: 1; background: transparent; border: none; padding: 6px 0;
}
.invite-link-row .primary-button { white-space: nowrap; }
.username-prefix {
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}
.friend-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.friend-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  width: 100%;
  text-align: left;
}
.friend-row-button {
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  color: inherit;
}
.friend-row-button:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
.friend-row-request { background: rgba(168,85,247,0.08); border-color: rgba(168,85,247,0.25); }
.friend-avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
}
.friend-avatar-empty {
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5);
}
.friend-avatar-empty svg { width: 60%; height: 60%; }
.friend-row-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.friend-row-meta strong { font-size: 0.95rem; }
.friend-row-sub { font-size: 0.82rem; color: rgba(255,255,255,0.6); }
.friend-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.friend-row-chevron { color: rgba(255,255,255,0.4); font-size: 1.4rem; line-height: 1; }
.friends-username-gate {
  background: rgba(168,85,247,0.06);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}
.friends-username-gate h2 { margin: 0 0 8px; font-size: 1.1rem; }
.friends-username-form {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 320px; margin: 14px auto 0;
}
.trade-tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #ef4444; color: white;
  border-radius: 999px; font-size: 0.7rem; font-weight: 700;
  margin-left: 6px;
}

/* Friend detail */
.friend-detail { display: flex; flex-direction: column; gap: 14px; }
.friend-detail-head { display: flex; }
.friend-detail-card {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px;
  flex-wrap: wrap;
}
.friend-detail-meta { flex: 1; min-width: 140px; }
.friend-detail-meta h2 { margin: 0; font-size: 1.05rem; }
.friend-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.friend-sharing {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px 14px;
}
.friend-sharing summary {
  cursor: pointer; font-weight: 600; font-size: 0.9rem;
  list-style: none;
}
.friend-sharing summary::-webkit-details-marker { display: none; }
.sharing-form { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.friend-set-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 10px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  margin-bottom: 6px;
  color: inherit;
}
.friend-set-row:hover { background: rgba(255,255,255,0.06); }
.friend-set-symbol { width: 28px; height: 28px; object-fit: contain; grid-row: 1 / span 2; }
.friend-set-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.friend-set-meta strong { font-size: 0.95rem; }
.friend-row-sub { font-size: 0.75rem; opacity: 0.85; line-height: 1.4; }
.friend-set-chevron { font-size: 0.9rem; opacity: 0.6; padding: 0 4px; grid-row: 1 / span 2; }
.friend-set-bar {
  grid-column: 1 / -1;
  height: 4px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden;
}
.friend-set-bar > div { height: 100%; background: linear-gradient(90deg,#a855f7,#22d3ee); }
.friend-set-block { margin-bottom: 8px; }
.friend-set-block.is-open .friend-set-row { border-color: rgba(168,85,247,0.4); background: rgba(168,85,247,0.08); }
.friend-set-cards { padding: 8px 4px 14px; }

/* Friend collection summary + filters */
.fc-summary { padding: 4px 0 10px; }
.fc-summary-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fc-summary-row > div { background: rgba(255,255,255,0.04); border-radius: 10px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.fc-summary-row strong { font-size: 1.1rem; line-height: 1; }
.fc-summary-row span { font-size: 0.65rem; opacity: 0.8; }
.fc-summary-row .fc-need { background: rgba(250,204,21,0.12); border: 1px solid rgba(250,204,21,0.35); }
.fc-summary-row .fc-offer { background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.35); }
.fc-legend { font-size: 0.7rem; opacity: 0.75; margin: 8px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.fc-filters { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.fc-chip { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: inherit; padding: 6px 10px; border-radius: 999px; font-size: 0.75rem; cursor: pointer; }
.fc-chip.active { background: linear-gradient(90deg, rgba(168,85,247,0.3), rgba(34,211,238,0.25)); border-color: rgba(168,85,247,0.6); }
.fc-pill { display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 0.65rem; margin-left: 4px; }
.fc-pill-need { background: rgba(250,204,21,0.18); color: #fde68a; }
.fc-pill-offer { background: rgba(34,211,238,0.18); color: #a5f3fc; }

/* Friend per-card grid */
.friend-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.fc-card { position: relative; aspect-ratio: 5/7; border-radius: 6px; overflow: hidden; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.fc-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc-card-fallback { padding: 4px; font-size: 0.6rem; word-break: break-word; }
.fc-card.fc-missing img { filter: grayscale(0.85) brightness(0.55); opacity: 0.55; }
.fc-card.fc-missing { border-style: dashed; }
.fc-card[data-fc-mine="1"] { -webkit-touch-callout: none; }
.fc-remove { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(220, 38, 38, 0.92); color: #fff; font-size: 16px; line-height: 20px; font-weight: 800; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,0.5); z-index: 2; }
.fc-remove:hover, .fc-remove:focus { background: rgb(220, 38, 38); outline: none; transform: scale(1.08); }
.fc-card .fc-check, .fc-card .fc-x { position: absolute; bottom: 2px; right: 4px; font-size: 0.75rem; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.fc-card .fc-check { color: #4ade80; }
.fc-card .fc-x { color: #f87171; }
.fc-badge { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; }
.fc-badge-need { background: #facc15; color: #1f1300; }
.fc-badge-offer { background: #22d3ee; color: #002630; }


/* Unified friend page */
.friend-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  margin: 12px 0 14px;
  overflow-x: auto;
}
.friend-tabs .trade-tab { flex: 0 0 auto; }
.friend-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.friend-stat {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.friend-stat strong { font-size: 1.25rem; color: var(--text-bright, #fff); }
.friend-stat span { font-size: 0.7rem; color: var(--text-muted); }
.friend-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.friend-chat-view { min-height: 360px; }

/* First-run onboarding: suggested sets in dashboard empty state */
.onboard-empty {
  display: grid;
  gap: 16px;
}
.onboard-empty-head h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}
.onboard-empty-head p {
  margin: 0;
  color: var(--muted, #b9b9c6);
  font-size: 0.9rem;
}
.suggest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.suggest-tile {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  transition: transform .12s, border-color .12s, background .12s;
}
.suggest-tile:hover,
.suggest-tile:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(168,85,247,0.45);
  background: rgba(168,85,247,0.08);
  outline: none;
}
.suggest-tile img {
  width: 100%;
  height: 56px;
  object-fit: contain;
}
.suggest-tile-name {
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest-tile-meta {
  font-size: 0.75rem;
  color: var(--muted, #8a8a98);
}
.onboard-empty-foot { display: flex; justify-content: flex-end; }

/* ===== Polish v2: animations, skeletons, dashboard insight, recents ===== */

@keyframes pt-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pt-skeleton {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.view:not(.hidden) > .page-grid > * {
  animation: pt-fade-up 320ms cubic-bezier(.2,.8,.2,1) both;
}
.view:not(.hidden) > .page-grid > *:nth-child(2) { animation-delay: 40ms; }
.view:not(.hidden) > .page-grid > *:nth-child(3) { animation-delay: 80ms; }
.view:not(.hidden) > .page-grid > *:nth-child(4) { animation-delay: 120ms; }
.view:not(.hidden) > .page-grid > *:nth-child(5) { animation-delay: 160ms; }
.view:not(.hidden) > .page-grid > *:nth-child(n+6) { animation-delay: 200ms; }

.card-item {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.35), 0 0 0 1px rgba(168,85,247,.18);
}
.card-art {
  transition: transform .25s ease;
}
.card-item:hover .card-art { transform: scale(1.02); }

.set-card, .closest-row {
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.set-card:hover { transform: translateY(-2px); }

/* Card skeleton tiles for search loading */
.card-skeleton {
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.10) 80px, rgba(255,255,255,0.04) 160px);
  background-size: 200px 100%;
  background-repeat: no-repeat;
  animation: pt-skeleton 1.2s ease-in-out infinite;
  aspect-ratio: 3 / 4;
  min-height: 220px;
}

/* Recent searches */
.recent-searches {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.recent-searches-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.recent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.recent-chip {
  background: var(--bg-chip);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.recent-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.recent-chip-clear {
  background: transparent;
  color: var(--text-muted);
}

/* Closest to completion */
.closest-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.closest-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.closest-row:hover {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--bg-soft), var(--accent-soft));
}
.closest-symbol {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.closest-main { min-width: 0; display: grid; gap: 6px; }
.closest-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.closest-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.closest-progress { height: 6px; }
.closest-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .view:not(.hidden) > .page-grid > *,
  .card-skeleton {
    animation: none;
  }
  .card-item, .set-card, .card-art, .closest-row, .recent-chip {
    transition: none;
  }
}

/* ======= Onboarding checklist panel ======= */
.onboard-panel {
  background: linear-gradient(135deg, rgba(182,103,255,0.08), rgba(139,92,246,0.04));
  border: 1px solid rgba(182,103,255,0.18);
}
.onboard-progress-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: 0.04em;
}
.onboard-progress-shell {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0 16px;
}
.onboard-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.onboard-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.onboard-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: background .15s, border-color .15s;
}
.onboard-step.is-done {
  background: rgba(74,222,128,0.06);
  border-color: rgba(74,222,128,0.18);
}
.onboard-check {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid var(--line-strong);
}
.onboard-step.is-done .onboard-check {
  background: var(--success);
  color: #0a0a0d;
  border-color: var(--success);
}
.onboard-step-label {
  flex: 1;
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 500;
}
.onboard-step.is-done .onboard-step-label {
  color: var(--text-soft);
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.2);
}
.onboard-step-tag {
  font-size: 0.7rem;
  color: var(--success);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.onboard-step-btn {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.onboard-step-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.onboard-step-btn:active { transform: scale(0.97); }

/* ======= Where your value lives ======= */
.value-lives-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.value-lives-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background .15s, border-color .15s, transform .1s;
}
.value-lives-row:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--line-strong);
}
.value-lives-row:active { transform: scale(0.99); }
.value-lives-symbol {
  flex: none;
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.value-lives-main {
  flex: 1;
  min-width: 0;
}
.value-lives-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.value-lives-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.value-lives-progress {
  margin-top: 8px;
  height: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  overflow: hidden;
}
.value-lives-progress .progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 999px;
}
.value-lives-value {
  flex: none;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
