/* TradeRealm 3.4.1 — collectible pet cards */

body[data-page="pets"] .tr232-collection-grid{
  grid-template-columns:repeat(auto-fill,minmax(145px,1fr))!important;
  gap:14px!important;
  align-items:start!important;
}
body[data-page="pets"] .tr232-pet-collection-card{
  --rarity-accent:#b8c1d2;
  --rarity-deep:#1a2232;
  --rarity-mid:#30394c;
  position:relative!important;
  aspect-ratio:2.52/3.52!important;
  min-height:0!important;
  padding:8px!important;
  border-radius:17px!important;
  overflow:hidden!important;
  isolation:isolate!important;
  background:
    radial-gradient(circle at 20% 5%,rgba(255,255,255,.22),transparent 25%),
    linear-gradient(145deg,var(--rarity-mid),var(--rarity-deep) 72%)!important;
  border:2px solid color-mix(in srgb,var(--rarity-accent) 62%,#eef4ff 38%)!important;
  box-shadow:
    0 1px 0 rgba(255,255,255,.46) inset,
    0 0 0 3px rgba(4,9,20,.64) inset,
    0 0 0 4px color-mix(in srgb,var(--rarity-accent) 28%,transparent) inset,
    0 13px 28px rgba(0,0,0,.27)!important;
  transition:transform .18s ease,box-shadow .18s ease,filter .18s ease!important;
}
body[data-page="pets"] .tr232-pet-collection-card:before{
  content:""!important;
  position:absolute!important;
  inset:5px!important;
  z-index:0!important;
  border-radius:12px!important;
  border:1px solid rgba(255,255,255,.22)!important;
  background:
    linear-gradient(120deg,rgba(255,255,255,.08),transparent 26%,transparent 72%,rgba(255,255,255,.04)),
    repeating-linear-gradient(135deg,rgba(255,255,255,.018) 0 1px,transparent 1px 6px)!important;
  pointer-events:none!important;
}
body[data-page="pets"] .tr232-pet-collection-card:hover{
  transform:translateY(-4px) rotate(.2deg)!important;
  filter:saturate(1.06)!important;
  box-shadow:0 18px 38px rgba(0,0,0,.34),0 0 26px color-mix(in srgb,var(--rarity-accent) 18%,transparent)!important;
}
body[data-page="pets"] .tr232-pet-collection-card>*{position:relative;z-index:2}
body[data-page="pets"] .tr232-pet-collection-card .realm-card-shine-v140{z-index:3!important;opacity:.18!important}

/* Rarity chip: compact, readable, part of the card frame */
body[data-page="pets"] .tr232-pet-collection-card .realm-card-rarity-v142{
  top:10px!important;
  right:10px!important;
  left:auto!important;
  max-width:58%!important;
  min-height:21px!important;
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  padding:4px 8px!important;
  border-radius:7px!important;
  background:linear-gradient(180deg,rgba(8,13,26,.92),rgba(4,8,18,.86))!important;
  border:1px solid color-mix(in srgb,var(--rarity-accent) 70%,#fff 30%)!important;
  box-shadow:0 3px 8px rgba(0,0,0,.32),0 0 12px color-mix(in srgb,var(--rarity-accent) 22%,transparent)!important;
  color:#fff!important;
  font-size:7px!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  line-height:1!important;
  text-transform:uppercase!important;
}
body[data-page="pets"] .tr232-pet-collection-card .realm-card-rarity-v142:before{
  content:"";
  width:7px;height:7px;flex:0 0 7px;border-radius:2px;
  background:var(--rarity-accent);
  box-shadow:0 0 7px color-mix(in srgb,var(--rarity-accent) 80%,transparent);
  transform:rotate(45deg);
}

/* Name plate */
body[data-page="pets"] .tr232-pet-collection-card .realm-card-name-v142{
  min-height:36px!important;
  margin:30px 8px 5px!important;
  padding:0 3px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  font-size:13px!important;
  font-weight:950!important;
  line-height:1.05!important;
  letter-spacing:.01em!important;
  color:#fff!important;
  text-shadow:0 2px 5px rgba(0,0,0,.62)!important;
}

/* Art window deliberately prevents tiny source images from being over-enlarged */
body[data-page="pets"] .tr232-pet-collection-card .realm-card-art-v140{
  flex:1 1 auto!important;
  min-height:0!important;
  margin:0 8px 7px!important;
  border-radius:13px!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  background:
    radial-gradient(circle at 50% 38%,color-mix(in srgb,var(--rarity-accent) 22%,rgba(255,255,255,.08)),rgba(4,9,22,.70) 70%)!important;
  border:1px solid color-mix(in srgb,var(--rarity-accent) 38%,rgba(255,255,255,.15))!important;
  box-shadow:inset 0 0 26px rgba(0,0,0,.25),0 1px 0 rgba(255,255,255,.12)!important;
}
body[data-page="pets"] .tr232-pet-collection-card .realm-card-art-v140:before{
  content:"";position:absolute;inset:0;
  background:linear-gradient(125deg,rgba(255,255,255,.07),transparent 35%,transparent 68%,rgba(255,255,255,.025));
  pointer-events:none;
}
body[data-page="pets"] .tr232-pet-collection-card .realm-card-art-v140:after{
  content:""!important;display:block!important;position:absolute!important;
  left:20%;right:20%;bottom:8%;height:9%;border-radius:50%;
  background:rgba(0,0,0,.24)!important;filter:blur(8px)!important;z-index:0!important;
}
body[data-page="pets"] .tr232-pet-collection-card .realm-card-img-v140{
  position:relative!important;z-index:1!important;
  width:auto!important;height:auto!important;
  max-width:min(78%,150px)!important;
  max-height:min(78%,150px)!important;
  object-fit:contain!important;
  image-rendering:auto!important;
  filter:drop-shadow(0 10px 10px rgba(0,0,0,.30))!important;
}

/* Stat box styled like a collectible-card stat panel */
body[data-page="pets"] .tr340-card-value{
  position:relative!important;
  z-index:5!important;
  margin:0 8px 6px!important;
  min-height:35px!important;
  padding:6px 9px!important;
  border-radius:9px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:8px!important;
  background:linear-gradient(180deg,rgba(248,251,255,.12),rgba(7,12,25,.78))!important;
  border:1px solid color-mix(in srgb,var(--rarity-accent) 55%,rgba(255,255,255,.24))!important;
  box-shadow:inset 0 1px rgba(255,255,255,.13),0 2px 7px rgba(0,0,0,.18)!important;
}
body[data-page="pets"] .tr340-card-value:before{
  content:"VALUE";
  position:absolute;left:9px;top:3px;
  font-size:4.6px;font-weight:950;letter-spacing:.14em;
  color:color-mix(in srgb,var(--rarity-accent) 65%,#fff 35%);
  opacity:.88;
}
body[data-page="pets"] .tr340-card-value small{
  padding-top:7px!important;
  font-size:6px!important;
  font-weight:900!important;
  letter-spacing:.07em!important;
  color:rgba(255,255,255,.72)!important;
}
body[data-page="pets"] .tr340-card-value strong{
  font-size:13px!important;
  line-height:1!important;
  color:#fff!important;
  text-shadow:0 0 12px color-mix(in srgb,var(--rarity-accent) 42%,transparent)!important;
}

/* Origin footer */
body[data-page="pets"] .tr340-card-origin{
  position:relative!important;
  z-index:5!important;
  min-height:27px!important;
  margin:0 8px!important;
  padding:5px 7px!important;
  border:0!important;
  border-radius:7px!important;
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  background:rgba(4,8,18,.42)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.07)!important;
}
body[data-page="pets"] .tr340-card-origin:before{
  content:"◆";
  flex:0 0 auto;
  font-size:6px;
  color:var(--rarity-accent);
}
body[data-page="pets"] .tr340-card-origin span{
  display:block!important;min-width:0!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
  font-size:6.4px!important;font-weight:850!important;letter-spacing:.015em!important;
  color:rgba(255,255,255,.78)!important;
}

/* Rarity identities */
body[data-page="pets"] .tr232-pet-collection-card.rarity-common{--rarity-accent:#b7c0cf;--rarity-mid:#394253;--rarity-deep:#161d2b}
body[data-page="pets"] .tr232-pet-collection-card.rarity-uncommon{--rarity-accent:#62e39a;--rarity-mid:#245f47;--rarity-deep:#10291f}
body[data-page="pets"] .tr232-pet-collection-card.rarity-rare{--rarity-accent:#62b8ff;--rarity-mid:#23558c;--rarity-deep:#102846}
body[data-page="pets"] .tr232-pet-collection-card.rarity-ultra-rare{--rarity-accent:#da83ff;--rarity-mid:#70408c;--rarity-deep:#301b46}
body[data-page="pets"] .tr232-pet-collection-card.rarity-legendary{
  --rarity-accent:#ffe785;--rarity-mid:#5d3b84;--rarity-deep:#24163e;
  background:
    radial-gradient(circle at 12% 5%,rgba(255,255,255,.26),transparent 22%),
    linear-gradient(125deg,#71355c,#4f3d91,#196c88,#4f7d4b,#91662e,#71355c)!important;
  background-size:360% 360%!important;
  animation:tr341LegendaryHue 7s ease-in-out infinite!important;
}
body[data-page="pets"] .tr232-pet-collection-card.rarity-legendary:after{
  content:""!important;
  position:absolute!important;inset:-55%!important;z-index:1!important;
  background:
    linear-gradient(112deg,transparent 35%,rgba(255,255,255,.04) 43%,rgba(255,255,255,.30) 50%,rgba(255,255,255,.05) 57%,transparent 65%),
    radial-gradient(circle,rgba(255,245,176,.24) 0 1px,transparent 1.6px) 0 0/22px 22px!important;
  transform:translateX(-48%) rotate(9deg);
  animation:tr341LegendaryShine 5.4s linear infinite!important;
  pointer-events:none!important;
}
@keyframes tr341LegendaryHue{0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}
@keyframes tr341LegendaryShine{0%{transform:translateX(-48%) rotate(9deg)}58%,100%{transform:translateX(48%) rotate(9deg)}}

@media(min-width:1500px){body[data-page="pets"] .tr232-collection-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))!important}}
@media(max-width:1180px){body[data-page="pets"] .tr232-collection-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}}
@media(max-width:900px){body[data-page="pets"] .tr232-collection-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:760px){
  body[data-page="pets"] .tr232-collection-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
  body[data-page="pets"] .tr232-pet-collection-card{aspect-ratio:2.48/3.52!important;padding:5px!important;border-radius:13px!important;border-width:1.5px!important}
  body[data-page="pets"] .tr232-pet-collection-card:before{inset:3px!important;border-radius:9px!important}
  body[data-page="pets"] .tr232-pet-collection-card .realm-card-rarity-v142{top:7px!important;right:7px!important;min-height:16px!important;padding:3px 5px!important;border-radius:5px!important;font-size:4.7px!important;letter-spacing:.06em!important}
  body[data-page="pets"] .tr232-pet-collection-card .realm-card-rarity-v142:before{width:5px;height:5px;flex-basis:5px}
  body[data-page="pets"] .tr232-pet-collection-card .realm-card-name-v142{min-height:27px!important;margin:22px 4px 3px!important;font-size:9.6px!important}
  body[data-page="pets"] .tr232-pet-collection-card .realm-card-art-v140{margin:0 4px 4px!important;border-radius:9px!important}
  body[data-page="pets"] .tr232-pet-collection-card .realm-card-img-v140{max-width:min(82%,88px)!important;max-height:min(82%,88px)!important}
  body[data-page="pets"] .tr340-card-value{min-height:28px!important;margin:0 4px 4px!important;padding:4px 5px!important;border-radius:6px!important;gap:4px!important}
  body[data-page="pets"] .tr340-card-value:before{left:5px;top:2px;font-size:3.4px}
  body[data-page="pets"] .tr340-card-value small{padding-top:6px!important;font-size:4.2px!important}
  body[data-page="pets"] .tr340-card-value strong{font-size:8.5px!important}
  body[data-page="pets"] .tr340-card-origin{min-height:20px!important;margin:0 4px!important;padding:3px 4px!important;border-radius:5px!important;gap:4px!important}
  body[data-page="pets"] .tr340-card-origin:before{font-size:4px}
  body[data-page="pets"] .tr340-card-origin span{font-size:4.8px!important}
}
@media(max-width:390px){body[data-page="pets"] .tr232-collection-grid{gap:6px!important}}
@media(prefers-reduced-motion:reduce){body[data-page="pets"] .tr232-pet-collection-card.rarity-legendary,body[data-page="pets"] .tr232-pet-collection-card.rarity-legendary:after{animation:none!important}}
