.shop-pack, .collection-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.mini-pack {
  position: relative;
  aspect-ratio: 0.78;
  border-radius: 8px;
  background: var(--pack-gradient);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.42), 0 10px 24px rgba(48, 63, 99, 0.12);
  overflow: hidden;
}

.mini-pack::before {
  content: "";
  position: absolute;
  inset: 12% 15% auto;
  height: 18%;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
}

.mini-pack::after {
  content: "";
  position: absolute;
  inset: auto 18% 15%;
  height: 36%;
  border: 2px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
}

.pack-tier-rare {
  border-color: rgba(47, 125, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(237, 248, 255, 0.74)),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 30px rgba(47, 125, 255, 0.12);
}

.pack-tier-rare .mini-pack,
.pack-tier-mythic .mini-pack,
.pack-tier-ultimate .mini-pack {
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.56),
    inset 0 0 0 8px rgba(255, 255, 255, 0.16),
    0 14px 30px rgba(48, 63, 99, 0.18);
}

.pack-tier-rare .mini-pack::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent),
    rgba(255, 255, 255, 0.3);
}

.pack-tier-rare .mini-pack::after {
  border-width: 3px;
  box-shadow: 0 0 18px rgba(48, 229, 255, 0.38);
}

.pack-tier-mythic {
  border-color: rgba(139, 92, 255, 0.38);
  background:
    radial-gradient(circle at 14% 18%, rgba(48, 229, 255, 0.18), transparent 24%),
    radial-gradient(circle at 88% 82%, rgba(255, 93, 184, 0.16), transparent 28%),
    rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 36px rgba(139, 92, 255, 0.18);
}

.pack-tier-mythic .mini-pack {
  animation: packFoilSweep 2.7s linear infinite;
}

.pack-tier-mythic .mini-pack::before {
  inset: 10% 12% auto;
  height: 20%;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.14) 0 5px, transparent 5px 10px),
    rgba(255, 255, 255, 0.36);
}

.pack-tier-mythic .mini-pack::after {
  inset: auto 16% 13%;
  height: 40%;
  border-width: 3px;
  border-color: rgba(255, 255, 255, 0.68);
  box-shadow:
    0 0 20px rgba(255, 93, 184, 0.42),
    0 0 36px rgba(48, 229, 255, 0.32);
}

.pack-tier-mythic .mini-pack {
  background:
    linear-gradient(115deg, transparent 0 28%, rgba(255,255,255,0.62) 40%, transparent 55%),
    var(--pack-gradient);
  background-size: 240% 100%, 100% 100%;
}

.pack-tier-ultimate {
  border-color: rgba(255, 247, 168, 0.54);
  background:
    conic-gradient(from 30deg at 12% 20%, rgba(255,255,255,0.22), transparent, rgba(48,229,255,0.16), transparent),
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 247, 232, 0.74));
  box-shadow:
    0 18px 42px rgba(255, 63, 119, 0.16),
    0 0 0 1px rgba(255, 247, 168, 0.3);
}

.pack-tier-ultimate .mini-pack {
  background:
    conic-gradient(from 0deg, rgba(255,255,255,0.78), transparent 14%, rgba(48,229,255,0.56), transparent 36%, rgba(255,63,119,0.5), transparent 62%, rgba(255,247,168,0.66), transparent 86%, rgba(255,255,255,0.78)),
    var(--pack-gradient);
  background-size: 100% 100%;
  animation: ultimatePackPulse 1.8s ease-in-out infinite;
}

.pack-tier-ultimate .mini-pack::before {
  inset: 8% 10% auto;
  height: 22%;
  border: 2px solid rgba(255, 255, 255, 0.58);
  background:
    linear-gradient(90deg, rgba(255,247,168,0.72), rgba(255,255,255,0.42), rgba(48,229,255,0.5));
  box-shadow: 0 0 22px rgba(255, 247, 168, 0.52);
}

.pack-tier-ultimate .mini-pack::after {
  inset: auto 13% 11%;
  height: 44%;
  border: 4px solid rgba(255, 255, 255, 0.78);
  border-radius: 34% 66% 42% 58%;
  box-shadow:
    0 0 22px rgba(255, 255, 255, 0.58),
    0 0 48px rgba(255, 63, 119, 0.36),
    inset 0 0 22px rgba(48, 229, 255, 0.28);
  animation: sealMorph 3s ease-in-out infinite;
}

.pack-tier-ultimate h3 {
  text-shadow: 0 0 16px rgba(255, 152, 46, 0.24);
}

.shop-pack h3, .collection-item h3 {
  margin: 0 0 5px;
  font-size: 15px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.shop-pack p, .collection-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.reveal-cards .collection-item h3 {
  min-height: 34px;
  margin-bottom: 7px;
  font-size: 14px;
  line-height: 1.2;
}

.reveal-cards .collection-item p {
  min-height: 54px;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.reveal-cards .collection-item > div {
  align-self: stretch;
  min-width: 0;
  padding-top: 2px;
}

.pack-odds {
  margin-top: 4px;
  max-height: 58px;
  overflow: auto;
}

.pack-pity {
  margin-top: 4px;
  color: #8b5cff;
}

.card-actions {
  display: grid;
  gap: 7px;
}

.trait-mode-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(139, 92, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(229, 248, 255, 0.76)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(139, 92, 255, 0.12);
}

.trait-mode-banner h3,
.trait-mode-banner p {
  margin: 0;
}

.trait-mode-banner h3 {
  font-size: 15px;
  font-weight: 950;
}

.trait-mode-banner p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.trait-up-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.trait-up-field input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font-weight: 950;
}

.shop-actions {
  display: grid;
  grid-template-columns: 84px 58px 92px;
  gap: 7px;
  align-items: end;
}

.quantity-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pack-quantity {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  font-weight: 900;
}

.buy-button, .equip-button, .sell-button, .combine-button, .max-button, .trait-up-button {
  min-width: 92px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, #24bd76, #24a6e8);
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(36, 166, 232, 0.2);
}

.max-button {
  min-width: 58px;
  min-height: 34px;
  color: #234060;
  background: linear-gradient(135deg, #e5f8ff, #dff4ea);
  box-shadow: 0 8px 18px rgba(36, 166, 232, 0.12);
  font-size: 12px;
}

.sell-button {
  min-height: 34px;
  background: linear-gradient(135deg, #ff982e, #ff5d75);
  font-size: 12px;
}

.combine-button {
  min-height: 34px;
  background: linear-gradient(135deg, #8b5cff, #30e5ff);
  font-size: 12px;
}

.trait-up-button {
  min-height: 36px;
  background: linear-gradient(135deg, #8b5cff, #ff5db8);
  font-size: 12px;
}

.buy-button:disabled, .equip-button:disabled, .sell-button:disabled, .combine-button:disabled, .max-button:disabled, .trait-up-button:disabled {
  cursor: not-allowed;
  color: #7d8598;
  background: #e7ebf4;
  box-shadow: none;
}

.card-preview {
  --card-a: #9ca7b8;
  --card-b: #eef2f7;
  --card-c: #ffffff;
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 0.7;
  min-height: 0;
  width: min(82px, 100%);
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.48), transparent 36%), linear-gradient(160deg, var(--card-a), var(--card-b));
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.42), inset 0 0 0 8px rgba(20, 28, 48, 0.1), 0 14px 30px rgba(48, 63, 99, 0.18);
  overflow: hidden;
}

.equipped-panel .card-preview {
  width: min(130px, 100%);
}

.card-preview.click-card-face {
  width: auto;
  height: min(50vh, 500px);
  max-width: 82%;
  aspect-ratio: 0.7;
  max-height: min(50vh, 500px);
}

.collection-item .card-preview,
.shop-pack .mini-pack {
  width: 100%;
}

.card-preview::before, .card-preview::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.card-preview::before {
  width: 76%;
  height: 50%;
  border: 3px solid rgba(255, 255, 255, 0.48);
  transform: rotate(-18deg);
}

.card-preview::after {
  width: 34%;
  height: 34%;
  background: var(--card-c);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.18);
}

.pattern-shield::before { border-radius: 8px 8px 44px 44px; transform: rotate(0deg); }
.pattern-shield::after { clip-path: polygon(50% 0, 88% 22%, 74% 82%, 50% 100%, 26% 82%, 12% 22%); }
.pattern-moon::before { width: 54%; height: 54%; border-width: 0; background: rgba(255, 255, 255, 0.28); }
.pattern-moon::after { width: 42%; height: 42%; transform: translate(16%, -8%); background: rgba(24, 32, 51, 0.16); }
.pattern-coin::before { width: 58%; height: 58%; transform: rotate(0deg); }
.pattern-coin::after { width: 22%; height: 58%; border-radius: 999px; }
.pattern-glyph::before { width: 72%; height: 72%; border-radius: 8px; transform: rotate(45deg); }
.pattern-glyph::after { width: 24%; height: 24%; border-radius: 8px; transform: rotate(45deg); }
.pattern-leaf::before { width: 44%; height: 72%; border-radius: 100% 0 100% 0; transform: rotate(42deg); }
.pattern-leaf::after { width: 4px; height: 72%; transform: rotate(42deg); }
.pattern-star::before { width: 70%; height: 70%; border-width: 0; background: rgba(255, 255, 255, 0.22); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 39% 35%); }
.pattern-star::after { width: 22%; height: 22%; }
.pattern-wave::before { width: 86%; height: 38%; border-radius: 999px 0 999px 0; transform: rotate(-16deg); }
.pattern-wave::after { width: 62%; height: 22%; transform: translateY(24px) rotate(-16deg); }
.pattern-diamond::before { width: 62%; height: 62%; border-radius: 8px; transform: rotate(45deg); }
.pattern-diamond::after { width: 28%; height: 28%; border-radius: 8px; transform: rotate(45deg); }
.pattern-wing::before { width: 76%; height: 42%; border-radius: 100% 0 100% 0; transform: rotate(-22deg); }
.pattern-wing::after { width: 48%; height: 28%; border-radius: 100% 0 100% 0; transform: translate(20px, 22px) rotate(-22deg); }
.pattern-crown::before { width: 74%; height: 48%; border-width: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.25); clip-path: polygon(0 84%, 10% 28%, 32% 60%, 50% 12%, 68% 60%, 90% 28%, 100% 84%); }
.pattern-crown::after { width: 64%; height: 8%; border-radius: 8px; transform: translateY(34px); }

.card-symbol {
  position: relative;
  z-index: 1;
  font-size: 30px;
  font-weight: 950;
  text-shadow: 0 4px 12px rgba(20, 28, 48, 0.22);
}

.shiny { animation: shinyPulse 2.2s ease-in-out infinite; }
.golden { filter: saturate(1.1); }

.shiny .card-preview, .card-preview.shiny {
  background: linear-gradient(115deg, transparent 0 30%, rgba(255, 255, 255, 0.74) 42%, transparent 55%), linear-gradient(160deg, var(--card-a), var(--card-b));
  background-size: 240% 100%, 100% 100%;
  animation: foilSweep 2.4s linear infinite;
}

.golden .card-preview, .card-preview.golden {
  box-shadow:
    inset 0 0 0 5px rgba(255, 255, 255, 0.52),
    inset 0 0 0 9px rgba(255, 205, 77, 0.78),
    0 14px 32px rgba(255, 152, 46, 0.28);
}

.golden .card-preview::after, .card-preview.golden::after {
  background: #fff0a8;
}

.dark .card-preview, .card-preview.dark {
  color: #f5f7ff;
  background:
    radial-gradient(circle at 50% 48%, rgba(139, 92, 255, 0.38), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 38%),
    linear-gradient(160deg, #080b16, #202041 48%, #05070d);
  box-shadow:
    inset 0 0 0 5px rgba(255, 255, 255, 0.16),
    inset 0 0 0 9px rgba(139, 92, 255, 0.52),
    0 16px 36px rgba(8, 11, 22, 0.36);
}

.dark .card-preview::before, .card-preview.dark::before {
  border-color: rgba(190, 172, 255, 0.58);
}

.dark .card-preview::after, .card-preview.dark::after {
  background: #bdaeff;
}

.diamond .card-preview, .card-preview.diamond {
  color: #17304a;
  background:
    linear-gradient(115deg, transparent 0 24%, rgba(255, 255, 255, 0.95) 39%, transparent 54%),
    linear-gradient(160deg, #dffcff, #ffffff 38%, #7deaff);
  background-size: 220% 100%, 100% 100%;
  animation: diamondSweep 1.65s linear infinite;
  box-shadow:
    inset 0 0 0 5px rgba(255, 255, 255, 0.82),
    inset 0 0 0 10px rgba(125, 234, 255, 0.72),
    0 18px 42px rgba(48, 229, 255, 0.34);
}

.diamond .card-preview::before, .card-preview.diamond::before {
  border-color: rgba(23, 48, 74, 0.2);
}

.diamond .card-preview::after, .card-preview.diamond::after {
  background: #ffffff;
}

.galaxy .card-preview, .card-preview.galaxy {
  color: #ffffff;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.95) 0 1px, transparent 2px),
    radial-gradient(circle at 24% 44%, rgba(255, 255, 255, 0.82) 0 1px, transparent 2px),
    radial-gradient(circle at 46% 28%, rgba(210, 240, 255, 0.78) 0 1px, transparent 2px),
    radial-gradient(circle at 66% 22%, rgba(180, 230, 255, 0.85) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 46%, rgba(255, 255, 255, 0.82) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 68%, rgba(255, 247, 168, 0.88) 0 1px, transparent 2px),
    radial-gradient(circle at 38% 82%, rgba(255, 255, 255, 0.85) 0 1px, transparent 2px),
    radial-gradient(circle at 58% 84%, rgba(180, 230, 255, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 91% 12%, rgba(255, 255, 255, 0.72) 0 1px, transparent 2px),
    radial-gradient(ellipse at 20% 44%, rgba(255, 255, 255, 0.16), transparent 9%),
    radial-gradient(ellipse at 34% 48%, rgba(255, 63, 119, 0.34), transparent 24%),
    radial-gradient(ellipse at 62% 56%, rgba(48, 229, 255, 0.28), transparent 26%),
    radial-gradient(ellipse at 52% 40%, rgba(139, 92, 255, 0.34), transparent 34%),
    radial-gradient(ellipse at 72% 34%, rgba(255, 247, 168, 0.16), transparent 38%),
    linear-gradient(160deg, #02040d, #0a1230 42%, #17092e 72%, #03030a);
  background-size:
    62px 74px,
    86px 92px,
    104px 88px,
    78px 96px,
    118px 102px,
    92px 112px,
    136px 116px,
    156px 128px,
    180px 150px,
    260% 220%,
    320% 260%,
    340% 280%,
    380% 320%,
    420% 340%,
    100% 100%;
  animation: galaxyCamera 12s ease-in-out infinite, galaxyPulse 2.2s ease-in-out infinite;
  box-shadow:
    inset 0 0 0 5px rgba(255, 255, 255, 0.7),
    inset 0 0 0 10px rgba(48, 229, 255, 0.36),
    inset 0 0 34px rgba(255, 63, 119, 0.28),
    0 0 24px rgba(48, 229, 255, 0.48),
    0 0 58px rgba(139, 92, 255, 0.5);
}

.galaxy .card-preview::before, .card-preview.galaxy::before {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.48),
    inset 0 0 22px rgba(48, 229, 255, 0.3);
}

.galaxy .card-preview::after, .card-preview.galaxy::after {
  background:
    radial-gradient(circle, #ffffff 0 18%, rgba(255, 255, 255, 0.25) 22%, transparent 44%),
    #ffffff;
  box-shadow:
    0 0 12px #ffffff,
    0 0 28px rgba(255, 63, 119, 0.78);
  animation: starTwinkle 1.4s ease-in-out infinite;
}

.fire .card-preview, .card-preview.fire {
  color: #fff7e6;
  background:
    radial-gradient(ellipse at 50% 104%, rgba(255, 247, 168, 0.98), transparent 22%),
    radial-gradient(ellipse at 23% 84%, rgba(255, 63, 49, 0.88), transparent 34%),
    radial-gradient(ellipse at 77% 74%, rgba(255, 152, 46, 0.9), transparent 32%),
    conic-gradient(from 178deg at 18% 94%, transparent 0 18deg, rgba(255, 247, 168, 0.95) 18deg 32deg, rgba(255, 63, 49, 0.75) 32deg 46deg, transparent 46deg 72deg),
    conic-gradient(from 184deg at 50% 98%, transparent 0 14deg, rgba(255, 240, 168, 0.98) 14deg 28deg, rgba(255, 105, 38, 0.88) 28deg 48deg, transparent 48deg 76deg),
    conic-gradient(from 170deg at 82% 94%, transparent 0 18deg, rgba(255, 247, 168, 0.92) 18deg 30deg, rgba(255, 63, 49, 0.78) 30deg 48deg, transparent 48deg 74deg),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0 4px, transparent 4px 12px),
    linear-gradient(160deg, #2a0500, #ff3f31 38%, #ff982e 68%, #fff0a8);
  background-size: 190% 190%, 260% 230%, 250% 220%, 180% 160%, 170% 160%, 180% 160%, 180% 180%, 100% 100%;
  animation: fireSurge 1.6s ease-in-out infinite;
  filter: saturate(1.18) contrast(1.04);
  box-shadow:
    inset 0 0 0 5px rgba(255, 247, 168, 0.64),
    inset 0 0 0 11px rgba(255, 92, 32, 0.84),
    inset 0 -18px 42px rgba(255, 247, 168, 0.54),
    inset 0 0 40px rgba(255, 63, 49, 0.5),
    0 0 22px rgba(255, 247, 168, 0.82),
    0 0 48px rgba(255, 63, 49, 0.76),
    0 0 94px rgba(255, 152, 46, 0.58);
}

.fire .card-preview::before, .card-preview.fire::before {
  inset: auto 7% -1%;
  width: 86%;
  height: 42%;
  border: 0;
  border-radius: 0 0 8px 8px;
  background:
    linear-gradient(180deg, rgba(255, 247, 168, 0.92), rgba(255, 152, 46, 0.86) 42%, rgba(255, 63, 49, 0.72));
  clip-path: polygon(0 100%, 5% 48%, 11% 78%, 17% 23%, 25% 75%, 33% 10%, 42% 72%, 50% 0, 59% 78%, 68% 16%, 76% 76%, 84% 34%, 93% 82%, 100% 52%, 100% 100%);
  transform: none;
  opacity: 0.92;
  box-shadow: 0 -10px 28px rgba(255, 93, 40, 0.86), 0 -22px 54px rgba(255, 152, 46, 0.54);
  animation: flameTongues 850ms ease-in-out infinite;
}

.fire .card-preview::after, .card-preview.fire::after {
  width: 42%;
  height: 42%;
  background:
    radial-gradient(circle, #fff7a8 0 24%, rgba(255, 152, 46, 0.92) 34%, rgba(255, 63, 49, 0.62) 58%, transparent 70%);
  box-shadow: 0 0 22px rgba(255, 247, 168, 1), 0 0 52px rgba(255, 63, 49, 0.95), 0 0 86px rgba(255, 152, 46, 0.7);
  animation: flameCore 1.1s ease-in-out infinite;
}

.ice .card-preview, .card-preview.ice {
  color: #062447;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92) 0 8%, transparent 8% 100%),
    radial-gradient(circle at 18% 16%, rgba(255,255,255,0.98), transparent 11%),
    radial-gradient(circle at 78% 74%, rgba(255,255,255,0.86), transparent 16%),
    linear-gradient(115deg, transparent 0 22%, rgba(255, 255, 255, 0.98) 38%, transparent 52%),
    repeating-linear-gradient(155deg, rgba(255,255,255,0.42) 0 2px, transparent 2px 12px),
    repeating-conic-gradient(from 45deg, rgba(255,255,255,0.46) 0 8deg, transparent 8deg 18deg),
    linear-gradient(160deg, #f8ffff, #bffcff 22%, #73fff2 42%, #30e5ff 66%, #dffcff);
  background-size: 100% 100%, 180% 180%, 220% 220%, 240% 100%, 160% 160%, 180% 180%, 100% 100%;
  animation: iceGlide 3s ease-in-out infinite;
  filter: saturate(1.18) hue-rotate(8deg) brightness(1.06);
  box-shadow:
    inset 0 0 0 6px rgba(255, 255, 255, 0.9),
    inset 0 0 0 12px rgba(115, 255, 242, 0.86),
    inset 0 0 30px rgba(255, 255, 255, 0.9),
    inset 0 -18px 46px rgba(48, 229, 255, 0.36),
    0 0 28px rgba(255, 255, 255, 0.95),
    0 0 54px rgba(115, 255, 242, 0.9),
    0 0 118px rgba(48, 229, 255, 0.64);
}

.ice .card-preview::before, .card-preview.ice::before {
  inset: -1px 8% auto;
  width: 84%;
  height: 35%;
  border: 0;
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(191,252,255,0.74) 44%, rgba(115,255,242,0.18));
  clip-path: polygon(0 0, 100% 0, 96% 36%, 91% 12%, 86% 58%, 79% 18%, 72% 72%, 65% 20%, 58% 52%, 51% 10%, 44% 78%, 36% 18%, 29% 64%, 21% 13%, 14% 56%, 8% 22%, 3% 44%);
  transform: none;
  opacity: 0.95;
  box-shadow: 0 9px 22px rgba(255, 255, 255, 0.82), 0 16px 34px rgba(115, 255, 242, 0.42);
  animation: icicleShimmer 2.2s ease-in-out infinite;
}

.ice .card-preview::after, .card-preview.ice::after {
  width: 46%;
  height: 46%;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(115,255,242,0.54) 48%, rgba(255,255,255,0.88));
  clip-path: polygon(50% 0, 84% 18%, 100% 50%, 82% 84%, 50% 100%, 16% 84%, 0 50%, 18% 16%);
  box-shadow: 0 0 22px rgba(255,255,255,1), 0 0 56px rgba(115,255,242,0.98), inset 0 0 18px rgba(48,229,255,0.42);
  animation: iceCore 1.4s ease-in-out infinite;
}

.rarity-common { --card-a: #8d99a8; --card-b: #dbe3ee; --card-c: #ffffff; }
.rarity-uncommon { --card-a: #1fbf7b; --card-b: #91f0b7; --card-c: #eafff1; }
.rarity-rare { --card-a: #2f7dff; --card-b: #75d6ff; --card-c: #ecfbff; }
.rarity-epic { --card-a: #8b5cff; --card-b: #f06dff; --card-c: #fff0ff; }
.rarity-legendary { --card-a: #ff982e; --card-b: #ffe66b; --card-c: #fff7c2; }
.rarity-mythic { --card-a: #ff3f77; --card-b: #30e5ff; --card-c: #ffffff; }
.rarity-celestial { --card-a: #48f2ff; --card-b: #fff7a8; --card-c: #ffffff; }
.rarity-transcendent { --card-a: #7a4dff; --card-b: #ff64df; --card-c: #ffffff; }
.rarity-eternal { --card-a: #080b16; --card-b: #ffffff; --card-c: #fff0a8; }
.rarity-astral { --card-a: #1020ff; --card-b: #73fff2; --card-c: #ffffff; }
.rarity-omniversal { --card-a: #000000; --card-b: #ffcd4d; --card-c: #ffffff; }
.rarity-quantum { --card-a: #00f5d4; --card-b: #304ffe; --card-c: #ffffff; }
.rarity-singularity { --card-a: #050505; --card-b: #ff3f77; --card-c: #bdaeff; }
.rarity-apex { --card-a: #ffffff; --card-b: #ffcd4d; --card-c: #30e5ff; }

.card-preview.special-infinity {
  color: #fff7d8;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.26), transparent 24%, rgba(255, 205, 77, 0.22) 48%, transparent 68%),
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.28), transparent 24%),
    url("thanos snap.jpg") center / cover no-repeat,
    linear-gradient(160deg, #08040f, #32135c 38%, #0a1638 70%, #000000);
  box-shadow:
    inset 0 0 0 5px rgba(255, 255, 255, 0.68),
    inset 0 0 0 11px rgba(255, 205, 77, 0.78),
    inset 0 0 48px rgba(8, 4, 15, 0.36),
    0 0 28px rgba(255, 205, 77, 0.72),
    0 0 70px rgba(139, 92, 255, 0.58),
    0 0 120px rgba(255, 63, 119, 0.36);
}

.card-preview.special-infinity::before {
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 32%, rgba(8, 4, 15, 0.32)),
    radial-gradient(circle at 22% 18%, rgba(255, 205, 77, 0.34), transparent 18%),
    radial-gradient(circle at 78% 76%, rgba(139, 92, 255, 0.36), transparent 22%);
  opacity: 0.88;
  transform: none;
  filter: saturate(1.08) contrast(1.05);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.card-preview.special-infinity::after {
  width: 52%;
  height: 32%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 12%, rgba(255, 205, 77, 0.78) 22%, rgba(139, 92, 255, 0.42) 48%, transparent 70%);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.92),
    0 0 46px rgba(255, 205, 77, 0.76),
    0 0 82px rgba(139, 92, 255, 0.58);
  mix-blend-mode: screen;
  animation: infinitySnapPulse 1.7s ease-in-out infinite;
}

.card-preview.special-infinity .card-symbol {
  position: absolute;
  right: 8%;
  bottom: 7%;
  color: #fff7d8;
  font-size: clamp(22px, 28%, 42px);
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.95),
    0 0 32px rgba(255, 205, 77, 0.95),
    0 0 62px rgba(139, 92, 255, 0.74);
}

.rarity-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  color: white;
  background: var(--card-a);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.owned-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.card-name-tip {
  cursor: help;
}

.info-card,
.toggle-row,
.toggle-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.info-card h3,
.toggle-card h3,
.toggle-row span {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.toggle-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.info-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(103, 112, 137, 0.16);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #24bd76, #30e5ff);
}

.requirement-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.requirement-list span {
  padding: 5px 7px;
  border-radius: 8px;
  color: #7d8598;
  background: #e7ebf4;
  font-size: 12px;
  font-weight: 800;
}

.requirement-list span.owned {
  color: #147a4d;
  background: #dff4ea;
}

.toggle-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}

.toggle-row input {
  width: 22px;
  height: 22px;
}

.claim-button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, #24bd76, #24a6e8);
  font-weight: 950;
}

.claim-button:disabled {
  color: #7d8598;
  background: #e7ebf4;
}

.mythic-hidden-card {
  position: relative;
  min-height: 346px;
  perspective: 1100px;
  cursor: pointer;
}

.mythic-question,
.mythic-real-card {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  min-height: 100%;
  border-radius: 8px;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.mythic-question {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  place-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  border: 0;
  padding: 18px;
  color: white;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.26), transparent 28%),
    linear-gradient(135deg, #241e72, #ff3f77 52%, #30e5ff);
  box-shadow:
    inset 0 0 0 7px rgba(255, 255, 255, 0.38),
    0 0 28px rgba(255, 63, 119, 0.34);
  animation: mythicEdgeGlow 1.2s ease-in-out infinite;
}

.mythic-question::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  pointer-events: none;
}

.mythic-question::after {
  content: "";
  position: absolute;
  inset: -35%;
  background: radial-gradient(circle, rgba(255,255,255,0.34), transparent 34%);
  opacity: 0.42;
  pointer-events: none;
}

.ultra-celestial .mythic-question {
  background:
    radial-gradient(circle at 26% 22%, rgba(255, 255, 255, 0.55), transparent 18%),
    radial-gradient(circle at 70% 72%, rgba(255, 247, 168, 0.55), transparent 24%),
    linear-gradient(135deg, #30e5ff, #fff7a8 48%, #ff5db8);
  animation: celestialEdgeGlow 1s ease-in-out infinite;
}

.ultra-transcendent .mythic-question {
  background:
    radial-gradient(ellipse at 36% 62%, rgba(255,255,255,0.35), transparent 24%),
    repeating-conic-gradient(from 0deg, #7a4dff 0 10deg, #30e5ff 10deg 18deg, #ff64df 18deg 32deg, #fff7a8 32deg 38deg, #7a4dff 38deg 52deg);
  animation: transcendentEdgeGlow 850ms ease-in-out infinite, ultraSpinWash 4s linear infinite;
}

.ultra-eternal .mythic-question {
  color: #fff7a8;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 247, 168, 0.58), transparent 22%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.22) 0 7px, transparent 7px 16px),
    conic-gradient(from 120deg, #ffffff, #ff3f77, #080b16, #30e5ff, #ffffff);
  animation: eternalEdgeGlow 700ms ease-in-out infinite, ultraSpinWash 3s linear infinite reverse;
}

.ultra-astral .mythic-question {
  color: #ffffff;
  background:
    radial-gradient(circle at 45% 42%, rgba(255,255,255,0.75), transparent 18%),
    radial-gradient(ellipse at 30% 62%, rgba(48,229,255,0.5), transparent 38%),
    repeating-radial-gradient(circle at 68% 34%, rgba(255,255,255,0.24) 0 2px, transparent 2px 11px),
    conic-gradient(from 45deg, #1020ff, #73fff2, #ffffff, #8b5cff, #1020ff);
  animation: astralEdgeGlow 620ms ease-in-out infinite, ultraSpinWash 2.5s linear infinite;
}

.ultra-omniversal .mythic-question {
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.9), transparent 16%),
    repeating-conic-gradient(from 0deg, rgba(255,255,255,0.62) 0 4deg, transparent 4deg 12deg),
    conic-gradient(from 0deg, #000000, #ffffff, #ffcd4d, #ff3f77, #30e5ff, #000000);
  animation: omniversalEdgeGlow 480ms ease-in-out infinite, ultraSpinWash 1.8s linear infinite reverse;
}

.ultra-quantum .mythic-question {
  color: #ffffff;
  background:
    radial-gradient(circle at 26% 24%, rgba(255,255,255,0.9), transparent 14%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.22) 0 3px, transparent 3px 12px),
    conic-gradient(from 80deg, #00f5d4, #304ffe, #ffffff, #ff3f77, #00f5d4);
  animation: omniversalEdgeGlow 430ms ease-in-out infinite, ultraSpinWash 1.5s linear infinite;
}

.ultra-singularity .mythic-question {
  color: #fff7a8;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.88), transparent 10%),
    radial-gradient(circle at 50% 50%, rgba(255,63,119,0.7), transparent 24%),
    repeating-conic-gradient(from 0deg, #050505 0 9deg, #7a4dff 9deg 13deg, #ff3f77 13deg 18deg, #050505 18deg 28deg);
  animation: omniversalEdgeGlow 380ms ease-in-out infinite, ultraSpinWash 1.2s linear infinite reverse;
}

.ultra-apex .mythic-question {
  color: #10182f;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,1), transparent 13%),
    repeating-conic-gradient(from 0deg, rgba(255,255,255,0.9) 0 5deg, transparent 5deg 11deg),
    conic-gradient(from 0deg, #ffffff, #ffcd4d, #30e5ff, #ff3f77, #000000, #ffffff);
  animation: omniversalEdgeGlow 320ms ease-in-out infinite, ultraSpinWash 950ms linear infinite;
}

.question-mark {
  font-size: clamp(72px, 12vw, 130px);
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.9), 0 8px 26px rgba(20, 27, 45, 0.34);
  z-index: 1;
}

.mystery-rarity,
.mystery-trait {
  position: relative;
  z-index: 1;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.mystery-rarity {
  font-size: 12px;
  letter-spacing: 0.04em;
}

.mystery-trait {
  font-size: 11px;
}

.mythic-question.shiny {
  background-blend-mode: screen, normal;
}

.mythic-question.shiny::after {
  background: linear-gradient(115deg, transparent 0 34%, rgba(255,255,255,0.78) 44%, transparent 56%);
  opacity: 0.85;
  animation: foilSweep 1.9s linear infinite;
}

.mythic-question.golden::before {
  border-color: rgba(255, 205, 77, 0.95);
  box-shadow:
    0 0 20px rgba(255, 205, 77, 0.62),
    inset 0 0 18px rgba(255, 205, 77, 0.32);
}

.mythic-question.dark {
  filter: brightness(0.72) saturate(1.35);
}

.mythic-question.dark .question-mark {
  color: #c9b8ff;
  text-shadow: 0 0 26px rgba(139, 92, 255, 1), 0 0 58px rgba(8, 11, 22, 0.8);
}

.mythic-question.diamond {
  color: #17304a;
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.9),
    inset 0 0 0 14px rgba(125, 234, 255, 0.72),
    0 0 46px rgba(48, 229, 255, 0.72),
    0 0 92px rgba(255, 255, 255, 0.55);
}

.mythic-question.diamond .question-mark {
  color: #ffffff;
  text-shadow: 0 0 18px rgba(255,255,255,1), 0 0 48px rgba(48,229,255,0.95);
}

.mythic-question.galaxy {
  background:
    radial-gradient(circle at 16% 24%, rgba(255,255,255,0.95) 0 1px, transparent 2px),
    radial-gradient(circle at 54% 18%, rgba(180,230,255,0.88) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 70%, rgba(255,247,168,0.9) 0 1px, transparent 2px),
    radial-gradient(ellipse at 30% 62%, rgba(255,63,119,0.34), transparent 28%),
    radial-gradient(ellipse at 72% 38%, rgba(48,229,255,0.28), transparent 34%),
    linear-gradient(160deg, #02040d, #0a1230 42%, #17092e 72%, #03030a);
  background-size: 70px 80px, 96px 90px, 116px 102px, 240% 220%, 260% 240%, 100% 100%;
  animation: mysteryGalaxyCamera 10s ease-in-out infinite, galaxyPulse 2.2s ease-in-out infinite;
}

.mythic-question.galaxy .question-mark {
  text-shadow: 0 0 18px rgba(255,255,255,1), 0 0 48px rgba(48,229,255,0.95), 0 0 88px rgba(255,63,119,0.72);
}

.mythic-question.fire {
  background:
    radial-gradient(ellipse at 50% 104%, rgba(255, 247, 168, 0.98), transparent 22%),
    radial-gradient(ellipse at 24% 84%, rgba(255, 63, 49, 0.88), transparent 34%),
    radial-gradient(ellipse at 76% 72%, rgba(255, 152, 46, 0.9), transparent 32%),
    conic-gradient(from 178deg at 18% 96%, transparent 0 18deg, rgba(255, 247, 168, 0.95) 18deg 32deg, rgba(255, 63, 49, 0.75) 32deg 46deg, transparent 46deg 72deg),
    conic-gradient(from 184deg at 50% 100%, transparent 0 14deg, rgba(255, 240, 168, 0.98) 14deg 28deg, rgba(255, 105, 38, 0.88) 28deg 48deg, transparent 48deg 76deg),
    conic-gradient(from 170deg at 82% 96%, transparent 0 18deg, rgba(255, 247, 168, 0.92) 18deg 30deg, rgba(255, 63, 49, 0.78) 30deg 48deg, transparent 48deg 74deg),
    linear-gradient(160deg, #2a0500, #ff3f31 42%, #ff982e 70%, #fff0a8);
  background-size: 190% 190%, 260% 230%, 250% 220%, 180% 160%, 170% 160%, 180% 160%, 100% 100%;
  animation: fireSurge 1.6s ease-in-out infinite, omniversalEdgeGlow 900ms ease-in-out infinite;
}

.mythic-question.fire::before {
  border-color: rgba(255, 247, 168, 0.76);
  box-shadow: 0 0 24px rgba(255, 152, 46, 0.92), inset 0 0 24px rgba(255, 63, 49, 0.34);
}

.mythic-question.fire::after {
  inset: auto 7% -1%;
  height: 38%;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, rgba(255, 247, 168, 0.94), rgba(255, 152, 46, 0.86) 44%, rgba(255, 63, 49, 0.72));
  clip-path: polygon(0 100%, 5% 48%, 11% 78%, 17% 23%, 25% 75%, 33% 10%, 42% 72%, 50% 0, 59% 78%, 68% 16%, 76% 76%, 84% 34%, 93% 82%, 100% 52%, 100% 100%);
  opacity: 0.78;
  animation: flameTongues 850ms ease-in-out infinite;
}

.mythic-question.fire .question-mark {
  color: #fff7a8;
  text-shadow: 0 0 22px rgba(255,247,168,1), 0 0 58px rgba(255,63,49,1), 0 0 110px rgba(255,152,46,0.86);
}

.mythic-question.ice {
  color: #062447;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92) 0 8%, transparent 8% 100%),
    radial-gradient(circle at 18% 16%, rgba(255,255,255,0.98), transparent 11%),
    radial-gradient(circle at 78% 74%, rgba(255,255,255,0.86), transparent 16%),
    linear-gradient(115deg, transparent 0 22%, rgba(255, 255, 255, 0.98) 38%, transparent 52%),
    repeating-linear-gradient(155deg, rgba(255,255,255,0.42) 0 2px, transparent 2px 12px),
    repeating-conic-gradient(from 45deg, rgba(255,255,255,0.48) 0 8deg, transparent 8deg 18deg),
    linear-gradient(160deg, #f8ffff, #bffcff 22%, #73fff2 42%, #30e5ff 66%, #dffcff);
  background-size: 100% 100%, 180% 180%, 220% 220%, 240% 100%, 160% 160%, 180% 180%, 100% 100%;
  animation: iceGlide 2.4s ease-in-out infinite, omniversalEdgeGlow 720ms ease-in-out infinite;
}

.mythic-question.ice::before {
  inset: 0 8% auto;
  height: 35%;
  border: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(191,252,255,0.74) 44%, rgba(115,255,242,0.2));
  clip-path: polygon(0 0, 100% 0, 96% 36%, 91% 12%, 86% 58%, 79% 18%, 72% 72%, 65% 20%, 58% 52%, 51% 10%, 44% 78%, 36% 18%, 29% 64%, 21% 13%, 14% 56%, 8% 22%, 3% 44%);
  box-shadow: 0 9px 22px rgba(255, 255, 255, 0.82), 0 16px 34px rgba(115, 255, 242, 0.42);
  animation: icicleShimmer 2.2s ease-in-out infinite;
}

.mythic-question.ice .question-mark {
  color: #ffffff;
  text-shadow: 0 0 22px rgba(255,255,255,1), 0 0 66px rgba(115,255,242,1), 0 0 128px rgba(48,229,255,0.9);
}

.mythic-real-card {
  display: grid;
  gap: 12px;
  align-content: center;
  opacity: 0;
  transform: rotateY(180deg);
}

.reveal-cards.bulk-reveal .reveal-card {
  animation: none;
}

.reveal-cards.bulk-reveal .shiny,
.reveal-cards.bulk-reveal .card-preview.shiny,
.reveal-cards.bulk-reveal .diamond,
.reveal-cards.bulk-reveal .card-preview.diamond,
.reveal-cards.bulk-reveal .galaxy,
.reveal-cards.bulk-reveal .card-preview.galaxy,
.reveal-cards.bulk-reveal .fire,
.reveal-cards.bulk-reveal .card-preview.fire,
.reveal-cards.bulk-reveal .ice,
.reveal-cards.bulk-reveal .card-preview.ice,
.reveal-cards.bulk-reveal .mythic-question {
  animation: none;
}

.reveal-cards.bulk-reveal .mythic-question::after,
.reveal-cards.bulk-reveal .card-preview::after {
  animation: none;
}

.mythic-hidden-card.revealed {
  animation: mythicBigGlow 760ms ease-out both;
}

.mythic-hidden-card.revealed .mythic-question {
  animation: mythicQuestionFlip 760ms ease-in forwards;
  pointer-events: none;
}

.mythic-hidden-card.revealed .mythic-real-card {
  opacity: 1;
  animation: mythicRealFlip 760ms ease-out forwards;
}

.ultra-celestial.revealed {
  animation: celestialBigGlow 1050ms ease-out both;
}

.ultra-celestial.revealed .mythic-question {
  animation: mythicQuestionFlip 1000ms ease-in forwards;
}

.ultra-celestial.revealed .mythic-real-card {
  animation: mythicRealFlip 1000ms ease-out forwards;
}

.ultra-transcendent.revealed {
  animation: transcendentBigGlow 1400ms ease-out both;
}

.ultra-transcendent.revealed .mythic-question {
  animation: mythicQuestionFlip 1350ms cubic-bezier(0.45, 0, 0.2, 1) forwards;
}

.ultra-transcendent.revealed .mythic-real-card {
  animation: mythicRealFlip 1350ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.ultra-eternal.revealed {
  animation: eternalBigGlow 1900ms ease-out both;
}

.ultra-eternal.revealed .mythic-question {
  animation: mythicQuestionFlip 1800ms cubic-bezier(0.42, 0, 0.1, 1) forwards;
}

.ultra-eternal.revealed .mythic-real-card {
  animation: mythicRealFlip 1800ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ultra-astral.revealed {
  animation: astralBigGlow 2300ms ease-out both;
}

.ultra-astral.revealed .mythic-question {
  animation: mythicQuestionFlip 2200ms cubic-bezier(0.42, 0, 0.1, 1) forwards;
}

.ultra-astral.revealed .mythic-real-card {
  animation: mythicRealFlip 2200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ultra-omniversal.revealed {
  animation: omniversalBigGlow 2800ms ease-out both;
}

.ultra-omniversal.revealed .mythic-question {
  animation: mythicQuestionFlip 2700ms cubic-bezier(0.42, 0, 0.1, 1) forwards;
}

.ultra-omniversal.revealed .mythic-real-card {
  animation: mythicRealFlip 2700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ultra-quantum.revealed,
.ultra-singularity.revealed,
.ultra-apex.revealed {
  animation: omniversalBigGlow 3100ms ease-out both;
}

.ultra-quantum.revealed .mythic-question,
.ultra-singularity.revealed .mythic-question,
.ultra-apex.revealed .mythic-question {
  animation: mythicQuestionFlip 3000ms cubic-bezier(0.42, 0, 0.1, 1) forwards;
}

.ultra-quantum.revealed .mythic-real-card,
.ultra-singularity.revealed .mythic-real-card,
.ultra-apex.revealed .mythic-real-card {
  animation: mythicRealFlip 3000ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (max-width: 560px) {
  .shop-pack, .collection-item {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .shop-pack .shop-actions,
  .collection-item .card-actions {
    grid-column: 1 / -1;
  }

  .shop-actions {
    grid-template-columns: 1fr 70px 1fr;
  }

  .buy-button, .equip-button, .sell-button, .combine-button {
    width: 100%;
  }

  .card-preview.click-card-face {
    width: auto;
    height: min(44vh, 380px);
    max-width: 82%;
    aspect-ratio: 0.7;
    max-height: 44vh;
  }
}

@keyframes foilSweep {
  from { background-position: 170% 0, 0 0; }
  to { background-position: -70% 0, 0 0; }
}

@keyframes shinyPulse {
  50% { filter: saturate(1.22) brightness(1.04); }
}

@keyframes diamondSweep {
  from { background-position: 160% 0, 0 0; }
  to { background-position: -80% 0, 0 0; }
}

@keyframes galaxyCamera {
  0% {
    background-position:
      12% 18%,
      24% 44%,
      46% 28%,
      68% 22%,
      78% 46%,
      82% 72%,
      36% 84%,
      58% 84%,
      91% 12%,
      18% 42%,
      28% 48%,
      62% 58%,
      48% 42%,
      72% 34%,
      0 0;
    background-size:
      62px 74px,
      86px 92px,
      104px 88px,
      78px 96px,
      118px 102px,
      92px 112px,
      136px 116px,
      156px 128px,
      180px 150px,
      260% 220%,
      320% 260%,
      340% 280%,
      380% 320%,
      420% 340%,
      100% 100%;
  }
  33% {
    background-position:
      58% 36%,
      74% 28%,
      18% 72%,
      30% 66%,
      88% 74%,
      74% 28%,
      18% 38%,
      42% 12%,
      12% 54%,
      54% 48%,
      44% 34%,
      38% 68%,
      64% 58%,
      34% 72%,
      0 0;
    background-size:
      255% 255%,
      102px 108px,
      126px 110px,
      96px 118px,
      142px 124px,
      112px 134px,
      160px 138px,
      184px 152px,
      214px 178px,
      330% 280%,
      420% 340%,
      430% 360%,
      500% 420%,
      540% 440%,
      100% 100%;
  }
  66% {
    background-position:
      34% 74%,
      52% 16%,
      82% 38%,
      78% 48%,
      22% 58%,
      26% 18%,
      72% 62%,
      16% 86%,
      68% 28%,
      38% 58%,
      70% 44%,
      54% 34%,
      28% 64%,
      82% 48%,
      0 0;
    background-size:
      190% 190%,
      72px 84px,
      92px 76px,
      68px 86px,
      104px 90px,
      82px 100px,
      124px 104px,
      142px 118px,
      164px 138px,
      240% 210%,
      300% 250%,
      320% 270%,
      360% 300%,
      400% 330%,
      100% 100%;
  }
  100% {
    background-position:
      12% 18%,
      24% 44%,
      46% 28%,
      68% 22%,
      78% 46%,
      82% 72%,
      36% 84%,
      58% 84%,
      91% 12%,
      18% 42%,
      28% 48%,
      62% 58%,
      48% 42%,
      72% 34%,
      0 0;
  }
}

@keyframes galaxyPulse {
  50% {
    filter: saturate(1.35) brightness(1.12);
    transform: translateY(-1px) scale(1.025);
    box-shadow:
      inset 0 0 0 5px rgba(255, 255, 255, 0.82),
      inset 0 0 0 10px rgba(48, 229, 255, 0.62),
      inset 0 0 42px rgba(255, 63, 119, 0.36),
      0 0 34px rgba(255, 63, 119, 0.68),
      0 0 72px rgba(139, 92, 255, 0.62);
  }
}

@keyframes mysteryGalaxyCamera {
  0%, 100% {
    background-position:
      16% 24%,
      54% 18%,
      82% 70%,
      30% 62%,
      72% 38%,
      0 0;
  }
  40% {
    background-position:
      72% 36%,
      20% 62%,
      48% 18%,
      68% 44%,
      28% 70%,
      0 0;
  }
  70% {
    background-position:
      34% 78%,
      84% 42%,
      18% 30%,
      46% 26%,
      78% 64%,
      0 0;
  }
}

@keyframes starTwinkle {
  0%, 100% {
    opacity: 0.72;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.14);
  }
}

@keyframes fireSurge {
  0%, 100% {
    background-position: 50% 104%, 20% 86%, 78% 74%, 16% 96%, 50% 100%, 84% 96%, 0 0, 0 0;
    filter: saturate(1.18) contrast(1.04) brightness(1);
  }
  45% {
    background-position: 52% 76%, 35% 54%, 66% 46%, 22% 74%, 48% 78%, 74% 70%, 70% 0, 0 0;
    filter: saturate(1.55) contrast(1.08) brightness(1.16);
  }
  70% {
    background-position: 46% 86%, 15% 66%, 88% 52%, 10% 82%, 56% 72%, 90% 78%, 110% 0, 0 0;
  }
}

@keyframes flameCore {
  0%, 100% { transform: scale(0.92); }
  50% { transform: scale(1.18) translateY(-3px); }
}

@keyframes flameTongues {
  0%, 100% { transform: translateY(0) scaleY(1); opacity: 0.9; }
  45% { transform: translateY(-6px) scaleY(1.12); opacity: 1; }
  70% { transform: translateY(-2px) scaleY(0.96); }
}

@keyframes iceGlide {
  0%, 100% {
    background-position: 0 0, 18% 16%, 78% 74%, 170% 0, 0 0, 0 0, 0 0;
    filter: saturate(1.18) hue-rotate(8deg) brightness(1.06);
  }
  50% {
    background-position: 0 0, 70% 34%, 28% 58%, -70% 0, 58% 42%, 60% 40%, 0 0;
    filter: saturate(1.32) hue-rotate(16deg) brightness(1.18);
  }
}

@keyframes iceCore {
  0%, 100% { transform: rotate(0deg) scale(0.95); }
  50% { transform: rotate(45deg) scale(1.12); }
}

@keyframes icicleShimmer {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(2px); opacity: 1; }
}

@keyframes infinitySnapPulse {
  0%, 100% { opacity: 0.78; transform: scale(0.94) rotate(-7deg); }
  50% { opacity: 1; transform: scale(1.08) rotate(5deg); }
}

@keyframes packFoilSweep {
  from { background-position: 180% 0, 0 0; }
  to { background-position: -80% 0, 0 0; }
}

@keyframes ultimatePackPulse {
  50% {
    filter: saturate(1.35) brightness(1.08);
    transform: translateY(-1px) scale(1.02);
  }
}

@keyframes sealMorph {
  0%, 100% { border-radius: 34% 66% 42% 58%; transform: rotate(0deg); }
  50% { border-radius: 64% 36% 58% 42%; transform: rotate(8deg); }
}

@keyframes mythicEdgeGlow {
  50% {
    box-shadow:
      inset 0 0 0 7px rgba(255, 255, 255, 0.5),
      0 0 34px rgba(48, 229, 255, 0.55),
      0 0 58px rgba(255, 63, 119, 0.42);
  }
}

@keyframes celestialEdgeGlow {
  50% {
    box-shadow:
      inset 0 0 0 8px rgba(255, 255, 255, 0.62),
      0 0 42px rgba(48, 229, 255, 0.78),
      0 0 78px rgba(255, 247, 168, 0.56);
  }
}

@keyframes transcendentEdgeGlow {
  50% {
    box-shadow:
      inset 0 0 0 9px rgba(255, 255, 255, 0.72),
      0 0 52px rgba(122, 77, 255, 0.88),
      0 0 96px rgba(255, 100, 223, 0.66),
      0 0 132px rgba(48, 229, 255, 0.44);
  }
}

@keyframes eternalEdgeGlow {
  50% {
    box-shadow:
      inset 0 0 0 10px rgba(255, 247, 168, 0.86),
      0 0 64px rgba(255, 255, 255, 0.9),
      0 0 118px rgba(255, 63, 119, 0.74),
      0 0 170px rgba(48, 229, 255, 0.6);
  }
}

@keyframes astralEdgeGlow {
  50% {
    box-shadow:
      inset 0 0 0 11px rgba(255, 255, 255, 0.9),
      0 0 74px rgba(115, 255, 242, 1),
      0 0 150px rgba(16, 32, 255, 0.88),
      0 0 230px rgba(139, 92, 255, 0.66);
  }
}

@keyframes omniversalEdgeGlow {
  50% {
    box-shadow:
      inset 0 0 0 12px rgba(255, 255, 255, 1),
      0 0 92px rgba(255, 255, 255, 1),
      0 0 190px rgba(255, 205, 77, 0.92),
      0 0 310px rgba(255, 63, 119, 0.75),
      0 0 420px rgba(48, 229, 255, 0.62);
  }
}

@keyframes mythicBigGlow {
  0% { box-shadow: 0 0 0 rgba(255, 63, 119, 0); }
  45% { box-shadow: 0 0 46px rgba(48, 229, 255, 0.85), 0 0 92px rgba(255, 63, 119, 0.62); }
  100% { box-shadow: 0 0 18px rgba(48, 229, 255, 0.28); }
}

@keyframes celestialBigGlow {
  0% { box-shadow: 0 0 0 rgba(48, 229, 255, 0); }
  45% { box-shadow: 0 0 64px rgba(48, 229, 255, 0.95), 0 0 128px rgba(255, 247, 168, 0.72); }
  100% { box-shadow: 0 0 24px rgba(48, 229, 255, 0.34); }
}

@keyframes transcendentBigGlow {
  0% { box-shadow: 0 0 0 rgba(122, 77, 255, 0); filter: saturate(1); }
  50% { box-shadow: 0 0 82px rgba(122, 77, 255, 1), 0 0 150px rgba(255, 100, 223, 0.82), 0 0 220px rgba(48, 229, 255, 0.55); filter: saturate(1.45); }
  100% { box-shadow: 0 0 30px rgba(122, 77, 255, 0.42); filter: saturate(1); }
}

@keyframes eternalBigGlow {
  0% { box-shadow: 0 0 0 rgba(255, 247, 168, 0); filter: brightness(1); }
  20% { filter: brightness(1.45); }
  55% { box-shadow: 0 0 110px rgba(255, 255, 255, 1), 0 0 190px rgba(255, 63, 119, 0.9), 0 0 280px rgba(48, 229, 255, 0.75); filter: brightness(1.35) saturate(1.6); }
  100% { box-shadow: 0 0 38px rgba(255, 247, 168, 0.5); filter: brightness(1); }
}

@keyframes astralBigGlow {
  0% { box-shadow: 0 0 0 rgba(115, 255, 242, 0); filter: brightness(1); }
  18% { filter: brightness(1.65); }
  55% { box-shadow: 0 0 130px rgba(115, 255, 242, 1), 0 0 230px rgba(16, 32, 255, 0.9), 0 0 340px rgba(139, 92, 255, 0.72); filter: brightness(1.45) saturate(1.8); }
  100% { box-shadow: 0 0 46px rgba(115, 255, 242, 0.5); filter: brightness(1); }
}

@keyframes omniversalBigGlow {
  0% { box-shadow: 0 0 0 rgba(255, 255, 255, 0); filter: brightness(1); }
  14% { filter: brightness(1.9) contrast(1.18); }
  52% { box-shadow: 0 0 160px rgba(255, 255, 255, 1), 0 0 280px rgba(255, 205, 77, 0.98), 0 0 430px rgba(255, 63, 119, 0.88), 0 0 560px rgba(48, 229, 255, 0.7); filter: brightness(1.7) saturate(2); }
  100% { box-shadow: 0 0 58px rgba(255, 255, 255, 0.58); filter: brightness(1); }
}

@keyframes ultraSpinWash {
  to { filter: hue-rotate(360deg); }
}

@keyframes mythicQuestionFlip {
  to {
    opacity: 0;
    transform: rotateY(-180deg) scale(0.96);
  }
}

@keyframes mythicRealFlip {
  from {
    opacity: 0;
    transform: rotateY(180deg) scale(0.96);
  }
  to {
    opacity: 1;
    transform: rotateY(0deg) scale(1);
  }
}
