/* Restore the visible card issuing animation for the current card markup. */
.collectible-card-meta {
  justify-content: flex-end;
}

#cardSeries,
.card-subline > span {
  display: none !important;
}

.card-subline {
  display: block;
}

.sample-card-topline {
  justify-content: flex-end;
}

.sample-card-topline > span:first-child:not(:last-child),
.sample-card-subline > span:last-child:not(:first-child) {
  display: none !important;
}

.sample-card-subline {
  display: block;
}

.reveal-stage {
  isolation: isolate;
}

.reveal-loading,
.gacha-loading {
  position: absolute;
  inset: 18px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-content: center;
  justify-items: center;
  gap: 10px;
  overflow: hidden;
  border: 3px solid var(--navy);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 216, 77, 0.46), transparent 34%),
    linear-gradient(135deg, rgba(255, 231, 226, 0.92), rgba(255, 253, 249, 0.94) 52%, rgba(226, 246, 240, 0.92));
  color: var(--navy);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  box-shadow:
    8px 8px 0 rgba(33, 51, 79, 0.16),
    0 18px 46px rgba(33, 51, 79, 0.22);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.reveal-loading::before,
.reveal-loading::after,
.gacha-loading::before,
.gacha-loading::after {
  position: absolute;
  inset: 16px;
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.reveal-loading::before,
.gacha-loading::before {
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 216, 77, 0.78) 0 3px, transparent 7px),
    radial-gradient(circle at 78% 20%, rgba(255, 129, 119, 0.7) 0 3px, transparent 7px),
    radial-gradient(circle at 68% 78%, rgba(101, 205, 185, 0.68) 0 3px, transparent 7px),
    radial-gradient(circle at 27% 72%, rgba(255, 255, 255, 0.88) 0 2px, transparent 6px);
  animation: issue-sparkle-field 1.1s ease-in-out infinite alternate;
}

.reveal-loading::after,
.gacha-loading::after {
  background: linear-gradient(
    110deg,
    transparent 0 34%,
    rgba(255, 255, 255, 0.58) 45%,
    transparent 58% 100%
  );
  opacity: 0;
  transform: translateX(-52%);
  animation: issue-light-sweep 1.35s ease-in-out infinite;
}

.ideal-panel.is-generating .reveal-loading,
.ideal-panel.is-generating .gacha-loading,
.reveal-loading.is-active,
.gacha-loading.is-active {
  opacity: 1 !important;
  visibility: visible !important;
  display: grid !important;
  transform: scale(1) !important;
  pointer-events: none !important;
  z-index: 80 !important;
}

#idealPanel.is-generating #revealStage .reveal-loading,
#idealPanel.is-generating #revealStage .gacha-loading,
#revealStage .reveal-loading.is-active,
#revealStage .gacha-loading.is-active {
  opacity: 1 !important;
  visibility: visible !important;
  display: grid !important;
  transform: scale(1) !important;
  pointer-events: none !important;
  z-index: 80 !important;
}

#idealPanel:not(.is-generating) #revealStage .reveal-loading:not(.is-active),
#idealPanel:not(.is-generating) #revealStage .gacha-loading:not(.is-active) {
  opacity: 0 !important;
  transform: scale(0.96) !important;
}

.ideal-panel.is-generating .face-card {
  animation: issue-card-breathe 1.15s ease-in-out infinite alternate;
  filter: saturate(0.78) brightness(0.9);
}

.ideal-panel.is-generating .face-card::before {
  animation: card-shine 1.25s ease-in-out infinite;
}

.reveal-pack,
.gacha-pack {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 152px;
  border: 3px solid var(--navy);
  border-radius: 10px;
  background:
    linear-gradient(135deg, var(--salmon) 0 48%, var(--mint) 48% 100%);
  box-shadow: 7px 7px 0 rgba(33, 51, 79, 0.22);
  animation: issue-pack-pop 900ms ease-in-out infinite;
}

.reveal-pack::before,
.reveal-pack::after,
.gacha-pack::before,
.gacha-pack::after {
  position: absolute;
  inset: 14px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 6px;
  content: "";
}

.reveal-pack::after,
.gacha-pack::after {
  inset: auto 20px 20px;
  height: 28px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--navy);
}

.reveal-pack span,
.gacha-pack span {
  position: absolute;
  top: -16px;
  left: 50%;
  width: 42px;
  height: 42px;
  border: 3px solid var(--navy);
  border-radius: 50%;
  background: var(--yellow);
  transform: translateX(-50%);
}

.reveal-pack strong,
.gacha-pack strong {
  position: absolute;
  top: 54px;
  left: 50%;
  padding: 4px 9px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 18px;
  font-weight: 1000;
  transform: translateX(-50%) rotate(-5deg);
}

.reveal-loading p,
.gacha-loading p {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 6px 12px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 19px;
  font-weight: 1000;
  box-shadow: 3px 3px 0 var(--navy);
}

.reveal-loading small,
.gacha-loading small {
  position: relative;
  z-index: 1;
  max-width: 260px;
  color: #40534f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

@keyframes issue-card-breathe {
  from {
    opacity: 0.68;
    transform: translateY(0) scale(0.985);
  }

  to {
    opacity: 0.82;
    transform: translateY(4px) scale(0.972);
  }
}

@keyframes issue-sparkle-field {
  from {
    opacity: 0.42;
    transform: scale(0.98) rotate(-1deg);
  }

  to {
    opacity: 0.9;
    transform: scale(1.03) rotate(1deg);
  }
}

@keyframes issue-light-sweep {
  0% {
    opacity: 0;
    transform: translateX(-58%);
  }

  35% {
    opacity: 0.75;
  }

  100% {
    opacity: 0;
    transform: translateX(58%);
  }
}

@keyframes issue-pack-pop {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }

  45% {
    transform: translateY(-10px) rotate(4deg) scale(1.03);
  }
}

.face-card .card-art {
  overflow: hidden !important;
  background-position: 50% 50% !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

.face-card .card-art::before {
  content: "" !important;
  position: absolute !important;
  inset: -24px !important;
  z-index: 0 !important;
  display: block !important;
  background: inherit !important;
  filter: blur(18px) !important;
  opacity: 0.62 !important;
  transform: scale(1.08) !important;
}

.face-card .card-art img {
  position: relative !important;
  z-index: 1 !important;
  object-fit: contain !important;
  object-position: 50% 0% !important;
  transform: scale(0.82) !important;
  transform-origin: 50% 0% !important;
}

@media (max-width: 520px) {
  .reveal-loading,
  .gacha-loading {
    inset: 10px;
    gap: 8px;
  }

  .reveal-pack,
  .gacha-pack {
    width: 96px;
    height: 132px;
  }

  .reveal-loading p,
  .gacha-loading p {
    font-size: 17px;
  }

  .reveal-loading small,
  .gacha-loading small {
    width: max-content;
    max-width: calc(100% - 24px);
    font-size: clamp(9px, 3vw, 12px);
    white-space: nowrap;
  }
}
