.board-frame {
  position: relative;
  isolation: isolate;
}
.arcade-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}
.fx-bolt {
  stroke: #e4ffff;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  filter: drop-shadow(0 0 3px #31dfff) drop-shadow(0 0 6px #4483ff);
  animation: bolt-fade 0.52s ease-out both;
}
.fx-ring {
  fill: none;
  stroke: #ffe881;
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: ring-out 0.45s ease-out both;
}
.fx-impact {
  stroke: #ff769b;
}
.fx-points {
  font:
    700 15px system-ui,
    sans-serif;
  fill: #fff5aa;
  paint-order: stroke;
  stroke: #202030;
  stroke-width: 3px;
  animation: points-rise 0.8s ease-out both;
}
#board .aimed {
  outline: 2px dashed #fff1a8;
  outline-offset: -3px;
  z-index: 2;
}
@keyframes bolt-fade {
  0% {
    opacity: 0.5;
  }
  13% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes ring-out {
  from {
    transform: scale(0.45);
    opacity: 1;
  }
  to {
    transform: scale(1.8);
    opacity: 0;
  }
}
@keyframes points-rise {
  0% {
    opacity: 1;
    transform: translateY(3px);
  }
  65% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-16px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .arcade-fx {
    display: none;
  }
}
.result-medal {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 16px;
  margin: 18px 0 12px;
  background: repeating-linear-gradient(
    -45deg,
    #292a42 0 8px,
    #2d2e48 8px 16px
  );
  border: 1px solid #4c4763;
  border-radius: 10px;
}
.result-medal .result-character {
  width: 72px;
  height: 76px;
  object-fit: contain;
  animation: score-arrive 0.36s ease-out both;
}
.result-medal strong {
  display: block;
  margin-top: 8px;
  font:
    20px/1.4 Pixel,
    monospace;
  color: #ffdf58;
}
.result-medal small {
  color: #e7dcff;
}
.result-ledger {
  display: grid;
  gap: 6px;
  margin: 18px 0;
}
.result-ledger div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.result-ledger dd {
  font: bold 15px monospace;
  margin: 0;
}
.result-ledger div:last-child {
  color: #91e4c6;
}
@keyframes score-arrive {
  from {
    transform: translateY(7px) scale(0.88);
    opacity: 0.5;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .result-medal .result-character {
    animation: none;
  }
}
#board .sprite.up {
  transform: rotate(90deg);
}
#board .sprite.down {
  transform: rotate(-90deg);
}
#board .floor.ray-sight {
  box-shadow: inset 0 0 0 2px #92d9e1;
}
.ghost-pace {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 7px 2px;
  color: #e1ccd4;
  font-size: 12px;
}
.ghost-pace[hidden] {
  display: none;
}
.ghost-pace img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.ghost-pace.fleeing {
  color: #aecaff;
}
.ghost-pace.fleeing img {
  content: url("../assets/arcade/power-chase.png");
  object-fit: cover;
  object-position: left center;
}
.ghost-track {
  position: absolute;
  bottom: 1px;
  left: 1px;
  background: #462539;
  color: #ffd7df;
  border: 1px solid #dd9cab;
  border-radius: 3px;
  font:
    700 clamp(9px, 1.05vw, 14px) / 1 system-ui,
    sans-serif;
  padding: 0 2px 1px;
  pointer-events: none;
  z-index: 2;
}
.ghost-track.fleeing {
  background: #202b47;
  border-color: #96b6fc;
  color: #e0ecff;
}
#board .fright-sprite {
  background-position: left center;
  background-size: auto 100%;
  height: 88%;
}
