/* Batch results use the same reveal, with one seal for the whole haul. */
.loot-reveal[data-batch="true"] { position: relative; scroll-margin-top: calc(var(--hud-height) + 12px); }
.banner-main:has(.loot-reveal[data-batch="true"]:not([hidden])) > :is(.banner-content, .banner-foot) { display: none; }
.banner-main:has(.loot-reveal[data-batch="true"]:not([hidden])) { justify-content: center; }
.loot-reveal[data-batch="true"] > #loot-reveal-item { width: min(100%, 780px); }
.chest-batch-results { text-align: center; }
.chest-batch-results h3 { margin: 0; color: var(--cream); font: 800 clamp(24px, 5vw, 44px)/1.1 var(--display); }
.chest-batch-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 112px), 1fr));
  gap: 7px; margin-top: 14px;
}
.chest-batch-grid .loot-item {
  min-width: 0; padding: 7px 5px; border: 1px solid var(--rarity-wash);
  background: radial-gradient(ellipse at 50% 34%, var(--rarity-wash), transparent 78%), #281936;
}
.chest-batch-grid .loot-item strong { font: 800 14px/1.12 var(--body); }
.chest-batch-grid .loot-item small { font-size: 12px; }
.chest-batch-grid .loot-sprite { width: 60px; height: 60px; }

/* The seal contracts as the loot appears, then its ring expands and fades. */
@media (prefers-reduced-motion: no-preference) {
  .chest-opening { position: relative; isolation: isolate; }
  .chest-opening::before, .chest-opening::after {
    position: absolute; top: calc(48px + clamp(18px, 7vmin, 57px)); left: 50%;
    z-index: 1; aspect-ratio: 1; translate: -50% -50%; pointer-events: none;
    border: 2px solid var(--rarity); border-radius: 50%;
    box-shadow: inset 0 0 15px var(--rarity-wash), 0 0 18px var(--rarity-wash);
  }
  .chest-opening::before {
    content: "✦" / "";
    display: grid; place-items: center; width: 83px; border-style: dashed;
    background: radial-gradient(circle, #402359 0 35%, #251731 70%); color: var(--rarity);
    font: normal 36px/1 var(--display);
    animation: chest-seal 180ms var(--ease-out) both;
  }
  .chest-opening::after {
    content: "";
    width: 118px;
    animation: chest-rune-ring 250ms var(--ease-out) 55ms both;
  }
  .chest-opening > :is(.loot-item, .chest-batch-results) { animation: chest-appear 180ms var(--ease-out) 85ms both; }
}

@keyframes chest-seal {
  0% { opacity: 1; transform: rotate(-18deg) scale(1.12); }
  55% { opacity: 1; transform: rotate(9deg) scale(.88); }
  100% { opacity: 0; transform: rotate(25deg) scale(.9); }
}
@keyframes chest-rune-ring {
  0% { opacity: 0; transform: scale(.75); }
  25% { opacity: .95; }
  100% { opacity: 0; transform: scale(1.8); }
}
@keyframes chest-appear { from { opacity: 0; } to { opacity: 1; } }
