/* 에임 테스트 전용 스타일. 색은 공통 변수를 쓰고, 과녁 색만 따로 둔다. */
.aim {
  --aim-red: #e5484d;
  --aim-ring: #ffffff;
  --aim-miss: #d8404d;
}

.aim-hud {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.aim-hud li {
  flex: 1;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 4px;
  line-height: 1.35;
}
.aim-hud b {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.aim-board {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--surface-2);
  background-position: center;
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow);
}
@media (max-width: 560px) {
  .aim-board {
    aspect-ratio: 4 / 5;
    max-height: 70vh;
  }
}

.aim-msg {
  position: absolute;
  left: 0;
  right: 0;
  top: 12%;
  margin: 0;
  padding: 0 16px;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
  pointer-events: none;
}

.aim-target {
  --size: 56px;
  position: absolute;
  left: calc(var(--size) / 2 + (100% - var(--size)) * var(--fx, 0.5));
  top: calc(var(--size) / 2 + (100% - var(--size)) * var(--fy, 0.5));
  width: var(--size);
  height: var(--size);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: crosshair;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  /* 점토 과녁 그림(힉스필드, /game/aim-target.webp). 그림이 늦게 오면 아래 줄무늬가 보인다 */
  background:
    url(/game/aim-target.webp) center / 100% 100% no-repeat,
    radial-gradient(
    circle closest-side,
    var(--aim-red) 0 18%,
    var(--aim-ring) 19% 38%,
    var(--aim-red) 39% 60%,
    var(--aim-ring) 61% 80%,
    var(--aim-red) 81% 100%
  );
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  animation: aim-pop 0.08s ease-out;
}
.aim-target:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}
.aim-target.is-start {
  --size: 104px;
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  animation: aim-breathe 1.6s ease-in-out infinite;
}
.aim-target.is-start span {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
}
@keyframes aim-pop {
  from {
    transform: translate(-50%, -50%) scale(0.6);
  }
}
@keyframes aim-breathe {
  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
}

/* 빗나간 자리 표시(X). 잠깐 보였다가 사라진다. */
.aim-miss {
  position: absolute;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: aim-fade 0.7s ease-out forwards;
}
.aim-miss::before,
.aim-miss::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--aim-miss);
  transform: translate(-50%, -50%) rotate(45deg);
}
.aim-miss::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
@keyframes aim-fade {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.3);
  }
}

.aim-opts {
  margin-bottom: 8px;
}
.aim-opts + .aim-opts {
  margin-top: 0;
}

/* 등급표: 숫자 칸이 줄바꿈되지 않게 (이 페이지에서만 읽히는 CSS) */
.table-wrap th,
.table-wrap td {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* 공통 CSS 는 좁은 화면에서 세 칸 표를 쌓아 보이지만, 이 표는 네 칸 숫자 표라 표 모양을 그대로 둔다. */
@media (max-width: 520px) {
  .table-wrap thead {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
  .table-wrap tr {
    display: table-row;
    padding: 0;
  }
  .table-wrap th,
  .table-wrap td,
  .table-wrap td:nth-child(3) {
    padding: 10px 6px;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
    color: inherit;
  }
  .table-wrap tr:last-child td {
    border-bottom: 0;
  }
  .table-wrap th {
    color: var(--muted);
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aim-target,
  .aim-target.is-start,
  .aim-miss {
    animation: none;
  }
}
