/* Short, high-contrast effects that stay legible on small map tokens. */
.battle-moment {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
  color: var(--moment-color, #d9f7f0);
  z-index: 3;
}
.battle-moment > i {
  position: absolute;
  display: block;
  width: 22%;
  min-width: 5px;
  max-width: 20px;
  aspect-ratio: 1;
  background: currentColor;
  clip-path: polygon(50% 0, 65% 36%, 100% 50%, 65% 64%, 50% 100%, 36% 64%, 0 50%, 36% 36%);
  filter: drop-shadow(0 0 3px currentColor);
}
.battle-moment[data-shape="shard"] > i {
  clip-path: polygon(55% 0, 100% 38%, 72% 84%, 19% 100%, 0 54%);
}
.battle-moment[data-shape="root"] > i {
  clip-path: polygon(2% 92%, 34% 38%, 33% 8%, 63% 46%, 89% 2%, 100% 39%, 75% 83%, 43% 100%);
}
.battle-moment[data-shape="bolt"] > i {
  clip-path: polygon(59% 0, 98% 0, 68% 43%, 95% 40%, 25% 100%, 49% 55%, 12% 61%);
}
.battle-moment[data-shape="ring"] > i {
  background: transparent;
  border: max(2px, .16em) solid currentColor;
  border-radius: 50%;
  clip-path: none;
}
.battle-moment[data-shape="chevron"] > i {
  clip-path: polygon(0 35%, 46% 35%, 46% 7%, 100% 50%, 46% 93%, 46% 65%, 0 65%);
}
.scan-bond-destination {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: fit-content;
  max-width: 100%;
  margin-top: .65rem;
  padding: .35rem .75rem .35rem .4rem;
  border: 1px solid #6eb29f;
  border-radius: .5rem;
  background: #172c2b;
  color: #e7fff8;
}
.scan-bond-destination[data-destination="lab"] {
  border-color: #b99c68;
  background: #302a22;
  color: #fff1d1;
}
.scan-bond-destination > img {
  width: 2.3rem;
  height: 2.3rem;
  object-fit: contain;
  image-rendering: pixelated;
}
.scan-bond-destination small {
  display: block;
  color: inherit;
}
.scan-first-bond-flight {
  position: fixed;
  pointer-events: none;
  z-index: 110;
  object-fit: contain;
  image-rendering: pixelated;
}

.battle-moment[data-shape="slash"] > i {
  width: 33%;
  max-width: 29px;
  clip-path: polygon(0 95%, 38% 43%, 100% 4%, 64% 56%, 20% 89%);
}
.log-rider-verdict { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  #field-log-details .log-rider-verdict,
  #field-log-details [data-rider-roll] .log-die {
    animation: rider-result-reveal .38s ease-out both;
  }
}
@keyframes rider-result-reveal {
  from { opacity: .55; transform: scale(.84); }
  56% { opacity: 1; transform: scale(1.13); }
  to { opacity: 1; transform: none; }
}
.map-token-healing { color: #b8ffd3; }
.growth-reveal {
  --growth-reveal-duration: 1.15s;
  margin: 0;
  display: grid;
  justify-items: center;
  gap: .5rem;
  padding: .75rem;
  background: radial-gradient(ellipse at 50% 65%, #417d7970, transparent 68%), var(--paper);
  border: 1px solid var(--scanner-accent);
  border-radius: .6rem;
}
.growth-reveal[data-stage="3"] { --growth-reveal-duration: 1.85s; }
.growth-reveal-art {
  display: grid;
  width: min(20rem, 60vw);
  aspect-ratio: 5/3;
}
.growth-reveal-art img {
  grid-area: 1/1;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  image-rendering: pixelated;
  transform-origin: 50% 84%;
}
.growth-reveal-old { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .growth-reveal-old { animation: growth-silhouette-leave var(--growth-reveal-duration) ease-in-out both; }
  .growth-reveal-new { animation: growth-silhouette-form var(--growth-reveal-duration) ease-in-out both; }
}
@keyframes growth-silhouette-leave {
  0%, 12% { opacity: 1; filter: none; transform: scale(.9); }
  40% { opacity: .9; filter: brightness(0) invert(.95) drop-shadow(0 0 9px #c5ffe0); transform: scale(.98); }
  69%, 100% { opacity: 0; filter: brightness(0) invert(.95); transform: scale(1.07); }
}
@keyframes growth-silhouette-form {
  0%, 35% { opacity: 0; filter: brightness(0) invert(.96); transform: scale(.84); }
  63% { opacity: 1; filter: brightness(0) invert(.96) drop-shadow(0 0 10px #defff2); transform: scale(1.06); }
  86% { opacity: 1; filter: none; transform: scale(1.015, 1.045); }
  100% { opacity: 1; filter: none; transform: none; }
}

/* Rest is quiet and cool-toned, separate from the healing and guard flashes. */
.battle-rest-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.battle-rest-scene > i {
  position: absolute;
  display: block;
  opacity: 0;
}
.battle-rest-glow,
.battle-rest-ripple {
  inset: auto 2% 10%;
  height: 19%;
  border-radius: 50%;
}
.battle-rest-glow {
  background: radial-gradient(ellipse, #8ddffc70 3%, #6abce34d 38%, transparent 71%);
}
.battle-rest-ripple {
  border: 1px solid #b6e9fb;
  border-top-color: #a1d9f24d;
  box-shadow: 0 1px 5px #56bde78c;
}
.battle-rest-mote {
  bottom: 14%;
  width: var(--rest-mote-size, 3px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #e4f8ff;
  box-shadow: 0 0 5px 1px #8bd6f194;
}
.map-kin-token[data-knocked-out="true"] > .battle-rest-scene { display: none; }
