.portrait-details {
  position: absolute;
  display: block;
  pointer-events: none;
  max-width: none;
}
.team-portrait > .portrait-details,
.portrait-frame > .portrait-details {
  inset: 0;
  width: 100%;
  height: 100%;
}
.art > .portrait-details {
  inset: var(--art-top) auto auto var(--art-left);
  width: var(--art-width);
  height: auto;
}
.information-character > .portrait-details {
  inset: -.73% auto auto -18.91%;
  width: 139.49%;
  height: auto;
}
.investigation-intro .information-character > .portrait-details {
  inset: -.40193% auto auto -6.69856%;
  width: 120%;
}
.portrait-frame {
  position: relative;
  display: block;
  justify-self: center;
  min-width: 0;
  max-width: 100%;
}
.portrait-frame > img { display: block; }
@keyframes portrait-scan {
  from { transform: translateX(-6px); }
  to { transform: translateX(6px); }
}
@media (prefers-reduced-motion: no-preference) {
  .portrait-details[data-eyes-visible] .portrait-pupil {
    animation: portrait-scan 2.1s ease-in-out infinite alternate;
  }
}

/* The original emblem is a separate layer behind the unchanged team art. */
.team-portrait--redrawn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--portrait-paper, #faf0e6);
}
.team-portrait--redrawn::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 80%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: url("./ea-badge-backdrop.webp") center / contain no-repeat;
  /* Clip just outside the original pink edge to remove the black matte. */
  clip-path: polygon(
    9.95% 34.91%, 10.27% 33.55%, 11.07% 32.18%, 23.59% 19.02%, 25.92% 17.58%,
    47.75% 10.83%, 49.36% 10.51%, 51.69% 10.67%, 73.68% 17.33%, 75.44% 18.14%,
    76.65% 19.10%, 85.15% 28.33%, 88.93% 32.74%, 89.65% 34.03%, 89.81% 34.83%,
    89.89% 64.29%, 89.33% 66.13%, 88.85% 67.10%, 86.84% 70.15%, 84.59% 73.11%,
    80.74% 77.69%, 79.21% 79.21%, 76.73% 81.22%, 74.40% 82.51%, 64.29% 86.04%,
    54.66% 88.85%, 53.21% 89.01%, 47.35% 88.52%, 42.86% 87.88%, 30.58% 85.72%,
    27.21% 84.91%, 25.60% 83.95%, 15.81% 74.16%, 12.04% 69.98%, 11.32% 68.70%,
    10.99% 66.85%
  );
}
.team-portrait--redrawn > img:first-child {
  display: block;
  width: 100%;
  height: auto;
  mask: url("./ea-holmes-team-redrawn-mask.webp") center / 100% 100% no-repeat;
}
:is(.character, .char) > .portrait-details {
  inset: 0;
  width: 100%;
  height: 100%;
}
.discovery-demo .discovery-character > .portrait-details {
  height: auto;
  aspect-ratio: 437 / 560;
}
html[data-portraits-hidden] .portrait-pupil { animation-play-state: paused; }
