/* Public Treasure showcase — Dota-style animated costume models */

@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=Cormorant+Garamond:wght@600;700&family=Sora:wght@400;500;600;700&display=swap");

.pmx-treasure {
  position: relative;
  padding: clamp(56px, 8vh, 96px) 0 clamp(48px, 7vh, 80px);
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 10%, rgba(232, 185, 35, 0.16), transparent 58%),
    radial-gradient(ellipse 45% 40% at 10% 80%, rgba(168, 85, 247, 0.1), transparent 55%),
    #07090f;
  color: #e8ecf4;
  font-family: "Sora", system-ui, sans-serif;
}

.pmx-treasure__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 9, 15, 0.15), transparent 35%, rgba(7, 9, 15, 0.9));
}

.pmx-treasure__header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: end;
  margin-bottom: clamp(18px, 3vh, 28px);
}

.pmx-treasure__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e8b923;
}

.pmx-treasure__title {
  margin: 0 0 0.55rem;
  font-family: "Cinzel", serif;
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
}

.pmx-treasure__lead {
  margin: 0 0 1.1rem;
  max-width: 38rem;
  color: rgba(232, 236, 244, 0.72);
  font-size: 1.02rem;
  line-height: 1.55;
}

.pmx-treasure__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.pmx-treasure__cta {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 220px;
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  color: #14110a;
  background: linear-gradient(135deg, #ffe08a, #e8b923 45%, #b8860b);
  box-shadow: 0 12px 30px rgba(232, 185, 35, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: "Cinzel", serif;
  font-weight: 700;
  position: relative;
}

.pmx-treasure__cta i {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
}

.pmx-treasure__cta span { font-size: 1.05rem; letter-spacing: 0.03em; }
.pmx-treasure__cta small {
  font-family: "Sora", system-ui, sans-serif;
  font-weight: 600;
  opacity: 0.75;
  font-size: 0.78rem;
}

.pmx-treasure__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(232, 185, 35, 0.48);
  color: #14110a;
}

.pmx-treasure__hint {
  margin: 0;
  max-width: 28rem;
  font-size: 0.9rem;
  color: rgba(232, 236, 244, 0.6);
}

.pmx-treasure__mini-chest {
  position: relative;
  width: 120px;
  height: 110px;
  animation: pmxTreasureFloat 3.6s ease-in-out infinite;
}

.pmx-treasure__chest-burst {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 185, 35, 0.35), transparent 68%);
  animation: pmxTreasurePulse 2.8s ease-in-out infinite;
}

.pmx-treasure__chest-box {
  position: relative;
  width: 104px;
  height: 66px;
  margin: 34px auto 0;
  border-radius: 10px 10px 12px 12px;
  background: linear-gradient(160deg, #8a6a1a, #3d2c08 55%, #1a1408);
  border: 2px solid #f0d06a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), inset 0 0 16px rgba(255, 220, 100, 0.15);
}

.pmx-treasure__chest-lid {
  position: absolute;
  left: -2px;
  right: -2px;
  top: -26px;
  height: 32px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(160deg, #c9a227, #6b4e10);
  border: 2px solid #f0d06a;
  transform-origin: bottom center;
  animation: pmxTreasureLid 4.5s ease-in-out infinite;
}

.pmx-treasure__chest-lock {
  position: absolute;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a0, #b8860b 60%, #5a4208);
  border: 2px solid #fff3c4;
  box-shadow: 0 0 14px rgba(232, 185, 35, 0.55);
}

@keyframes pmxTreasureFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pmxTreasurePulse {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes pmxTreasureLid {
  0%, 70%, 100% { transform: rotateX(0); }
  78% { transform: rotateX(-28deg) translateY(-2px); }
  88% { transform: rotateX(-8deg); }
}

/* ===== Animated model stage (main visual) ===== */
.pmx-treasure-stage {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 920px;
  border-radius: 22px;
  border: 1px solid rgba(232, 185, 35, 0.28);
  background:
    radial-gradient(ellipse 55% 70% at 50% 55%, rgba(232, 185, 35, 0.1), transparent 70%),
    linear-gradient(180deg, rgba(18, 22, 34, 0.95), rgba(8, 10, 16, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  min-height: clamp(420px, 58vh, 620px);
}

.pmx-treasure-stage__rail {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 15, 0.75), transparent 18%, transparent 82%, rgba(7, 9, 15, 0.75)),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 46px,
      rgba(232, 185, 35, 0.04) 46px,
      rgba(232, 185, 35, 0.04) 47px
    );
  pointer-events: none;
}

.pmx-treasure-stage__viewport {
  position: relative;
  height: clamp(360px, 52vh, 540px);
  display: grid;
  place-items: end center;
}

.pmx-treasure-model {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transition: opacity 0.55s ease, transform 0.65s cubic-bezier(0.16, 0.84, 0.28, 1);
  pointer-events: none;
}

.pmx-treasure-model.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  z-index: 2;
}

.pmx-treasure-model__aura {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: min(420px, 70%);
  height: 55%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--rarity, #e8b923) 55%, transparent), transparent 68%);
  filter: blur(8px);
  animation: pmxModelAura 2.8s ease-in-out infinite;
}

@keyframes pmxModelAura {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(0.95); }
  50% { opacity: 0.95; transform: translateX(-50%) scale(1.06); }
}

.pmx-treasure-model__img {
  position: relative;
  z-index: 1;
  max-height: clamp(320px, 48vh, 500px);
  width: auto;
  max-width: min(420px, 88%);
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55));
  animation: pmxModelBob 4s ease-in-out infinite;
}

@keyframes pmxModelBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.pmx-treasure-model__meta {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 3;
  text-align: center;
  min-width: min(280px, 86%);
  padding: 0.65rem 1rem 0.75rem;
  border-radius: 14px;
  background: rgba(8, 10, 16, 0.72);
  border: 1px solid color-mix(in srgb, var(--rarity, #e8b923) 55%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 24px color-mix(in srgb, var(--rarity, #e8b923) 25%, transparent);
}

.pmx-treasure-model__rarity {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rarity, #e8b923);
  margin-bottom: 0.2rem;
}

.pmx-treasure-model__name {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.15rem;
}

.pmx-treasure-model__gender {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(232, 236, 244, 0.65);
}

.pmx-treasure-stage__nav {
  position: absolute;
  top: 42%;
  z-index: 4;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(232, 185, 35, 0.35);
  background: rgba(10, 12, 18, 0.72);
  color: #f0d06a;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.pmx-treasure-stage__nav:hover {
  background: rgba(232, 185, 35, 0.2);
  transform: scale(1.06);
}

.pmx-treasure-stage__nav--prev { left: 12px; }
.pmx-treasure-stage__nav--next { right: 12px; }

.pmx-treasure-stage__thumbs {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0.35rem 1rem 1.1rem;
}

.pmx-treasure-stage__thumb {
  position: relative;
  width: 64px;
  height: 84px;
  padding: 0;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  cursor: pointer;
  background: #0c1018;
  opacity: 0.62;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pmx-treasure-stage__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.pmx-treasure-stage__thumb span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.pmx-treasure-stage__thumb.is-active,
.pmx-treasure-stage__thumb:hover {
  opacity: 1;
  border-color: var(--rarity, #e8b923);
  transform: translateY(-3px);
  box-shadow: 0 0 16px color-mix(in srgb, var(--rarity, #e8b923) 40%, transparent);
}

.pmx-treasure__caption {
  position: relative;
  z-index: 1;
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(232, 236, 244, 0.55);
}

.pmx-treasure--home {
  padding: clamp(40px, 6vh, 72px) 0;
  border-top: 1px solid rgba(232, 185, 35, 0.12);
}

.pmx-treasure--home .pmx-treasure-stage {
  min-height: clamp(380px, 52vh, 560px);
}

@media (max-width: 767.98px) {
  .pmx-treasure__header {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .pmx-treasure__actions { align-items: center; }
  .pmx-treasure__lead { margin-left: auto; margin-right: auto; }
  .pmx-treasure__mini-chest { display: none; }
  .pmx-treasure-stage__nav { width: 36px; height: 36px; }
  .pmx-treasure-stage__thumb { width: 52px; height: 70px; }
}

body.treasure-public-page {
  background: #07090f;
}
body.treasure-public-page .header {
  background: rgba(7, 9, 15, 0.72);
}

/* ===== Dota-style homepage trove billboard (hero center) ===== */
#hero.cgames-hero .pmx-trove {
  position: relative;
  z-index: 7;
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
  /* top nav + bottom dock always reserved */
  padding: calc(var(--cg-dock-h, 68px) + 4px) 12px 92px;
}

.pmx-trove__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.pmx-trove__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.55;
  filter: saturate(0.85) brightness(0.72);
}

.pmx-trove__mist {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(232, 185, 35, 0.12), transparent 65%),
    linear-gradient(180deg, rgba(7, 9, 13, 0.2) 0%, transparent 35%, rgba(7, 9, 13, 0.92) 88%);
}

.pmx-trove__cast {
  position: relative;
  z-index: 2;
  width: min(920px, 100%);
  height: clamp(280px, 48vh, 520px);
  margin: 0 auto;
}

.pmx-trove__fig {
  position: absolute;
  bottom: 0;
  width: auto;
  height: 86%;
  max-width: none;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.55));
  pointer-events: none;
  user-select: none;
}

#hero.cgames-hero .pmx-trove__fig {
  position: absolute !important;
  inset: auto !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: 0 !important;
  width: auto !important;
  max-width: none !important;
}

.pmx-trove__fig--left {
  left: 2%;
  height: 78%;
  z-index: 2;
  transform: translateX(0);
  animation: pmxTroveBob 4.4s ease-in-out infinite;
  opacity: 0.92;
}

.pmx-trove__fig--center {
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  z-index: 4;
  animation: pmxTroveBobCenter 3.8s ease-in-out infinite;
}

.pmx-trove__fig--right {
  right: 2%;
  height: 80%;
  z-index: 3;
  animation: pmxTroveBob 4.8s ease-in-out infinite 0.35s;
  opacity: 0.94;
}

@keyframes pmxTroveBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

.pmx-trove__stage {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.pmx-trove__copy {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 0.55rem 1rem 0.65rem;
  margin: -1.75rem auto 0;
  max-width: 640px;
  animation: pmxRise 0.9s cubic-bezier(0.16, 0.84, 0.28, 1) both;
  flex: 0 0 auto;
}

.pmx-trove__eyebrow {
  margin: 0 0 0.35rem;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #e8b923;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

.pmx-trove__emblem {
  width: 34px;
  height: 34px;
  margin: 0 auto 0.35rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #111;
  background: radial-gradient(circle at 35% 30%, #ffe9a0, #e8b923 55%, #8a6a1a);
  box-shadow: 0 0 22px rgba(232, 185, 35, 0.45);
  font-size: 0.95rem;
}

.pmx-trove__title {
  margin: 0 0 0.4rem;
  font-family: "Cinzel", serif;
  font-size: clamp(1.7rem, 3.6vw, 2.55rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.1;
  color: #fff;
  background: linear-gradient(180deg, #fffef6 0%, #ffe9a0 42%, #e8b923 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 18px rgba(232, 185, 35, 0.28));
}

.pmx-trove__lead {
  margin: 0 auto 0.75rem;
  max-width: 34rem;
  color: rgba(240, 236, 228, 0.9);
  font-family: "Sora", system-ui, sans-serif;
  font-size: clamp(0.86rem, 1.35vw, 1rem);
  font-weight: 500;
  line-height: 1.45;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8), 0 0 1px rgba(0, 0, 0, 0.9);
  overflow: visible;
  display: block;
  -webkit-line-clamp: unset;
}

.pmx-trove__cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 0.72rem 1.55rem;
  border-radius: 6px;
  text-decoration: none;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  color: #fff8e8;
  background:
    linear-gradient(180deg, rgba(255, 220, 120, 0.18), transparent 42%),
    linear-gradient(180deg, #3a2a12, #1a140a 55%, #0e0b07);
  border: 1px solid rgba(240, 193, 77, 0.65);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(232, 185, 35, 0.22),
    0 12px 28px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition:
    transform 0.28s cubic-bezier(0.16, 0.84, 0.28, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    filter 0.28s ease,
    letter-spacing 0.28s ease;
}

.pmx-trove__cta-label {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 0 18px rgba(255, 210, 90, 0.35);
}

.pmx-trove__cta-shine {
  position: absolute;
  inset: -40% -60%;
  z-index: 1;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(255, 235, 160, 0.55) 50%,
    rgba(255, 255, 255, 0.1) 55%,
    transparent 65%
  );
  transform: translateX(-55%) rotate(8deg);
  opacity: 0.55;
  pointer-events: none;
  transition: transform 0.65s cubic-bezier(0.16, 0.84, 0.28, 1), opacity 0.3s ease;
}

.pmx-trove__cta-glow {
  position: absolute;
  inset: -2px;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 120%, rgba(255, 210, 80, 0.45), transparent 55%);
  opacity: 0.35;
  filter: blur(6px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pmx-trove__cta:hover,
.pmx-trove__cta:focus-visible {
  color: #fff;
  letter-spacing: 0.18em;
  transform: translateY(-4px) scale(1.04);
  border-color: rgba(255, 220, 120, 0.95);
  filter: brightness(1.12) saturate(1.15);
  box-shadow:
    0 0 0 1px rgba(255, 220, 120, 0.35),
    0 0 28px rgba(232, 185, 35, 0.55),
    0 0 48px rgba(80, 180, 220, 0.22),
    0 16px 36px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.pmx-trove__cta:hover .pmx-trove__cta-shine,
.pmx-trove__cta:focus-visible .pmx-trove__cta-shine {
  transform: translateX(55%) rotate(8deg);
  opacity: 1;
}

.pmx-trove__cta:hover .pmx-trove__cta-glow,
.pmx-trove__cta:focus-visible .pmx-trove__cta-glow {
  opacity: 0.9;
  transform: scale(1.08);
}

.pmx-trove__cta:active {
  transform: translateY(-1px) scale(0.98);
}

.pmx-trove__cta.is-opening {
  animation: pmxTroveCtaBurst 0.55s cubic-bezier(0.16, 0.84, 0.28, 1) both;
  pointer-events: none;
}

@keyframes pmxTroveCtaBurst {
  0% { transform: scale(1); filter: brightness(1); }
  35% { transform: scale(1.12); filter: brightness(1.45) saturate(1.4); box-shadow: 0 0 40px rgba(255, 220, 100, 0.85), 0 0 80px rgba(80, 200, 230, 0.4); }
  100% { transform: scale(0.92); filter: brightness(1.8); opacity: 0.15; }
}

/* Full-viewport treasure open FX — chest lid + gold beam + loot burst */
.pmx-treasure-burst {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  perspective: 960px;
}

.pmx-treasure-burst.is-active {
  opacity: 1;
}

.pmx-treasure-burst__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 50% 55%, rgba(12, 14, 22, 0.15), rgba(7, 9, 13, 0.72) 55%, rgba(4, 5, 10, 0.92));
  opacity: 0;
}

.pmx-treasure-burst__rays {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 140vmax;
  height: 140vmax;
  margin: -70vmax 0 0 -70vmax;
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    rgba(255, 220, 120, 0.08) 18deg,
    transparent 36deg,
    rgba(90, 200, 230, 0.06) 54deg,
    transparent 72deg,
    rgba(255, 220, 120, 0.1) 90deg,
    transparent 108deg,
    rgba(255, 200, 80, 0.07) 126deg,
    transparent 144deg,
    rgba(255, 220, 120, 0.09) 162deg,
    transparent 180deg,
    rgba(90, 200, 230, 0.05) 198deg,
    transparent 216deg,
    rgba(255, 220, 120, 0.08) 234deg,
    transparent 252deg,
    rgba(255, 200, 80, 0.06) 270deg,
    transparent 288deg,
    rgba(255, 220, 120, 0.1) 306deg,
    transparent 324deg,
    rgba(255, 220, 120, 0.07) 342deg,
    transparent 360deg
  );
  opacity: 0;
  mix-blend-mode: screen;
}

.pmx-treasure-burst__beam {
  position: absolute;
  left: 50%;
  bottom: 28%;
  width: 18px;
  height: 0;
  margin-left: -9px;
  transform-origin: 50% 100%;
  background: linear-gradient(
    180deg,
    rgba(255, 250, 210, 0) 0%,
    rgba(255, 235, 160, 0.95) 35%,
    rgba(232, 185, 35, 0.85) 65%,
    rgba(255, 220, 100, 0.4) 100%
  );
  box-shadow:
    0 0 24px rgba(255, 220, 100, 0.9),
    0 0 48px rgba(232, 185, 35, 0.55),
    0 0 80px rgba(255, 240, 180, 0.35);
  filter: blur(0.5px);
  opacity: 0;
  border-radius: 999px;
}

.pmx-treasure-burst__title {
  position: absolute;
  left: 50%;
  top: 18%;
  margin: 0;
  transform: translateX(-50%) scale(0.88);
  font-family: "Cinzel", serif;
  font-size: clamp(1.35rem, 3.8vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff8dc;
  text-shadow:
    0 0 18px rgba(255, 220, 100, 0.85),
    0 0 36px rgba(232, 185, 35, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.65);
  opacity: 0;
  white-space: nowrap;
}

.pmx-treasure-burst__stage {
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(320px, 78vw);
  height: min(280px, 52vh);
  margin: -140px 0 0 -160px;
  transform-style: preserve-3d;
  perspective: 900px;
}

.pmx-treasure-burst__glow {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 220px;
  height: 220px;
  margin: -110px 0 0 -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 235, 160, 0.55) 0%, rgba(232, 185, 35, 0.28) 38%, transparent 68%);
  opacity: 0;
  filter: blur(2px);
}

.pmx-treasure-burst__loot {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 1px;
  height: 1px;
  transform-style: preserve-3d;
}

.pmx-treasure-burst__coin,
.pmx-treasure-burst__gem,
.pmx-treasure-burst__loot .pmx-treasure-burst__spark {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
}

.pmx-treasure-burst__coin {
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6c8, #e8b923 55%, #8a6a1a);
  box-shadow: 0 0 10px rgba(255, 220, 100, 0.85), inset 0 -2px 4px rgba(0, 0, 0, 0.25);
}

.pmx-treasure-burst__gem {
  width: 12px;
  height: 16px;
  margin: -8px 0 0 -6px;
  clip-path: polygon(50% 0%, 92% 38%, 72% 100%, 28% 100%, 8% 38%);
  background: linear-gradient(160deg, #a8f0ff, #5ec8e8 40%, #2a88b8);
  box-shadow: 0 0 14px rgba(90, 200, 230, 0.75);
}

.pmx-treasure-burst__loot .pmx-treasure-burst__spark {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: #ffe9a0;
  box-shadow: 0 0 8px #ffd45a, 0 0 14px rgba(255, 220, 100, 0.65);
}

.pmx-treasure-burst__chest {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 168px;
  height: 120px;
  margin-left: -84px;
  transform-style: preserve-3d;
}

.pmx-treasure-burst__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  border-radius: 12px 12px 14px 14px;
  background: linear-gradient(165deg, #9a7420 0%, #4a3810 52%, #1a1408 100%);
  border: 2px solid #f0d06a;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.55),
    inset 0 0 20px rgba(255, 220, 100, 0.12);
}

.pmx-treasure-burst__body::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a0, #b8860b 60%, #5a4208);
  border: 2px solid #fff3c4;
  box-shadow: 0 0 16px rgba(232, 185, 35, 0.6);
}

.pmx-treasure-burst__lid {
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 68px;
  height: 38px;
  border-radius: 12px 12px 6px 6px;
  transform-origin: 50% 100%;
  transform: rotateX(0deg);
  background: linear-gradient(165deg, #d4ad2a 0%, #7a5a12 55%, #3d2c08);
  border: 2px solid #f0d06a;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.35), inset 0 2px 8px rgba(255, 240, 180, 0.2);
}

.pmx-treasure-burst.is-active .pmx-treasure-burst__veil {
  animation: pmxBurstVeil 1.35s ease-out both;
}

.pmx-treasure-burst.is-active .pmx-treasure-burst__rays {
  animation: pmxBurstRays 1.2s ease-out both;
}

.pmx-treasure-burst.is-active .pmx-treasure-burst__beam {
  animation: pmxBurstBeam 0.85s cubic-bezier(0.12, 0.75, 0.22, 1) both;
  animation-delay: 0.18s;
}

.pmx-treasure-burst.is-active .pmx-treasure-burst__title {
  animation: pmxBurstTitle 1.05s cubic-bezier(0.16, 0.84, 0.28, 1) both;
  animation-delay: 0.32s;
}

.pmx-treasure-burst.is-active .pmx-treasure-burst__glow {
  animation: pmxBurstGlow 1s ease-out both;
  animation-delay: 0.22s;
}

.pmx-treasure-burst.is-active .pmx-treasure-burst__lid {
  animation: pmxChestLid 0.72s cubic-bezier(0.22, 0.85, 0.28, 1) both;
  animation-delay: 0.12s;
}

.pmx-treasure-burst.is-active .pmx-treasure-burst__coin:nth-child(1) { --fx: -72px; --fy: -118px; --fr: -240deg; animation-delay: 0.38s; }
.pmx-treasure-burst.is-active .pmx-treasure-burst__coin:nth-child(2) { --fx: 88px; --fy: -102px; --fr: 200deg; animation-delay: 0.42s; }
.pmx-treasure-burst.is-active .pmx-treasure-burst__coin:nth-child(3) { --fx: -95px; --fy: -68px; --fr: -160deg; animation-delay: 0.44s; }
.pmx-treasure-burst.is-active .pmx-treasure-burst__coin:nth-child(4) { --fx: 62px; --fy: -128px; --fr: 280deg; animation-delay: 0.4s; }

.pmx-treasure-burst.is-active .pmx-treasure-burst__gem:nth-child(5) { --fx: -48px; --fy: -142px; animation-delay: 0.48s; }
.pmx-treasure-burst.is-active .pmx-treasure-burst__gem:nth-child(6) { --fx: 54px; --fy: -136px; animation-delay: 0.5s; }

.pmx-treasure-burst.is-active .pmx-treasure-burst__loot .pmx-treasure-burst__spark:nth-child(7) { --fx: -120px; --fy: -90px; animation-delay: 0.36s; }
.pmx-treasure-burst.is-active .pmx-treasure-burst__loot .pmx-treasure-burst__spark:nth-child(8) { --fx: 115px; --fy: -78px; animation-delay: 0.39s; }
.pmx-treasure-burst.is-active .pmx-treasure-burst__loot .pmx-treasure-burst__spark:nth-child(9) { --fx: -80px; --fy: -55px; animation-delay: 0.41s; }
.pmx-treasure-burst.is-active .pmx-treasure-burst__loot .pmx-treasure-burst__spark:nth-child(10) { --fx: 95px; --fy: -62px; animation-delay: 0.37s; }
.pmx-treasure-burst.is-active .pmx-treasure-burst__loot .pmx-treasure-burst__spark:nth-child(11) { --fx: 0px; --fy: -155px; animation-delay: 0.45s; }
.pmx-treasure-burst.is-active .pmx-treasure-burst__loot .pmx-treasure-burst__spark:nth-child(12) { --fx: 28px; --fy: -95px; animation-delay: 0.43s; }

.pmx-treasure-burst.is-active .pmx-treasure-burst__coin,
.pmx-treasure-burst.is-active .pmx-treasure-burst__gem,
.pmx-treasure-burst.is-active .pmx-treasure-burst__loot .pmx-treasure-burst__spark {
  animation: pmxBurstLootFly 0.78s cubic-bezier(0.12, 0.78, 0.22, 1) both;
}

@keyframes pmxBurstVeil {
  0% { opacity: 0; }
  12% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes pmxBurstRays {
  0% { opacity: 0; transform: scale(0.6) rotate(0deg); }
  25% { opacity: 0.85; }
  100% { opacity: 0.35; transform: scale(1.05) rotate(28deg); }
}

@keyframes pmxBurstBeam {
  0% { opacity: 0; height: 0; transform: scaleX(0.4); }
  22% { opacity: 1; height: min(42vh, 320px); transform: scaleX(1); }
  55% { opacity: 0.92; height: min(48vh, 360px); transform: scaleX(1.15); }
  100% { opacity: 0; height: min(52vh, 380px); transform: scaleX(1.25); }
}

@keyframes pmxBurstTitle {
  0% { opacity: 0; transform: translateX(-50%) scale(0.75); letter-spacing: 0.08em; filter: blur(4px); }
  35% { opacity: 1; transform: translateX(-50%) scale(1.06); letter-spacing: 0.26em; filter: blur(0); }
  100% { opacity: 0.92; transform: translateX(-50%) scale(1); letter-spacing: 0.22em; }
}

@keyframes pmxBurstGlow {
  0% { opacity: 0; transform: scale(0.35); }
  30% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 0.45; transform: scale(1.35); }
}

@keyframes pmxChestLid {
  0%, 8% { transform: rotateX(0deg); }
  42% { transform: rotateX(-112deg) translateY(-6px); }
  58% { transform: rotateX(-98deg) translateY(-3px); }
  100% { transform: rotateX(-105deg) translateY(-4px); }
}

@keyframes pmxBurstLootFly {
  0% { opacity: 0; transform: translate(0, 24px) scale(0.35) rotate(0deg); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--fx, 0), var(--fy, -100px)) scale(0.85) rotate(var(--fr, 180deg)); }
}

#hero.cgames-hero.is-treasure-opening .pmx-trove {
  animation: pmxTroveExit 1.1s cubic-bezier(0.4, 0, 0.2, 1) both;
}

#hero.cgames-hero .pmx-armory--home.is-entering {
  animation: pmxArmoryEnter 0.9s cubic-bezier(0.16, 0.84, 0.28, 1) both;
}

@keyframes pmxTroveExit {
  0% { opacity: 1; filter: blur(0) brightness(1); transform: scale(1); }
  40% { opacity: 0.6; filter: blur(2px) brightness(1.3); transform: scale(1.02); }
  100% { opacity: 0; filter: blur(10px) brightness(1.55); transform: scale(1.08); }
}

@keyframes pmxArmoryEnter {
  0% { opacity: 0; filter: blur(10px); transform: scale(1.04) translateY(18px); }
  55% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; filter: none; transform: scale(1) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .pmx-trove__cta,
  .pmx-trove__cta-shine,
  .pmx-trove__cta-glow {
    transition: none !important;
  }
  .pmx-trove__cta:hover,
  .pmx-trove__cta:focus-visible {
    transform: none;
    letter-spacing: 0.14em;
  }
  .pmx-trove__cta.is-opening,
  #hero.cgames-hero.is-treasure-opening .pmx-trove,
  #hero.cgames-hero .pmx-armory--home.is-entering,
  .pmx-treasure-burst.is-active .pmx-treasure-burst__veil,
  .pmx-treasure-burst.is-active .pmx-treasure-burst__rays,
  .pmx-treasure-burst.is-active .pmx-treasure-burst__beam,
  .pmx-treasure-burst.is-active .pmx-treasure-burst__title,
  .pmx-treasure-burst.is-active .pmx-treasure-burst__glow,
  .pmx-treasure-burst.is-active .pmx-treasure-burst__lid,
  .pmx-treasure-burst.is-active .pmx-treasure-burst__coin,
  .pmx-treasure-burst.is-active .pmx-treasure-burst__gem,
  .pmx-treasure-burst.is-active .pmx-treasure-burst__loot .pmx-treasure-burst__spark {
    animation: none !important;
  }
}
/* Critical: author .pmx-armory{display:flex} overrides [hidden] and steals a grid row */
#hero.cgames-hero .pmx-armory--home[hidden],
#hero.cgames-hero:not(.is-treasure-view) .pmx-armory--home {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

#hero.cgames-hero .cgames-center--dock {
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  grid-row: auto;
  width: 100% !important;
  flex: 0 0 auto !important;
  padding: 12px clamp(14px, 2vw, 28px) !important;
  background: linear-gradient(180deg, rgba(7, 9, 13, 0.15), rgba(7, 9, 13, 0.97) 28%) !important;
  border-top: 1px solid rgba(232, 185, 35, 0.22) !important;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  min-height: 76px;
  box-sizing: border-box;
}

#hero.cgames-hero .cgames-center--dock .cgames-center__copy {
  margin: 0 !important;
  text-align: left !important;
}

#hero.cgames-hero .cgames-center--dock .cgames-center__brand {
  font-size: 1.15rem !important;
}

#hero.cgames-hero .cgames-center--dock .cgames-center__lead,
#hero.cgames-hero .cgames-center--dock .cgames-center__meta,
#hero.cgames-hero .cgames-center--dock .cgames-quick-links {
  display: none !important;
}

#hero.cgames-hero .cgames-center--dock .cgames-schools {
  margin: 0 !important;
  gap: 10px !important;
}

#hero.cgames-hero .cgames-center--dock .cgames-center__actions {
  margin: 0 !important;
}

@media (max-width: 991.98px) {
  .pmx-trove__cast { height: clamp(240px, 42vh, 400px); }
  .pmx-trove__fig--left { left: -4%; height: 72%; }
  .pmx-trove__fig--right { right: -4%; height: 74%; }
  .pmx-trove__title { letter-spacing: 0.05em; }
  #hero.cgames-hero .cgames-center--dock {
    order: 1 !important;
    justify-content: center;
    text-align: center;
  }
  #hero.cgames-hero .cgames-center--dock .cgames-center__copy {
    text-align: center !important;
    width: 100%;
  }
  #hero.cgames-hero .pmx-trove {
    order: 2 !important;
  }
}

@media (max-width: 575.98px) {
  .pmx-trove__fig--left,
  .pmx-trove__fig--right {
    opacity: 0.78;
    height: 68%;
  }
  .pmx-trove__lead { font-size: 0.86rem; }
}

#hero.cgames-hero.is-auth .pmx-trove,
#hero.cgames-hero.is-sheet-open .pmx-trove {
  opacity: 0.22;
  pointer-events: none;
  filter: blur(1px);
}

@media (prefers-reduced-motion: reduce) {
  .pmx-trove__fig--left,
  .pmx-trove__fig--center,
  .pmx-trove__fig--right {
    animation: none !important;
  }
}

/* ===== Dota Armory treasure detail (/treasure) ===== */
body.treasure-armory-page {
  background: #07090f;
}
body.treasure-armory-page .footer,
body.treasure-armory-page .public-footer {
  display: none !important;
}

.pmx-armory {
  position: relative;
  min-height: calc(100dvh - 72px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e8ecf4;
  font-family: "Sora", system-ui, sans-serif;
}

.pmx-armory__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.pmx-armory__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: saturate(0.8) brightness(0.65);
}
.pmx-armory__mist {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 50% 40%, rgba(232,185,35,0.1), transparent 60%),
    linear-gradient(180deg, rgba(7,9,15,0.55) 0%, transparent 30%, rgba(7,9,15,0.92) 78%, #07090f 100%);
}

.pmx-armory__shell {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr) minmax(200px, 280px);
  gap: 12px 18px;
  align-items: stretch;
  padding: calc(var(--cg-dock-h, 72px) + 10px) clamp(12px, 2vw, 28px) 8px;
  min-height: 0;
}

.pmx-armory__left,
.pmx-armory__right {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.35rem 0.25rem;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  align-self: stretch;
  align-items: stretch;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: 100%;
}

.pmx-armory__eyebrow {
  margin: 0 0 0.55rem;
  font-family: "Cinzel", serif;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: #ffe08a;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

.pmx-armory__owned {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(240, 236, 228, 0.88);
}
.pmx-armory__owned strong {
  color: #fff;
  font-size: 1.25rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.pmx-armory__open {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  width: 100%;
  max-width: 168px;
  padding: 0;
  border: 0;
  border-radius: 0;
  text-decoration: none;
  color: #fff8e0;
  font-family: "Cinzel", serif;
  font-size: clamp(0.82rem, 1.8vw, 0.95rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  box-shadow: none;
  transition: transform 0.2s ease, filter 0.2s ease;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  overflow: visible;
  flex-shrink: 0;
}
.pmx-armory__open::before { display: none; }
.pmx-armory__open > * {
  position: relative;
  z-index: 1;
}
.pmx-armory__open-glow {
  position: absolute;
  left: 50%;
  top: 36%;
  z-index: 0;
  width: 120%;
  height: 70%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 60, 0.55), rgba(232, 185, 35, 0.2) 42%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  animation: pmxChestGlow 2.4s ease-in-out infinite;
}
/* CSS treasure box — always visible, no broken image bg */
.pmx-armory__chestbox {
  position: relative;
  z-index: 1;
  display: block;
  width: 118px;
  height: 96px;
  margin: 0 auto 0.15rem;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 16px rgba(255, 190, 40, 0.4));
  animation: pmxChestFloat 3.2s ease-in-out infinite;
  transform-style: preserve-3d;
  perspective: 480px;
}
.pmx-armory__chestbox-body {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 58%;
  border-radius: 8px 8px 12px 12px;
  background:
    linear-gradient(180deg, #a87922 0%, #6b4a12 40%, #3a280a 100%);
  border: 2px solid #f0d06a;
  box-shadow: inset 0 2px 0 rgba(255, 240, 180, 0.25), inset 0 -8px 14px rgba(0, 0, 0, 0.35);
}
.pmx-armory__chestbox-body::before,
.pmx-armory__chestbox-body::after {
  content: "";
  position: absolute;
  top: 10%;
  bottom: 10%;
  width: 3px;
  background: linear-gradient(180deg, #ffe08a, #b8860b 55%, #6b4e10);
  border-radius: 2px;
  opacity: 0.9;
}
.pmx-armory__chestbox-body::before { left: 22%; }
.pmx-armory__chestbox-body::after { right: 22%; }
.pmx-armory__chestbox-lid {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 52%;
  height: 36%;
  border-radius: 12px 12px 5px 5px;
  background: linear-gradient(165deg, #e8c24a 0%, #b89220 45%, #6b4e10 100%);
  border: 2px solid #fff1a8;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.35), inset 0 2px 6px rgba(255, 255, 220, 0.35);
  transform-origin: 50% 100%;
}
.pmx-armory__chestbox-lid::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 38%;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #fff3c4, transparent);
  opacity: 0.7;
}
.pmx-armory__chestbox-lock {
  position: absolute;
  left: 50%;
  top: 48%;
  z-index: 2;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #e8b923 45%, #8a6508 100%);
  border: 2px solid #ffe9a0;
  box-shadow: 0 0 14px rgba(255, 200, 60, 0.75), inset 0 -2px 4px rgba(0, 0, 0, 0.35);
}
.pmx-armory__chestbox-lock::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: #1a1206;
  box-shadow: inset 0 0 0 1.5px #c99212;
}
.pmx-armory__chestbox-shine {
  position: absolute;
  inset: 8% 18% 20%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 20%, rgba(255, 255, 220, 0.35), transparent 60%);
  pointer-events: none;
}
.pmx-armory__chestbox-glow {
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 28%;
  height: 55%;
  z-index: 0;
  border-radius: 50% 50% 40% 40%;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(255, 240, 150, 0.95), rgba(255, 180, 40, 0.55) 42%, transparent 72%);
  opacity: 0;
  transform: scale(0.6) translateY(8px);
  pointer-events: none;
  filter: blur(1px);
}
.pmx-armory__chestbox-lid {
  transition: transform 0.45s cubic-bezier(0.22, 0.9, 0.28, 1);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.pmx-armory__chestbox-lock {
  transition: opacity 0.3s ease, transform 0.35s ease;
}
.pmx-armory__chestbox-glow {
  transition: opacity 0.35s ease, transform 0.45s ease;
}
.pmx-armory__open:hover .pmx-armory__chestbox {
  transform: scale(1.07) translateY(-3px);
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 24px rgba(255, 210, 60, 0.7));
}
.pmx-armory__open:hover .pmx-armory__chestbox-lid {
  transform: rotateX(-18deg) translateY(-2px);
}
/* Clicked / spinning — chest clearly OPEN */
.pmx-armory__open.is-spinning .pmx-armory__chestbox {
  animation: pmxChestOpenBob 1.1s ease-in-out infinite;
  filter:
    drop-shadow(0 12px 18px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 28px rgba(255, 210, 60, 0.85));
}
.pmx-armory__open.is-spinning .pmx-armory__chestbox-lid {
  transform: rotateX(-118deg) translateY(-4px);
  box-shadow: 0 -6px 14px rgba(0, 0, 0, 0.35), inset 0 2px 6px rgba(255, 255, 220, 0.35);
}
.pmx-armory__open.is-spinning .pmx-armory__chestbox-lock {
  opacity: 0;
  transform: translate(-50%, 12px) scale(0.6);
  pointer-events: none;
}
.pmx-armory__open.is-spinning .pmx-armory__chestbox-glow {
  opacity: 1;
  transform: scale(1.15) translateY(-10px);
  animation: pmxChestInnerGlow 0.85s ease-in-out infinite;
}
.pmx-armory__open.is-spinning .pmx-armory__chestbox-body {
  box-shadow:
    inset 0 2px 0 rgba(255, 240, 180, 0.35),
    inset 0 -8px 14px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(255, 200, 60, 0.45);
}
.pmx-armory__open.is-spinning .pmx-armory__chestbox-shine {
  opacity: 0;
}
.pmx-armory__open-img { display: none !important; }
.pmx-armory__open-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  margin-top: 0.15rem;
}
.pmx-armory__open small {
  font-family: "Sora", system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffe08a;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}
.pmx-armory__open:hover {
  color: #fff;
  transform: translateY(-4px);
  filter: brightness(1.06);
}
.pmx-armory__open:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}
.pmx-armory__open:disabled:not(.is-spinning) {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.25);
}
.pmx-armory__open.is-spinning,
.pmx-armory__open:disabled.is-spinning {
  opacity: 1;
  cursor: wait;
  pointer-events: none;
  color: #ffe9a8;
  filter: none;
  transform: none;
  animation: none;
}
.pmx-armory__open.is-spinning .pmx-armory__open-glow {
  animation: pmxChestGlowFast 0.7s ease-in-out infinite;
  opacity: 1;
  width: 130%;
  height: 85%;
}
.pmx-armory__open.is-spinning small {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #fff3c4;
}
@keyframes pmxChestFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes pmxChestGlow {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.92); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}
@keyframes pmxChestGlowFast {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.95); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}
@keyframes pmxChestOpenBob {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.06) translateY(-4px); }
}
@keyframes pmxChestInnerGlow {
  0%, 100% { opacity: 0.75; filter: blur(1px) brightness(1); }
  50% { opacity: 1; filter: blur(0.5px) brightness(1.25); }
}
@media (prefers-reduced-motion: reduce) {
  .pmx-armory__chestbox,
  .pmx-armory__open-glow,
  .pmx-armory__open.is-spinning .pmx-armory__chestbox,
  .pmx-armory__open.is-spinning .pmx-armory__open-glow,
  .pmx-armory__open.is-spinning .pmx-armory__chestbox-glow {
    animation: none;
  }
  .pmx-armory__open:hover .pmx-armory__chestbox-lid {
    transform: none;
  }
  .pmx-armory__open.is-spinning .pmx-armory__chestbox-lid {
    transform: rotateX(-118deg) translateY(-4px);
  }
  .pmx-armory__open.is-spinning .pmx-armory__chestbox-glow {
    opacity: 1;
    transform: scale(1.1) translateY(-8px);
  }
}

.pmx-armory__panel-title {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffe08a;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}
.pmx-armory__panel-title--gap { margin-top: 1.15rem; }
.pmx-armory__panel-lead {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(245, 242, 235, 0.9);
}

.pmx-armory__feed-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 180px;
  height: 100%;
  max-height: none;
  overflow: hidden !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.pmx-armory__feed-viewport::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.pmx-armory__left::-webkit-scrollbar,
.pmx-armory__right::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.pmx-armory__left,
.pmx-armory__right {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
/* Keep headers/buttons compact; feeds eat remaining height */
.pmx-armory__left > :not(.pmx-armory__feed-viewport),
.pmx-armory__right > :not(.pmx-armory__feed-viewport) {
  flex: 0 0 auto;
}
.pmx-armory__feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  max-height: none;
  overflow: visible;
  will-change: transform;
}
.pmx-armory__feed.is-marquee {
  animation: pmxFeedMarquee var(--feed-secs, 26s) linear infinite;
}
.pmx-armory__feed-viewport:hover .pmx-armory__feed.is-marquee {
  animation-play-state: paused;
}
@keyframes pmxFeedMarquee {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .pmx-armory__feed.is-marquee { animation: none !important; }
  .pmx-armory__feed-viewport {
    overflow: hidden !important;
    mask-image: none;
    -webkit-mask-image: none;
  }
}
.pmx-armory__feed-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: start;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  border-left: 3px solid var(--rarity, #e8b923);
}
.pmx-armory__feed-dot {
  width: 8px;
  height: 8px;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--rarity, #e8b923);
  box-shadow: 0 0 10px color-mix(in srgb, var(--rarity, #e8b923) 55%, transparent);
}
.pmx-armory__feed-body {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}
.pmx-armory__feed-body strong {
  color: #fffef8;
  font-size: 0.88rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.pmx-armory__feed-body span,
.pmx-armory__feed-item time {
  font-size: 0.74rem;
  color: rgba(240, 236, 228, 0.72);
}
.pmx-armory__feed-empty {
  margin: 0;
  padding: 0.7rem 0.55rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(245, 242, 235, 0.78);
  font-size: 0.88rem;
  list-style: none;
}

.pmx-armory__trade-btn {
  appearance: none;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 6px;
  border: 1px solid rgba(232, 185, 35, 0.45);
  background: linear-gradient(180deg, rgba(232, 185, 35, 0.22), rgba(120, 80, 10, 0.35));
  color: #ffe08a;
  font-family: "Cinzel", serif;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
}
.pmx-armory__trade-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  color: #fff;
}
.pmx-armory__trade-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.pmx-armory__trade-btn--link {
  background: rgba(0, 0, 0, 0.35);
}

.pmx-armory-trade {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 1.15rem;
  background: rgba(4, 6, 12, 0.78);
  backdrop-filter: blur(7px);
}
.pmx-armory-trade[hidden] { display: none !important; }
.pmx-armory-trade__card {
  position: relative;
  width: min(440px, 100%);
  max-height: min(84vh, 640px);
  overflow: auto;
  padding: 1.25rem 1.15rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(232, 185, 35, 0.42);
  background: linear-gradient(180deg, rgba(18, 22, 32, 0.98), rgba(8, 10, 16, 0.98));
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}
.pmx-armory-trade__x {
  position: absolute;
  top: 8px;
  right: 10px;
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 254, 248, 0.75);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.pmx-armory-trade__x:hover { color: #fff; }
.pmx-armory-trade__title {
  margin: 0 0 0.35rem;
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  color: #ffe08a;
  letter-spacing: 0.06em;
}
.pmx-armory-trade__lead {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  color: rgba(245, 242, 235, 0.9);
  line-height: 1.45;
}
.pmx-armory-trade__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  max-height: min(42vh, 280px);
  overflow-y: auto;
}
.pmx-armory__trade-chip {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--rarity, #e8b923) 55%, transparent);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  background: rgba(0, 0, 0, 0.4);
  color: #fffef8;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pmx-armory__trade-chip.is-picked {
  background: color-mix(in srgb, var(--rarity, #e8b923) 28%, rgba(0, 0, 0, 0.55));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--rarity, #e8b923) 70%, transparent);
}
.pmx-armory-trade__status {
  min-height: 1.2em;
  margin: 0 0 0.65rem;
  font-size: 0.86rem;
  color: rgba(245, 242, 235, 0.88);
}
.pmx-armory-trade__status.is-error { color: #ffb4b4; }
.pmx-armory-trade__status.is-ok { color: #b8f5c8; }

.pmx-armory__stage-name {
  position: absolute;
  top: calc(8% + 2.2rem);
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  margin: 0;
  max-width: min(90%, 360px);
  text-align: center;
  font-family: "Cinzel", serif;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 700;
  color: #fffef8;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
  line-height: 1.25;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.pmx-armory__credits {
  position: relative;
  top: auto;
  right: auto;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.3rem 0.5rem;
  margin: 0 0 0.75rem;
  max-width: 100%;
  width: 100%;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  color: #fff8e6;
  text-align: left;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75);
  background: rgba(10, 12, 18, 0.45);
  border: 1px solid rgba(232, 185, 35, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  box-sizing: border-box;
}
.pmx-armory__chest-desc { display: none !important; }
.pmx-armory__credits-val {
  font-family: "Cinzel", serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffe08a;
}
.pmx-armory__credits-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 224, 138, 0.85);
}
.pmx-armory__credits-owned {
  flex-basis: 100%;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(245, 242, 235, 0.8);
}
.pmx-armory__credits.is-error {
  color: #ffb4b4;
  border-color: rgba(255, 120, 120, 0.45);
  background: rgba(40, 12, 12, 0.65);
}
.pmx-armory__credits.is-error .pmx-armory__credits-val,
.pmx-armory__credits.is-error .pmx-armory__credits-label,
.pmx-armory__credits.is-error .pmx-armory__credits-owned {
  color: inherit;
}

.pmx-armory__cta-dock {
  position: sticky;
  bottom: calc(var(--cg-dock-h, 68px) + 4px);
  z-index: 14;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.55rem clamp(12px, 2vw, 28px) 0.65rem;
  box-sizing: border-box;
  background: transparent;
  pointer-events: none;
}
.pmx-armory__cta-dock > * {
  pointer-events: auto;
}
.pmx-armory__open--center {
  width: min(168px, 100%);
  max-width: 168px;
  flex-shrink: 0;
}
.pmx-armory__open--chest {
  max-width: 168px;
}
/* Keep costume stage visible — chest is only the CTA under it */
#hero.cgames-hero.is-treasure-view .pmx-armory__stage {
  display: grid !important;
  place-items: end center !important;
  overflow: visible !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__figure {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__figure img {
  display: block !important;
  max-height: 100% !important;
  visibility: visible !important;
}
.pmx-armory.is-rolling .pmx-armory__cta-dock .pmx-armory__open {
  opacity: 0.85;
  cursor: wait;
}
.pmx-armory.is-rolling .pmx-armory__cta-dock {
  z-index: 16;
}
.pmx-armory__note.is-error {
  color: #ffb4b4;
}

/* Reveal modal retired — win stays on center stage */
.pmx-armory-reveal,
.pmx-armory-reveal[hidden] {
  display: none !important;
}

.pmx-armory.is-opening .pmx-armory__figure img,
.pmx-armory.is-rolling .pmx-armory__figure img {
  animation: none;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.5));
}

/* Dota-style roll: smooth rotateY flip + flash (fast blur → slow clear) */
.pmx-armory__figure.is-spinning {
  perspective: 1200px;
}
.pmx-armory__figure.is-spinning img {
  transform-origin: 50% 50%;
  will-change: transform, filter, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.pmx-armory__figure img.is-roll-out {
  animation: pmxRollFlipOut var(--roll-ms, 120ms) cubic-bezier(0.4, 0.0, 0.7, 0.2) forwards;
}
.pmx-armory__figure img.is-roll-in {
  animation: pmxRollFlipIn var(--roll-ms, 120ms) cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.pmx-armory__figure img.is-roll-out.is-roll-fast,
.pmx-armory__figure img.is-roll-in.is-roll-fast {
  animation-timing-function: linear;
}
.pmx-armory__figure img.is-roll-out.is-roll-slow {
  animation-timing-function: cubic-bezier(0.55, 0.05, 0.7, 0.15);
}
.pmx-armory__figure img.is-roll-in.is-roll-slow {
  animation-timing-function: cubic-bezier(0.15, 0.85, 0.25, 1);
}
@keyframes pmxRollFlipOut {
  0% {
    transform: rotateY(0deg) scale(1);
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.5)) brightness(1) blur(0);
    opacity: 1;
  }
  55% {
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.5)) brightness(1.55) blur(1.5px);
  }
  100% {
    transform: rotateY(92deg) scale(0.9);
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.5)) brightness(2.2) blur(2.5px);
    opacity: 0.35;
  }
}
@keyframes pmxRollFlipIn {
  0% {
    transform: rotateY(-92deg) scale(0.9);
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.5)) brightness(2.2) blur(2.5px);
    opacity: 0.35;
  }
  45% {
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.5)) brightness(1.4) blur(1px);
    opacity: 1;
  }
  82% {
    transform: rotateY(6deg) scale(1.03);
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.5)) brightness(1.12) blur(0);
  }
  100% {
    transform: rotateY(0deg) scale(1);
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.5)) brightness(1) blur(0);
    opacity: 1;
  }
}
.pmx-armory__figure.is-roll-fast img.is-roll-out,
.pmx-armory__figure.is-roll-fast img.is-roll-in {
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.45)) brightness(1.35) blur(2px) !important;
}
.pmx-armory__roll-flash {
  position: absolute;
  inset: 6% 14% 10%;
  z-index: 4;
  border-radius: 14px;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.95), rgba(255, 236, 170, 0.4) 42%, transparent 72%);
  mix-blend-mode: screen;
}
.pmx-armory__roll-flash.is-on {
  animation: pmxRollFlash 0.28s ease-out forwards;
}
.pmx-armory__figure.is-roll-slow .pmx-armory__roll-flash.is-on {
  animation-duration: 0.4s;
}
@keyframes pmxRollFlash {
  0% { opacity: 0.2; transform: scale(0.7); }
  30% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.35); }
}
.pmx-armory__figure.is-flash::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.65), transparent 58%);
  animation: pmxFigureFlash 0.26s ease-out forwards;
}
@keyframes pmxFigureFlash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
.pmx-armory.is-rolling .pmx-armory__ring--a,
.pmx-armory.is-rolling .pmx-armory__ring--b {
  display: block !important;
  opacity: 0.9;
  animation: pmxRarityRing 0.75s linear infinite !important;
}
.pmx-armory.is-rolling .pmx-armory__aura {
  opacity: 0.85 !important;
  animation: pmxRarityAuraPulse 0.55s ease-in-out infinite !important;
}
.pmx-armory.is-rolling .pmx-armory__badge {
  animation: pmxModelAura 0.55s ease-in-out infinite;
}
.pmx-armory__slot.is-spin-pass {
  opacity: 1 !important;
  filter: none !important;
  transform: translateY(-4px) scale(1.06) !important;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--rarity, #e8b923) 80%, #fff),
    0 0 18px color-mix(in srgb, var(--rarity, #e8b923) 55%, transparent) !important;
  z-index: 3;
}

/* ===== Win finale (in-place, no modal) ===== */
.pmx-armory__win-burst {
  position: absolute;
  left: 50%;
  bottom: 18%;
  z-index: 0;
  width: 20%;
  height: 20%;
  transform: translateX(-50%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--rarity, #e8b923) 85%, #fff), transparent 70%);
}
.pmx-armory__win-burst.is-pop {
  animation: pmxWinBurst 1.1s ease-out forwards;
}
@keyframes pmxWinBurst {
  0% { opacity: 0.95; width: 18%; height: 18%; filter: brightness(1.6); }
  55% { opacity: 0.75; width: 140%; height: 110%; }
  100% { opacity: 0; width: 180%; height: 140%; }
}

.pmx-armory__win-shout {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 8;
  transform: translate(-50%, -50%) scale(0.7);
  margin: 0;
  max-width: 96%;
  padding: 0.35rem 0.85rem;
  font-family: "Cinzel", serif;
  font-size: clamp(1.35rem, 5vw, 2.35rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  color: #ffe08a;
  text-shadow:
    0 0 18px color-mix(in srgb, var(--rarity, #e8b923) 80%, transparent),
    0 3px 14px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
}
.pmx-armory__win-shout[hidden] { display: none !important; }
.pmx-armory__win-shout.is-show {
  display: block !important;
  animation: pmxWinShoutIn 0.85s cubic-bezier(0.16, 0.84, 0.28, 1) forwards;
}
@keyframes pmxWinShoutIn {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(0.55); letter-spacing: 0.02em; filter: brightness(1.4); }
  35% { opacity: 1; transform: translate(-50%, -50%) scale(1.18); letter-spacing: 0.2em; }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0.92; transform: translate(-50%, -50%) scale(1); }
}

.pmx-armory__figure img.is-win {
  animation: pmxArmoryWinPop 1.25s cubic-bezier(0.16, 0.84, 0.28, 1) forwards;
}
@keyframes pmxArmoryWinPop {
  0% {
    opacity: 0.4;
    transform: scale(0.86);
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.4)) brightness(1.5);
  }
  40% {
    opacity: 1;
    transform: scale(1.1);
    filter:
      drop-shadow(0 24px 40px rgba(0, 0, 0, 0.55))
      drop-shadow(0 0 42px color-mix(in srgb, var(--rarity, #e8b923) 75%, transparent))
      brightness(1.15);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter:
      drop-shadow(0 20px 30px rgba(0, 0, 0, 0.55))
      drop-shadow(0 0 26px color-mix(in srgb, var(--rarity, #e8b923) 50%, transparent));
  }
}

.pmx-armory.is-win-fx .pmx-armory__aura {
  opacity: 1 !important;
  animation: pmxRarityAuraPulse 0.55s ease-in-out 4 !important;
}
.pmx-armory.is-win-fx .pmx-armory__sparks {
  display: block !important;
  animation: pmxRaritySparks 0.7s ease-in-out 3 !important;
}
.pmx-armory.is-win-fx .pmx-armory__ring--a,
.pmx-armory.is-win-fx .pmx-armory__ring--b {
  display: block !important;
}
.pmx-armory.is-win-fx .pmx-armory__badge {
  animation: pmxModelAura 0.65s ease-in-out 3;
}
.pmx-armory.is-win-fx .pmx-armory__stage {
  outline: 2px solid color-mix(in srgb, var(--rarity, #e8b923) 65%, transparent);
  outline-offset: 6px;
  border-radius: 16px;
}

/* Rare / Heroic / Ancient — stronger hit */
.pmx-armory.is-win-rare .pmx-armory__win-shout,
.pmx-armory.is-win-heroic .pmx-armory__win-shout,
.pmx-armory.is-win-ancient .pmx-armory__win-shout {
  font-size: clamp(1.5rem, 5.5vw, 2.6rem);
}
.pmx-armory.is-win-heroic .pmx-armory__win-burst.is-pop,
.pmx-armory.is-win-ancient .pmx-armory__win-burst.is-pop {
  animation-duration: 1.35s;
}
.pmx-armory.is-win-ancient.is-win-fx .pmx-armory__stage {
  animation: pmxWinStagePulse 0.9s ease-in-out 2;
}
@keyframes pmxWinStagePulse {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 48px color-mix(in srgb, var(--rarity, #f59e0b) 55%, transparent); }
}

/* LEGENDARY — full impact */
.pmx-armory.is-win-legendary.is-win-fx::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 50% 45%, rgba(255, 80, 60, 0.35), transparent 70%),
    radial-gradient(ellipse 90% 80% at 50% 50%, rgba(255, 220, 120, 0.18), transparent 75%);
  animation: pmxLegendFlash 1.6s ease-out forwards;
}
@keyframes pmxLegendFlash {
  0% { opacity: 1; }
  25% { opacity: 0.85; }
  100% { opacity: 0; }
}
.pmx-armory.is-win-legendary .pmx-armory__win-shout {
  font-size: clamp(1.85rem, 7vw, 3.4rem);
  letter-spacing: 0.22em;
  color: #ff6b5a !important;
  text-shadow:
    0 0 12px #fff,
    0 0 28px rgba(255, 70, 50, 0.95),
    0 0 60px rgba(255, 180, 40, 0.85),
    0 4px 18px rgba(0, 0, 0, 0.95);
  animation: pmxLegendShout 1.2s cubic-bezier(0.16, 0.84, 0.28, 1) forwards;
}
@keyframes pmxLegendShout {
  0% { opacity: 0; transform: translate(-50%, -35%) scale(0.4) rotate(-4deg); filter: brightness(2); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.35) rotate(2deg); }
  45% { transform: translate(-50%, -50%) scale(0.95) rotate(-1deg); }
  65% { transform: translate(-50%, -50%) scale(1.12) rotate(0deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: brightness(1.1); }
}
.pmx-armory__figure img.is-win-legendary {
  animation: pmxLegendWinPop 1.6s cubic-bezier(0.16, 0.84, 0.28, 1) forwards !important;
}
@keyframes pmxLegendWinPop {
  0% {
    opacity: 0.2;
    transform: scale(0.72);
    filter: brightness(2.2) drop-shadow(0 0 40px rgba(255, 80, 50, 0.9));
  }
  30% {
    opacity: 1;
    transform: scale(1.18);
    filter:
      brightness(1.35)
      drop-shadow(0 28px 48px rgba(0, 0, 0, 0.65))
      drop-shadow(0 0 60px rgba(255, 70, 50, 0.95))
      drop-shadow(0 0 90px rgba(255, 200, 60, 0.75));
  }
  55% { transform: scale(0.96); }
  75% { transform: scale(1.06); }
  100% {
    opacity: 1;
    transform: scale(1);
    filter:
      brightness(1.08)
      drop-shadow(0 22px 36px rgba(0, 0, 0, 0.55))
      drop-shadow(0 0 40px rgba(255, 70, 50, 0.7))
      drop-shadow(0 0 70px rgba(255, 180, 40, 0.45));
  }
}
.pmx-armory.is-win-legendary.is-win-fx .pmx-armory__stage {
  animation: pmxLegendShake 0.7s ease-out, pmxWinStagePulse 0.8s ease-in-out 4;
  outline-color: rgba(255, 80, 60, 0.85);
  outline-width: 3px;
}
@keyframes pmxLegendShake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-6px, 2px); }
  30% { transform: translate(7px, -3px); }
  45% { transform: translate(-5px, -2px); }
  60% { transform: translate(5px, 3px); }
  75% { transform: translate(-3px, 1px); }
}
.pmx-armory.is-win-legendary.is-win-fx .pmx-armory__aura {
  width: 130% !important;
  height: 95% !important;
  opacity: 1 !important;
  filter: blur(6px) saturate(1.6) brightness(1.25) !important;
  animation: pmxRarityAuraPulse 0.45s ease-in-out 8 !important;
  background:
    radial-gradient(circle, rgba(255, 70, 50, 0.85), transparent 65%),
    radial-gradient(circle at 50% 80%, rgba(255, 220, 100, 0.55), transparent 55%) !important;
}
.pmx-armory.is-win-legendary.is-win-fx .pmx-armory__sparks {
  opacity: 1 !important;
  animation: pmxRaritySparks 0.45s ease-in-out 8 !important;
}
.pmx-armory.is-win-legendary .pmx-armory__win-burst.is-pop {
  animation: pmxLegendBurst 1.5s ease-out forwards;
  background: radial-gradient(circle, rgba(255, 240, 180, 0.95), rgba(255, 70, 50, 0.55) 40%, transparent 72%);
}
@keyframes pmxLegendBurst {
  0% { opacity: 1; width: 15%; height: 15%; filter: brightness(2); }
  40% { opacity: 0.9; width: 160%; height: 130%; }
  100% { opacity: 0; width: 220%; height: 180%; }
}
.pmx-armory.is-win-legendary.is-win-fx .pmx-armory__badge {
  font-size: 1.05rem;
  letter-spacing: 0.32em;
  color: #ff6b5a !important;
  text-shadow: 0 0 24px rgba(255, 70, 50, 1), 0 0 48px rgba(255, 200, 60, 0.8);
  animation: pmxModelAura 0.4s ease-in-out 6 !important;
}

.pmx-armory.is-rolling .pmx-armory__aura {
  opacity: 0.55;
  filter: blur(6px);
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .pmx-armory.is-win-legendary.is-win-fx .pmx-armory__stage,
  .pmx-armory__figure img.is-win,
  .pmx-armory__figure img.is-win-legendary,
  .pmx-armory__win-shout.is-show,
  .pmx-armory.is-win-legendary .pmx-armory__win-shout,
  .pmx-armory__win-burst.is-pop {
    animation: none !important;
  }
  .pmx-armory__win-shout.is-show {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.pmx-armory__skip {
  position: absolute;
  right: 10px;
  bottom: 12px;
  z-index: 7;
  appearance: none;
  -webkit-appearance: none;
  padding: 0.55rem 0.95rem;
  border-radius: 6px;
  border: 1px solid rgba(232, 185, 35, 0.55);
  background: rgba(8, 10, 16, 0.88);
  color: #ffe08a;
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}
.pmx-armory__skip:hover {
  background: rgba(232, 185, 35, 0.18);
  color: #fff;
}
.pmx-armory__skip[hidden] { display: none !important; }

.pmx-armory__roll-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 4;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fffef8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  pointer-events: none;
}
.pmx-armory__roll-hint[hidden] { display: none !important; }

.pmx-armory.is-rolling .pmx-armory__stage {
  outline: 2px solid color-mix(in srgb, var(--rarity, #e8b923) 55%, transparent);
  outline-offset: 4px;
  border-radius: 16px;
}
.pmx-armory.is-rolling .pmx-armory__badge {
  animation: pmxModelAura 0.7s ease-in-out infinite;
}

.pmx-armory__note {
  margin: 0.75rem 0 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(245, 242, 235, 0.9);
  line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.pmx-armory__odds h3 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232,236,244,0.55);
}
.pmx-armory__odds ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.pmx-armory__odds li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border-left: 3px solid var(--c, #aaa);
  background: rgba(0,0,0,0.25);
}
.pmx-armory__odds li span { color: var(--c, #aaa); }

.pmx-armory__stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: end center;
  padding-bottom: 0.25rem;
}

.pmx-armory__badge {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  margin: 0;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fffef8;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
}

.pmx-armory__figure {
  position: relative;
  width: min(420px, 100%);
  height: clamp(320px, 52vh, 560px);
  display: grid;
  place-items: end center;
  perspective: 1100px;
  transform-style: preserve-3d;
}

.pmx-armory__aura {
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: 85%;
  height: 55%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--rarity, #e8b923) 55%, transparent), transparent 70%);
  filter: blur(10px);
  animation: pmxModelAura 2.8s ease-in-out infinite;
}

.pmx-armory__figure img {
  position: relative;
  z-index: 1;
  max-height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.55));
  animation: pmxModelBob 4s ease-in-out infinite;
}
.pmx-armory__figure img.is-swap {
  animation: pmxArmorySwap 0.45s ease;
}
@keyframes pmxArmorySwap {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.pmx-armory__chest-desc {
  margin: -0.15rem 0 0.85rem;
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 500;
  color: rgba(245, 242, 235, 0.9);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.pmx-armory__right .pmx-armory__rarity {
  margin: 0 0 0.4rem;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}
.pmx-armory__name {
  margin: 0 0 0.4rem;
  font-family: "Cinzel", serif;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  color: #fffef8;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.pmx-armory__gender {
  margin: 0 0 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: rgba(240, 236, 228, 0.88);
}

/* Dota-style drop chance callout */
.pmx-armory__chance {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--c, #e8b923) 45%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--c, #e8b923) 18%, transparent), rgba(0, 0, 0, 0.35)),
    rgba(8, 10, 16, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.pmx-armory__chance-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 236, 244, 0.58);
}
.pmx-armory__chance strong {
  font-family: "Cinzel", serif;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c, #e8b923);
  text-shadow: 0 0 18px color-mix(in srgb, var(--c, #e8b923) 45%, transparent);
}

.pmx-armory__blurb {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  line-height: 1.55;
  font-weight: 500;
  color: rgba(250, 247, 240, 0.94);
  min-height: 3.2em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}
.pmx-armory__tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.pmx-armory__tags li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(245, 242, 235, 0.92);
}
.pmx-armory__tags i { color: #f0d06a; }

/* Percentages hidden — Dota-style mystery odds */
.pmx-armory__odds,
.pmx-armory__chance,
.pmx-armory__slot-chance {
  display: none !important;
}

.pmx-armory__rules {
  margin-top: 0.85rem;
}
.pmx-armory__rules h3 {
  margin: 0 0 0.45rem;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffe08a;
  font-weight: 800;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
}
.pmx-armory__rules ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.pmx-armory__rules li {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fffef8;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  border-left: 3px solid #e8b923;
  line-height: 1.4;
}

.pmx-armory__owned-flag {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #111;
  background: #e8b923;
}

.pmx-armory__slot-owned {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  padding: 0.12rem 0.3rem;
  border-radius: 3px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #111;
  background: rgba(232, 185, 35, 0.92);
  pointer-events: none;
}

.pmx-armory__slot.is-owned {
  opacity: 0.38;
  filter: grayscale(0.9) brightness(0.55);
}
.pmx-armory__slot.is-owned img {
  filter: grayscale(1) brightness(0.7);
}
.pmx-armory__slot.is-owned.is-active {
  opacity: 0.78;
  filter: grayscale(0.25) brightness(0.95);
}
.pmx-armory__slot:not(.is-active):not(:hover) {
  opacity: 0.72;
  filter: brightness(0.82) saturate(0.85);
}
.pmx-armory__slot:not(.is-active):not(:hover).is-owned {
  opacity: 0.32;
  filter: grayscale(0.95) brightness(0.5);
}

.pmx-armory__tray {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0.35rem clamp(12px, 2vw, 28px) 1rem;
  box-sizing: border-box;
  background: transparent;
}

.pmx-armory__tray-label {
  margin: 0 0 0.55rem;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(245, 242, 235, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

.pmx-armory__strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  overflow: visible;
  padding: 0.35rem 0 0.65rem;
  scroll-snap-type: none;
  box-sizing: border-box;
}
.pmx-armory__strip::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.pmx-armory__slot {
  position: relative;
  flex: 0 0 auto;
  width: 92px;
  height: 124px;
  padding: 0;
  border: 2px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #0c1018;
  scroll-snap-align: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.pmx-armory__slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.pmx-armory__slot-glow {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--rarity, #e8b923) 75%, transparent));
  pointer-events: none;
}
.pmx-armory__slot-name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 1.15rem 5px 6px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fffef8;
  text-shadow: 0 1px 3px #000, 0 0 8px rgba(0, 0, 0, 0.9);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.92) 38%);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.pmx-armory__slot:hover,
.pmx-armory__slot.is-active {
  transform: translateY(-4px);
  border-color: var(--rarity, #e8b923);
  box-shadow: 0 0 18px color-mix(in srgb, var(--rarity, #e8b923) 45%, transparent);
}

@media (max-width: 1099.98px) {
  .pmx-armory__shell {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    gap: 14px !important;
    align-items: stretch !important;
  }
  .pmx-armory__left,
  .pmx-armory__right,
  .pmx-armory__stage {
    position: relative !important;
    inset: auto !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    align-self: stretch !important;
    margin: 0 !important;
    transform: none !important;
  }
  .pmx-armory__stage {
    order: 1;
    z-index: 1;
    min-height: 240px;
    place-items: center;
  }
  .pmx-armory__left {
    order: 2;
    z-index: 2;
  }
  .pmx-armory__right {
    order: 3;
    z-index: 3;
  }
  .pmx-armory__slot { width: 96px; height: 128px; }
  .pmx-armory__slot-name {
    font-size: 0.74rem;
    -webkit-line-clamp: 3;
  }
  .pmx-armory__name {
    font-size: clamp(1.15rem, 5vw, 1.45rem) !important;
    overflow-wrap: anywhere;
    line-height: 1.3 !important;
  }
  .pmx-armory__blurb {
    min-height: 0;
    font-size: 0.98rem;
    line-height: 1.55;
  }
}

/* Same-page home <-> treasure switch */
button.pmx-trove__cta {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

#hero.cgames-hero .pmx-armory--home {
  grid-column: 1;
  grid-row: 1 / span 2;
  z-index: 8;
  min-height: 0;
  max-height: 100%;
  padding-top: calc(var(--cg-dock-h, 68px) + 4px);
}

#hero.cgames-hero:not(.is-treasure-view) .pmx-armory--home {
  display: none !important;
}

#hero.cgames-hero.is-treasure-view .pmx-trove,
#hero.cgames-hero.is-treasure-view .cgames-center--dock {
  display: none !important;
}

#hero.cgames-hero.is-treasure-view {
  grid-template-rows: minmax(0, 1fr) !important;
  grid-template-columns: minmax(0, 1fr) !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  position: relative !important;
}

/* Full-bleed armory: one-screen fit, no page scroll */
#hero.cgames-hero.is-treasure-view .pmx-armory--home {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr) minmax(170px, 230px) !important;
  grid-template-rows: minmax(0, 1fr) auto auto !important;
  gap: 4px 12px !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: calc(var(--cg-dock-h, 68px) + 4px) clamp(8px, 1.4vw, 18px) 4px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  z-index: 8 !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__shell {
  display: contents !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  overflow: visible !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__left {
  grid-column: 1 !important;
  grid-row: 1 / -1 !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__stage {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-height: 0 !important;
  align-self: stretch !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__right {
  grid-column: 3 !important;
  grid-row: 1 / -1 !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__left,
#hero.cgames-hero.is-treasure-view .pmx-armory__right {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  align-self: stretch !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding: 0.15rem 0.1rem !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__feed-viewport {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__cta-dock {
  grid-column: 2 !important;
  grid-row: 2 !important;
  position: relative !important;
  bottom: auto !important;
  z-index: 14 !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-height: none !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__tray {
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
  flex: 0 0 auto !important;
  z-index: 6;
  display: flex !important;
  justify-content: center !important;
  align-self: end !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__strip {
  justify-content: center !important;
  flex-wrap: nowrap !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: hidden !important;
  padding: 0.1rem 0 0.2rem !important;
  gap: 0.35rem !important;
  max-width: 100% !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__figure {
  height: clamp(140px, 28vh, 280px) !important;
  width: min(300px, 100%) !important;
}

/* Compact chrome so everything fits one viewport */
#hero.cgames-hero.is-treasure-view .pmx-armory__eyebrow {
  margin: 0 0 0.35rem !important;
  font-size: 0.92rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__credits {
  margin: 0 0 0.45rem !important;
  padding: 0.3rem 0.5rem !important;
  font-size: 0.76rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__credits-val {
  font-size: 0.95rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__panel-title {
  margin: 0 0 0.35rem !important;
  font-size: 0.74rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__panel-title--gap {
  margin-top: 0.55rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__panel-lead {
  margin: 0 0 0.35rem !important;
  font-size: 0.78rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__trade-btn {
  padding: 0.5rem 0.65rem !important;
  font-size: 0.78rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__feed-item {
  padding: 0.35rem 0.4rem !important;
  gap: 0.3rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__feed-body strong {
  font-size: 0.78rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__feed-body span,
#hero.cgames-hero.is-treasure-view .pmx-armory__feed-item time {
  font-size: 0.68rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__feed {
  gap: 0.3rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__badge {
  top: 4% !important;
  font-size: 0.72rem !important;
  padding: 0.15rem 0.5rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__stage-name {
  top: calc(4% + 1.5rem) !important;
  font-size: clamp(0.8rem, 1.6vw, 1rem) !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__chestbox {
  width: 88px !important;
  height: 72px !important;
  margin-bottom: 0 !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__open,
#hero.cgames-hero.is-treasure-view .pmx-armory__open--center,
#hero.cgames-hero.is-treasure-view .pmx-armory__open--chest {
  max-width: 140px !important;
  width: min(140px, 100%) !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__open {
  font-size: 0.78rem !important;
  letter-spacing: 0.08em !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__open small {
  font-size: 0.72rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__slot {
  width: 72px !important;
  height: 96px !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__slot-name {
  font-size: 0.58rem !important;
  padding: 0.7rem 3px 4px !important;
  -webkit-line-clamp: 2 !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__slot-owned {
  font-size: 0.5rem !important;
  padding: 0.08rem 0.22rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__back {
  margin-bottom: 0.25rem !important;
  font-size: 0.78rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__slot:hover,
#hero.cgames-hero.is-treasure-view .pmx-armory__slot.is-active {
  transform: translateY(-2px) scale(1.03) !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__slot.rarity-ancient.is-active,
#hero.cgames-hero.is-treasure-view .pmx-armory__slot.rarity-legendary.is-active {
  transform: translateY(-3px) scale(1.04) !important;
}
body.index-page:has(#hero.cgames-hero.is-treasure-view),
body.index-page:has(#hero.cgames-hero.is-treasure-view) html {
  overflow: hidden !important;
  height: 100% !important;
}
html:has(#hero.cgames-hero.is-treasure-view),
html:has(#hero.cgames-hero.is-treasure-view) body.index-page {
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100dvh !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__bg,
#hero.cgames-hero.is-treasure-view .pmx-armory__mist {
  grid-column: 1 / -1 !important;
  grid-row: 1 / -1 !important;
  z-index: 0 !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__credits {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  grid-column: auto !important;
  grid-row: auto !important;
  margin: 0 0 0.75rem !important;
  max-width: 100% !important;
  width: 100% !important;
  justify-content: flex-start !important;
  text-align: left !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory-trade,
#hero.cgames-hero.is-treasure-view .pmx-armory-reveal {
  grid-column: 1 / -1 !important;
  grid-row: 1 / -1 !important;
}

@media (max-width: 1099.98px) {
  #hero.cgames-hero.is-treasure-view {
    height: auto !important;
    max-height: none !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  #hero.cgames-hero.is-treasure-view .pmx-armory--home {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: calc(var(--cg-dock-h, 68px) + 8px) 12px 12px !important;
    gap: 12px !important;
  }

  #hero.cgames-hero.is-treasure-view .pmx-armory__shell {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    overflow: visible !important;
    padding: 0 !important;
    gap: 14px !important;
  }

  #hero.cgames-hero.is-treasure-view .pmx-armory__left,
  #hero.cgames-hero.is-treasure-view .pmx-armory__stage,
  #hero.cgames-hero.is-treasure-view .pmx-armory__right,
  #hero.cgames-hero.is-treasure-view .pmx-armory__cta-dock,
  #hero.cgames-hero.is-treasure-view .pmx-armory__tray {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  #hero.cgames-hero.is-treasure-view .pmx-armory__cta-dock {
    position: sticky !important;
    bottom: calc(var(--cg-dock-h, 68px) + 4px) !important;
  }

  #hero.cgames-hero.is-treasure-view .pmx-armory__tray {
    position: relative;
    z-index: 4;
    padding-bottom: calc(var(--cg-dock-h, 68px) + 0.75rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  #hero.cgames-hero.is-treasure-view .pmx-armory__left,
  #hero.cgames-hero.is-treasure-view .pmx-armory__right {
    padding: 0.35rem 0.15rem;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
    align-self: stretch !important;
    min-height: 280px !important;
  }

  #hero.cgames-hero.is-treasure-view .pmx-armory__stage {
    min-height: 260px !important;
  }

  #hero.cgames-hero.is-treasure-view .pmx-armory__figure {
    height: clamp(220px, 34vh, 360px) !important;
  }

  #hero.cgames-hero.is-treasure-view .pmx-armory__name,
  #hero.cgames-hero.is-treasure-view .pmx-armory__blurb,
  #hero.cgames-hero.is-treasure-view .pmx-armory__note,
  #hero.cgames-hero.is-treasure-view .pmx-armory__chest-desc,
  #hero.cgames-hero.is-treasure-view .pmx-armory__rules {
    overflow: visible !important;
    max-height: none !important;
    -webkit-line-clamp: unset !important;
  }

  #hero.cgames-hero.is-treasure-view .pmx-armory__tags {
    overflow: visible !important;
    display: grid !important;
  }

  #hero.cgames-hero.is-treasure-view .pmx-armory__blurb {
    min-height: 0;
    font-size: 0.98rem;
    line-height: 1.55;
    color: #fffef8;
  }

  #hero.cgames-hero.is-treasure-view .pmx-armory__note,
  #hero.cgames-hero.is-treasure-view .pmx-armory__chest-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #f5f2eb;
  }

  #hero.cgames-hero.is-treasure-view .pmx-armory__slot {
    width: 96px;
    height: 128px;
  }

  #hero.cgames-hero.is-treasure-view .pmx-armory__slot-name {
    font-size: 0.74rem;
  }
}

@media (min-width: 992px) {
  #hero.cgames-hero.is-treasure-view .pmx-armory__shell {
    padding-top: calc(64px + 10px) !important;
  }
}

.pmx-armory__back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  background: rgba(0,0,0,0.28);
  color: rgba(232,236,244,0.85);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.pmx-armory__back:hover {
  border-color: rgba(232,185,35,0.45);
  color: #fff;
}

#hero.cgames-hero .pmx-armory--home .pmx-armory__shell {
  padding-top: 8px;
}
#hero.cgames-hero .pmx-armory--home .pmx-armory__figure {
  height: clamp(260px, 42vh, 480px);
}

/* Single composite treasure cast (rarest centered) — compact for one viewport */
.pmx-trove__cast--single {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: auto;
  max-height: none;
  margin: 0 auto;
  display: grid;
  place-items: end center;
}

.pmx-trove__hero-art {
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - var(--cg-dock-h, 68px) - 168px);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.55));
  animation: pmxTroveBob 4.2s ease-in-out infinite;
}

#hero.cgames-hero .pmx-trove__hero-art {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: calc(100dvh - var(--cg-dock-h, 68px) - 168px) !important;
}

.pmx-trove:has(.pmx-trove__cast--single) .pmx-trove__bg {
  display: none;
}

@media (max-width: 991.98px) {
  #hero.cgames-hero {
    height: auto !important;
    max-height: none !important;
    min-height: 100dvh !important;
    overflow: visible !important;
    grid-template-rows: auto auto !important;
  }
  #hero.cgames-hero .cgames-center--dock {
    order: 1 !important;
    position: relative;
    bottom: auto;
  }
  #hero.cgames-hero .pmx-trove {
    order: 2 !important;
    padding-top: 8px;
  }
  #hero.cgames-hero .pmx-trove__hero-art {
    max-height: min(38vh, 300px) !important;
  }
}

/* Desktop: force one-screen home — art never eats the dock */
@media (min-width: 992px) {
  #hero.cgames-hero:not(.is-treasure-view) {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
  }
  #hero.cgames-hero:not(.is-treasure-view) .pmx-trove__hero-art {
    max-height: calc(100dvh - var(--cg-dock-h, 72px) - 150px) !important;
  }
}

/* FINAL OVERRIDE: pin login/download dock into first viewport */
#hero.cgames-hero:not(.is-treasure-view) .cgames-center.cgames-center--dock {
  position: absolute !important;
  top: auto !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  inset: auto 0 0 0 !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 78px !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 40 !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  grid-row: unset !important;
  grid-column: unset !important;
}

#hero.cgames-hero:not(.is-treasure-view) {
  position: relative !important;
  overflow: hidden !important;
}

#hero.cgames-hero:not(.is-treasure-view) .pmx-trove {
  padding-bottom: 96px !important;
  grid-row: 1 / -1 !important;
}

#hero.cgames-hero:not(.is-treasure-view) .pmx-trove__hero-art {
  max-height: calc(100dvh - var(--cg-dock-h, 72px) - 170px) !important;
}

#hero.cgames-hero:not(.is-treasure-view) .cgames-center--dock .cgames-enter {
  min-height: 44px;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
}

/* Clear first-viewport composition: art + readable title/desc + solid dock */
#hero.cgames-hero:not(.is-treasure-view) .pmx-trove__copy {
  margin: 0 auto 0.45rem !important;
  padding: 0.55rem 1.1rem 0.7rem !important;
  max-width: min(680px, 92vw) !important;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 9, 13, 0.42) 22%, rgba(7, 9, 13, 0.78) 100%);
  border-radius: 14px;
  border: 1px solid rgba(232, 185, 35, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

#hero.cgames-hero:not(.is-treasure-view) .pmx-trove__eyebrow {
  margin-bottom: 0.3rem !important;
}

#hero.cgames-hero:not(.is-treasure-view) .pmx-trove__title {
  margin-bottom: 0.35rem !important;
}

#hero.cgames-hero:not(.is-treasure-view) .pmx-trove__lead {
  -webkit-line-clamp: unset !important;
  display: block !important;
  overflow: visible !important;
  max-width: 36rem !important;
  margin: 0 auto 0.8rem !important;
  white-space: normal !important;
}

#hero.cgames-hero:not(.is-treasure-view) .cgames-center.cgames-center--dock {
  background: #0b0d12 !important;
  border-top: 1px solid rgba(232, 185, 35, 0.35) !important;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  padding: 14px clamp(14px, 2vw, 28px) 16px !important;
  min-height: 88px !important;
  box-sizing: border-box !important;
}

#hero.cgames-hero:not(.is-treasure-view) .cgames-center--dock .cgames-enter {
  background: var(--pmx-gold, #f0c14d) !important;
  color: #111 !important;
  border: 1px solid #f0c14d !important;
  font-weight: 800 !important;
}

#hero.cgames-hero:not(.is-treasure-view) .cgames-center--dock .cgames-enter--ghost {
  background: transparent !important;
  color: #f0c14d !important;
}

/* Center Enter Game + Download under VIEW TREASURE */
#hero.cgames-hero:not(.is-treasure-view) .cgames-center.cgames-center--dock {
  justify-content: space-between !important;
  align-items: center !important;
}

#hero.cgames-hero:not(.is-treasure-view) .cgames-center--dock .cgames-center__copy {
  flex: 0 0 auto;
  min-width: 120px;
  z-index: 1;
}

#hero.cgames-hero:not(.is-treasure-view) .cgames-center--dock .cgames-schools {
  flex: 0 0 auto;
  min-width: 120px;
  z-index: 1;
  justify-content: flex-end !important;
}

#hero.cgames-hero:not(.is-treasure-view) .cgames-center--dock .cgames-center__actions {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  z-index: 2;
  width: auto !important;
  max-width: calc(100% - 16px);
}

#hero.cgames-hero:not(.is-treasure-view) .cgames-center--dock .cgames-enter {
  flex: 0 0 auto !important;
  min-width: 148px;
  justify-content: center !important;
  text-align: center !important;
}

/* Mobile/tablet: lift Enter Game dock above fixed bottom nav; keep CTAs visible */
@media (max-width: 991.98px) {
  #hero.cgames-hero:not(.is-treasure-view) {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  #hero.cgames-hero:not(.is-treasure-view) .cgames-center.cgames-center--dock {
    bottom: calc(var(--cg-dock-h, 68px) + 6px) !important;
    inset: auto 0 calc(var(--cg-dock-h, 68px) + 6px) 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 10px 14px !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  #hero.cgames-hero:not(.is-treasure-view) .cgames-center--dock .cgames-center__copy,
  #hero.cgames-hero:not(.is-treasure-view) .cgames-center--dock .cgames-schools {
    display: none !important;
  }

  #hero.cgames-hero:not(.is-treasure-view) .cgames-center--dock .cgames-center__actions {
    position: relative !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 420px;
    margin: 0 auto !important;
  }

  #hero.cgames-hero:not(.is-treasure-view) .cgames-center--dock .cgames-enter {
    flex: 1 1 0 !important;
    min-width: 0;
    min-height: 44px;
  }

  #hero.cgames-hero:not(.is-treasure-view) .pmx-trove {
    padding-bottom: calc(var(--cg-dock-h, 68px) + 72px) !important;
  }
}

/* ===== Rarity intensity: higher tier = fiercer FX ===== */
.pmx-armory__ring,
.pmx-armory__sparks {
  display: none;
  pointer-events: none;
}

.pmx-armory__ring {
  position: absolute;
  left: 50%;
  bottom: 10%;
  width: 70%;
  height: 38%;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--rarity, #e8b923) 70%, transparent);
  box-shadow:
    0 0 18px color-mix(in srgb, var(--rarity, #e8b923) 45%, transparent),
    inset 0 0 18px color-mix(in srgb, var(--rarity, #e8b923) 25%, transparent);
  opacity: 0;
  z-index: 0;
}

.pmx-armory__sparks {
  position: absolute;
  inset: 8% 10% 18%;
  z-index: 2;
  background:
    radial-gradient(circle at 18% 30%, color-mix(in srgb, var(--rarity, #e8b923) 90%, #fff) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 22%, color-mix(in srgb, var(--rarity, #e8b923) 90%, #fff) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 62% 68%, color-mix(in srgb, var(--rarity, #e8b923) 90%, #fff) 0 2px, transparent 3px),
    radial-gradient(circle at 34% 78%, color-mix(in srgb, var(--rarity, #e8b923) 90%, #fff) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 88% 55%, color-mix(in srgb, var(--rarity, #e8b923) 90%, #fff) 0 1px, transparent 2px);
  opacity: 0;
  filter: drop-shadow(0 0 6px var(--rarity, #e8b923));
}

.pmx-armory__badge {
  color: var(--rarity, #fff);
  transition: color 0.25s ease, text-shadow 0.25s ease, letter-spacing 0.25s ease;
}

.pmx-armory__stage[data-rarity="common"] .pmx-armory__aura {
  opacity: 0.45;
  filter: blur(12px);
  animation-duration: 3.6s;
}
.pmx-armory__stage[data-rarity="common"] .pmx-armory__badge {
  letter-spacing: 0.16em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}
.pmx-armory__stage[data-rarity="common"] .pmx-armory__figure img {
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.45));
  animation-duration: 4.4s;
}

/* Rare */
.pmx-armory__stage[data-rarity="rare"] .pmx-armory__aura {
  opacity: 0.85;
  width: 92%;
  height: 62%;
  filter: blur(9px);
  animation: pmxRarityAuraPulse 2.2s ease-in-out infinite;
}
.pmx-armory__stage[data-rarity="rare"] .pmx-armory__ring--a {
  display: block;
  animation: pmxRarityRing 2.4s ease-out infinite;
}
.pmx-armory__stage[data-rarity="rare"] .pmx-armory__badge {
  letter-spacing: 0.24em;
  text-shadow: 0 0 18px color-mix(in srgb, var(--rarity) 75%, transparent), 0 2px 12px rgba(0, 0, 0, 0.7);
}
.pmx-armory__stage[data-rarity="rare"] .pmx-armory__figure img {
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 22px color-mix(in srgb, var(--rarity) 50%, transparent));
  animation: pmxRarityBob 3.4s ease-in-out infinite;
}

/* Heroic */
.pmx-armory__stage[data-rarity="heroic"] .pmx-armory__aura {
  opacity: 1;
  width: 100%;
  height: 70%;
  filter: blur(8px) saturate(1.25);
  animation: pmxRarityAuraPulse 1.7s ease-in-out infinite;
}
.pmx-armory__stage[data-rarity="heroic"] .pmx-armory__ring--a,
.pmx-armory__stage[data-rarity="heroic"] .pmx-armory__ring--b {
  display: block;
}
.pmx-armory__stage[data-rarity="heroic"] .pmx-armory__ring--a {
  animation: pmxRarityRing 2s ease-out infinite;
}
.pmx-armory__stage[data-rarity="heroic"] .pmx-armory__ring--b {
  width: 88%;
  height: 48%;
  animation: pmxRarityRing 2.5s ease-out infinite 0.35s;
}
.pmx-armory__stage[data-rarity="heroic"] .pmx-armory__sparks {
  display: block;
  animation: pmxRaritySparks 1.6s ease-in-out infinite;
}
.pmx-armory__stage[data-rarity="heroic"] .pmx-armory__badge {
  letter-spacing: 0.28em;
  font-size: 0.92rem;
  text-shadow: 0 0 22px color-mix(in srgb, var(--rarity) 85%, transparent), 0 0 40px color-mix(in srgb, var(--rarity) 45%, transparent);
}
.pmx-armory__stage[data-rarity="heroic"] .pmx-armory__figure img {
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 28px color-mix(in srgb, var(--rarity) 65%, transparent));
  animation: pmxRarityBobFierce 2.8s ease-in-out infinite;
}

/* Ancient */
.pmx-armory__stage[data-rarity="ancient"] .pmx-armory__aura {
  opacity: 1;
  width: 110%;
  height: 78%;
  bottom: 2%;
  filter: blur(7px) saturate(1.35) brightness(1.08);
  animation: pmxRarityAuraPulse 1.35s ease-in-out infinite;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--rarity) 70%, transparent), transparent 68%),
    radial-gradient(circle at 50% 80%, rgba(255, 240, 180, 0.35), transparent 55%);
}
.pmx-armory__stage[data-rarity="ancient"] .pmx-armory__ring--a,
.pmx-armory__stage[data-rarity="ancient"] .pmx-armory__ring--b {
  display: block;
  border-width: 2.5px;
}
.pmx-armory__stage[data-rarity="ancient"] .pmx-armory__ring--a {
  animation: pmxRarityRing 1.6s ease-out infinite;
}
.pmx-armory__stage[data-rarity="ancient"] .pmx-armory__ring--b {
  width: 95%;
  height: 52%;
  animation: pmxRarityRing 2.1s ease-out infinite 0.25s;
}
.pmx-armory__stage[data-rarity="ancient"] .pmx-armory__sparks {
  display: block;
  opacity: 0.85;
  animation: pmxRaritySparks 1.15s ease-in-out infinite;
}
.pmx-armory__stage[data-rarity="ancient"] .pmx-armory__badge {
  letter-spacing: 0.32em;
  font-size: 0.98rem;
  font-weight: 800;
  color: #ffe9a0;
  text-shadow:
    0 0 10px rgba(255, 230, 140, 0.95),
    0 0 28px rgba(245, 158, 11, 0.85),
    0 0 48px rgba(245, 158, 11, 0.45);
  animation: pmxRarityBadgeFlash 1.4s ease-in-out infinite;
}
.pmx-armory__stage[data-rarity="ancient"] .pmx-armory__figure img {
  filter:
    drop-shadow(0 24px 36px rgba(0, 0, 0, 0.65))
    drop-shadow(0 0 34px rgba(245, 158, 11, 0.75))
    drop-shadow(0 0 60px rgba(255, 220, 100, 0.35));
  animation: pmxRarityBobFierce 2.3s ease-in-out infinite;
}
.pmx-armory__stage[data-rarity="ancient"]::before {
  content: "";
  position: absolute;
  inset: 5% 8% 12%;
  border-radius: 40%;
  background: radial-gradient(ellipse at 50% 60%, rgba(245, 158, 11, 0.18), transparent 65%);
  animation: pmxRarityVignette 1.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* Legendary — rarest */
.pmx-armory__stage[data-rarity="legendary"] .pmx-armory__aura {
  opacity: 1;
  width: 120%;
  height: 88%;
  bottom: 0;
  filter: blur(6px) saturate(1.55) brightness(1.15);
  animation: pmxRarityAuraInferno 0.95s ease-in-out infinite;
  background:
    radial-gradient(circle, rgba(239, 68, 68, 0.75), transparent 62%),
    radial-gradient(circle at 45% 70%, rgba(255, 80, 40, 0.45), transparent 50%),
    radial-gradient(circle at 60% 40%, rgba(255, 200, 80, 0.25), transparent 45%);
}
.pmx-armory__stage[data-rarity="legendary"] .pmx-armory__ring--a,
.pmx-armory__stage[data-rarity="legendary"] .pmx-armory__ring--b {
  display: block;
  border-width: 3px;
  border-color: rgba(255, 90, 70, 0.9);
}
.pmx-armory__stage[data-rarity="legendary"] .pmx-armory__ring--a {
  animation: pmxRarityRing 1.15s ease-out infinite;
}
.pmx-armory__stage[data-rarity="legendary"] .pmx-armory__ring--b {
  width: 105%;
  height: 58%;
  animation: pmxRarityRing 1.55s ease-out infinite 0.2s;
}
.pmx-armory__stage[data-rarity="legendary"] .pmx-armory__sparks {
  display: block;
  opacity: 1;
  animation: pmxRaritySparks 0.75s ease-in-out infinite;
}
.pmx-armory__stage[data-rarity="legendary"] .pmx-armory__badge {
  letter-spacing: 0.36em;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ff6b5a;
  text-shadow:
    0 0 12px rgba(255, 100, 80, 1),
    0 0 32px rgba(239, 68, 68, 0.95),
    0 0 60px rgba(239, 68, 68, 0.55);
  animation: pmxRarityBadgeFlash 0.9s ease-in-out infinite;
}
.pmx-armory__stage[data-rarity="legendary"] .pmx-armory__figure img {
  filter:
    drop-shadow(0 26px 40px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 40px rgba(239, 68, 68, 0.9))
    drop-shadow(0 0 70px rgba(255, 80, 40, 0.45));
  animation: pmxRarityBobInferno 1.7s ease-in-out infinite;
}
.pmx-armory__stage[data-rarity="legendary"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(239, 68, 68, 0.28), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 60, 20, 0.22), transparent 50%);
  animation: pmxRarityVignette 1.1s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.pmx-armory__right[data-rarity="ancient"] .pmx-armory__rarity,
.pmx-armory__right[data-rarity="legendary"] .pmx-armory__rarity {
  animation: pmxRarityBadgeFlash 1.2s ease-in-out infinite;
}
.pmx-armory__right[data-rarity="ancient"] .pmx-armory__chance,
.pmx-armory__right[data-rarity="legendary"] .pmx-armory__chance {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--rarity) 55%, transparent),
    0 0 24px color-mix(in srgb, var(--rarity) 35%, transparent);
}
.pmx-armory__right[data-rarity="legendary"] {
  border-color: color-mix(in srgb, var(--rarity) 55%, transparent);
  box-shadow: 0 0 28px color-mix(in srgb, var(--rarity) 22%, transparent);
}

.pmx-armory__slot {
  border-width: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}
.pmx-armory__slot.rarity-common {
  border-color: rgba(176, 183, 195, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 0 10px rgba(176, 183, 195, 0.2);
}
.pmx-armory__slot.rarity-rare {
  border-color: rgba(91, 157, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(40, 90, 180, 0.45), 0 0 14px rgba(91, 157, 255, 0.45);
}
.pmx-armory__slot.rarity-heroic {
  border-color: rgba(168, 85, 247, 0.9);
  box-shadow: 0 0 0 1px rgba(100, 40, 180, 0.45), 0 0 16px rgba(168, 85, 247, 0.5);
  animation: pmxSlotPulse 2.2s ease-in-out infinite;
}
.pmx-armory__slot.rarity-ancient {
  border-color: rgba(245, 158, 11, 0.95);
  box-shadow: 0 0 0 1px rgba(160, 90, 0, 0.5), 0 0 18px rgba(245, 158, 11, 0.55), 0 0 30px rgba(255, 220, 100, 0.25);
  animation: pmxSlotPulse 1.5s ease-in-out infinite;
}
.pmx-armory__slot.rarity-legendary {
  border-color: #ff4d3d;
  box-shadow: 0 0 0 1px rgba(180, 30, 20, 0.55), 0 0 20px rgba(239, 68, 68, 0.7), 0 0 36px rgba(255, 80, 40, 0.35);
  animation: pmxSlotPulse 1s ease-in-out infinite;
}
.pmx-armory__slot.is-active {
  opacity: 1 !important;
  filter: none !important;
  transform: translateY(-5px) scale(1.05);
  z-index: 2;
}
.pmx-armory__slot.rarity-ancient.is-active,
.pmx-armory__slot.rarity-legendary.is-active {
  transform: translateY(-7px) scale(1.07);
}

@keyframes pmxRarityAuraPulse {
  0%, 100% { opacity: 0.72; transform: translateX(-50%) scale(0.96); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}
@keyframes pmxRarityAuraInferno {
  0%, 100% { opacity: 0.8; transform: translateX(-50%) scale(0.94); filter: blur(6px) saturate(1.4) brightness(1.05); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.12); filter: blur(5px) saturate(1.7) brightness(1.25); }
}
@keyframes pmxRarityRing {
  0% { opacity: 0.85; transform: translateX(-50%) scale(0.72); }
  70% { opacity: 0.35; }
  100% { opacity: 0; transform: translateX(-50%) scale(1.35); }
}
@keyframes pmxRaritySparks {
  0%, 100% { opacity: 0.35; transform: translateY(0) scale(0.96); }
  50% { opacity: 1; transform: translateY(-6px) scale(1.05); }
}
@keyframes pmxRarityBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pmxRarityBobFierce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.02); }
}
@keyframes pmxRarityBobInferno {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
  25% { transform: translateY(-8px) scale(1.03) rotate(-0.4deg); }
  75% { transform: translateY(-14px) scale(1.04) rotate(0.4deg); }
}
@keyframes pmxRarityBadgeFlash {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}
@keyframes pmxRarityVignette {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.9; }
}
@keyframes pmxSlotPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .pmx-armory__stage[data-rarity] .pmx-armory__aura,
  .pmx-armory__stage[data-rarity] .pmx-armory__ring,
  .pmx-armory__stage[data-rarity] .pmx-armory__sparks,
  .pmx-armory__stage[data-rarity] .pmx-armory__badge,
  .pmx-armory__stage[data-rarity] .pmx-armory__figure img,
  .pmx-armory__slot.rarity-heroic,
  .pmx-armory__slot.rarity-ancient,
  .pmx-armory__slot.rarity-legendary {
    animation: none !important;
  }
}

/* ===== Costume Cache vault redesign (2026-10-08) ===== */
.pmx-armory {
  --vault-ink: #06080d;
  --vault-bronze: #c9a46a;
  --vault-amber: #f0c45c;
  --vault-cream: #f7f1e6;
  --vault-mist: rgba(180, 210, 220, 0.06);
  color: var(--vault-cream);
}

.pmx-armory__bg img {
  opacity: 0.28;
  filter: saturate(0.35) brightness(0.38) contrast(1.15) blur(1px);
  transform: scale(1.04);
}

.pmx-armory__mist {
  background:
    radial-gradient(ellipse 48% 42% at 50% 38%, rgba(240, 196, 92, 0.14), transparent 62%),
    radial-gradient(ellipse 30% 35% at 12% 70%, rgba(70, 110, 120, 0.18), transparent 70%),
    radial-gradient(ellipse 28% 32% at 88% 65%, rgba(90, 60, 30, 0.2), transparent 68%),
    linear-gradient(180deg, rgba(6, 8, 13, 0.72) 0%, transparent 28%, rgba(6, 8, 13, 0.55) 62%, #06080d 100%);
}

.pmx-armory__vault {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.pmx-armory__shaft {
  position: absolute;
  top: -8%;
  width: min(38vw, 420px);
  height: 118%;
  background: linear-gradient(
    180deg,
    rgba(255, 236, 180, 0.16) 0%,
    rgba(240, 196, 92, 0.07) 38%,
    transparent 78%
  );
  filter: blur(18px);
  opacity: 0.75;
  animation: pmxVaultShaft 9s ease-in-out infinite;
}
.pmx-armory__shaft--a {
  left: 28%;
  transform: rotate(-8deg);
}
.pmx-armory__shaft--b {
  right: 24%;
  width: min(28vw, 300px);
  transform: rotate(7deg);
  animation-delay: -4s;
  opacity: 0.5;
}
@keyframes pmxVaultShaft {
  0%, 100% { opacity: 0.45; filter: blur(18px); }
  50% { opacity: 0.85; filter: blur(14px); }
}

.pmx-armory__embers {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 18% 72%, rgba(255, 210, 120, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 72% 58%, rgba(255, 230, 170, 0.55), transparent),
    radial-gradient(2px 2px at 46% 80%, rgba(240, 180, 80, 0.65), transparent),
    radial-gradient(1px 1px at 62% 40%, rgba(255, 240, 200, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 34% 48%, rgba(255, 200, 100, 0.5), transparent);
  animation: pmxVaultEmbers 7s ease-in-out infinite;
  opacity: 0.7;
}
@keyframes pmxVaultEmbers {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(-12px); opacity: 0.85; }
}

.pmx-armory__shell {
  gap: 10px 22px;
  padding-top: calc(var(--cg-dock-h, 72px) + 6px);
}

.pmx-armory__left,
.pmx-armory__right {
  padding: 0.55rem 0.65rem 0.45rem;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(18, 22, 30, 0.55), rgba(8, 10, 14, 0.28));
  border: 1px solid rgba(201, 164, 106, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 200, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pmx-armory__panel-title {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--vault-bronze);
  text-shadow: none;
  border-bottom: 1px solid rgba(201, 164, 106, 0.25);
  padding-bottom: 0.4rem;
  margin-bottom: 0.55rem;
}

.pmx-armory__panel-lead {
  color: rgba(247, 241, 230, 0.72);
  font-size: 0.82rem;
}

.pmx-armory__credits {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(201, 164, 106, 0.28);
  border-radius: 4px;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.pmx-armory__credits-val {
  color: var(--vault-amber);
}

.pmx-armory__feed-item {
  background: transparent;
  border-left: none;
  border-radius: 0;
  padding: 0.45rem 0.15rem 0.5rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}
.pmx-armory__feed-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 2px;
  background: var(--rarity, var(--vault-bronze));
  box-shadow: 0 0 8px color-mix(in srgb, var(--rarity, var(--vault-bronze)) 50%, transparent);
}
.pmx-armory__feed-dot { display: none; }
.pmx-armory__feed-body strong {
  font-family: "Cormorant Garamond", "Cinzel", serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fffaf0;
}
.pmx-armory__feed-empty {
  background: transparent;
  border: 1px dashed rgba(201, 164, 106, 0.28);
  border-radius: 4px;
  color: rgba(247, 241, 230, 0.55);
}

.pmx-armory__trade-btn {
  border-radius: 3px;
  border: 1px solid rgba(201, 164, 106, 0.5);
  background: linear-gradient(180deg, rgba(201, 164, 106, 0.18), rgba(40, 28, 12, 0.45));
  color: var(--vault-amber);
  letter-spacing: 0.14em;
  box-shadow: inset 0 1px 0 rgba(255, 236, 180, 0.12);
}
.pmx-armory__trade-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(201, 164, 106, 0.32), rgba(60, 40, 14, 0.55));
  color: #fff8e8;
}

/* Center: brand + spotlight stage */
.pmx-armory__brand {
  position: absolute;
  top: 1.5%;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  margin: 0;
  max-width: 92%;
  font-family: "Cinzel", serif;
  font-size: clamp(1.35rem, 2.8vw, 2.05rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  color: #fff6dc;
  text-shadow:
    0 0 28px rgba(240, 196, 92, 0.35),
    0 2px 16px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  white-space: nowrap;
}
.pmx-armory__brand::after {
  content: "";
  display: block;
  width: min(180px, 55%);
  height: 1px;
  margin: 0.4rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(240, 196, 92, 0.75), transparent);
}

.pmx-armory__badge {
  top: calc(1.5% + 2.55rem);
  border-radius: 2px;
  background: rgba(8, 10, 14, 0.72);
  border: 1px solid color-mix(in srgb, var(--rarity, #e8b923) 55%, transparent);
  letter-spacing: 0.24em;
  box-shadow: 0 0 18px color-mix(in srgb, var(--rarity, #e8b923) 25%, transparent);
}

.pmx-armory__stage-name {
  top: calc(1.5% + 4.55rem);
  font-family: "Cormorant Garamond", "Cinzel", serif;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fffaf0;
}

.pmx-armory__pedestal {
  position: absolute;
  left: 50%;
  bottom: 2%;
  z-index: 0;
  width: 78%;
  height: 22%;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, color-mix(in srgb, var(--rarity, #e8b923) 55%, transparent) 0%, transparent 68%),
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.12) 0%, transparent 55%);
  box-shadow:
    0 0 40px color-mix(in srgb, var(--rarity, #e8b923) 30%, transparent),
    inset 0 0 30px rgba(0, 0, 0, 0.35);
  animation: pmxPedestalPulse 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pmxPedestalPulse {
  0%, 100% { opacity: 0.65; transform: translateX(-50%) scale(0.96); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.04); }
}

.pmx-armory__figure {
  width: min(460px, 100%);
}
.pmx-armory__figure img {
  filter:
    drop-shadow(0 24px 36px rgba(0, 0, 0, 0.65))
    drop-shadow(0 0 28px color-mix(in srgb, var(--rarity, #e8b923) 28%, transparent));
}

.pmx-armory__stage {
  outline: none !important;
}
.pmx-armory.is-rolling .pmx-armory__stage,
.pmx-armory.is-win-fx .pmx-armory__stage {
  outline: none !important;
  box-shadow: none;
}
.pmx-armory.is-rolling .pmx-armory__pedestal,
.pmx-armory.is-win-fx .pmx-armory__pedestal {
  animation: pmxPedestalPulse 0.7s ease-in-out infinite;
  opacity: 1;
}

/* CTA chest — pedestal button */
.pmx-armory__cta-dock {
  padding-top: 0.2rem;
  padding-bottom: 0.35rem;
}
.pmx-armory__open--chest,
.pmx-armory__open--center {
  max-width: 176px;
  width: min(176px, 100%);
}
.pmx-armory__chestbox {
  filter:
    drop-shadow(0 12px 20px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 22px rgba(240, 196, 92, 0.45));
}
.pmx-armory__open-copy span {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
}
.pmx-armory__open small {
  color: var(--vault-amber);
  font-weight: 700;
}

/* Pool strip — jewel pedestals */
.pmx-armory__tray {
  padding-top: 0.15rem;
  padding-bottom: 0.55rem;
}
.pmx-armory__strip {
  gap: 0.65rem;
  padding: 0.45rem 0.35rem 0.55rem;
  border-radius: 4px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.2));
  border-top: 1px solid rgba(201, 164, 106, 0.18);
}
.pmx-armory__slot {
  width: 86px;
  height: 116px;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--rarity, #e8b923) 45%, rgba(255, 255, 255, 0.12));
  background:
    linear-gradient(180deg, rgba(20, 24, 32, 0.95), #080a10);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.pmx-armory__slot::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 3px;
  z-index: 3;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, transparent, var(--rarity, #e8b923), transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--rarity, #e8b923) 60%, transparent);
  pointer-events: none;
}
.pmx-armory__slot:hover,
.pmx-armory__slot.is-active {
  transform: translateY(-6px);
  border-color: var(--rarity, #e8b923);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.45),
    0 0 22px color-mix(in srgb, var(--rarity, #e8b923) 40%, transparent);
}
.pmx-armory__slot-name {
  font-family: "Cormorant Garamond", "Sora", serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* One-screen treasure overrides for vault */
#hero.cgames-hero.is-treasure-view .pmx-armory__brand {
  font-size: clamp(1.15rem, 2.2vw, 1.75rem);
  letter-spacing: 0.18em;
  top: 0.5%;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__badge {
  top: calc(0.5% + 2.15rem);
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__stage-name {
  top: calc(0.5% + 3.85rem);
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
}
#hero.cgames-hero.is-treasure-view .pmx-armory__left,
#hero.cgames-hero.is-treasure-view .pmx-armory__right {
  padding: 0.4rem 0.5rem;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__slot {
  width: 78px;
  height: 104px;
  border-radius: 3px;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__eyebrow {
  display: none;
}

@media (max-width: 1099.98px) {
  .pmx-armory__brand {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0.35rem auto 0.5rem;
    font-size: clamp(1.25rem, 6vw, 1.7rem);
  }
  .pmx-armory__badge,
  .pmx-armory__stage-name {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0.25rem auto;
  }
  .pmx-armory__shaft { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .pmx-armory__shaft,
  .pmx-armory__embers,
  .pmx-armory__pedestal {
    animation: none !important;
  }
}

/* ===== Vault polish: bigger stage, readable feeds ===== */
#hero.cgames-hero.is-treasure-view .pmx-armory__left,
#hero.cgames-hero.is-treasure-view .pmx-armory__right {
  padding: 0.45rem 0.55rem !important;
  background:
    linear-gradient(180deg, rgba(18, 22, 30, 0.62), rgba(8, 10, 14, 0.32)) !important;
  border: 1px solid rgba(201, 164, 106, 0.22) !important;
  border-radius: 4px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 200, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.28) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__figure {
  height: clamp(220px, 46vh, 460px) !important;
  width: min(420px, 92%) !important;
  place-items: end center !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__figure img,
#hero.cgames-hero.is-treasure-view .pmx-armory__figure #armoryHero {
  position: relative !important;
  inset: auto !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: bottom center !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__feed-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0.12rem !important;
  padding: 0.4rem 0.2rem 0.45rem 0.65rem !important;
  align-items: start !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__feed-item time {
  justify-self: start !important;
  order: 3;
  opacity: 0.65;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__feed-dot {
  display: none !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__feed-body {
  display: grid !important;
  gap: 0.08rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__feed-body strong {
  font-size: 0.92rem !important;
  line-height: 1.2 !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__strip {
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.28)) !important;
  border-top: 1px solid rgba(201, 164, 106, 0.16) !important;
  padding: 0.25rem 0.2rem 0.35rem !important;
  border-radius: 4px !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__slot {
  width: 72px !important;
  height: 96px !important;
  border-radius: 3px !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__cta-dock {
  padding: 0.15rem 0 0.1rem !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__brand {
  top: 0.8% !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__badge {
  top: calc(0.8% + 2.35rem) !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__stage-name {
  top: calc(0.8% + 4.1rem) !important;
}

/* ===== Readability fix: trade + strip labels ===== */
#hero.cgames-hero.is-treasure-view .pmx-armory__panel-title,
.pmx-armory__panel-title {
  color: #ffe9a8 !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9), 0 0 12px rgba(0, 0, 0, 0.55) !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.14em !important;
  border-bottom-color: rgba(255, 224, 138, 0.45) !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__panel-lead,
.pmx-armory__panel-lead {
  color: #fffef8 !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85) !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__trade-btn,
.pmx-armory__trade-btn {
  color: #ffe08a !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75) !important;
  border-color: rgba(255, 210, 100, 0.65) !important;
  background: linear-gradient(180deg, rgba(232, 185, 35, 0.35), rgba(80, 55, 10, 0.55)) !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__feed-body strong,
.pmx-armory__feed-body strong {
  color: #fffef8 !important;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8) !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__feed-body span,
#hero.cgames-hero.is-treasure-view .pmx-armory__feed-item time,
.pmx-armory__feed-body span,
.pmx-armory__feed-item time {
  color: rgba(245, 240, 228, 0.88) !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__slot-name,
.pmx-armory__slot-name {
  color: #fffef8 !important;
  font-family: "Sora", system-ui, sans-serif !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: 0.01em !important;
  text-shadow:
    0 1px 2px #000,
    0 0 6px rgba(0, 0, 0, 0.95),
    0 2px 8px rgba(0, 0, 0, 0.9) !important;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.75) 35%, rgba(0, 0, 0, 0.95) 100%) !important;
  padding: 1rem 4px 5px !important;
  -webkit-line-clamp: 3 !important;
  opacity: 1 !important;
  filter: none !important;
}

/* Keep OWNED slot dimmed on art only — names stay readable */
#hero.cgames-hero.is-treasure-view .pmx-armory__slot.is-owned,
.pmx-armory__slot.is-owned {
  opacity: 0.85 !important;
  filter: none !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__slot.is-owned img,
.pmx-armory__slot.is-owned img {
  opacity: 0.45 !important;
  filter: grayscale(0.85) brightness(0.65) !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__slot:not(.is-active):not(:hover),
.pmx-armory__slot:not(.is-active):not(:hover) {
  opacity: 1 !important;
  filter: none !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__slot:not(.is-active):not(:hover) img,
.pmx-armory__slot:not(.is-active):not(:hover) img {
  filter: brightness(0.88) saturate(0.9);
}
#hero.cgames-hero.is-treasure-view .pmx-armory__slot:not(.is-active):not(:hover).is-owned img,
.pmx-armory__slot:not(.is-active):not(:hover).is-owned img {
  opacity: 0.4 !important;
  filter: grayscale(0.9) brightness(0.55) !important;
}
#hero.cgames-hero.is-treasure-view .pmx-armory__slot.is-owned .pmx-armory__slot-name,
.pmx-armory__slot.is-owned .pmx-armory__slot-name {
  color: #fffef8 !important;
  opacity: 1 !important;
}

/* ===== Readability v2: solid label bar ===== */
#hero.cgames-hero.is-treasure-view .pmx-armory__slot-name,
.pmx-armory__slot-name {
  background: rgba(0, 0, 0, 0.88) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px #000 !important;
  padding: 0.35rem 4px 0.4rem !important;
  min-height: 2.4em;
  display: flex !important;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  overflow: hidden !important;
  font-size: 0.66rem !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__panel-title,
.pmx-armory__right .pmx-armory__panel-title,
.pmx-armory__left .pmx-armory__panel-title {
  color: #ffe9a8 !important;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.35rem 0.4rem !important;
  border-radius: 3px;
  border-bottom: 1px solid rgba(255, 224, 138, 0.5) !important;
}

#hero.cgames-hero.is-treasure-view .pmx-armory__panel-lead,
.pmx-armory__panel-lead {
  color: #ffffff !important;
  background: rgba(0, 0, 0, 0.28);
  padding: 0.3rem 0.4rem;
  border-radius: 3px;
  margin-bottom: 0.45rem !important;
}
