/* WikiVaults — Modern Museum Card Presentation Engine
   Refined Precision Radii (Non-Bubble) • 5 Distinct Rarity Tiers
   Full-Bleed Visuals • Clean Architectural Framing • Distinct Decals & Shaders
*/

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

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

/* ==========================================================================
   BASE CARD CONTAINER (Refined Precision Radii)
   ========================================================================== */
.card-museum-item {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-container-lowest, #ffffff);
  padding: 0.45rem;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  user-select: none;
  cursor: pointer;
}

.card-museum-item:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .card-museum-item:hover {
    transform: translateY(-4px) scale(1.02);
    z-index: 10;
  }
}

/* ==========================================================================
   TIER 1: COMMON (The Minimalist Archival Slab)
   Clean, matte, scholarly document presentation with zero visual clutter.
   ========================================================================== */
.card-museum-item[data-rarity="common"] {
  border-radius: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.card-museum-item[data-rarity="common"] .aura-halo {
  background: transparent;
  box-shadow: none;
  opacity: 0;
}

.card-museum-item[data-rarity="common"] .card-substrate {
  border-radius: 0.65rem;
  border: 1px solid rgba(203, 213, 225, 0.85);
}

.card-museum-item[data-rarity="common"] .decal-title-bar {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 0.5rem;
}

.card-museum-item[data-rarity="common"] .decal-title-text {
  color: #334155;
  font-weight: 700;
}

.card-museum-item[data-rarity="common"] .decal-energy-badge {
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid #cbd5e1;
  border-radius: 0.45rem;
}

.card-museum-item[data-rarity="common"] .decal-energy-value {
  color: #475569;
}

.card-museum-item[data-rarity="common"] .card-sheen {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.12) 0%, transparent 40%, rgba(19, 27, 46, 0.45) 100%);
}

.card-museum-item[data-rarity="common"] .decal-rarity-tag {
  color: #64748b;
  font-weight: 700;
}

/* ==========================================================================
   TIER 2: UNCOMMON (The Emerald Specimen)
   Organic, jade-specimen presentation with emerald resin sheen & breathing glow.
   ========================================================================== */
.card-museum-item[data-rarity="uncommon"] {
  border-radius: 0.9rem;
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 5px 16px rgba(16, 185, 129, 0.1);
}

.card-museum-item[data-rarity="uncommon"] .aura-halo {
  background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #059669 100%);
  border-radius: 1rem;
  opacity: 0.45;
  filter: blur(8px);
  box-shadow: 0 0 16px 3px rgba(16, 185, 129, 0.28);
}

.card-museum-item[data-rarity="uncommon"]:hover .aura-halo {
  opacity: 0.75;
  box-shadow: 0 0 22px 5px rgba(16, 185, 129, 0.38);
}

.card-museum-item[data-rarity="uncommon"] .card-substrate {
  border-radius: 0.75rem;
  border: 1.5px solid #10b981;
}

.card-museum-item[data-rarity="uncommon"] .decal-title-bar {
  background: rgba(240, 253, 244, 0.94);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 0.55rem;
}

.card-museum-item[data-rarity="uncommon"] .decal-title-text {
  color: #065f46;
  font-weight: 800;
}

.card-museum-item[data-rarity="uncommon"] .decal-energy-badge {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1.5px solid #10b981;
  border-radius: 0.45rem;
}

.card-museum-item[data-rarity="uncommon"] .decal-energy-value {
  color: #047857;
}

.card-museum-item[data-rarity="uncommon"] .card-sheen {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, transparent 45%, rgba(6, 78, 59, 0.5) 100%);
}

.card-museum-item[data-rarity="uncommon"] .decal-rarity-tag {
  color: #059669;
  font-weight: 800;
}

/* ==========================================================================
   TIER 3: RARE (The Cyan Crystalline Tech Relic)
   Precision cyber-crystal aesthetic with diagonal scanline foil & azure aura.
   ========================================================================== */
.card-museum-item[data-rarity="rare"] {
  border-radius: 1rem;
  border: 1.5px solid rgba(13, 153, 255, 0.45);
  box-shadow: 0 6px 20px rgba(13, 153, 255, 0.15);
}

.card-museum-item[data-rarity="rare"] .aura-halo {
  background: linear-gradient(135deg, #0061a5 0%, #0d99ff 50%, #9fcaff 100%);
  border-radius: 1.15rem;
  opacity: 0.6;
  filter: blur(10px);
  box-shadow: 0 0 22px 5px rgba(13, 153, 255, 0.32);
}

.card-museum-item[data-rarity="rare"]:hover .aura-halo {
  opacity: 0.85;
  box-shadow: 0 0 30px 7px rgba(13, 153, 255, 0.42);
}

.card-museum-item[data-rarity="rare"] .card-substrate {
  border-radius: 0.85rem;
  border: 2px solid #0d99ff;
  box-shadow: inset 0 0 8px rgba(13, 153, 255, 0.22);
}

.card-museum-item[data-rarity="rare"] .decal-title-bar {
  background: rgba(240, 249, 255, 0.94);
  border: 1.5px solid rgba(13, 153, 255, 0.6);
  border-radius: 0.6rem;
  box-shadow: 0 0 10px rgba(13, 153, 255, 0.2);
}

.card-museum-item[data-rarity="rare"] .decal-title-text {
  color: #00497e;
  font-weight: 800;
}

.card-museum-item[data-rarity="rare"] .decal-energy-badge {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #0d99ff;
  border-radius: 0.5rem;
  box-shadow: 0 0 8px rgba(13, 153, 255, 0.3);
}

.card-museum-item[data-rarity="rare"] .decal-energy-value {
  color: #0284c7;
}

.card-museum-item[data-rarity="rare"] .card-sheen {
  background: 
    repeating-linear-gradient(45deg, rgba(13, 153, 255, 0.08) 0px, rgba(13, 153, 255, 0.08) 2px, transparent 2px, transparent 6px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.2) 0%, transparent 40%, rgba(0, 47, 85, 0.6) 100%);
}

.card-museum-item[data-rarity="rare"] .decal-rarity-tag {
  color: #0061a5;
  font-weight: 800;
}

/* ==========================================================================
   TIER 4: EPIC (The Royal Amethyst / Nebula Artifact)
   Royal cosmic aesthetic with metallic violet gradient rim & chromatic wave shimmer.
   ========================================================================== */
.card-museum-item[data-rarity="epic"] {
  border-radius: 1.15rem;
  border: 2px solid rgba(234, 87, 255, 0.55);
  box-shadow: 0 8px 24px rgba(162, 0, 186, 0.18);
}

.card-museum-item[data-rarity="epic"] .aura-halo {
  background: linear-gradient(135deg, #7c008e 0%, #ea57ff 40%, #a200ba 70%, #fbabff 100%);
  border-radius: 1.3rem;
  opacity: 0.7;
  filter: blur(12px);
  box-shadow: 0 0 28px 7px rgba(234, 87, 255, 0.38), 0 0 45px 10px rgba(162, 0, 186, 0.22);
  animation: epicPulse 4s ease-in-out infinite alternate;
}

@keyframes epicPulse {
  0% { transform: scale(0.99); opacity: 0.65; }
  100% { transform: scale(1.02); opacity: 0.9; }
}

.card-museum-item[data-rarity="epic"] .card-substrate {
  border-radius: 0.95rem;
  border: 2px solid #ea57ff;
  box-shadow: inset 0 0 10px rgba(234, 87, 255, 0.28);
}

.card-museum-item[data-rarity="epic"] .decal-title-bar {
  background: rgba(253, 244, 255, 0.94);
  border: 1.5px solid rgba(234, 87, 255, 0.7);
  border-radius: 0.65rem;
  box-shadow: 0 0 12px rgba(234, 87, 255, 0.25);
}

.card-museum-item[data-rarity="epic"] .decal-title-text {
  color: #580066;
  font-weight: 800;
}

.card-museum-item[data-rarity="epic"] .decal-energy-badge {
  background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%);
  border: 2px solid #ea57ff;
  border-radius: 0.5rem;
  box-shadow: 0 0 10px rgba(234, 87, 255, 0.35);
}

.card-museum-item[data-rarity="epic"] .decal-energy-value {
  color: #c026d3;
}

.card-museum-item[data-rarity="epic"] .card-sheen {
  background: 
    linear-gradient(125deg, transparent 20%, rgba(234, 87, 255, 0.2) 40%, rgba(162, 0, 186, 0.2) 60%, transparent 80%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.25) 0%, transparent 40%, rgba(88, 0, 102, 0.65) 100%);
  background-size: 200% 200%;
  animation: epicShimmer 5s ease-in-out infinite;
}

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

.card-museum-item[data-rarity="epic"] .decal-rarity-tag {
  color: #a200ba;
  font-weight: 800;
}

/* ==========================================================================
   TIER 5: LEGENDARY (The 24K Sovereign Crown / Celestial Rainbow Relic)
   24K gold sculpted bezel, diamond sparkle crest, and shifting iridescent rainbow foil.
   ========================================================================== */
.card-museum-item[data-rarity="legendary"] {
  border-radius: 1.25rem;
  padding: 0.55rem;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 50%, #fef3c7 100%);
  border: 2.5px solid #f59e0b;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.22), 0 0 25px rgba(234, 87, 255, 0.18);
}

.card-museum-item[data-rarity="legendary"] .aura-halo {
  background: linear-gradient(135deg, #ea57ff 0%, #0d99ff 35%, #ffd700 70%, #f59e0b 100%);
  background-size: 300% 300%;
  border-radius: 1.4rem;
  opacity: 0.8;
  filter: blur(12px);
  animation: legendaryRainbowDiffraction 6s ease-in-out infinite;
  box-shadow: 
    0 0 32px 8px rgba(234, 87, 255, 0.32),
    0 0 55px 14px rgba(13, 153, 255, 0.25),
    0 0 75px 18px rgba(245, 158, 11, 0.28);
}

.card-museum-item[data-rarity="legendary"]:hover .aura-halo {
  opacity: 0.95;
  box-shadow: 
    0 0 40px 12px rgba(234, 87, 255, 0.4),
    0 0 70px 18px rgba(13, 153, 255, 0.32),
    0 0 95px 24px rgba(245, 158, 11, 0.36);
}

.card-museum-item[data-rarity="legendary"] .card-substrate {
  border-radius: 1.05rem;
  border: 2.5px solid #d97706;
  box-shadow: inset 0 0 12px rgba(245, 158, 11, 0.4);
}

.card-museum-item[data-rarity="legendary"] .decal-title-bar {
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.96) 0%, rgba(254, 243, 199, 0.92) 100%);
  border: 2px solid #f59e0b;
  border-radius: 0.7rem;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.card-museum-item[data-rarity="legendary"] .decal-title-text {
  color: #78350f;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.card-museum-item[data-rarity="legendary"] .decal-energy-badge {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #f59e0b 100%);
  border: 2px solid #b45309;
  border-radius: 0.55rem;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.card-museum-item[data-rarity="legendary"] .decal-energy-label {
  color: #78350f;
  font-weight: 800;
}

.card-museum-item[data-rarity="legendary"] .decal-energy-value {
  color: #451a03;
  font-weight: 900;
}

.card-museum-item[data-rarity="legendary"] .card-sheen {
  background: 
    linear-gradient(115deg, 
      transparent 0%, 
      rgba(255, 255, 255, 0.25) 25%, 
      rgba(234, 87, 255, 0.25) 40%, 
      rgba(13, 153, 255, 0.25) 55%, 
      rgba(255, 215, 0, 0.3) 70%, 
      transparent 100%
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0%, transparent 40%, rgba(67, 40, 0, 0.7) 100%);
  background-size: 250% 250%;
  mix-blend-mode: color-dodge;
  animation: legendaryRainbowDiffraction 5s ease-in-out infinite;
}

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

.card-museum-item[data-rarity="legendary"] .decal-rarity-tag {
  color: #b45309;
  font-weight: 900;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   CARD SUBSTRATE & GENERAL DECALS
   ========================================================================== */
.card-substrate {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: var(--surface-dim, #d2d9f4);
}

.card-img-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-out;
}

.card-museum-item:hover .card-img-element {
  transform: scale(1.05);
}

.card-placeholder-box {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: linear-gradient(
    110deg,
    rgba(226, 232, 240, 0.7) 8%,
    rgba(248, 250, 252, 0.95) 25%,
    rgba(226, 232, 240, 0.7) 45%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.8s ease-in-out infinite;
  z-index: 1;
}

@keyframes skeletonShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.skeleton-icon-disc {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   THE WIKI-EXTRACT: TEXT AS ART (Editorial Curatorial Artwork)
   ========================================================================== */
.card-wiki-extract {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 4.2rem 1.05rem 3.4rem 1.05rem;
  box-sizing: border-box;
  overflow: hidden;
  user-select: none;
}

/* Massive procedural monogram glyph bleeding off background edge */
.wiki-extract-bg-glyph {
  position: absolute;
  right: -0.6rem;
  bottom: 0.6rem;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 10.5rem;
  font-weight: 900;
  line-height: 0.75;
  pointer-events: none;
  user-select: none;
  opacity: 0.11;
  color: currentColor;
}

/* Tier-tinted editorial paper substrates */
.card-wiki-extract.tier-common {
  background: linear-gradient(150deg, #ffffff 0%, #f1f5f9 65%, #e2e8f0 100%);
  color: #334155;
}
.card-wiki-extract.tier-uncommon {
  background: linear-gradient(150deg, #f0fdf4 0%, #dcfce7 65%, #bbf7d0 100%);
  color: #065f46;
}
.card-wiki-extract.tier-rare {
  background: linear-gradient(150deg, #f0f9ff 0%, #e0f2fe 65%, #bae6fd 100%);
  color: #0369a1;
}
.card-wiki-extract.tier-epic {
  background: linear-gradient(150deg, #faf5ff 0%, #f3e8ff 65%, #e9d5ff 100%);
  color: #6b21a8;
}
.card-wiki-extract.tier-legendary {
  background: linear-gradient(150deg, #fffbeb 0%, #fef3c7 65%, #fde68a 100%);
  color: #92400e;
}

.wiki-extract-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.wiki-extract-quote-mark {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 1.9rem;
  line-height: 1;
  height: 1rem;
  opacity: 0.35;
  color: currentColor;
  margin-bottom: 0.12rem;
}

.wiki-extract-text {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 0.74rem;
  line-height: 1.36;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: currentColor;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.wiki-extract-divider {
  width: 28px;
  height: 2px;
  background: currentColor;
  opacity: 0.25;
  margin-top: 0.45rem;
  border-radius: 9999px;
}

/* ==========================================================================
   STATUS DECAL BADGE (Below Name, Left of Energy)
   ========================================================================== */
.decal-status-badge {
  position: absolute;
  top: 2.45rem;
  left: 0.45rem;
  padding: 0.22rem 0.45rem;
  border-radius: 0.45rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  z-index: 2;
}

.decal-status-badge.auction {
  background: rgba(41, 18, 5, 0.88);
  border-color: rgba(245, 158, 11, 0.65);
}

.decal-status-badge.auction span:first-child {
  animation: pulse 1.8s ease-in-out infinite;
}

.card-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Decals (Refined subtle radius) */
.decal-title-bar {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  right: 0.45rem;
  padding: 0.3rem 0.55rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

.decal-title-text {
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.decal-energy-badge {
  position: absolute;
  top: 2.45rem;
  right: 0.45rem;
  padding: 0.25rem 0.4rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 42px;
  text-align: center;
  z-index: 2;
}

.decal-energy-label {
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.decal-energy-value {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 1px;
}

/* Enclosed Bottom Meta Bar (Internalized inside Card Substrate) */
.decal-bottom-bar {
  position: absolute;
  bottom: 0.45rem;
  left: 0.45rem;
  right: 0.45rem;
  padding: 0.3rem 0.5rem;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

.decal-bottom-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  line-height: 1;
}

.decal-bottom-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  line-height: 1;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 0.18rem;
}

.decal-rarity-tag {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.decal-reach-stat {
  display: flex;
  align-items: center;
  gap: 1.5px;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--on-surface, #1e293b);
  line-height: 1;
}

.decal-display-tag {
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--on-surface-variant, #64748b);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.decal-page-id {
  font-size: 0.5rem;
  font-weight: 600;
  color: var(--outline, #94a3b8);
  line-height: 1;
}

/* Card Outer Footer (Cleanly integrated / zero margin) */
.card-info-footer {
  display: none;
}

/* Scroll Affordance Edge Fade */
.scroll-edge-fade {
  background: linear-gradient(to right, transparent 0%, rgba(250, 248, 255, 0.75) 50%, var(--surface, #faf8ff) 100%);
}

/* ==========================================================================
   AUCTION HOUSE MODERN MUSEUM COLLECTIBLE SLABS (ADR-005)
   ========================================================================== */
.card-auction-slab {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0.45rem;
  user-select: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.card-auction-slab .card-substrate {
  aspect-ratio: 1 / 1.4;
}

/* Sub-Title Row inside Auction Substrate */
.decal-auction-header-row {
  position: absolute;
  top: 2.45rem;
  left: 0.45rem;
  right: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  z-index: 3;
}

/* Live Countdown Timer Pill */
.auction-timer-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.45rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f8fafc;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.auction-timer-badge.ending-soon {
  background: rgba(190, 18, 60, 0.92);
  border-color: rgba(251, 113, 133, 0.6);
  color: #fff1f2;
}

/* Status / Rarity Pills in Auction Header */
.auction-rarity-pill {
  padding: 0.2rem 0.45rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.auction-status-badge {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.45rem;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.auction-status-badge.winning {
  background: rgba(6, 78, 59, 0.9);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.6);
}

.auction-status-badge.outbid {
  background: rgba(136, 19, 55, 0.92);
  color: #fda4af;
  border: 1px solid rgba(251, 113, 133, 0.6);
  animation: pulse 1.8s ease-in-out infinite;
}

.auction-status-badge.seller {
  background: rgba(120, 53, 15, 0.9);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.6);
}

/* Enclosed Bottom Auction Bar */
.decal-auction-bar {
  position: absolute;
  bottom: 0.45rem;
  left: 0.45rem;
  right: 0.45rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  z-index: 3;
}

.auction-info-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.58rem;
  line-height: 1;
}

.auction-seller-meta {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--on-surface-variant, #64748b);
  font-weight: 600;
  max-width: 55%;
}

.auction-bid-count-tag {
  color: var(--on-surface-variant, #64748b);
  font-size: 0.58rem;
}

.auction-bid-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding-top: 0.2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.auction-bid-amount-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.auction-bid-sub-label {
  font-size: 0.48rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--outline, #94a3b8);
}

.auction-bid-amount {
  display: flex;
  align-items: center;
  gap: 1.5px;
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--on-surface, #0f172a);
  margin-top: 1px;
}

/* Stadium Quick-Bid Pill Button */
.auction-quick-bid-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.28);
  transition: transform 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

.auction-quick-bid-pill:active {
  transform: scale(0.92);
}

.auction-quick-bid-pill.leading-bid {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.auction-quick-bid-pill.outbid {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.3);
  animation: pulse 1.8s ease-in-out infinite;
}

/* User Participation Glowing Rings on Auction Slab */
.card-auction-slab.is-winning {
  border-color: #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}
.card-auction-slab.is-outbid {
  border-color: #f43f5e !important;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.35);
  animation: pulse 2s ease-in-out infinite;
}
.card-auction-slab.is-seller {
  border-color: #f59e0b !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   PACK OPENING CEREMONY & 3D SWIPE DECK (ADR-016 / ADR-017)
   Hardware-accelerated (60/120fps): pure transform & opacity compositor rules
   ========================================================================== */

@keyframes packUnboxingShake {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  20% { transform: translate3d(-5px, 0, 0) rotate(-1.5deg) scale(1.02); }
  40% { transform: translate3d(5px, 0, 0) rotate(1.5deg) scale(1.03); }
  60% { transform: translate3d(-4px, 0, 0) rotate(-1deg) scale(1.04); }
  80% { transform: translate3d(4px, 0, 0) rotate(1deg) scale(1.04); }
}

@keyframes apexGlowPulse {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.04); }
}

.pack-shaking {
  animation: packUnboxingShake 0.45s ease-in-out infinite !important;
  transition: none !important;
  will-change: transform;
}

/* Fullscreen Unboxing Theater (No heavy backdrop-filter to ensure 60/120fps) */
.unboxing-theater-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: radial-gradient(circle at 50% 35%, rgba(20, 27, 45, 0.97) 0%, rgba(10, 14, 26, 0.99) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: env(safe-area-inset-top, 16px) 1rem env(safe-area-inset-bottom, 20px) 1rem;
  overflow: hidden;
  will-change: opacity;
  animation: fadeInTheater 0.2s ease-out;
}

@keyframes fadeInTheater {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 3D Swipe Deck Stage */
.swipe-deck-stage {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 460px;
  margin: auto;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Faint Left & Right Navigation Arrows for Card Deck */
.faint-nav-arrow-left,
.faint-nav-arrow-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  z-index: 25;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.faint-nav-arrow-left {
  left: 0.65rem;
}

.faint-nav-arrow-right {
  right: 0.65rem;
}

.faint-nav-arrow-left:hover,
.faint-nav-arrow-left:active,
.faint-nav-arrow-right:hover,
.faint-nav-arrow-right:active {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
}

.swipe-card-wrapper {
  position: absolute;
  width: 100%;
  max-width: 300px;
  height: 440px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

.swipe-card-wrapper:active {
  cursor: grabbing;
}

/* Depth Layers: GPU-only transforms with opacity (no CPU filters) */
.swipe-card-wrapper[data-depth="0"] {
  transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  z-index: 10;
  opacity: 1;
  pointer-events: auto;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
}

.swipe-card-wrapper[data-depth="1"] {
  transform: translate3d(0, 10px, -20px) scale(0.96) rotate(-1deg);
  z-index: 9;
  opacity: 0.94;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
}

.swipe-card-wrapper[data-depth="2"] {
  transform: translate3d(0, 20px, -40px) scale(0.92) rotate(1deg);
  z-index: 8;
  opacity: 0.88;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
}

.swipe-card-wrapper[data-depth="3"] {
  transform: translate3d(0, 30px, -60px) scale(0.88) rotate(-0.5deg);
  z-index: 7;
  opacity: 0.82;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
}

.swipe-card-wrapper[data-depth="4"] {
  transform: translate3d(0, 40px, -80px) scale(0.84) rotate(0.5deg);
  z-index: 6;
  opacity: 0.75;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
}

/* Fast Hardware-Accelerated Swipes & Throws */
.swipe-card-wrapper.swiped-left,
.swipe-card-wrapper.throw-left {
  transform: translate3d(-130vw, -30px, 0) rotate(-26deg) scale(0.85) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s linear !important;
}

.swipe-card-wrapper.swiped-right,
.swipe-card-wrapper.throw-right {
  transform: translate3d(130vw, -30px, 0) rotate(26deg) scale(0.85) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s linear !important;
}

/* ============================================================== */
/* STAGE 1: PHYSICAL FOIL TEAR & UNSEALING STAGE                  */
/* ============================================================== */
.foil-tear-stage {
  position: relative;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  perspective: 1200px;
}

.foil-pouch-container {
  position: relative;
  width: 100%;
  max-width: 275px;
  aspect-ratio: 1 / 1.48;
  margin: 0 auto;
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.4s ease;
  will-change: transform, opacity;
  transform-style: preserve-3d;
}

/* Glowing Interactive Tear Strip */
.tear-strip-laser {
  position: absolute;
  top: 13%;
  left: -5%;
  right: -5%;
  height: 44px;
  z-index: 35;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  touch-action: none;
  user-select: none;
}

.tear-strip-laser:active {
  cursor: grabbing;
}

.tear-dashed-line {
  position: absolute;
  top: 50%;
  left: 10px;
  right: 10px;
  height: 2px;
  background: repeating-linear-gradient(90deg, #ffffff, #ffffff 6px, transparent 6px, transparent 12px);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(13, 153, 255, 0.7);
  pointer-events: none;
  animation: laserPulse 1.6s ease-in-out infinite;
}

@keyframes laserPulse {
  0%, 100% { opacity: 0.7; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.6); }
}

.tear-pull-tab {
  position: relative;
  z-index: 36;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
  color: #0061a5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 12px rgba(255, 255, 255, 0.8);
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: tabBlink 1.4s ease-in-out infinite;
}

@keyframes tabBlink {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); box-shadow: 0 4px 20px rgba(13, 153, 255, 0.75); }
}

.tear-prompt-pill {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 14px;
  border-radius: 9999px;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  animation: floatPrompt 2s ease-in-out infinite;
}

@keyframes floatPrompt {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}

/* Foil Top Strip Peeling Away */
.foil-top-peel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 15%;
  border-top-left-radius: 1.5rem;
  border-top-right-radius: 1.5rem;
  z-index: 30;
  transform-origin: top left;
  transition: transform 0.42s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.38s ease;
  pointer-events: none;
}

.foil-top-peel.peeled {
  transform: translate3d(90px, -90px, 50px) rotate(32deg) scale(0.85);
  opacity: 0;
}

/* Card Stack Emerging from Pouch */
.emerging-card-stack {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%) translateY(30px) scale(0.92);
  width: 90%;
  height: 84%;
  z-index: 20;
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.18, 0.9, 0.28, 1), opacity 0.4s ease;
  pointer-events: none;
}

.emerging-card-stack.emerged {
  transform: translateX(-50%) translateY(-28px) scale(1);
  opacity: 1;
}

/* Light Ray Sunburst */
.tear-light-burst {
  position: absolute;
  top: 14%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 320px;
  height: 320px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(245, 158, 11, 0.6) 25%, rgba(13, 153, 255, 0.3) 50%, transparent 70%);
  pointer-events: none;
  z-index: 40;
  opacity: 0;
  transition: transform 0.5s ease-out, opacity 0.4s ease-out;
}

.tear-light-burst.bursting {
  transform: translate(-50%, -50%) scale(1.6);
  opacity: 1;
}

/* ============================================================== */
/* STAGE 3: PULL SUMMARY CELEBRATION SHOWCASE                     */
/* ============================================================== */
.pull-summary-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: radial-gradient(circle at 50% 20%, rgba(15, 23, 42, 0.96) 0%, rgba(5, 8, 18, 0.99) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 16px) 1rem env(safe-area-inset-bottom, 20px) 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: fadeInTheater 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.summary-card-tile {
  position: relative;
  border-radius: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.summary-card-tile:hover {
  transform: translateY(-4px) scale(1.02);
}

.summary-new-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  z-index: 25;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 9999px;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.6);
  animation: badgePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
  0% { transform: scale(0); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Full-Height Right-Side Dismiss Rail (Huge >) */
.summary-right-dismiss-rail {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 70;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 65%, transparent 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.22s ease, border-color 0.22s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

@media (min-width: 640px) {
  .summary-right-dismiss-rail {
    width: 68px;
  }
}

.summary-right-dismiss-rail:hover {
  background: linear-gradient(to left, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.06) 70%, transparent 100%);
  border-left-color: rgba(255, 255, 255, 0.25);
}

.summary-right-dismiss-rail:active {
  background: linear-gradient(to left, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.1) 70%, transparent 100%);
}

.summary-dismiss-chevron {
  font-size: 52px !important;
  color: rgba(255, 255, 255, 0.55);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}

@media (min-width: 640px) {
  .summary-dismiss-chevron {
    font-size: 68px !important;
  }
}

.summary-right-dismiss-rail:hover .summary-dismiss-chevron {
  color: #ffffff;
  transform: translateX(4px) scale(1.1);
}

.summary-right-dismiss-rail:active .summary-dismiss-chevron {
  transform: translateX(6px) scale(1.04);
}

/* High-Performance Apex Halo (Strictly behind cards) */
.apex-deck-glow {
  position: absolute;
  inset: -35px;
  border-radius: 3rem;
  pointer-events: none;
  z-index: 1; /* Strictly behind all card wrappers which have z-index: 6 to 10 */
  opacity: 0.65;
  will-change: opacity, transform;
  animation: apexGlowPulse 2.5s ease-in-out infinite;
}

.apex-deck-glow.legendary {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.5) 0%, rgba(234, 87, 255, 0.3) 45%, rgba(13, 153, 255, 0.15) 70%, transparent 80%);
}

.apex-deck-glow.epic {
  background: radial-gradient(circle, rgba(234, 87, 255, 0.55) 0%, rgba(162, 0, 186, 0.35) 50%, transparent 75%);
}

.apex-deck-glow.rare {
  background: radial-gradient(circle, rgba(13, 153, 255, 0.55) 0%, rgba(0, 97, 165, 0.3) 50%, transparent 75%);
}

.apex-deck-glow.uncommon {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.5) 0%, transparent 70%);
}

.apex-deck-glow.common {
  background: radial-gradient(circle, rgba(148, 163, 184, 0.3) 0%, transparent 70%);
}

/* Apex Reveal Banner Badge */
.apex-badge-banner {
  background: linear-gradient(135deg, #f59e0b, #ea57ff, #0d99ff);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

/* Inside theater card slab refinement */
.swipe-card-wrapper .card-museum-item {
  width: 100%;
  height: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
  contain: layout style;
}

.swipe-card-wrapper .card-substrate {
  height: calc(100% - 2.2rem);
}

