* { box-sizing: border-box; }
:root {
  --bg: #000000;
  --panel: #ffffff;
  --line: rgba(15, 23, 42, 0.1);
  --ink: #0f172a;
  --muted-ink: #64748b;
  --green: #059669;
  --gold: #b45309;
  --violet: #4f46e5;
}
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: #000000;
  color: var(--ink);
  min-height: 100vh;
}
h1, h2, h3 { margin: 0; }
a { color: inherit; text-decoration: none; }

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 22px; letter-spacing: -0.02em; }
.brand-mark { font-size: 24px; }
.brand-name span { color: var(--violet); }
.nav-wallet { display: flex; gap: 12px; }
.chip {
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 6px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.chip-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-ink); }
.chip-value { font-size: 18px; font-weight: 900; color: var(--green); }
.chip-value.spins { color: var(--violet); }

/* ---------- Store layout ---------- */
.store { max-width: 1040px; margin: 0 auto; padding: 22px 24px 48px; }
.screen { animation: screenFade .4s ease; }
@keyframes screenFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero { text-align: center; margin-bottom: 20px; }
.hero-eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--violet);
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.2);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 { font-size: 46px; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 12px; color: #ffffff; }
.hero p { color: var(--muted-ink); font-size: 17px; max-width: 620px; margin: 0 auto; }

/* ---------- Reel ---------- */
.reel-stage {
  background: linear-gradient(180deg, #0b1020 0%, #141a30 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(8, 11, 25, 0.45);
  transition: box-shadow .4s ease, border-color .4s ease;
}
/* High-value (epic/legendary) pull: the whole stage flares gold. */
.reel-stage.legendary-hit {
  border-color: rgba(245, 196, 90, 0.7);
  box-shadow: 0 0 60px rgba(245, 196, 90, 0.45), 0 20px 50px rgba(8, 11, 25, 0.5);
}
.ticker-wrap {
  position: relative;
  height: 360px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(99, 102, 241, 0.18), transparent 60%),
    #0e1424;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
}
/* Soft edge fades so slabs slide in/out of view like a real reel. */
.ticker-wrap::before, .ticker-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 4;
  pointer-events: none;
}
.ticker-wrap::before { left: 0; background: linear-gradient(90deg, #0e1424, transparent); }
.ticker-wrap::after { right: 0; background: linear-gradient(270deg, #0e1424, transparent); }

/* CS:GO-style centre indicator with arrowheads top and bottom. */
.marker {
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 3px; transform: translateX(-50%);
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  z-index: 6;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.8);
}
.marker::before, .marker::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  border-left: 9px solid transparent; border-right: 9px solid transparent;
}
.marker::before { top: -2px; border-top: 11px solid #f59e0b; }
.marker::after { bottom: -2px; border-bottom: 11px solid #f59e0b; }

.ticker {
  display: flex; gap: 14px; height: 100%;
  align-items: center; padding-left: 50%;
  transform: translateX(0px);
  will-change: transform;
}
/* Motion blur: blurred while travelling fast, sharpening as the reel settles. */
.ticker.is-spinning { animation: reelBlur 6000ms cubic-bezier(.08,.72,.12,1) forwards; }
@keyframes reelBlur {
  0%   { filter: blur(0); }
  8%   { filter: blur(7px); }
  60%  { filter: blur(5px); }
  88%  { filter: blur(1.2px); }
  100% { filter: blur(0); }
}

/* ---------- Slab card (reel + result) ---------- */
.slab {
  flex: 0 0 200px; height: 318px;
  display: flex; flex-direction: column; gap: 8px;
}
.slab-holder {
  position: relative; flex: 1; border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, #f8fafc 0%, #e2e8f0 100%);
  border: 2px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 8px 22px rgba(8, 11, 25, 0.35), inset 0 1px 0 rgba(255,255,255,0.7);
}
.slab-label {
  position: absolute; top: 0; left: 0; right: 0; height: 34px; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, #ffffff, #e8edf6);
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  font-weight: 900; letter-spacing: 0.04em; color: #0f172a;
}
.slab-grade-co { font-size: 12px; color: #475569; }
.slab-grade-num { font-size: 16px; color: #0f172a; }
.slab-photo {
  position: absolute; top: 34px; left: 7px; right: 7px; bottom: 16px;
  border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #0f172a;
}
.slab-photo img { width: 100%; height: 100%; object-fit: cover; }
.slab-gen { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.slab-gen-emoji { font-size: 64px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }
/* Bottom rarity stripe inside the holder. */
.slab-tier-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; z-index: 2; }
.slab-meta { text-align: center; }
.slab-name {
  font-weight: 800; font-size: 13px; color: #e2e8f0; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.slab-value { color: #34d399; font-weight: 900; font-size: 15px; margin-top: 2px; }

/* Rarity tiers — holder edge + glow + bottom stripe. */
.slab.tier-common .slab-holder { border-color: #94a3b8; }
.slab.tier-common .slab-tier-bar { background: #94a3b8; }
.slab.tier-rare .slab-holder { border-color: #3b82f6; box-shadow: 0 0 18px rgba(59,130,246,0.35), 0 8px 22px rgba(8,11,25,0.35); }
.slab.tier-rare .slab-tier-bar { background: #3b82f6; }
.slab.tier-epic .slab-holder { border-color: #a855f7; box-shadow: 0 0 22px rgba(168,85,247,0.45), 0 8px 22px rgba(8,11,25,0.35); }
.slab.tier-epic .slab-tier-bar { background: #a855f7; }
.slab.tier-legendary .slab-holder { border-color: #f59e0b; box-shadow: 0 0 30px rgba(245,158,11,0.55), 0 8px 22px rgba(8,11,25,0.4); }
.slab.tier-legendary .slab-tier-bar { background: linear-gradient(90deg, #fbbf24, #f59e0b); }

/* The slab resting under the indicator when the reel stops gets a lift. */
.slab.is-landed { animation: slabLand .45s ease-out; }
.slab.is-landed .slab-holder { box-shadow: 0 0 34px rgba(245,158,11,0.5), 0 14px 30px rgba(8,11,25,0.5); }
@keyframes slabLand {
  0% { transform: scale(1); }
  50% { transform: scale(1.07); }
  100% { transform: scale(1.04); }
}

/* Sealed hobby pack — a foil wax-pack look instead of a graded-card holder. */
.slab--pack .slab-holder {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.10) 0 12px, rgba(255,255,255,0) 12px 24px),
    linear-gradient(160deg, #1e293b 0%, #0b1220 100%);
}
.slab--pack .slab-label {
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  border-bottom: 1px solid rgba(120, 53, 15, 0.35);
}
.slab--pack .slab-grade-co,
.slab--pack .slab-grade-num { color: #3b2406; }
.slab--pack .slab-photo { background: linear-gradient(160deg, #111827, #020617); }

/* Sealed box — a deep emerald holo shell, distinct from the wax-pack look. */
.slab--box .slab-holder {
  background:
    repeating-linear-gradient(135deg, rgba(52, 211, 153, 0.12) 0 12px, rgba(255,255,255,0) 12px 24px),
    linear-gradient(160deg, #064e3b 0%, #022c22 100%);
}
.slab--box .slab-label {
  background: linear-gradient(180deg, #6ee7b7, #059669);
  border-bottom: 1px solid rgba(4, 47, 24, 0.45);
}
.slab--box .slab-grade-co,
.slab--box .slab-grade-num { color: #022c22; }
.slab--box .slab-photo { background: linear-gradient(160deg, #04241b, #010f0a); }

/* Small kind tag used in lists that mix graded cards, packs and boxes. */
.kind-tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.02em; vertical-align: middle;
  color: #3b2406; background: linear-gradient(180deg, #fde68a, #f59e0b);
}
/* Emerald tint for the "Sealed box" variant of the tag. */
.kind-tag.kind-tag-box { color: #022c22; background: linear-gradient(180deg, #6ee7b7, #059669); }
/* Violet tint for the rare "Chase" variant. */
.kind-tag.kind-tag-chase { color: #fff; background: linear-gradient(180deg, #818cf8, #4f46e5); }

.reel-status { text-align: center; color: #cbd5e1; font-size: 14px; font-weight: 700; margin: 18px 0 0; }

/* ---------- Pack store grid ---------- */
/* Two featured products stack vertically with breathing room between them. */
.pack-grid { display: flex; flex-direction: column; gap: 30px; }
.pack-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  display: flex; flex-direction: column; align-items: center;
}
.pack-art {
  position: relative;
  width: 190px; height: 270px;
  border-radius: 18px;
  margin: 4px auto 18px;
  /* Pack artwork photo — centered and filling the frame with no black bars */
  background: url("/assets/pop-cards-ruby-pack.png") center center / cover no-repeat;
  box-shadow:
    0 22px 48px rgba(6, 8, 20, 0.55),
    inset 0 0 0 1.5px rgba(214, 184, 112, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 0 44px rgba(120, 140, 220, 0.14);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
}
/* The artwork already carries the branding, so hide the text/foil overlays */
.pack-art::before,
.pack-art .pack-art-shine,
.pack-art .pack-art-logo,
.pack-art .pack-art-foot { display: none; }
/* Static iridescent foil grain that catches the light across the pack face */
.pack-art::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg,
    rgba(255,255,255,0) 0px,
    rgba(120, 220, 255, 0.10) 9px,
    rgba(190, 150, 255, 0.12) 18px,
    rgba(255, 150, 210, 0.10) 27px,
    rgba(255, 224, 150, 0.10) 36px,
    rgba(150, 255, 210, 0.10) 45px,
    rgba(255,255,255,0) 54px);
  mix-blend-mode: screen;
  opacity: 0.65;
  pointer-events: none;
}
/* Holographic sheen that sweeps across like real foil under light */
.pack-art-shine {
  position: absolute; top: -60%; left: -40%;
  width: 78%; height: 220%;
  background: linear-gradient(90deg,
    transparent,
    rgba(120, 220, 255, 0.32),
    rgba(190, 150, 255, 0.44),
    rgba(255, 150, 210, 0.40),
    rgba(255, 224, 150, 0.40),
    rgba(150, 255, 210, 0.32),
    transparent);
  filter: blur(2px);
  mix-blend-mode: screen;
  transform: rotate(18deg);
  animation: packShine 4.2s ease-in-out infinite;
}
@keyframes packShine { 0%,100% { left: -50%; } 50% { left: 115%; } }
.pack-art-logo {
  position: relative; z-index: 2;
  color: #fff; font-weight: 900; font-size: 32px; line-height: 1.04;
  letter-spacing: 0.04em; text-shadow: 0 3px 14px rgba(0,0,0,0.35);
}
.pack-art-foot {
  position: relative; z-index: 2; margin-top: 14px;
  color: rgba(226, 198, 132, 0.92); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
}
.pack-name { font-size: 22px; letter-spacing: -0.02em; }
.pack-desc { color: var(--muted-ink); font-size: 14px; margin: 8px 0 18px; }
.pack-actions { display: flex; flex-direction: column; gap: 12px; width: 100%; }

/* ---------- Featured pack (homepage focal point) ---------- */
.pack-feature {
  display: grid;
  grid-template-columns: minmax(300px, 400px) 1fr;
  gap: 44px;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
  padding: 36px 44px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.12);
}
.pack-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 520px;
}
/* Glow halo radiating from behind the pack */
.pack-glow {
  position: absolute; z-index: 0;
  width: 440px; height: 470px; border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 184, 112, 0.5), rgba(150, 160, 255, 0.3) 44%, transparent 72%);
  filter: blur(26px);
  animation: glowBreath 3.8s ease-in-out infinite;
}
@keyframes glowBreath {
  0%, 100% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 1; }
}
/* The pack itself, sized to the artwork's natural shape and gently floating */
.pack-feature .pack-art {
  position: relative; z-index: 1;
  width: 300px; height: auto;
  aspect-ratio: 1 / 1;
  margin: 0;
  animation: packFloat 5s ease-in-out infinite;
}
@keyframes packFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.pack-feature .pack-art-logo { font-size: 52px; line-height: 1.05; }
.pack-feature .pack-art-foot { font-size: 14px; margin-top: 22px; letter-spacing: 0.16em; }

/* Emerald Poke pack — uses its own uploaded pack photo. Like the ruby pack, the
   artwork already carries the branding, so the text/foil overlays stay hidden and
   an emerald-tinted holder ring frames the photo. */
.pack-art--emerald {
  background: url("/assets/pop-cards-emerald-pack.png") center center / cover no-repeat;
  box-shadow:
    0 22px 48px rgba(2, 20, 14, 0.6),
    inset 0 0 0 1.5px rgba(110, 231, 183, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 0 44px rgba(16, 185, 129, 0.22);
}

.pack-info { text-align: left; }
.pack-info .pack-name { font-size: 30px; }
.pack-info .pack-desc { font-size: 15px; margin: 10px 0 22px; max-width: 440px; }

.pack-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 18px;
}
.pack-stat {
  display: flex; flex-direction: column; gap: 5px;
  background: #f8fafc; border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 10px; text-align: center;
}
.pack-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-ink); font-weight: 800; }
.pack-stat-value { font-size: 21px; font-weight: 900; letter-spacing: -0.02em; }

.pack-chase {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(120deg, rgba(79, 70, 229, 0.09), rgba(99, 102, 241, 0.03));
  border: 1px solid rgba(79, 70, 229, 0.22);
  border-radius: 16px; padding: 12px 16px; margin-bottom: 22px;
}
.chase-thumb {
  width: 58px; height: 58px; border-radius: 10px; flex-shrink: 0;
  background-size: cover; background-position: center;
  background-color: rgba(79, 70, 229, 0.1);
  display: inline-flex; align-items: center; justify-content: center; font-size: 26px;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
}
.pack-chase-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pack-chase-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--violet); font-weight: 800; }
.pack-chase-name { font-weight: 800; font-size: 15px; }
.pack-chase-value { color: var(--green); font-weight: 800; font-size: 14px; }

.hits-btn {
  width: 100%; margin-top: 14px; padding: 17px;
  background: var(--ink); color: #fff;
  font-weight: 900; font-size: 16px; letter-spacing: 0.01em;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
  transition: transform .12s, box-shadow .12s;
}
.hits-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(15, 23, 42, 0.32); }

/* ---------- Pack checklist & live odds ---------- */
.checklist {
  max-width: 640px;
  margin: 26px auto 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}
.checklist > summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  font-weight: 800;
  user-select: none;
}
.checklist > summary::-webkit-details-marker { display: none; }
.checklist > summary::after {
  content: '▾';
  margin-left: 4px;
  color: var(--muted-ink);
  transition: transform .18s;
}
.checklist[open] > summary::after { transform: rotate(180deg); }
.checklist-title { font-size: 16px; }
.checklist-meta { font-size: 12px; font-weight: 700; color: var(--muted-ink); margin-left: auto; }
.checklist-body { padding: 2px 14px 12px; max-height: 360px; overflow-y: auto; }
.checklist-row {
  display: grid;
  grid-template-columns: 34px 1fr auto 160px;
  align-items: center; gap: 12px;
  padding: 9px 4px;
  border-top: 1px solid var(--line);
}
.checklist-row:first-child { border-top: 0; }
.checklist-thumb {
  width: 34px; height: 34px; border-radius: 8px;
  background-size: cover; background-position: center;
  display: inline-flex; align-items: center; justify-content: center;
  background-color: rgba(79, 70, 229, 0.08); font-size: 16px;
}
.checklist-name { font-weight: 700; font-size: 14px; }
.checklist-value { font-size: 13px; color: var(--muted-ink); font-weight: 700; }
.checklist-odds { display: flex; align-items: center; gap: 8px; }
.checklist-bar {
  position: relative; flex: 1; height: 7px; border-radius: 999px;
  background: rgba(79, 70, 229, 0.12); overflow: hidden;
}
.checklist-bar-fill {
  position: absolute; inset: 0 auto 0 0; height: 100%;
  background: linear-gradient(90deg, #6366f1, #4f46e5);
  border-radius: 999px; transition: width .4s ease;
}
.checklist-pct { font-size: 12px; font-weight: 800; min-width: 54px; text-align: right; }
.checklist-row.is-out { opacity: 0.5; }
.checklist-row.is-out .checklist-pct { color: var(--muted-ink); }
.checklist-empty { color: var(--muted-ink); text-align: center; padding: 16px; margin: 0; }
@media (max-width: 520px) {
  .checklist-row { grid-template-columns: 30px 1fr 120px; }
  .checklist-value { display: none; }
}

.buy-btn, .open-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: 0; border-radius: 16px; padding: 15px 24px;
  cursor: pointer; color: white;
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.buy-btn { background: var(--violet); box-shadow: 0 8px 22px rgba(79, 70, 229, 0.28); }
.buy-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(79, 70, 229, 0.4); }
.buy-btn:disabled { opacity: 0.6; cursor: progress; }
.buy-label { font-weight: 900; font-size: 17px; }
.buy-price { font-size: 16px; font-weight: 900; color: #fde68a; }
.open-btn { background: var(--green); box-shadow: 0 8px 22px rgba(5, 150, 105, 0.28); }
.open-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(5, 150, 105, 0.4); }
.open-label { font-weight: 900; font-size: 17px; }
.open-sub { font-size: 12px; opacity: 0.85; }

/* ---------- Pack opening animation ---------- */
.opening-stage {
  position: relative;
  min-height: 420px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
}
.opening-glow {
  position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.35), transparent 70%);
  opacity: 0; transform: scale(0.4);
}
.opening-rays {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(99,102,241,0.18), transparent 22deg, rgba(99,102,241,0.18) 44deg, transparent 66deg, rgba(99,102,241,0.18) 88deg, transparent 110deg, rgba(99,102,241,0.18) 132deg, transparent 154deg, rgba(99,102,241,0.18) 176deg, transparent 198deg);
  opacity: 0;
}
.opening-pack {
  position: relative; width: 200px; height: 285px;
}
.opening-pack-top, .opening-pack-body {
  position: absolute; left: 0; width: 100%;
  background:
    radial-gradient(135% 90% at 50% -12%, rgba(255,255,255,0.22), rgba(255,255,255,0) 55%),
    linear-gradient(160deg, #23263a 0%, #14151f 45%, #07080d 100%);
  box-shadow:
    0 18px 40px rgba(6, 8, 20, 0.5),
    inset 0 0 0 1.5px rgba(214, 184, 112, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.opening-pack-top {
  top: 0; height: 70px; border-radius: 18px 18px 4px 4px;
  border-bottom: 2px dashed rgba(214, 184, 112, 0.55);
}
.opening-pack-body {
  top: 70px; height: 215px; border-radius: 4px 4px 18px 18px;
  display: flex; align-items: center; justify-content: center;
}
.opening-pack-logo {
  color: #fff; font-weight: 900; font-size: 30px; line-height: 1.05;
  text-align: center; letter-spacing: 0.04em; text-shadow: 0 3px 14px rgba(0,0,0,0.35);
}
.opening-flash {
  position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none;
}
.opening-caption {
  position: absolute; bottom: 26px;
  color: var(--muted-ink); font-weight: 700; font-size: 15px;
}

/* Trigger states (added via .is-opening) */
.is-opening .opening-pack { animation: packShake 1.1s ease-in-out forwards; }
.is-opening .opening-pack-top { animation: lidFly 0.9s 1.1s ease-in forwards; }
.is-opening .opening-pack-body { animation: bodyDrop 0.9s 1.1s ease-in forwards; }
.is-opening .opening-glow { animation: glowPulse 1.5s 1.0s ease-out forwards; }
.is-opening .opening-rays { animation: raysSpin 1.6s 1.0s linear forwards; }
.is-opening .opening-flash { animation: flashBurst 0.7s 1.1s ease-out forwards; }

@keyframes packShake {
  0%,100% { transform: rotate(0deg); }
  15% { transform: rotate(-5deg); } 30% { transform: rotate(5deg); }
  45% { transform: rotate(-6deg); } 60% { transform: rotate(6deg); }
  75% { transform: rotate(-4deg) scale(1.03); } 90% { transform: rotate(3deg) scale(1.05); }
}
@keyframes lidFly {
  to { transform: translateY(-160px) rotate(-24deg); opacity: 0; }
}
@keyframes bodyDrop {
  to { transform: translateY(80px) scale(0.85); opacity: 0; }
}
@keyframes glowPulse {
  0% { opacity: 0; transform: scale(0.4); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.5); }
}
@keyframes raysSpin {
  0% { opacity: 0; transform: rotate(0deg) scale(0.6); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: rotate(140deg) scale(1.2); }
}
@keyframes flashBurst {
  0% { opacity: 0; } 40% { opacity: 0.9; } 100% { opacity: 0; }
}

/* ---------- How it works ---------- */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; }
.how-step {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.how-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(79, 70, 229, 0.1); color: var(--violet); font-weight: 900;
  border: 1px solid rgba(79, 70, 229, 0.25); margin-bottom: 12px;
}
.how-step h3 { font-size: 17px; margin-bottom: 6px; }
.how-step p { color: var(--muted-ink); font-size: 14px; margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1040px; margin: 0 auto; padding: 22px 24px 40px;
  color: var(--muted-ink); font-size: 13px; border-top: 1px solid var(--line);
}
.footer-admin { color: var(--muted-ink); }
.footer-admin:hover { color: var(--ink); }

/* ---------- Result popup ---------- */
.modal-result { max-width: 440px; text-align: center; max-height: 92vh; overflow-y: auto; }
.result-burst {
  font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--violet); margin-bottom: 14px;
}
.result-image {
  display: flex; justify-content: center; align-items: center;
  width: 230px; margin: 0 auto 16px;
  transform-origin: center;
  animation: slabExpand .5s cubic-bezier(.16,.84,.3,1.2);
}
.result-image .slab { flex: 0 0 auto; width: 210px; height: 334px; }
/* The popup shows the name/value separately below, so hide the slab's own meta. */
.result-image .slab-meta { display: none; }
/* High-value pulls get a pulsing rarity halo behind the slab. */
.result-image.is-high { filter: drop-shadow(0 0 26px rgba(245, 158, 11, 0.55)); animation: slabExpand .5s cubic-bezier(.16,.84,.3,1.2), haloPulse 1.8s ease-in-out .5s infinite; }
.result-image-emoji { font-size: 72px; }
@keyframes slabExpand {
  0%   { transform: scale(.2); opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes haloPulse {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.4)); }
  50%      { filter: drop-shadow(0 0 34px rgba(245, 158, 11, 0.7)); }
}
.result-name { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 8px; }
.result-value {
  display: inline-flex; align-items: baseline; gap: 8px;
  background: rgba(5, 150, 105, 0.1); border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: 999px; padding: 8px 18px; margin-bottom: 20px;
}
.result-value-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-ink); }
.result-value-amount { font-size: 20px; font-weight: 900; color: var(--green); }
.result-actions { display: flex; flex-direction: column; gap: 12px; }
.choice-ship, .choice-sell {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border: 0; border-radius: 14px;
  text-align: left; cursor: pointer; color: white; width: 100%;
  transition: transform .12s, box-shadow .12s;
}
.choice-ship { background: var(--violet); box-shadow: 0 4px 16px rgba(79, 70, 229, 0.25); }
.choice-sell { background: var(--green); box-shadow: 0 4px 16px rgba(5, 150, 105, 0.25); }
.choice-keep { background: var(--ink); box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2); }
.choice-ship:hover, .choice-sell:hover, .choice-keep:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18); }
.choice-sell.is-disabled, .choice-ship.is-disabled {
  filter: grayscale(0.7); opacity: 0.6; cursor: not-allowed;
}
.choice-sell.is-disabled:hover, .choice-ship.is-disabled:hover { transform: none; box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12); }
.choice-icon { font-size: 28px; flex-shrink: 0; }
.choice-text { display: flex; flex-direction: column; gap: 2px; }
.choice-text strong { font-size: 15px; }
.choice-text small { font-size: 12px; font-weight: 400; opacity: 0.88; }

/* ---------- Modals (shared) ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal {
  background: #ffffff; border: 1px solid var(--line);
  border-radius: 20px; padding: 28px; width: 100%; max-width: 480px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
}
.modal-sm { max-width: 380px; }
.modal h2 { margin: 0 0 6px; font-size: 22px; }
.modal-item-label { color: var(--green); font-weight: 700; margin: 0 0 18px; font-size: 15px; }
.modal form { display: flex; flex-direction: column; gap: 12px; }
.modal label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted-ink); }
.modal input { background: #ffffff; color: var(--ink); border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px; }
.modal input::placeholder { color: #94a3b8; }
.form-row { display: grid; grid-template-columns: 1fr 80px 100px; gap: 10px; }
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.modal-actions button { flex: 1; padding: 12px; font-size: 15px; }

/* ---------- Contact support modal ---------- */
.contact-message { color: var(--muted-ink); font-size: 15px; line-height: 1.5; margin: 0 0 16px; }
.contact-email-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 4px;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 12px;
}
.contact-email-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 800; color: var(--muted-ink);
}
.contact-email {
  color: var(--violet); font-weight: 800; font-size: 15px;
  text-decoration: none; word-break: break-all; margin-right: auto;
}
.contact-email:hover { text-decoration: underline; }
.contact-copy { flex: 0 0 auto; padding: 9px 14px; font-size: 13px; }
.contact-copy.copied {
  background: rgba(5, 150, 105, 0.12); color: var(--green);
  border-color: rgba(5, 150, 105, 0.5);
}

/* ---------- Generic controls ---------- */
input, button {
  border: 0; border-radius: 12px; padding: 12px 14px; font-size: 14px; font-family: inherit;
}
button { background: var(--green); color: #ffffff; font-weight: 800; cursor: pointer; }
button.secondary { background: #f1f5f9; color: var(--ink); border: 1px solid var(--line); }
button.danger { background: #ef4444; color: white; }
.hidden { display: none !important; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #ffffff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 24px; font-size: 15px; font-weight: 700;
  z-index: 200; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18); transition: opacity .3s;
}
.toast.toast-success { border-color: rgba(5, 150, 105, 0.5); color: #047857; }
.toast.toast-error { border-color: rgba(239, 68, 68, 0.5); color: #b91c1c; }

/* ---------- Admin ---------- */
.admin-body { background: #f1f5f9; }

/* Two-column shell: fixed sidebar on the left, scrollable content on the right. */
.admin-shell { display: flex; min-height: 100vh; align-items: stretch; }

.admin-sidebar {
  position: sticky; top: 0; align-self: flex-start;
  width: 250px; flex-shrink: 0; height: 100vh;
  background: var(--ink); color: #e2e8f0;
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 16px; box-sizing: border-box;
}
.admin-brand {
  font-size: 20px; font-weight: 900; letter-spacing: -0.02em;
  padding: 6px 10px 14px; color: #fff;
}
.admin-brand span {
  display: inline-block; margin-left: 6px; color: #a5b4fc;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
  vertical-align: middle;
}
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: transparent; color: #cbd5e1; border: 0;
  padding: 11px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.admin-nav-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.admin-nav-btn.is-active { background: var(--violet); color: #fff; }
.admin-nav-icon { font-size: 16px; line-height: 1; width: 20px; text-align: center; }
.admin-sidebar-footer {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 14px; margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.admin-sidebar-footer .admin-link-btn { text-align: center; }

.admin-main {
  flex: 1; min-width: 0;
  max-width: 1200px; margin: 0 auto; width: 100%;
  padding: 28px 32px 60px; box-sizing: border-box;
}
.admin-view-header { margin-bottom: 24px; }
.admin-view-header h1 { font-size: 30px; letter-spacing: -0.02em; }
.admin-view-header p { color: var(--muted-ink); margin: 6px 0 0; }

/* Only the active view is shown; the sidebar swaps between them. */
.admin-view { display: none; }
.admin-view.is-active { display: block; }

.admin-link-btn { padding: 10px 16px; border-radius: 12px; font-weight: 700; white-space: nowrap; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px; margin-bottom: 20px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
.panel h2 { margin: 0 0 14px; font-size: 19px; }
.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted-ink); text-transform: uppercase; letter-spacing: 0.05em; }
.field input { background: #ffffff; color: var(--ink); border: 1px solid var(--line); text-transform: none; letter-spacing: normal; font-size: 14px; }
.field input::placeholder { color: #94a3b8; }
.field-wide { grid-column: span 2; }
.admin-form-actions { grid-column: 1 / -1; display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.admin-form-buttons { display: flex; gap: 10px; }
.admin-form-actions button { min-width: 140px; }

/* Live wallet balance readout in the Add / Remove Funds form. */
.funds-balance-box { justify-content: flex-end; }
.funds-balance { font-size: 20px; font-weight: 900; color: var(--muted-ink); text-transform: none; letter-spacing: normal; }
.funds-balance.funds-balance-found { color: var(--green); }
.funds-balance.funds-balance-missing { color: #b91c1c; font-size: 14px; font-weight: 700; }

/* Read-only site configuration list on the Settings view. */
.settings-info { display: flex; flex-direction: column; gap: 12px; }
.settings-info-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc;
}
.settings-info-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-ink); font-weight: 800; }
.settings-info-value { font-weight: 700; color: var(--ink); }
.image-preview { display: flex; align-items: center; gap: 12px; }
.image-preview img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 12px;
  border: 1px solid var(--line); background: #f8fafc;
}
.field input[type="file"] { padding: 8px; cursor: pointer; }

/* Bulk CSV import */
.csv-import {
  margin: 18px 0 24px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.02);
}
.csv-import-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.csv-import-head h3 { margin: 0; }
.csv-template-link { white-space: nowrap; }
.csv-import p { margin: 6px 0 12px; }
.csv-import code {
  background: rgba(15, 23, 42, 0.06); border-radius: 5px;
  padding: 1px 5px; font-size: 12px;
}
.csv-import-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.csv-import-row input[type="file"] {
  flex: 1; min-width: 200px; padding: 8px;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.csv-result {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  font-size: 13px; line-height: 1.5;
}
.csv-result ul { margin: 6px 0 0; padding-left: 18px; }
.csv-result-ok { background: rgba(22, 163, 74, 0.1); color: #15803d; }
.csv-result-warn { background: rgba(202, 138, 4, 0.12); color: #a16207; }
.csv-result-error { background: rgba(220, 38, 38, 0.1); color: #b91c1c; }

.admin-table-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.muted { color: var(--muted-ink); font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 12px 10px; font-size: 14px; }
th { color: var(--muted-ink); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.row-inactive td { opacity: 0.5; }
.cell-slab { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.thumb { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; background: #f1f5f9; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.thumb-empty { border: 1px solid var(--line); }
.cell-actions { display: flex; gap: 8px; }
.cell-actions button { padding: 8px 14px; font-size: 13px; }

.status-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-paid { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-active { background: #dcfce7; color: #166534; }
.status-completed { background: #dcfce7; color: #166534; }
.status-shipped { background: #e0e7ff; color: #3730a3; }
.status-owned { background: #f1f5f9; color: #475569; }
.status-sold { background: #f1f5f9; color: #475569; }
.status-inactive { background: #f1f5f9; color: #64748b; }
.status-credited { background: #dcfce7; color: #166534; }
.status-failed { background: #fee2e2; color: #991b1b; }
.status-needs_review { background: #fef3c7; color: #92400e; }

/* ---------- Dashboard metric cards ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 20px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  display: flex; flex-direction: column; gap: 6px;
}
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-ink); font-weight: 800; }
.stat-value { font-size: 30px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; }
.stat-value.green { color: var(--green); }
.stat-value.violet { color: var(--violet); }
.stat-sub { font-size: 12px; color: var(--muted-ink); }
.panel h3 { margin: 0; font-size: 15px; }
.cell-mono { font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace; font-size: 13px; color: var(--muted-ink); }

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

/* Below tablet width, the sidebar folds to a horizontal top bar so the nav and
   content stack vertically instead of squeezing the tables. */
@media (max-width: 900px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    position: static; width: 100%; height: auto;
    flex-direction: column; gap: 12px;
  }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-nav-btn { width: auto; flex: 1 1 auto; justify-content: center; }
  .admin-sidebar-footer {
    flex-direction: row; flex-wrap: wrap; border-top: 0; padding-top: 0; margin-top: 0;
  }
  .admin-sidebar-footer .admin-link-btn { flex: 1 1 auto; }
  .admin-main { padding: 22px 18px 48px; }
}
@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ---------- Auth nav + dashboard ---------- */
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-btn { padding: 9px 16px; border-radius: 12px; font-size: 14px; font-weight: 800; }
.nav-btn.secondary { background: #f1f5f9; color: var(--ink); border: 1px solid var(--line); }
.nav-email { font-size: 13px; font-weight: 700; color: var(--muted-ink); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dash-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 26px;
}
.dash-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; text-align: center; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.dash-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-ink); font-weight: 700; }
.dash-value { font-size: 38px; font-weight: 900; letter-spacing: -0.02em; }
.dash-value.green { color: var(--green); }
.dash-value.violet { color: var(--violet); }
.dash-sub { font-size: 12px; color: var(--muted-ink); }
.dash-actions { text-align: center; margin-bottom: 34px; }
.dash-actions button { padding: 13px 30px; font-size: 15px; }
.dash-collection h2 { font-size: 20px; margin-bottom: 16px; text-align: center; }
.collection-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px;
}
.collection-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px;
  text-align: center; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}
.collection-card .thumb { width: 100%; height: 96px; border-radius: 10px; font-size: 40px; }
.collection-card .name { font-weight: 800; font-size: 13px; margin-top: 8px; }
.collection-card .value { color: var(--green); font-weight: 800; font-size: 13px; margin-top: 2px; }
.collection-card .badge {
  display: inline-block; margin-top: 6px; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--violet);
  background: rgba(79, 70, 229, 0.1); border-radius: 999px; padding: 2px 8px;
}
.collection-card.clickable { cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; }
.collection-card.clickable:hover { transform: translateY(-3px); border-color: var(--violet); box-shadow: 0 10px 24px rgba(79, 70, 229, 0.16); }
.collection-card .card-hint {
  display: inline-block; margin-top: 6px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-ink);
}
.collection-empty { color: var(--muted-ink); text-align: center; grid-column: 1 / -1; padding: 20px; }

/* ---------- Collection selection + withdraw ---------- */
.collection-card.selectable {
  position: relative; cursor: pointer;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.collection-card.selectable:hover { transform: translateY(-3px); border-color: var(--violet); box-shadow: 0 10px 24px rgba(79, 70, 229, 0.16); }
.collection-card.selectable .select-check {
  position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900;
  color: transparent; background: var(--panel); border: 2px solid var(--line); transition: all .12s;
}
.collection-card.selected {
  border-color: var(--violet); box-shadow: 0 0 0 2px var(--violet) inset, 0 10px 24px rgba(79, 70, 229, 0.18);
}
.collection-card.selected .select-check { color: #fff; background: var(--violet); border-color: var(--violet); }
.collection-card .card-sell {
  margin-top: 8px; width: 100%; font-size: 11px; font-weight: 800; padding: 5px 8px;
  background: rgba(15, 23, 42, 0.05); color: var(--ink); border-radius: 8px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.collection-card .card-sell:hover { background: rgba(15, 23, 42, 0.1); }

.withdraw-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 16px; margin-bottom: 14px; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}
.withdraw-bar-info { display: flex; flex-direction: column; gap: 2px; }
.withdraw-bar-count { font-weight: 800; font-size: 14px; }
.withdraw-bar-fee { color: var(--muted-ink); font-size: 12px; }
.withdraw-bar-actions { display: flex; gap: 8px; }

.ship-fee-note { color: var(--muted-ink); font-size: 13px; margin: 0 0 16px; }
.ship-insufficient {
  background: #fef3c7; border: 1px solid #fcd34d; border-radius: 12px;
  padding: 14px 16px; margin: 0 0 18px; text-align: center;
}
.ship-insufficient p { color: #92400e; font-weight: 600; margin: 0 0 12px; font-size: 14px; }

/* ---------- Auth modal links ---------- */
.auth-links { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; align-items: center; }
.linkbtn {
  background: none; color: var(--violet); font-weight: 700; font-size: 13px;
  padding: 4px; border-radius: 6px;
}
.linkbtn:hover { text-decoration: underline; }

@media (max-width: 850px) {
  .hero h1 { font-size: 34px; }
  .how { grid-template-columns: 1fr; }
  .nav { padding: 14px 18px; }
  .nav-wallet { gap: 8px; }
  .nav-right { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
  .nav-email { display: none; }
  .dash-stats { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr 1fr; }
  .field-wide { grid-column: span 2; }
  .form-row { grid-template-columns: 1fr; }
  .pack-feature { grid-template-columns: 1fr; gap: 26px; padding: 28px 22px; }
  .pack-info { text-align: center; }
  .pack-info .pack-desc { margin-left: auto; margin-right: auto; }
  .pack-chase { justify-content: center; }
}
@media (max-width: 460px) {
  .pack-stage { min-height: 440px; }
  .pack-feature .pack-art { width: 230px; height: auto; }
  .pack-feature .pack-art-logo { font-size: 42px; }
  .pack-glow { width: 340px; height: 370px; }
  .pack-stats { grid-template-columns: 1fr; }
}

/* ---------- Wallet ---------- */
.chip-add {
  align-self: center;
  font-size: 13px;
  padding: 8px 14px;
}
.dash-wallet-actions {
  display: flex; gap: 10px; margin-top: 12px; justify-content: center;
}
.wallet-action {
  padding: 9px 18px; font-size: 14px; border-radius: 10px; font-weight: 800;
  border: 1px solid var(--line); cursor: pointer;
}
.wallet-action.deposit { background: var(--green); color: #fff; border-color: transparent; }
.wallet-action.withdraw { background: #fff; color: var(--ink); }
.wallet-action:hover { filter: brightness(0.97); }
.amount-presets { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.amount-preset {
  flex: 1 1 40%; padding: 12px 0; border-radius: 10px; font-weight: 800; font-size: 15px;
  background: #f8fafc; border: 1px solid var(--line); color: var(--ink); cursor: pointer;
}
.amount-preset .preset-name { display: block; font-size: 11px; font-weight: 600; opacity: 0.7; margin-top: 2px; }
.amount-preset.is-active { background: rgba(16, 185, 129, 0.12); border-color: var(--green); color: var(--green); }
.amount-preset:hover { border-color: var(--green); }
.pack-paid-note {
  margin: 6px 0 0; text-align: center; font-size: 12px; color: var(--muted-ink); font-weight: 600;
}

/* ---------- Admin: registered accounts collection ---------- */
.collection-details { display: inline-block; }
.collection-details > summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 12px; font-weight: 800; color: var(--violet); background: rgba(79, 70, 229, 0.08);
  user-select: none;
}
.collection-details > summary::-webkit-details-marker { display: none; }
.collection-details > summary::before { content: '▸'; font-size: 10px; }
.collection-details[open] > summary::before { content: '▾'; }
.collection-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-width: 460px;
}
.collection-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 8px;
  border: 1px solid var(--line); background: #f8fafc; font-size: 12px; font-weight: 700; color: var(--ink);
}

/* Clickable "Items" summary in the admin Shipments table. Toggles the detail
   row below it that lists every slab the customer asked us to ship. */
.link-button {
  background: none; border: none; padding: 0; margin: 0; font: inherit; cursor: pointer;
  color: var(--violet); font-weight: 700; text-align: left;
}
.link-button:hover { text-decoration: underline; }
.items-toggle::before {
  content: '▸'; display: inline-block; font-size: 10px; margin-right: 6px; color: var(--muted-ink);
}
.items-toggle[aria-expanded="true"]::before { content: '▾'; }
.items-detail > td { padding: 0; }
.items-detail-box {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin: 4px 8px 12px;
}
.items-detail-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em;
  font-weight: 800; color: var(--muted-ink); margin-bottom: 8px;
}
.items-detail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.items-detail-item {
  display: flex; justify-content: space-between; gap: 16px; padding: 6px 8px;
  border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--ink);
}
.items-detail-item:nth-child(odd) { background: #ffffff; }
.items-detail-value { color: var(--green); white-space: nowrap; }
