/* V15.87 – Huy hiệu thành tựu có hình riêng, khung hoàng kim và trạng thái rõ ràng.
   Chỉ tác động khu vực bộ sưu tập và huy hiệu trưng bày V15.85. */
.tg85-badges.tg87-collection, .tg85-badges:has(.tg87-badge){
  position:relative;overflow:hidden;padding:clamp(14px,2.5vw,25px);
  background:radial-gradient(ellipse at 50% 5%,rgba(191,144,59,.10),transparent 66%),linear-gradient(145deg,#121923,#090f18);
  border:1px solid #947342;border-radius:21px;
  box-shadow:0 22px 58px rgba(0,0,0,.26),inset 0 0 0 1px rgba(247,202,101,.05);
}
.tg85-badges:has(.tg87-badge) h3{font-size:clamp(1.13rem,2vw,1.55rem);letter-spacing:.02em;color:#f9d780}
.tg85-badges:has(.tg87-badge)>div[data-v1585-badges]{gap:16px;align-items:stretch}
.tg87-badge.tg85-badge{
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;
  min-height:226px;gap:5px;overflow:hidden;isolation:isolate;
  padding:10px 12px 17px;border-radius:18px;border:1px solid #6a5335;
  background:linear-gradient(160deg,#191e28,#0b111a 78%);color:#f7e7c6;
  box-shadow:inset 0 1px rgba(255,232,185,.1),0 11px 28px #0006;
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
}
.tg87-badge.tg85-badge::before{
  content:"";position:absolute;inset:6px;border:1px solid rgba(223,177,100,.17);
  border-radius:13px;pointer-events:none;
}
.tg87-badge.tg85-badge::after{
  content:"✧";position:absolute;right:14px;top:9px;color:#d0a85b;font-size:15px;opacity:.7;pointer-events:none;
}
.tg87-badge .tg87-badge-art{
  width:100%;height:142px;display:flex;justify-content:center;align-items:center;
  flex-shrink:0;overflow:hidden;filter:drop-shadow(0 6px 14px rgba(193,149,71,.16));
}
.tg87-badge .tg87-badge-art img{
  display:block;width:min(100%,320px);height:100%;object-fit:contain;
  filter:saturate(1.12) contrast(1.06);
}
.tg87-badge .tg87-badge-fallback{font-size:3rem;color:var(--badge-accent)}
.tg87-badge.tg85-badge strong{position:relative;color:#fff0cd;font-size:clamp(.91rem,1.24vw,1.08rem);line-height:1.4;margin-top:auto}
.tg87-badge.tg85-badge .tg87-badge-state{position:relative;color:#cfc2ad;font-size:.86rem;margin-top:4px}
.tg87-badge.tg85-badge.is-locked{opacity:1;filter:none;cursor:not-allowed;border-color:#5e5a54}
.tg87-badge.tg85-badge.is-locked .tg87-badge-art{filter:grayscale(.5) brightness(.68)}
.tg87-badge.tg85-badge.is-locked strong{color:#b9b5ae}
.tg87-badge.tg85-badge.is-unlocked{border-color:var(--badge-accent);box-shadow:0 0 0 1px #cfa35a25,0 13px 30px #0007,0 0 24px color-mix(in srgb,var(--badge-accent) 17%,transparent)}
.tg87-badge.tg85-badge.is-unlocked .tg87-badge-state{color:#f7d987}
.tg87-badge.tg85-badge.is-equipped{border-color:#ffe29a;background:radial-gradient(ellipse at 50% 40%,#bd8e3030,transparent 64%),linear-gradient(160deg,#201c1b,#0c1119 75%);box-shadow:inset 0 0 0 1px #efc26599,0 0 32px #daa34350}
.tg87-badge.tg85-badge.is-equipped .tg87-badge-state{color:#ffd86e;font-weight:700}
.tg87-badge.tg85-badge.is-unlocked:hover{transform:translateY(-3px);box-shadow:0 17px 33px #0009,0 0 24px color-mix(in srgb,var(--badge-accent) 40%,transparent)}
.tg87-badge.tg85-badge:focus-visible{outline:3px solid #fbd784;outline-offset:3px}
.tg87-profile-badge .tg87-profile-badge-art{display:inline-flex;width:56px;height:32px;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}
.tg87-profile-badge .tg87-profile-badge-art img{display:block;width:100%;height:100%;object-fit:contain}
@media(max-width:650px){
 .tg85-badges:has(.tg87-badge)>div[data-v1585-badges]{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .tg87-badge.tg85-badge{min-height:184px;padding:8px 7px 13px}
 .tg87-badge .tg87-badge-art{height:107px}
}
@media(max-width:360px){
 .tg85-badges:has(.tg87-badge)>div[data-v1585-badges]{grid-template-columns:1fr 1fr;gap:8px}
 .tg87-badge.tg85-badge strong{font-size:.82rem}
 .tg87-badge .tg87-badge-art{height:92px}
}
@media(prefers-reduced-motion:reduce){.tg87-badge.tg85-badge{transition:none}}
