:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --border: rgba(0, 0, 0, 0.08);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --green: #16a34a;
  --green-bg: rgba(22, 163, 74, 0.12);
  --red: #dc2626;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 24px 54px rgba(0, 0, 0, 0.12);
  --radius: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

button,
.flip-slab,
.tear-pack-stage {
  touch-action: manipulation;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* CONFETTI */
#confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  animation: confetti-fall var(--dur, 1.8s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes confetti-fall {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx, 0px), var(--dy, 420px)) rotate(var(--rot, 540deg)) scale(0.7); opacity: 0; }
}

/* iOS FROSTED GLASS NAV */
.ios-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-brand { display: flex; align-items: center; gap: 10px; }

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d1d1f 0%, #3a3a40 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  box-shadow: var(--shadow-sm);
}

.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.brand-tag { font-size: 11px; color: var(--text-secondary); }

.segmented-control {
  background: rgba(118, 118, 128, 0.12);
  padding: 3px;
  border-radius: 12px;
  display: flex;
  gap: 2px;
}

.seg-btn {
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 160ms ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.seg-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.badge {
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
}

.nav-balance { display: flex; align-items: center; gap: 8px; }

.balance-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 5px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  box-shadow: var(--shadow-sm);
}

.bal-label { font-size: 10px; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.bal-amount { font-size: 15px; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }

.btn-refill {
  border: none;
  background: var(--green);
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
}

/* CONTAINER & STATUS */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px 140px;
}

.status-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 18px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.view { display: none; }
.view.active { display: block; }
.hidden { display: none !important; }

/* HERO & HORIZONTAL PACK CAROUSEL */
.hero-header { margin-bottom: 18px; }
.hero-header h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 4px; }
.hero-header p { color: var(--text-secondary); font-size: 15px; }

.pack-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 24px;
  scrollbar-width: none;
}
.pack-carousel::-webkit-scrollbar { display: none; }

.pack-card {
  flex: 0 0 320px;
  scroll-snap-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 200ms ease;
}

.pack-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* PHYSICAL FOIL BOOSTER PACK */
.foil-pack {
  position: relative;
  width: 210px;
  height: 310px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.22)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.14));
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), filter 220ms ease;
}

.pack-card:hover .foil-pack {
  transform: translateY(-6px) rotate(-1deg) scale(1.02);
  filter: drop-shadow(0 28px 42px rgba(0, 0, 0, 0.28));
}

/* Crimped serrated foil edges */
.pack-crimp-top,
.pack-crimp-bottom {
  height: 20px;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.35) 0px,
      rgba(255, 255, 255, 0.35) 2px,
      rgba(0, 0, 0, 0.25) 2px,
      rgba(0, 0, 0, 0.25) 4px
    ),
    linear-gradient(180deg, #4b5563 0%, #1f2937 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.pack-crimp-top {
  clip-path: polygon(
    0% 25%, 4% 0%, 8% 25%, 12% 0%, 16% 25%, 20% 0%, 24% 25%, 28% 0%,
    32% 25%, 36% 0%, 40% 25%, 44% 0%, 48% 25%, 52% 0%, 56% 25%, 60% 0%,
    64% 25%, 68% 0%, 72% 25%, 76% 0%, 80% 25%, 84% 0%, 88% 25%, 92% 0%,
    96% 25%, 100% 0%, 100% 100%, 0% 100%
  );
  border-bottom: 1px solid rgba(0, 0, 0, 0.45);
}

.pack-crimp-bottom {
  clip-path: polygon(
    0% 0%, 100% 0%, 100% 75%, 96% 100%, 92% 75%, 88% 100%, 84% 75%, 80% 100%,
    76% 75%, 72% 100%, 68% 75%, 64% 100%, 60% 75%, 56% 100%, 52% 75%, 48% 100%,
    44% 75%, 40% 100%, 36% 75%, 32% 100%, 28% 75%, 24% 100%, 20% 75%, 16% 100%,
    12% 75%, 8% 100%, 4% 75%, 0% 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.pack-body-wrap {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #18181b;
}

.foil-pack.tier-1 .pack-body-wrap { background: linear-gradient(145deg, #475569 0%, #1e293b 100%); }
.foil-pack.tier-2_5 .pack-body-wrap { background: linear-gradient(145deg, #06b6d4 0%, #0369a1 100%); }
.foil-pack.tier-5 .pack-body-wrap { background: linear-gradient(145deg, #ef4444 0%, #991b1b 100%); }
.foil-pack.tier-10 .pack-body-wrap { background: linear-gradient(145deg, #2563eb 0%, #1e3a8a 100%); }
.foil-pack.tier-25 .pack-body-wrap { background: linear-gradient(145deg, #10b981 0%, #065f46 100%); }
.foil-pack.tier-50 .pack-body-wrap { background: linear-gradient(145deg, #8b5cf6 0%, #5b21b6 100%); }
.foil-pack.tier-100 .pack-body-wrap { background: linear-gradient(145deg, #ec4899 0%, #9d174d 100%); }
.foil-pack.tier-250 .pack-body-wrap { background: linear-gradient(145deg, #f59e0b 0%, #92400e 100%); }
.foil-pack.tier-500 .pack-body-wrap { background: linear-gradient(145deg, #0f172a 0%, #6d28d9 50%, #0ea5e9 100%); }
.foil-pack.tier-1000 .pack-body-wrap { background: linear-gradient(145deg, #18181b 0%, #eab308 48%, #18181b 100%); }

.pack-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.35;
  mix-blend-mode: luminosity;
  filter: contrast(1.15);
}

/* POKEMON POKEBALL EMBLEM ON FOIL PACK */
.pack-pokeball {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 96px;
  z-index: 2;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.38));
  pointer-events: none;
}

.pack-pokeball svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Cylindrical 3D pillow shading for realistic foil volume */
.pack-foil-cylinder {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.44) 0%,
    rgba(255, 255, 255, 0.24) 16%,
    rgba(255, 255, 255, 0.02) 45%,
    rgba(255, 255, 255, 0.3) 76%,
    rgba(0, 0, 0, 0.48) 100%
  );
  mix-blend-mode: hard-light;
}

/* Animated diagonal metallic foil glint */
.pack-foil-glint {
  position: absolute;
  inset: -40%;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.42) 48%,
    rgba(255, 255, 255, 0.12) 55%,
    transparent 70%
  );
  animation: foil-shimmer 3.4s infinite ease-in-out;
}

.pack-overlay-badge {
  position: absolute;
  inset: auto 10px 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 15, 18, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  text-align: center;
}

.pack-tier-chip {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pack-tap-tear {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #e4e4e7;
}

/* TEAR INTERACTION OVERLAY (BEFORE 3D SLAB FLIP) */
.tear-pack-stage {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tear-pack-unit {
  width: 264px;
  height: 392px;
}

.tear-top-strip,
.tear-body-shell {
  transition: transform 560ms cubic-bezier(0.22, 1, 0.36, 1), opacity 480ms ease;
}

.tear-pack-unit.ripping .tear-top-strip {
  transform: translate(54px, -95px) rotate(16deg);
  opacity: 0;
}

.tear-pack-unit.ripping .tear-body-shell {
  transform: translateY(150px) scale(0.92);
  opacity: 0;
}

.pack-info h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.pack-info p { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.odds-box {
  background: #f5f5f7;
  border-radius: 12px;
  padding: 12px;
  font-size: 12px;
}

.odds-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.odds-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  font-variant-numeric: tabular-nums;
}

.btn-primary {
  border: none;
  background: var(--blue);
  color: #fff;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 18px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 100ms ease, background 150ms ease;
}
.btn-primary:hover { background: var(--blue-hover); }
.btn-primary:active { transform: scale(0.97); }

/* 3D SLAB FOCUS REVEAL */
.focus-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  gap: 20px;
  padding-top: 10px;
}

.focus-top { text-align: center; }

.focus-pack-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
  margin-bottom: 6px;
}

.focus-hint { font-size: 14px; color: var(--text-secondary); font-weight: 500; }

.slab-scene {
  position: relative;
  width: 280px;
  height: 410px;
  perspective: 1200px;
}

.flip-slab {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 740ms cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  touch-action: pan-y;
}

.flip-slab.flipped {
  transform: rotateY(180deg);
  cursor: default;
}

.slab-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.slab-front {
  transform: rotateY(180deg);
}

/* DIGITAL ACRYLIC SLAB */
.acrylic-slab {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  padding: 12px;
  background: linear-gradient(165deg, rgba(255,255,255,0.96) 0%, rgba(235,238,244,0.92) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.12),
    inset 0 2px 4px rgba(255, 255, 255, 1),
    inset 0 -2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.acrylic-slab.high-value {
  box-shadow:
    0 22px 54px rgba(124, 58, 237, 0.22),
    inset 0 2px 4px rgba(255, 255, 255, 1);
  border-color: rgba(167, 139, 250, 0.75);
}

/* BACK OF SLAB */
.slab-back-shell {
  background: linear-gradient(160deg, #1d1d1f 0%, #2c2c32 100%);
  border-color: rgba(255, 255, 255, 0.16);
}

.back-label {
  border-top-color: #0071e3 !important;
  background: #141417 !important;
  color: #fff;
  flex-direction: column;
  align-items: center !important;
  text-align: center;
}

.back-brand { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; }
.back-sub { font-size: 9px; color: #a1a1aa; }

.slab-back-well {
  flex: 1;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, #2e2e36 0%, #141417 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
}

.back-emblem {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0071e3 0%, #7c3aed 100%);
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(0, 113, 227, 0.35);
}

.back-tagline { font-size: 10px; letter-spacing: 0.14em; color: #a1a1aa; font-weight: 600; }

/* PSA-STYLE TACTICAL GRADING LABEL */
.slab-label {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-top: 3px solid var(--red);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.slab-label-left { display: flex; flex-direction: column; min-width: 0; }
.slab-set { font-size: 10px; font-weight: 700; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slab-rarity { font-size: 10px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.slab-grade-box {
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 2px 7px;
  text-align: center;
  flex-shrink: 0;
}

.grade-txt { display: block; font-size: 8px; font-weight: 700; color: var(--text-secondary); }
.grade-num { display: block; font-size: 14px; font-weight: 800; color: var(--text); line-height: 1.1; }

.slab-well {
  position: relative;
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #e5e7eb;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.14);
}

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

/* HOLOGRAPHIC FOIL CSS EFFECT */
.acrylic-slab.high-value .slab-well::after {
  content: "";
  position: absolute;
  inset: -45%;
  background: linear-gradient(
    115deg,
    transparent 26%,
    rgba(255, 255, 255, 0.58) 46%,
    rgba(56, 189, 248, 0.35) 51%,
    rgba(192, 132, 252, 0.35) 56%,
    transparent 74%
  );
  mix-blend-mode: overlay;
  animation: foil-shimmer 2.6s infinite ease-in-out;
  pointer-events: none;
}

@keyframes foil-shimmer {
  0%, 100% { transform: translateX(-45%); }
  50% { transform: translateX(45%); }
}

/* POST-REVEAL BOTTOM SHEET */
.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: var(--surface-glass);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.1);
  border-radius: 24px 24px 0 0;
  padding: 10px 20px 26px;
  transform: translateY(115%);
  transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bottom-sheet.open {
  transform: translateY(0);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  margin: 0 auto 14px;
}

.sheet-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sheet-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sheet-card-name { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.sheet-card-sub { font-size: 13px; color: var(--text-secondary); }

.fmv-pill {
  background: var(--green-bg);
  color: var(--green);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 12px;
}

.btn-sheet-vault, .btn-sheet-sell {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  padding: 16px 14px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 100ms ease, background 150ms ease;
}
.btn-sheet-vault:active, .btn-sheet-sell:active { transform: scale(0.97); }

.btn-sheet-vault {
  background: #f2f2f7;
  color: var(--text);
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.btn-sheet-vault:hover { background: #e5e5ea; }

.btn-sheet-sell {
  background: #1d1d1f;
  color: #fff;
  border: none;
  box-shadow: var(--shadow-sm);
}
.btn-sheet-sell:hover { background: #000; }

/* VAULT & ACTIVITY */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.muted-sub { color: var(--text-secondary); font-size: 13px; }

.slab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 18px;
}

.vault-slab-card {
  height: auto;
}
.vault-slab-card .slab-well {
  aspect-ratio: 2.5 / 3.5;
  flex: none;
}

.slab-footer { display: flex; flex-direction: column; gap: 6px; }
.slab-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slab-fmv-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); }
.slab-fmv-row strong { color: var(--text); }

.btn-sell-vault {
  border: none;
  background: var(--green-bg);
  color: var(--green);
  font-family: var(--font);
  font-weight: 700;
  font-size: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.pill.active { background: var(--text); color: #fff; border-color: var(--text); }

.activity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.tx-list { list-style: none; }
.tx-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.tx-list li:last-child { border-bottom: none; }
.tx-title { font-weight: 600; font-size: 14px; }
.tx-meta { font-size: 12px; color: var(--text-secondary); }
.tx-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.tx-pos { color: var(--green); }
.tx-neg { color: var(--text); }

.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: var(--red);
  font-family: var(--font);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  cursor: pointer;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* MOBILE-FIRST POLISH (Phones & Tablets) */
.pack-carousel {
  overscroll-behavior-x: contain;
  scroll-padding-inline: 16px;
}

.bottom-sheet {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

@media (max-width: 640px) {
  .nav-inner {
    padding: 10px 14px;
    gap: 10px;
  }

  .segmented-control {
    order: 3;
    width: 100%;
  }

  .seg-btn {
    flex: 1;
    justify-content: center;
    padding: 7px 10px;
  }

  .container {
    padding: 12px 14px 150px;
  }

  .hero-header h1 {
    font-size: 23px;
  }

  .pack-card {
    flex: 0 0 min(82vw, 310px);
    padding: 16px;
  }

  .focus-stage {
    min-height: calc(100dvh - 210px);
    gap: 14px;
  }

  .slab-scene {
    width: min(72vw, 270px);
    height: min(105vw, 395px);
  }

  .tear-pack-unit {
    width: min(68vw, 254px);
    height: min(100vw, 376px);
  }

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

  .vault-slab-card {
    padding: 8px;
  }

  .sheet-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .btn-sheet-vault,
  .btn-sheet-sell {
    padding: 14px 12px;
    font-size: 14px;
  }
}
