/* stop "aim": the finale. Every rule is scoped under #stop-aim. */

/* a night-sky panel with a gold halftone, so the white jacket pops and the flash reads */
#stop-aim .stop__art {
  container-type: size;
  cursor: crosshair;
  touch-action: manipulation;
  border-color: var(--c-gold);
  background:
    radial-gradient(ellipse 80% 60% at 50% 62%, rgba(217, 165, 58, 0.34), transparent 70%),
    linear-gradient(180deg, #1d0a12 0%, var(--c-burgundy-deep) 100%);
}
#stop-aim .stop__art::before {
  opacity: 0.34;
  background: radial-gradient(var(--c-gold) 1.1px, transparent 1.5px) 0 0 / 10px 10px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

/* the stage has the picture's exact proportions, so flash positions can be plain percentages */
#stop-aim .aim-stage {
  position: relative;
  width: min(100cqw, 100cqh * 0.8003);
  aspect-ratio: 1122 / 1402;
  translate: 0 4%; /* busts end a touch above their frame bottom; sink so the jacket meets it */
  user-select: none;
}
#stop-aim .aim-stage > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  max-width: none; max-height: none; object-fit: contain;
  pointer-events: none;
}

/* the flash: centred on its --x / --y (set from JS, per aim direction) */
#stop-aim .aim-spark {
  left: var(--x, 20%); top: var(--y, 45%);
  width: 38%; aspect-ratio: 1;
  translate: -50% -50%;
  z-index: 2;
}

/* recoil when aiming sideways (the straight-on pose has its own fire frame) */
#stop-aim .aim-stage[data-kick="left"] > img { animation: aim-kick-left 0.28s var(--ease, ease-out); }
#stop-aim .aim-stage[data-kick="right"] > img { animation: aim-kick-right 0.28s var(--ease, ease-out); }
@keyframes aim-kick-left { 0% { transform: translateX(0); } 25% { transform: translateX(3.5%) rotate(1.2deg); } 100% { transform: translateX(0); } }
@keyframes aim-kick-right { 0% { transform: translateX(0); } 25% { transform: translateX(-3.5%) rotate(-1.2deg); } 100% { transform: translateX(0); } }

/* the standing portrait, on the side opposite the art box; decorative */
#stop-aim .aim-full {
  position: absolute; bottom: 0; right: var(--s-5);
  height: 9rem; width: auto; max-width: none;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.35));
}
#stop-aim .stop__body { padding-right: 6.5rem; }
#stop-aim:nth-child(even) .aim-full { right: auto; left: var(--s-5); }
#stop-aim:nth-child(even) .stop__body { padding-right: 0; padding-left: 6.5rem; }

/* focus and chips read on burgundy */
#stop-aim :focus-visible { outline: 3px solid var(--c-gold); outline-offset: 3px; }
#stop-aim .stop__art:focus-visible { outline-offset: 4px; }
#stop-aim .chip { box-shadow: 3px 3px 0 var(--c-gold); }
#stop-aim .chip:active { box-shadow: 0 0 0 var(--c-gold); }
#stop-aim .chip[aria-pressed="true"] { background: var(--c-gold); color: var(--c-ink); }
@media (hover: hover) { #stop-aim .chip:hover { box-shadow: 4px 4px 0 var(--c-gold); } }
#stop-aim .stop__readout { min-height: 1.5em; }
#stop-aim .stop__readout:empty { display: block; } /* keep the card height steady while the count appears */

@media (max-width: 52rem) {
  #stop-aim .aim-full { display: none; }
  #stop-aim .stop__body, #stop-aim:nth-child(even) .stop__body { padding-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  #stop-aim .aim-stage > img { animation: none !important; }
}
