/**
 * Visual Phase 2 — battle arena layout.
 */

.battle-page-root {
  position: relative;
  flex: none;
  min-height: 0;
  height: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.battle-arena {
  color: var(--rps-text);
  gap: 0;
}

.battle-arena:has(.battle-match-result:not(.battle-match-result--hidden)) > :not(.battle-match-result) {
  display: none;
}

.battle-arena__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  flex: none;
  gap: 0.65rem;
  padding: 0;
}

.battle-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
  min-width: 0;
}

.battle-player--right {
  align-items: center;
}

.battle-player__portrait {
  position: relative;
  width: clamp(42px, 5.6vh, 52px);
  height: clamp(42px, 5.6vh, 52px);
  flex-shrink: 0;
  overflow: visible;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px rgba(8, 12, 22, 0.94),
    0 0 0 3px rgba(62, 207, 255, 0.26),
    0 0 11px rgba(62, 207, 255, 0.24);
}

.battle-player--right .battle-player__portrait {
  box-shadow:
    0 0 0 2px rgba(8, 12, 22, 0.94),
    0 0 0 3px rgba(168, 85, 247, 0.24),
    0 0 11px rgba(139, 92, 246, 0.2);
}

.battle-player__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  border: 1.5px solid rgba(126, 232, 255, 0.56);
  background:
    radial-gradient(circle at 32% 28%, rgba(126, 232, 255, 0.2), transparent 54%),
    rgba(8, 14, 28, 0.94);
}

.battle-player__avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(232, 249, 255, 0.16);
}

.battle-player--self .battle-player__avatar {
  color: #d7f7ff;
  border-color: rgba(126, 232, 255, 0.58);
}

.battle-player--right .battle-player__avatar {
  color: #efe6ff;
  border-color: rgba(196, 148, 255, 0.52);
  background:
    radial-gradient(circle at 32% 28%, rgba(168, 85, 247, 0.16), transparent 54%),
    rgba(10, 10, 24, 0.94);
}

.battle-player__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  width: 100%;
  max-width: 7.5rem;
  gap: 0.12rem;
}

.battle-player__label {
  display: block;
  width: 100%;
  font-size: 0.5rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(139, 149, 181, 0.82);
  text-align: center;
}

.battle-player__name {
  display: block;
  width: 100%;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.2;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-player__score {
  display: none;
}

.battle-player--right .battle-player__score {
  color: var(--rps-violet);
}

.battle-player__conn {
  position: absolute;
  left: 89%;
  top: 89%;
  width: 8px;
  height: 8px;
  margin: 0;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  flex-shrink: 0;
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
  background: var(--rps-muted);
  border: 1.5px solid #070b14;
  box-shadow: 0 0 0 1px rgba(8, 12, 22, 0.7);
}

.battle-player__conn--on {
  background: #34d399;
  box-shadow:
    0 0 0 1px rgba(8, 12, 22, 0.7),
    0 0 4px rgba(52, 211, 153, 0.4);
}

.battle-arena__stake {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 0.18rem;
  padding: 0.45rem 0 0.1rem;
  margin: 0 0 1.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rps-muted);
}

.battle-arena__info-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.battle-arena__format-value {
  color: #c4b5fd;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.32);
}

.battle-arena__stake-value {
  color: #e7f9ff;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 0 10px rgba(62, 207, 255, 0.28);
}

.battle-score-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  padding: 0.1rem 0.55rem;
  background: transparent;
  border: none;
}

.battle-score-center__vs {
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--rps-muted);
}

.battle-score-center__values {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 900;
  font-size: clamp(1.45rem, 4vh, 1.95rem);
  color: #f3f7ff;
}

.battle-score-center__value--left {
  color: #e8f7ff;
}

.battle-score-center__value--right {
  color: #f0e9ff;
}

.battle-arena__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  flex: none;
  min-height: 2.35rem;
}

.battle-ui-state {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rps-violet);
  font-weight: 700;
  min-height: 1.05em;
  text-align: center;
}

.battle-player__handle {
  font-size: 0.68rem;
  color: var(--rps-muted);
}

.battle-player__handle--empty {
  display: none;
}

.battle-player__avatar .rps-player-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.battle-score-center__sep {
  color: var(--rps-muted);
}

.battle-arena__center {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.2rem 0;
  position: relative;
  overflow: visible;
}

.battle-action-stage {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 100%;
  height: 10.25rem;
  min-height: 10.25rem;
  max-height: 10.25rem;
  overflow: visible;
}

.battle-action-stage > * {
  grid-area: 1 / 1;
}

.battle-arena .battle-hands,
.battle-arena .battle-hands--idle,
.battle-arena .battle-hand-wrap {
  min-height: 0 !important;
  height: 0 !important;
  overflow: hidden;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.battle-round-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rps-muted);
  font-weight: 700;
  min-height: 1em;
}

.battle-timer {
  position: relative;
  display: grid;
  place-items: center;
  width: 5.75rem;
  height: 5.75rem;
  font-size: clamp(1.85rem, 4.8vh, 2.55rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--rps-blue);
  text-shadow: 0 0 16px rgba(62, 207, 255, 0.38);
  line-height: 1;
}

.battle-timer::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(62, 207, 255, 0.3);
  box-shadow:
    0 0 14px rgba(62, 207, 255, 0.16),
    inset 0 0 12px rgba(62, 207, 255, 0.06);
  pointer-events: none;
}

.battle-timer--warning {
  text-shadow: 0 0 20px rgba(62, 207, 255, 0.7), 0 0 8px rgba(62, 207, 255, 0.4);
}

.battle-timer--warning::after {
  border-color: rgba(62, 207, 255, 0.55);
  box-shadow:
    0 0 18px rgba(62, 207, 255, 0.28),
    inset 0 0 14px rgba(62, 207, 255, 0.1);
}

.battle-timer--urgent {
  color: #f59e42;
  text-shadow: 0 0 16px rgba(245, 158, 66, 0.5);
}

.battle-timer--urgent::after {
  border-color: rgba(245, 158, 66, 0.5);
  box-shadow:
    0 0 16px rgba(245, 158, 66, 0.22),
    inset 0 0 12px rgba(245, 158, 66, 0.08);
}

.battle-timer.battle-timer--hidden {
  display: none;
}

.battle-timer.battle-timer--hidden::after {
  content: none;
  display: none;
}

.battle-countdown {
  position: relative;
  display: grid;
  place-items: center;
  width: 5.75rem;
  height: 5.75rem;
  font-size: clamp(1.85rem, 4.8vh, 2.55rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #f4fbff;
  text-shadow:
    0 0 16px rgba(62, 207, 255, 0.45),
    0 0 28px rgba(168, 85, 247, 0.22);
  line-height: 1;
  text-align: center;
}

.battle-countdown::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(62, 207, 255, 0.3);
  pointer-events: none;
}

.battle-countdown--pulse {
  animation: battle-countdown-pulse 0.42s ease-out;
}

@keyframes battle-countdown-pulse {
  0% { transform: scale(0.86); opacity: 0.55; }
  55% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.battle-countdown--hidden {
  display: none;
}

.battle-countdown.battle-countdown--hidden::after {
  content: none;
  display: none;
}

.battle-arena:has(.battle-afk:not([hidden])) .battle-action-stage {
  display: none;
}

.battle-status {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rps-muted);
  text-align: center;
  min-height: 1.85rem;
}

.battle-status:empty {
  display: block;
  min-height: 1.85rem;
  visibility: hidden;
}

.battle-status--reveal {
  font-size: clamp(0.82rem, 2.4vw, 1.2rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  color: #dbeafe;
  max-width: 100%;
  padding: 0 0.75rem;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-shadow: 0 0 12px rgba(62, 207, 255, 0.35);
}

.battle-status--outcome {
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
  max-width: 100%;
  padding: 0 0.75rem;
  text-shadow: 0 0 16px rgba(62, 207, 255, 0.28);
  animation: battle-reveal-outcome 0.32s ease-out var(--reveal-result-delay-ms, 320ms) both;
}

.battle-status--outcome-win {
  color: #8ef0d8;
  text-shadow: 0 0 14px rgba(62, 207, 255, 0.34);
}

.battle-status--outcome-lose {
  color: #ff9b6a;
  text-shadow: 0 0 14px rgba(245, 158, 66, 0.3);
}

.battle-status--outcome-draw {
  color: #eef6ff;
  text-shadow: 0 0 10px rgba(62, 207, 255, 0.16);
}

.battle-round-result {
  --reveal-clash-x: clamp(28px, 7vw, 76px);
  text-align: center;
  width: 100%;
  max-width: 36rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  color: #f4fbff;
  overflow: visible;
}

.battle-round-result__duel {
  display: grid;
  grid-template-columns: 1fr minmax(3.4rem, 4.6rem) 1fr;
  align-items: start;
  column-gap: clamp(0.85rem, 3.2vw, 1.85rem);
  width: 100%;
  margin: 0;
  overflow: visible;
}

.battle-round-result__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  overflow: visible;
}

.battle-round-result__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.85rem;
  height: 4.85rem;
}

.battle-round-result__mark > * {
  grid-area: 1 / 1;
}

.battle-round-result__silhouette {
  width: 4.1rem;
  height: 4.1rem;
  border-radius: 50%;
  border: 2px solid rgba(126, 232, 255, 0.58);
  background: radial-gradient(circle, rgba(62, 207, 255, 0.22), rgba(139, 92, 246, 0.12) 62%, transparent 74%);
  box-shadow:
    0 0 16px rgba(62, 207, 255, 0.34),
    inset 0 0 12px rgba(168, 85, 247, 0.22);
  opacity: 0;
  pointer-events: none;
}

.battle-round-result__glyph {
  width: 4.85rem;
  height: 4.85rem;
  display: grid;
  place-items: center;
  font-size: 3.95rem;
  line-height: 1;
  opacity: 1;
  transform: scale(1);
  filter: drop-shadow(0 0 10px rgba(62, 207, 255, 0.18));
}

.battle-round-result__move {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e8f4ff;
  opacity: 1;
}

.battle-round-result--charge .battle-round-result__silhouette {
  opacity: 0.82;
  animation:
    battle-reveal-charge-pulse var(--reveal-charge-ms, 500ms) ease-in-out 1,
    battle-reveal-fade-out 160ms ease-out var(--reveal-charge-ms, 500ms) forwards;
}

.battle-round-result--charge .battle-round-result__glyph {
  opacity: 0;
  transform: scale(0.85);
  animation: battle-reveal-unveil var(--reveal-unveil-ms, 250ms) ease-out var(--reveal-charge-ms, 500ms) forwards;
}

.battle-round-result--charge .battle-round-result__move {
  opacity: 0;
  animation: battle-reveal-outcome-fade var(--reveal-unveil-ms, 250ms) ease-out var(--reveal-charge-ms, 500ms) forwards;
}

.battle-round-result--charge .battle-round-result__vs {
  animation: battle-reveal-vs-charge var(--reveal-charge-ms, 500ms) ease-in-out 1;
}

.battle-round-result--impact .battle-round-result__side--self {
  animation: battle-reveal-clash-self var(--reveal-impact-ms, 900ms) linear;
}

.battle-round-result--impact .battle-round-result__side--opp {
  animation: battle-reveal-clash-opp var(--reveal-impact-ms, 900ms) linear;
}

.battle-round-result__vs {
  position: relative;
  margin-top: 1.85rem;
  font-size: 1.08rem;
  letter-spacing: 0.2em;
  font-weight: 800;
  color: #d7f6ff;
  text-shadow: 0 0 14px rgba(62, 207, 255, 0.42);
  background: none;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.battle-round-result--impact .battle-round-result__vs {
  animation: battle-reveal-vs-hit var(--reveal-hit-ms, 280ms) ease-out var(--reveal-hit-delay-ms, 400ms) both;
}

.battle-round-result__vs::before,
.battle-round-result__vs::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
  opacity: 0;
}

.battle-round-result--impact .battle-round-result__vs::before {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.98);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.72), rgba(126, 232, 255, 0.28) 42%, transparent 70%);
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.9), 0 0 22px rgba(126, 232, 255, 0.95);
  animation: battle-reveal-vs-ring var(--reveal-hit-ms, 280ms) ease-out var(--reveal-hit-delay-ms, 400ms) both;
}

.battle-round-result--impact .battle-round-result__vs::after {
  width: 9.4rem;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), rgba(126, 232, 255, 0.98), transparent);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.9), 0 0 18px rgba(126, 232, 255, 0.95);
  animation: battle-reveal-vs-line var(--reveal-hit-ms, 280ms) ease-out var(--reveal-hit-delay-ms, 400ms) both;
}

.battle-round-result--hidden {
  display: none;
}

.battle-round-result__title {
  margin: 0;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: battle-reveal-outcome 0.32s ease-out var(--reveal-result-delay-ms, 320ms) both;
}

.battle-round-result--win .battle-round-result__title {
  color: #8ef0d8;
  text-shadow: 0 0 14px rgba(62, 207, 255, 0.34);
}

.battle-round-result--lose .battle-round-result__title {
  color: #ff9b6a;
  text-shadow: 0 0 14px rgba(245, 158, 66, 0.3);
}

.battle-round-result--draw .battle-round-result__title {
  color: #eef6ff;
  text-shadow: 0 0 10px rgba(62, 207, 255, 0.16);
}

.battle-round-result--settled .battle-round-result__side--winner .battle-round-result__mark {
  animation: battle-reveal-winner-mark var(--reveal-winner-ms, 300ms) ease var(--reveal-winner-delay-ms, 180ms) both;
}

.battle-round-result--settled .battle-round-result__side--winner .battle-round-result__glyph {
  animation: battle-reveal-winner-glyph var(--reveal-winner-ms, 300ms) ease var(--reveal-winner-delay-ms, 180ms) both;
}

.battle-round-result--settled .battle-round-result__side--loser {
  animation: battle-reveal-loser var(--reveal-winner-ms, 300ms) ease var(--reveal-winner-delay-ms, 180ms) both;
}

.battle-round-result--settled .battle-round-result__side--loser .battle-round-result__mark {
  animation: battle-reveal-loser-mark var(--reveal-winner-ms, 300ms) ease var(--reveal-winner-delay-ms, 180ms) both;
}

@keyframes battle-reveal-charge-pulse {
  0% { opacity: 0.55; filter: brightness(1); transform: scale(1); }
  50% { opacity: 0.92; filter: brightness(1.22); transform: scale(1.04); }
  100% { opacity: 0.78; filter: brightness(1.08); transform: scale(1); }
}

@keyframes battle-reveal-fade-out {
  from { opacity: 0.78; }
  to { opacity: 0; }
}

@keyframes battle-reveal-unveil {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes battle-reveal-outcome-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes battle-reveal-vs-charge {
  0% { color: var(--rps-muted); text-shadow: none; }
  50% { color: #d7f6ff; text-shadow: 0 0 12px rgba(62, 207, 255, 0.55); }
  100% { color: #c9e9ff; text-shadow: 0 0 10px rgba(62, 207, 255, 0.28); }
}

@keyframes battle-reveal-clash-self {
  0% { transform: translateX(0); }
  11% { transform: translateX(calc(var(--reveal-clash-x) * 0.07)); }
  22% { transform: translateX(calc(var(--reveal-clash-x) * 0.22)); }
  33% { transform: translateX(calc(var(--reveal-clash-x) * 0.5)); }
  44% { transform: translateX(var(--reveal-clash-x)); }
  56% { transform: translateX(var(--reveal-clash-x)); }
  78% { transform: translateX(calc(var(--reveal-clash-x) * -0.12)); }
  91% { transform: translateX(calc(var(--reveal-clash-x) * 0.05)); }
  100% { transform: translateX(0); }
}

@keyframes battle-reveal-clash-opp {
  0% { transform: translateX(0); }
  11% { transform: translateX(calc(var(--reveal-clash-x) * -0.07)); }
  22% { transform: translateX(calc(var(--reveal-clash-x) * -0.22)); }
  33% { transform: translateX(calc(var(--reveal-clash-x) * -0.5)); }
  44% { transform: translateX(calc(var(--reveal-clash-x) * -1)); }
  56% { transform: translateX(calc(var(--reveal-clash-x) * -1)); }
  78% { transform: translateX(calc(var(--reveal-clash-x) * 0.12)); }
  91% { transform: translateX(calc(var(--reveal-clash-x) * -0.05)); }
  100% { transform: translateX(0); }
}

@keyframes battle-reveal-vs-hit {
  0% { transform: scale(1); filter: brightness(1); }
  32% { transform: scale(1.28); filter: brightness(2.25); color: #ffffff; text-shadow: 0 0 26px rgba(255, 255, 255, 0.95), 0 0 18px rgba(126, 232, 255, 1); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes battle-reveal-vs-ring {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.28); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(3.5); }
}

@keyframes battle-reveal-vs-line {
  0% { opacity: 0; transform: translate(-50%, -50%) scaleX(0.18); }
  28% { opacity: 1; transform: translate(-50%, -50%) scaleX(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scaleX(1.2); }
}

@keyframes battle-reveal-outcome {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes battle-reveal-winner-mark {
  from { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
  to { transform: scale(1.08); filter: drop-shadow(0 0 14px rgba(126, 232, 255, 0.7)); }
}

@keyframes battle-reveal-winner-glyph {
  from { filter: drop-shadow(0 0 10px rgba(62, 207, 255, 0.18)); }
  to { filter: drop-shadow(0 0 16px rgba(126, 232, 255, 0.55)); }
}

@keyframes battle-reveal-loser {
  from { opacity: 1; filter: brightness(1); }
  to { opacity: 0.62; filter: brightness(0.82); }
}

@keyframes battle-reveal-loser-mark {
  from { transform: scale(1); }
  to { transform: scale(0.96); }
}

/* ── Reveal V4.6 WOW prototype: contact / cut / large paper defeat ── */
.battle-round-result--wow {
  --wow-clash-x: 16.55rem;
  --wow-clash-y: 0px;
  /* Shared winner halo (scissors-proven cyan — no white blowout). */
  --wow-winner-mark-glow: drop-shadow(0 0 14px rgba(126, 232, 255, 0.7));
  --wow-winner-glyph-glow: drop-shadow(0 0 16px rgba(126, 232, 255, 0.55));
  --wow-winner-ring-border: 1px solid rgba(186, 242, 255, 0.55);
  --wow-winner-ring-shadow: 0 0 6px rgba(126, 232, 255, 0.32);
  --wow-dir: 1;
  --wow-tilt: 30deg;
  --wow-blade-tx: 8px;
  --wow-blade-ty: 2px;
  /* Post-contact cut flourish on glyph action layer (defaults = legacy vertical). */
  --wow-blade-cut-rot: 32deg;
  --wow-blade-cut-tx: 5px;
  --wow-blade-cut-ty: 7px;
  --wow-blade-mid-rot: 26deg;
  --wow-blade-mid-tx: 3px;
  --wow-blade-mid-ty: 3px;
  --wow-blade-end-rot: 18deg;
  --wow-origin: 42% 92%;
  --wow-fight-scale: 1.1;
  --wow-cutline-top: 54%;
  position: relative;
  overflow: visible;
}

.battle-wow-duel--ltr {
  --wow-dir: 1;
  --wow-origin: 42% 92%;
}

.battle-wow-duel--rtl {
  --wow-dir: -1;
  --wow-origin: 58% 92%;
}

/*
 * Horizontal SCISSORS (accepted DEV orient): retune tip → cut contact only.
 * Old 30° wrist-tilt lifted LTR tips ~23px up and RTL ~24px down.
 * Reach via clash-x; keep attack on the shared battle-zone horizontal axis.
 */
.dev-reveal-preview .battle-round-result--wow:not(.battle-round-result--rock):not(.battle-round-result--paper)
  .battle-wow-duel--ltr {
  /* Tip must enter PAPER ink (17.4rem still left a visible gap to paper). */
  --wow-clash-x: 18.5rem;
  --wow-clash-y: 0px;
  --wow-tilt: 0deg;
  --wow-blade-tx: 0px;
  --wow-blade-ty: 0px;
  /* Contact→CUT: no wrist swing / Y drop — micro cut action only. */
  --wow-blade-cut-rot: 6deg;
  --wow-blade-cut-tx: 2px;
  --wow-blade-cut-ty: 1px;
  --wow-blade-mid-rot: 4deg;
  --wow-blade-mid-tx: 1px;
  --wow-blade-mid-ty: 1px;
  --wow-blade-end-rot: 2deg;
  --wow-origin: 18% 50%;
  --wow-cutline-top: 52%;
}

.dev-reveal-preview .battle-round-result--wow:not(.battle-round-result--rock):not(.battle-round-result--paper)
  .battle-wow-duel--rtl {
  /* Separate X — paper ink pad differs on the right edge. */
  --wow-clash-x: 18.15rem;
  --wow-clash-y: 0px;
  --wow-tilt: 0deg;
  --wow-blade-tx: 0px;
  --wow-blade-ty: 0px;
  --wow-blade-cut-rot: 6deg;
  --wow-blade-cut-tx: 2px;
  --wow-blade-cut-ty: 1px;
  --wow-blade-mid-rot: 4deg;
  --wow-blade-mid-tx: 1px;
  --wow-blade-mid-ty: 1px;
  --wow-blade-end-rot: 2deg;
  --wow-origin: 82% 50%;
  --wow-cutline-top: 52%;
}


/*
 * LIVE SCISSORS > PAPER: promote the already accepted DEV contact geometry.
 * This removes the visible air-gap before the cut without touching ROCK/PAPER scenes.
 */
.battle-round-result--wow:not(.battle-round-result--rock):not(.battle-round-result--paper):not(.battle-round-result--draw-clash)
  .battle-wow-duel--ltr {
  --wow-clash-x: 18.5rem;
  --wow-clash-y: 0px;
  --wow-tilt: 0deg;
  --wow-blade-tx: 0px;
  --wow-blade-ty: 0px;
  --wow-blade-cut-rot: 6deg;
  --wow-blade-cut-tx: 2px;
  --wow-blade-cut-ty: 1px;
  --wow-blade-mid-rot: 4deg;
  --wow-blade-mid-tx: 1px;
  --wow-blade-mid-ty: 1px;
  --wow-blade-end-rot: 2deg;
  --wow-origin: 18% 50%;
  --wow-cutline-top: 52%;
}

.battle-round-result--wow:not(.battle-round-result--rock):not(.battle-round-result--paper):not(.battle-round-result--draw-clash)
  .battle-wow-duel--rtl {
  --wow-clash-x: 18.15rem;
  --wow-clash-y: 0px;
  --wow-tilt: 0deg;
  --wow-blade-tx: 0px;
  --wow-blade-ty: 0px;
  --wow-blade-cut-rot: 6deg;
  --wow-blade-cut-tx: 2px;
  --wow-blade-cut-ty: 1px;
  --wow-blade-mid-rot: 4deg;
  --wow-blade-mid-tx: 1px;
  --wow-blade-mid-ty: 1px;
  --wow-blade-end-rot: 2deg;
  --wow-origin: 82% 50%;
  --wow-cutline-top: 52%;
}

.battle-countdown--wow {
  z-index: 4;
  width: 6.4rem;
  height: 6.4rem;
  font-size: clamp(2.4rem, 7vh, 3.5rem);
  color: #f7ffff;
  text-shadow:
    0 0 18px rgba(126, 232, 255, 0.7),
    0 0 32px rgba(168, 85, 247, 0.35);
}

.battle-countdown--wow.battle-countdown--pulse {
  animation: battle-wow-count var(--wow-count-ms, 330ms) ease-out 1 both;
}

.battle-countdown--wow::after {
  border-color: rgba(126, 232, 255, 0.55);
  box-shadow: 0 0 18px rgba(62, 207, 255, 0.28);
}

.battle-wow-flash {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.82), rgba(126, 232, 255, 0.28) 42%, transparent 70%);
  z-index: 3;
}

.battle-round-result--wow.battle-round-result--charge .battle-wow-flash {
  animation: battle-wow-unveil-flash var(--wow-unveil-ms, 250ms) ease-out 1 both;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-flash {
  animation: none;
  opacity: 0;
  display: none;
}

.battle-round-result--wow.battle-round-result--charge .battle-round-result__silhouette {
  opacity: 0;
  animation: none;
}

.battle-round-result--wow.battle-round-result--charge .battle-round-result__glyph {
  opacity: 0;
  transform: scale(0.86);
  animation: battle-wow-unveil var(--wow-unveil-ms, 250ms) ease-out 80ms both;
}

.battle-round-result--wow.battle-round-result--charge .battle-round-result__move {
  opacity: 0;
  animation: battle-wow-unveil-fade var(--wow-unveil-ms, 250ms) ease-out 80ms both;
}

.battle-round-result--wow.battle-round-result--charge .battle-round-result__vs {
  animation: battle-wow-vs-idle var(--wow-reveal-ms, 1100ms) linear 1 both;
}

.battle-round-result--wow.battle-round-result--charge .battle-round-result__mark::after {
  content: '';
  position: absolute;
  inset: -0.35rem;
  border-radius: 50%;
  border: 1.5px solid rgba(126, 232, 255, 0.0);
  box-shadow: 0 0 0 rgba(126, 232, 255, 0);
  pointer-events: none;
  animation: battle-wow-precharge var(--wow-charge-ms, 300ms) ease-out var(--wow-charge-delay-ms, 800ms) 1 both;
}

.battle-round-result--wow.battle-round-result--impact .battle-round-result__side--self,
.battle-round-result--wow.battle-round-result--impact .battle-round-result__side--opp {
  z-index: 2;
  animation: none;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-attacker {
  z-index: 5;
  /* Whole side stays put so «НОЖИЦІ» never rides with the attack. */
  transform: none;
  animation: none;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-attacker .battle-round-result__mark {
  z-index: 5;
  transform-origin: 50% 38%;
  animation: battle-wow-clash-self var(--wow-impact-ms, 2750ms) linear 1 both;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-attacker .battle-round-result__move {
  transform: none;
  animation: none;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-attacker .battle-round-result__mark::after {
  content: '';
  position: absolute;
  inset: -0.28rem;
  border-radius: 50%;
  border: 1px solid rgba(186, 242, 255, 0.0);
  pointer-events: none;
  opacity: 0;
  animation: battle-wow-winner-ring var(--wow-winner-ms, 450ms) ease-out var(--wow-winner-delay-ms, 2190ms) 1 both;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-paper-side .battle-round-result__mark {
  transform: scale(var(--wow-fight-scale, 1.1));
  transform-origin: center;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-attacker .battle-round-result__glyph {
  transform-origin: var(--wow-origin, 42% 92%);
  animation: battle-wow-blade var(--wow-impact-ms, 2750ms) linear 1 both;
}

.battle-wow-duel--rtl .battle-round-result--wow.battle-round-result--impact .battle-wow-attacker .battle-round-result__glyph,
.battle-round-result--wow.battle-round-result--impact .battle-wow-duel--rtl .battle-wow-attacker .battle-round-result__glyph {
  transform-origin: var(--wow-origin, 58% 92%);
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-duel {
  animation: battle-wow-shake var(--wow-shake-ms, 140ms) ease-out var(--wow-contact-delay-ms, 450ms) 1 both;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-vs {
  animation: battle-wow-vs-fade 160ms ease-out var(--wow-contact-delay-ms, 450ms) 1 forwards;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-vs::before,
.battle-round-result--wow.battle-round-result--impact .battle-wow-vs::after {
  display: none;
  animation: none;
}

.battle-wow-paper-side .battle-round-result__mark {
  overflow: visible;
}

.battle-wow-contact {
  position: absolute;
  left: 22%;
  top: 52%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.2) 46%, transparent 72%);
}

.battle-wow-duel--rtl .battle-wow-contact {
  left: auto;
  right: 22%;
  margin: -20px -20px 0 0;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-contact {
  animation: battle-wow-contact var(--wow-contact-ms, 110ms) ease-out var(--wow-contact-delay-ms, 450ms) 1 both;
}

.battle-wow-cutline {
  position: absolute;
  left: 10%;
  top: var(--wow-cutline-top, 54%);
  width: 80%;
  height: 3.8px;
  max-width: 80%;
  margin-top: -1.9px;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transform: rotate(-11deg);
  transform-origin: center;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.95) 18%,
    rgba(126, 232, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.9) 82%,
    transparent 100%
  );
}

.battle-wow-duel--rtl .battle-wow-cutline {
  transform: rotate(11deg);
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-cutline {
  animation-name: battle-wow-cutline;
  animation-duration: var(--wow-cutline-ms, 180ms);
  animation-timing-function: ease-out;
  animation-delay: var(--wow-cutline-delay-ms, 830ms);
  animation-iteration-count: 1;
  animation-fill-mode: both;
}

.battle-wow-halves {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 3;
}

.battle-wow-half {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3.95rem;
  line-height: 1;
  transform-origin: center;
  filter: none;
}

.battle-wow-half--top {
  clip-path: polygon(0 0, 100% 0, 100% 52%, 0 58%);
}

.battle-wow-half--bottom {
  clip-path: polygon(0 58%, 100% 52%, 100% 100%, 0 100%);
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-paper-side .battle-round-result__move {
  animation: battle-wow-vs-fade 160ms ease-out var(--wow-contact-delay-ms, 450ms) 1 forwards;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-paper-side .battle-round-result__glyph {
  animation: battle-wow-paper-hide 80ms linear var(--wow-split-delay-ms, 1110ms) 1 both;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-halves {
  animation: battle-wow-halves-on 80ms linear var(--wow-split-delay-ms, 1110ms) 1 both;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-half--top {
  animation: battle-wow-half-top var(--wow-split-ms, 1260ms) ease-out var(--wow-split-delay-ms, 1110ms) 1 both;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-half--bottom {
  animation: battle-wow-half-bottom var(--wow-split-ms, 1260ms) ease-out var(--wow-split-delay-ms, 1110ms) 1 both;
}

.battle-wow-scraps {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 4;
}

.battle-wow-scrap {
  position: absolute;
  width: 8px;
  height: 5px;
  margin: -2px 0 0 -4px;
  border-radius: 1px;
  opacity: 0;
  background: #e8f2ff;
  box-shadow: none;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-scrap {
  /* forwards (not both): backwards fill was painting 0%{opacity:1} during the whole
     approach delay, showing white pre-cut chips on intact PAPER. */
  animation: battle-wow-scrap var(--wow-scrap-ms, 900ms) ease-out var(--wow-split-delay-ms, 1110ms) 1 forwards;
}

.battle-wow-scrap--1 { --dx: 16px; --dy: 78px; --rot: -14deg; width: 6px; height: 4px; }
.battle-wow-scrap--2 { --dx: -10px; --dy: 92px; --rot: 12deg; width: 7px; height: 4px; }
.battle-wow-scrap--3 { --dx: 6px; --dy: 104px; --rot: 18deg; width: 5px; height: 3px; }

.battle-wow-sparks {
  position: absolute;
  left: 28%;
  top: 52%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 6;
}

.battle-wow-duel--rtl .battle-wow-sparks {
  left: auto;
  right: 28%;
}

.battle-wow-spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.55);
  opacity: 0;
}

.battle-round-result--wow.battle-round-result--impact .battle-wow-spark {
  /* forwards (not both): backwards fill showed white sparks at the future cut
     from impact start until contact delay. */
  animation: battle-wow-spark var(--wow-spark-ms, 180ms) ease-out var(--wow-contact-delay-ms, 450ms) 1 forwards;
}

.battle-wow-spark--1 { --dx: 10px; --dy: -8px; }
.battle-wow-spark--2 { --dx: 12px; --dy: 6px; }
.battle-wow-spark--3 { --dx: 8px; --dy: 10px; }
.battle-wow-spark--4 { --dx: 14px; --dy: -3px; }
.battle-wow-spark--5 { --dx: 6px; --dy: 4px; }
.battle-wow-spark--6 { --dx: 9px; --dy: -11px; }

.battle-wow-gold {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
}

.battle-wow-gold-spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  opacity: 0;
  background: #f4e2a6;
  box-shadow: 0 0 3px rgba(232, 196, 92, 0.55);
}

.battle-wow-gold-spark--1 { left: 62%; top: 24%; --gdx: 8px; --gdy: -10px; }
.battle-wow-gold-spark--2 { left: 38%; top: 30%; --gdx: -7px; --gdy: -8px; }
.battle-wow-gold-spark--3 { left: 54%; top: 58%; --gdx: 6px; --gdy: 7px; }

.battle-round-result--wow.battle-round-result--impact .battle-wow-gold-spark {
  animation: battle-wow-gold-spark 280ms ease-out var(--wow-winner-delay-ms, 2190ms) 1 both;
}

.battle-wow-glints {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
}

.battle-wow-glint {
  position: absolute;
  width: 7px;
  height: 2px;
  border-radius: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), rgba(126, 232, 255, 0.7), transparent);
}

.battle-wow-glint--1 { left: 58%; top: 28%; }

.battle-wow-caption {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(201, 233, 255, 0.78);
  opacity: 0;
}

.battle-round-result--wow.battle-round-result--settled .battle-wow-caption {
  animation: battle-wow-caption 0.4s ease-out var(--reveal-result-delay-ms, 240ms) both;
}

.battle-round-result--wow.battle-round-result--settled .battle-round-result__side--self:not(.battle-wow-attacker),
.battle-round-result--wow.battle-round-result--settled .battle-round-result__side--opp:not(.battle-wow-attacker) {
  transform: none;
  filter: none;
}

.battle-round-result--wow.battle-round-result--settled .battle-wow-attacker {
  transform: none;
  filter: none;
  animation: none;
}

.battle-round-result--wow.battle-round-result--settled .battle-wow-attacker .battle-round-result__mark {
  transform: scale(1.04);
  transform-origin: 50% 38%;
  filter: var(--wow-winner-mark-glow);
}

.battle-round-result--wow.battle-round-result--settled .battle-wow-attacker .battle-round-result__move {
  transform: none;
  animation: none;
}

.battle-round-result--wow.battle-round-result--settled .battle-wow-attacker .battle-round-result__mark::after {
  content: '';
  position: absolute;
  inset: -0.28rem;
  border-radius: 50%;
  border: var(--wow-winner-ring-border);
  box-shadow: var(--wow-winner-ring-shadow);
  pointer-events: none;
  opacity: 0.5;
  animation: battle-wow-winner-ring 450ms ease-out 1 both;
}

.battle-round-result--wow.battle-round-result--settled .battle-wow-attacker .battle-round-result__glyph {
  filter: var(--wow-winner-glyph-glow);
}

.battle-round-result--wow.battle-round-result--settled .battle-wow-glint {
  animation: battle-wow-glint 480ms ease-out 1 both;
}

.battle-round-result--wow.battle-round-result--settled .battle-wow-gold-spark {
  animation: battle-wow-gold-spark 320ms ease-out 40ms 1 both;
}

.battle-round-result--wow.battle-round-result--settled .battle-wow-paper-side {
  opacity: 1;
  visibility: visible;
  animation: none;
}

.battle-round-result--wow.battle-round-result--settled .battle-wow-paper-side .battle-round-result__glyph,
.battle-round-result--wow.battle-round-result--settled .battle-wow-paper-side .battle-round-result__move {
  opacity: 0;
}

.battle-round-result--wow.battle-round-result--settled .battle-wow-halves {
  opacity: 1;
  visibility: visible;
  animation: none;
}

.battle-round-result--wow.battle-round-result--settled .battle-wow-half--top {
  transform: translate(calc(var(--wow-dir) * 24px), 86px) rotate(calc(var(--wow-dir) * 30deg)) scale(1);
  opacity: 0.46;
  animation: none;
  filter: grayscale(0.2) brightness(0.9);
}

.battle-round-result--wow.battle-round-result--settled .battle-wow-half--bottom {
  transform: translate(calc(var(--wow-dir) * -14px), 108px) rotate(calc(var(--wow-dir) * -22deg)) scale(1);
  opacity: 0.4;
  animation: none;
  filter: grayscale(0.2) brightness(0.9);
}

.battle-round-result--wow.battle-round-result--settled .battle-wow-scraps,
.battle-round-result--wow.battle-round-result--settled .battle-wow-sparks,
.battle-round-result--wow.battle-round-result--settled .battle-wow-flash,
.battle-round-result--wow.battle-round-result--settled .battle-wow-contact,
.battle-round-result--wow.battle-round-result--settled .battle-wow-cutline {
  opacity: 0;
  animation: none;
}

.battle-status--wow.battle-status--outcome {
  animation: battle-wow-victory 0.42s ease-out var(--reveal-result-delay-ms, 240ms) both;
}

/* ── Reveal ROCK > SCISSORS crush (does not alter scissors>paper cut) ── */
.battle-round-result--wow.battle-round-result--rock {
  --rock-clash-x: 20.2rem;
}

.battle-round-result--wow.battle-round-result--rock .battle-wow-duel--rtl {
  --rock-clash-x: 20.4rem;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-attacker .battle-round-result__mark {
  z-index: 5;
  transform-origin: 50% 55%;
  animation: battle-rock-clash-self var(--wow-impact-ms, 2550ms) linear 1 both;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-attacker .battle-round-result__move {
  transform: none;
  animation: none;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-attacker .battle-round-result__glyph {
  animation: battle-rock-heavy var(--wow-impact-ms, 2550ms) linear 1 both;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-duel {
  animation: battle-rock-shake 160ms ease-out var(--rock-break-delay-ms, 1020ms) 1 both;
}

.battle-rock-contact {
  position: absolute;
  left: 24%;
  top: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.65) 0%, rgba(200, 210, 220, 0.22) 48%, transparent 72%);
}

.battle-wow-duel--rtl .battle-rock-contact {
  left: auto;
  right: 24%;
  margin: -18px -18px 0 0;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-contact {
  animation: battle-rock-contact var(--rock-contact-ms, 120ms) ease-out var(--wow-contact-delay-ms, 800ms) 1 both;
}

.battle-rock-hitflash {
  position: absolute;
  left: 28%;
  top: 48%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(180, 190, 200, 0.35) 40%, transparent 70%);
}

.battle-wow-duel--rtl .battle-rock-hitflash {
  left: auto;
  right: 28%;
  margin: -26px -26px 0 0;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-hitflash {
  animation: battle-rock-hitflash var(--rock-hit-ms, 140ms) ease-out var(--rock-break-delay-ms, 1020ms) 1 both;
}

.battle-rock-halves {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 3;
}

.battle-rock-half {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3.95rem;
  line-height: 1;
  transform-origin: center;
  filter: grayscale(0.15) brightness(0.95);
}


/* Premium broken-scissors fragments: keep the exact RPS Arena art while clipping
 * each falling half. No legacy Unicode/Twemoji fallback is allowed here. */
.battle-rock-half__premium {
  width: 4.85rem;
  height: 4.85rem;
  object-fit: contain;
}
.battle-rock-half--a {
  clip-path: polygon(0 0, 54% 0, 46% 100%, 0 100%);
}

.battle-rock-half--b {
  clip-path: polygon(46% 0, 100% 0, 100% 100%, 54% 100%);
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-wow-scissors-side .battle-round-result__move {
  animation: battle-wow-vs-fade 160ms ease-out var(--wow-contact-delay-ms, 800ms) 1 forwards;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-wow-scissors-side .battle-round-result__glyph {
  animation: battle-wow-paper-hide 70ms linear var(--rock-break-delay-ms, 1020ms) 1 both;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-halves {
  animation: battle-wow-halves-on 70ms linear var(--rock-break-delay-ms, 1020ms) 1 both;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-half--a {
  animation: battle-rock-half-a var(--rock-fall-ms, 850ms) ease-out var(--rock-fall-delay-ms, 1080ms) 1 both;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-half--b {
  animation: battle-rock-half-b var(--rock-fall-ms, 850ms) ease-out var(--rock-fall-delay-ms, 1080ms) 1 both;
}

.battle-rock-sparks {
  position: absolute;
  left: 30%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 6;
}

.battle-wow-duel--rtl .battle-rock-sparks {
  left: auto;
  right: 30%;
}

.battle-rock-spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #dfe7ef;
  box-shadow: 0 0 3px rgba(220, 230, 240, 0.7);
  opacity: 0;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-spark {
  animation: battle-rock-spark 200ms ease-out var(--rock-break-delay-ms, 1020ms) 1 both;
}

.battle-rock-spark--1 { --dx: 9px; --dy: -7px; }
.battle-rock-spark--2 { --dx: 11px; --dy: 5px; }
.battle-rock-spark--3 { --dx: 7px; --dy: 9px; }
.battle-rock-spark--4 { --dx: 12px; --dy: -2px; }
.battle-rock-spark--5 { --dx: 6px; --dy: 3px; }

.battle-round-result--wow.battle-round-result--rock.battle-round-result--settled .battle-rock-attacker {
  transform: none;
  filter: none;
  animation: none;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--settled .battle-rock-attacker .battle-round-result__mark {
  transform: scale(1.04);
  transform-origin: 50% 55%;
  filter: var(--wow-winner-mark-glow);
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--settled .battle-rock-attacker .battle-round-result__move {
  transform: none;
  animation: none;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--settled .battle-wow-scissors-side {
  opacity: 1;
  visibility: visible;
  animation: none;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--settled .battle-wow-scissors-side .battle-round-result__glyph,
.battle-round-result--wow.battle-round-result--rock.battle-round-result--settled .battle-wow-scissors-side .battle-round-result__move {
  opacity: 0;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--settled .battle-rock-halves {
  opacity: 1;
  visibility: visible;
  animation: none;
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--settled .battle-rock-half--a {
  transform: translate(-18px, 92px) rotate(-28deg) scale(1);
  opacity: 0.44;
  animation: none;
  filter: grayscale(0.25) brightness(0.88);
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--settled .battle-rock-half--b {
  transform: translate(20px, 104px) rotate(24deg) scale(1);
  opacity: 0.4;
  animation: none;
  filter: grayscale(0.25) brightness(0.88);
}

.battle-round-result--wow.battle-round-result--rock.battle-round-result--settled .battle-rock-contact,
.battle-round-result--wow.battle-round-result--rock.battle-round-result--settled .battle-rock-hitflash,
.battle-round-result--wow.battle-round-result--rock.battle-round-result--settled .battle-rock-sparks {
  opacity: 0;
  animation: none;
}

@keyframes battle-rock-clash-self {
  0% { transform: translateX(0) scale(1.06); }
  18% { transform: translateX(calc(var(--wow-dir) * var(--rock-clash-x) * 0.55)) scale(1.08); }
  31.4% { transform: translateX(calc(var(--wow-dir) * var(--rock-clash-x))) scale(1.12); }
  40% { transform: translateX(calc(var(--wow-dir) * var(--rock-clash-x))) scale(1.12); }
  48.6% { transform: translateX(calc(var(--wow-dir) * var(--rock-clash-x))) scale(1.1); }
  75.3% { transform: translateX(0) scale(1.04); }
  100% {
    transform: translateX(0) scale(1.04);
    filter: drop-shadow(0 0 14px rgba(126, 232, 255, 0.7));
  }
}

@keyframes battle-rock-heavy {
  0%, 38% { transform: translateY(0) scale(1); }
  42% { transform: translateY(2px) scale(1.04); }
  50% { transform: translateY(0) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes battle-rock-shake {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(calc(var(--wow-dir) * -4px)); }
  62% { transform: translateX(calc(var(--wow-dir) * 3px)); }
  84% { transform: translateX(calc(var(--wow-dir) * -2px)); }
}

@keyframes battle-rock-contact {
  0% { opacity: 0; transform: scale(0.7); }
  40% { opacity: 0.75; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}

@keyframes battle-rock-hitflash {
  0% { opacity: 0; transform: scale(0.6); }
  35% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.15); }
}

/* Accepted break / fall — same local poses for L→R and R→L (attack dir already mirrored). */
@keyframes battle-rock-half-a {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  28% { transform: translate(-10px, 12px) rotate(-12deg) scale(1); opacity: 1; }
  78% { transform: translate(-16px, 78px) rotate(-24deg) scale(1); opacity: 0.7; }
  100% { transform: translate(-18px, 92px) rotate(-28deg) scale(1); opacity: 0.44; }
}

@keyframes battle-rock-half-b {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  28% { transform: translate(12px, 14px) rotate(10deg) scale(1); opacity: 1; }
  78% { transform: translate(18px, 88px) rotate(20deg) scale(1); opacity: 0.68; }
  100% { transform: translate(20px, 104px) rotate(24deg) scale(1); opacity: 0.4; }
}

@keyframes battle-rock-spark {
  0% { opacity: 0.9; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(calc(var(--wow-dir) * var(--dx)), var(--dy)) scale(0.4); }
}

/* ——— ROCK glyph orient wrapper (ring / label stay upright) ——— */
.battle-rps-rock-orient {
  display: grid;
  place-items: center;
  width: 4.85rem;
  height: 4.85rem;
  /* Fallback upright; wow/DEV override sets accepted thumb-up horizontal fist. */
  --rock-base-rot: 0deg;
  --rock-orient-sx: 1;
  /* CSS applies right→left: scaleX first, then rotate (thumb stays on top). */
  transform: rotate(var(--rock-base-rot)) scaleX(var(--rock-orient-sx));
  transform-origin: 50% 50%;
  pointer-events: none;
}

/*
 * Accepted ROCK orientation (MASTER from DEV reveal):
 * Windows ✊ upright has thumb on the right — mirror BEFORE rotate on LEFT.
 * LEFT → center: scaleX(-1) then rotate(+85°) → thumb on top.
 * RIGHT → center: rotate(-85°) only → thumb on top.
 * Applied to live wow reveal (same values as DEV / draw-clash).
 */
.battle-round-result--wow .battle-round-result__side--self .battle-rps-rock-orient,
.dev-reveal-preview .battle-round-result__side--self .battle-rps-rock-orient {
  --rock-base-rot: 85deg;
  --rock-orient-sx: -1;
}

.battle-round-result--wow .battle-round-result__side--opp .battle-rps-rock-orient,
.dev-reveal-preview .battle-round-result__side--opp .battle-rps-rock-orient {
  --rock-base-rot: -85deg;
  --rock-orient-sx: 1;
}

/* ——— SCISSORS glyph orient wrapper (ring / label stay upright) ——— */
.battle-rps-scissors-orient {
  display: grid;
  place-items: center;
  width: 4.85rem;
  height: 4.85rem;
  /* Production default: upright V. Break/fall rotate stays on parent half/mark. */
  --scissors-base-rot: 0deg;
  --scissors-orient-sx: 1;
  /* CSS applies right→left: scaleX first, then rotate (thumb stays on top). */
  transform: rotate(var(--scissors-base-rot)) scaleX(var(--scissors-orient-sx));
  transform-origin: 50% 50%;
  pointer-events: none;
}

/*
 * DEV-only horizontal SCISSORS (fingers toward center, thumb on top).
 * Same anatomy recipe as accepted ROCK (Windows emoji thumb on the right when upright).
 * LEFT → center: scaleX(-1) then rotate(+85°).
 * RIGHT → center: rotate(-85°) only.
 * Static confirmation: #/dev/scissors-orient — do not retune animation until confirmed.
 */
.dev-reveal-preview .battle-round-result__side--self .battle-rps-scissors-orient {
  --scissors-base-rot: 85deg;
  --scissors-orient-sx: -1;
}

.dev-reveal-preview .battle-round-result__side--opp .battle-rps-scissors-orient {
  --scissors-base-rot: -85deg;
  --scissors-orient-sx: 1;
}


/* LIVE scissors>paper uses the same accepted inward-facing anatomy as DEV. */
.battle-round-result--wow:not(.battle-round-result--rock):not(.battle-round-result--paper):not(.battle-round-result--draw-clash)
  .battle-round-result__side--self .battle-rps-scissors-orient {
  --scissors-base-rot: 85deg;
  --scissors-orient-sx: -1;
}

.battle-round-result--wow:not(.battle-round-result--rock):not(.battle-round-result--paper):not(.battle-round-result--draw-clash)
  .battle-round-result__side--opp .battle-rps-scissors-orient {
  --scissors-base-rot: -85deg;
  --scissors-orient-sx: 1;
}

/* ——— PAPER glyph orient wrapper (ring / label stay upright) ——— */
.battle-rps-paper-orient {
  display: grid;
  place-items: center;
  width: 4.85rem;
  height: 4.85rem;
  /* Upright palm only — handedness via scaleX, never rotate 180°. */
  --paper-base-rot: 0deg;
  --paper-orient-sx: 1;
  /* CSS applies right→left: scaleX first, then rotate. */
  transform: rotate(var(--paper-base-rot)) scaleX(var(--paper-orient-sx));
  transform-origin: 50% 50%;
  pointer-events: none;
}

/*
 * Reveal PAPER LEFT/RIGHT handedness (thumb toward outer screen edge).
 * Windows ✋ upright: thumb on the right → mirror LEFT only.
 * LEFT → thumb screen-left: scaleX(-1).
 * RIGHT → thumb screen-right: scaleX(1).
 */
.battle-round-result--wow .battle-round-result__side--self .battle-rps-paper-orient {
  --paper-orient-sx: -1;
}

.battle-round-result--wow .battle-round-result__side--opp .battle-rps-paper-orient {
  --paper-orient-sx: 1;
}

/* ——— PAPER > ROCK cover (separate from cut / crush) ——— */
.battle-round-result--wow.battle-round-result--paper {
  --paper-clash-x: 19.4rem;
  --paper-cover-x: 20.6rem;
  --paper-cover-rot: 9deg;
  /*
   * Attack Y-lift only (negative = higher). X unchanged.
   * -22px still left the palm of ✋ on the lower third of ROCK;
   * -34px puts palm mass on / slightly above ROCK center (~55% AABB overlap).
   */
  /* Fingertips lead above ROCK, then the palm descends over it. */
  --paper-approach-y: -48px;
  --paper-cover-y: -27px;
  --paper-palm-contact-rot: 58deg;
  --paper-palm-cover-rot: 24deg;
  /* Accepted defeated depth — do not change. */
  --paper-sink-y: 112px;
  --paper-squash-x: 1.05;
  --paper-squash-y: 0.86;
  --paper-rock-rot: 26deg;
  --paper-rock-opacity: 0.62;
  --paper-rock-brightness: 0.72;
}

.battle-round-result--wow.battle-round-result--paper .battle-wow-duel--rtl {
  --paper-cover-rot: -9deg;
  --paper-rock-rot: -26deg;
  --paper-approach-y: -48px;
  --paper-cover-y: -27px;
  --paper-palm-contact-rot: -58deg;
  --paper-palm-cover-rot: -24deg;
}

.battle-round-result--wow.battle-round-result--paper.battle-round-result--impact .battle-paper-attacker .battle-round-result__mark {
  will-change: transform;
  z-index: 4;
  /* MASTER + L→R share one animation; X/rot mirrored via --wow-dir and --paper-cover-rot. */
  animation: battle-paper-clash-self var(--wow-impact-ms, 2750ms) cubic-bezier(0.33, 0.1, 0.25, 1) 1 both;
}

/*
 * PAPER attacker glyph must NOT inherit scissors battle-wow-blade.
 * Motion lives only on .battle-round-result__mark (battle-paper-clash-self).
 * Scoped: paper scene + paper attacker + paper glyph only.
 */
.battle-round-result--wow.battle-round-result--paper.battle-round-result--impact
  .battle-paper-attacker
  .battle-rps-paper-glyph {
  animation: none;
  transform: none;
  transform-origin: 50% 50%;
}


/* Premium PAPER: fingertips lead, then the palm lays over ROCK. */
.battle-round-result--wow.battle-round-result--paper.battle-round-result--impact
  .battle-paper-attacker
  .battle-rps-paper-orient {
  transform-origin: 50% 82%;
  animation: battle-paper-palm-cover var(--wow-impact-ms, 2750ms)
    cubic-bezier(0.33, 0.1, 0.25, 1) 1 both;
}

.battle-round-result--wow.battle-round-result--paper.battle-round-result--impact .battle-paper-attacker {
  z-index: 3;
}

.battle-round-result--wow.battle-round-result--paper.battle-round-result--impact .battle-wow-rock-side {
  z-index: 1;
}

.battle-round-result--wow.battle-round-result--paper.battle-round-result--impact .battle-paper-attacker .battle-round-result__move {
  animation: none;
  transform: none;
}

/* Hide КАМІНЬ after cover starts — same pattern as defeated paper/scissors labels. */
.battle-round-result--wow.battle-round-result--paper.battle-round-result--impact .battle-wow-rock-side .battle-round-result__move {
  animation: battle-wow-vs-fade 160ms ease-out var(--paper-cover-delay-ms, 950ms) 1 forwards;
  transform: none;
}

.battle-round-result--wow.battle-round-result--paper.battle-round-result--impact .battle-wow-rock-side .battle-round-result__mark {
  will-change: transform, opacity, filter;
  transform-origin: 50% 100%;
  animation: battle-paper-rock-defeat var(--wow-impact-ms, 2750ms) ease-out 1 both;
}

.battle-round-result--wow.battle-round-result--paper.battle-round-result--impact .battle-wow-rock-side .battle-rps-rock-orient {
  animation: battle-paper-rock-orient-tip var(--wow-impact-ms, 2750ms) ease-out 1 both;
}

.battle-round-result--wow.battle-round-result--paper.battle-round-result--settled .battle-paper-attacker {
  z-index: 3;
}

/* PAPER winner: same cyan halo tokens as SCISSORS/ROCK; keep base scale (no 1.08). */
.battle-round-result--wow.battle-round-result--paper.battle-round-result--settled .battle-paper-attacker .battle-round-result__mark,
.battle-round-result--wow.battle-round-result--paper.battle-round-result--settled .battle-paper-attacker.battle-round-result__side--winner .battle-round-result__mark {
  animation: battle-wow-winner-mark-noscale var(--reveal-winner-ms, 300ms) ease var(--reveal-winner-delay-ms, 180ms) both;
  transform: none;
  transform-origin: 50% 50%;
  filter: var(--wow-winner-mark-glow);
}

.battle-round-result--wow.battle-round-result--paper.battle-round-result--settled .battle-paper-attacker .battle-round-result__glyph,
.battle-round-result--wow.battle-round-result--paper.battle-round-result--settled .battle-paper-attacker.battle-round-result__side--winner .battle-round-result__glyph {
  animation: battle-reveal-winner-glyph var(--reveal-winner-ms, 300ms) ease var(--reveal-winner-delay-ms, 180ms) both;
  transform: none;
  filter: var(--wow-winner-glyph-glow);
}

.battle-round-result--wow.battle-round-result--paper.battle-round-result--settled .battle-paper-attacker .battle-round-result__move {
  transform: none;
  animation: none;
}

.battle-round-result--wow.battle-round-result--paper.battle-round-result--settled .battle-wow-rock-side {
  z-index: 1;
}

.battle-round-result--wow.battle-round-result--paper.battle-round-result--settled .battle-wow-rock-side .battle-round-result__mark {
  transform-origin: 50% 100%;
  transform: translateY(var(--paper-sink-y, 112px))
    scale(var(--paper-squash-x, 1.05), var(--paper-squash-y, 0.86));
  opacity: var(--paper-rock-opacity, 0.62);
  filter: brightness(var(--paper-rock-brightness, 0.72));
  box-shadow: none;
  animation: none;
}

.battle-round-result--wow.battle-round-result--paper.battle-round-result--settled .battle-wow-rock-side .battle-rps-rock-orient {
  transform: rotate(calc(var(--rock-base-rot, 0deg) + var(--paper-rock-rot, 26deg)))
    scaleX(var(--rock-orient-sx, 1));
  animation: none;
}

.battle-round-result--wow.battle-round-result--paper.battle-round-result--settled .battle-wow-rock-side .battle-round-result__move {
  transform: none;
  opacity: 0;
  filter: none;
}

/* impactMs 2750: contact 27.3%, cover 34.5→52.7%, hold→62.9%, home 86.5%
   ROCK sink 34.5%→58% ≈ 647ms (within 500–750ms).
   Y: 0 → attack-y by contact (smooth approach), hold through cover, ease back to 0.
   MASTER = PAPER RIGHT→ROCK LEFT (--wow-dir:-1, --paper-cover-rot:-9deg).
   L→R = exact geometric mirror (--wow-dir:1, --paper-cover-rot:+9deg). Same keyframes. */
@keyframes battle-paper-clash-self {
  0% { transform: translateX(0) translateY(0) scale(1) rotate(0deg); }
  18% {
    transform: translateX(calc(var(--wow-dir) * var(--paper-clash-x) * 0.72))
      translateY(calc(var(--paper-approach-y, -48px) * 0.72)) scale(1.02) rotate(0deg);
  }
  27.3% {
    transform: translateX(calc(var(--wow-dir) * var(--paper-clash-x)))
      translateY(var(--paper-approach-y, -48px)) scale(1.03) rotate(0deg);
  }
  34.5% {
    transform: translateX(calc(var(--wow-dir) * var(--paper-clash-x)))
      translateY(var(--paper-approach-y, -48px)) scale(1.04)
      rotate(calc(var(--paper-cover-rot) * 0.25));
  }
  52.7% {
    transform: translateX(calc(var(--wow-dir) * var(--paper-cover-x)))
      translateY(var(--paper-cover-y, -27px)) scale(1.15) rotate(var(--paper-cover-rot));
  }
  62.9% {
    /* Start the return immediately after maximum cover. A visible distance
       change here prevents the old full-cover pause followed by a snap. */
    transform: translateX(calc(var(--wow-dir) * var(--paper-release-x, 16.2rem)))
      translateY(-18px) scale(1.09)
      rotate(calc(var(--paper-cover-rot) * 0.6));
  }
  86.5% { transform: translateX(0) translateY(0) scale(1) rotate(0deg); }
  100% {
    transform: translateX(0) translateY(0) scale(1) rotate(0deg);
    filter: var(--wow-winner-mark-glow);
  }
}

@keyframes battle-paper-palm-cover {
  0% { transform: rotate(0deg) scaleX(var(--paper-orient-sx, 1)); }
  18% { transform: rotate(calc(var(--paper-palm-contact-rot) * 0.68)) scaleX(var(--paper-orient-sx, 1)); }
  27.3% { transform: rotate(var(--paper-palm-contact-rot)) scaleX(var(--paper-orient-sx, 1)); }
  34.5% { transform: rotate(var(--paper-palm-contact-rot)) scaleX(var(--paper-orient-sx, 1)); }
  52.7% { transform: rotate(var(--paper-palm-cover-rot)) scaleX(var(--paper-orient-sx, 1)); }
  62.9% { transform: rotate(calc(var(--paper-palm-cover-rot) * 0.6)) scaleX(var(--paper-orient-sx, 1)); }
  86.5%, 100% { transform: rotate(0deg) scaleX(var(--paper-orient-sx, 1)); }
}

@keyframes battle-paper-rock-defeat {
  0%,
  34.5% {
    transform: translateY(0) scale(1, 1);
    opacity: 1;
    filter: brightness(1);
  }
  42% {
    transform: translateY(calc(var(--paper-sink-y, 112px) * 0.28))
      scale(1.02, 0.94);
    opacity: 0.88;
    filter: brightness(0.9);
  }
  58% {
    transform: translateY(var(--paper-sink-y, 112px))
      scale(var(--paper-squash-x, 1.05), var(--paper-squash-y, 0.86));
    opacity: var(--paper-rock-opacity, 0.62);
    filter: brightness(var(--paper-rock-brightness, 0.72));
  }
  100% {
    transform: translateY(var(--paper-sink-y, 112px))
      scale(var(--paper-squash-x, 1.05), var(--paper-squash-y, 0.86));
    opacity: var(--paper-rock-opacity, 0.62);
    filter: brightness(var(--paper-rock-brightness, 0.72));
  }
}

/* Defeated tip relative to base orient — glyph only (same scaleX-then-rotate order). */
@keyframes battle-paper-rock-orient-tip {
  0%,
  34.5% {
    transform: rotate(var(--rock-base-rot, 0deg)) scaleX(var(--rock-orient-sx, 1));
  }
  42% {
    transform: rotate(calc(var(--rock-base-rot, 0deg) + (var(--paper-rock-rot, 26deg) * 0.45)))
      scaleX(var(--rock-orient-sx, 1));
  }
  58%,
  100% {
    transform: rotate(calc(var(--rock-base-rot, 0deg) + var(--paper-rock-rot, 26deg)))
      scaleX(var(--rock-orient-sx, 1));
  }
}

/* Same cyan settle as battle-reveal-winner-mark, without enlarging PAPER. */
@keyframes battle-wow-winner-mark-noscale {
  from { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
  to { transform: scale(1); filter: var(--wow-winner-mark-glow); }
}

@keyframes battle-wow-count {
  0% { transform: scale(0.7); opacity: 0; filter: brightness(1); }
  42% { transform: scale(1.15); opacity: 1; filter: brightness(1.35); }
  100% { transform: scale(1); opacity: 0; filter: brightness(1); }
}

@keyframes battle-wow-unveil-flash {
  0% { opacity: 0.9; transform: scale(0.35); }
  100% { opacity: 0; transform: scale(1.8); }
}

@keyframes battle-wow-unveil {
  from { opacity: 0; transform: scale(0.86); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes battle-wow-unveil-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes battle-wow-vs-idle {
  0%, 72% { color: #d7f6ff; text-shadow: 0 0 10px rgba(62, 207, 255, 0.35); filter: brightness(1); }
  100% { color: #f4ffff; text-shadow: 0 0 18px rgba(126, 232, 255, 0.8); filter: brightness(1.35); }
}

@keyframes battle-wow-precharge {
  0% { border-color: rgba(126, 232, 255, 0); box-shadow: 0 0 0 rgba(126, 232, 255, 0); }
  100% { border-color: rgba(126, 232, 255, 0.7); box-shadow: 0 0 16px rgba(126, 232, 255, 0.45); }
}

@keyframes battle-wow-clash-self {
  0% { transform: translate(0, 0) scale(var(--wow-fight-scale, 1.1)); }
  11.64% {
    transform: translate(
      calc(var(--wow-dir) * var(--wow-clash-x) * 0.82),
      calc(var(--wow-clash-y, 0px) * 0.82)
    ) scale(var(--wow-fight-scale, 1.1));
  }
  16.36% {
    transform: translate(
      calc(var(--wow-dir) * var(--wow-clash-x)),
      var(--wow-clash-y, 0px)
    ) scale(var(--wow-fight-scale, 1.1));
  }
  24.73% {
    transform: translate(
      calc(var(--wow-dir) * var(--wow-clash-x)),
      var(--wow-clash-y, 0px)
    ) scale(var(--wow-fight-scale, 1.1));
  }
  40.36% {
    transform: translate(
      calc(var(--wow-dir) * var(--wow-clash-x)),
      var(--wow-clash-y, 0px)
    ) scale(var(--wow-fight-scale, 1.1));
  }
  48.36% {
    transform: translate(
      calc(var(--wow-dir) * var(--wow-clash-x)),
      var(--wow-clash-y, 0px)
    ) scale(var(--wow-fight-scale, 1.1));
  }
  71.64% { transform: translate(0, 0) scale(var(--wow-fight-scale, 1.1)); }
  79.64% { transform: translate(0, 0) scale(1); }
  85.5% { transform: translate(0, 0) scale(1.14); }
  91% { transform: translate(0, 0) scale(1.08); }
  96% { transform: translate(0, 0) scale(1.04); }
  100% {
    transform: translate(0, 0) scale(1.04);
    filter: drop-shadow(0 0 14px rgba(126, 232, 255, 0.7));
  }
}

@keyframes battle-wow-blade {
  0% { transform: rotate(0deg) translate(0, 0); }
  11.64% { transform: rotate(0deg) translate(0, 0); }
  /* Contact hold — position layer (mark) keeps clash X/Y; glyph action stays flat. */
  16.36% {
    transform: rotate(calc(var(--wow-dir) * var(--wow-tilt)))
      translate(calc(var(--wow-dir) * var(--wow-blade-tx, 8px)), var(--wow-blade-ty, 2px));
  }
  24.73% {
    transform: rotate(calc(var(--wow-dir) * var(--wow-tilt)))
      translate(calc(var(--wow-dir) * var(--wow-blade-tx, 8px)), var(--wow-blade-ty, 2px));
  }
  /* First CUT frames — must not overwrite contact with a large wrist swing / Y drop. */
  32.4% {
    transform: rotate(calc(var(--wow-dir) * var(--wow-blade-cut-rot, 32deg)))
      translate(
        calc(var(--wow-dir) * var(--wow-blade-cut-tx, 5px)),
        var(--wow-blade-cut-ty, 7px)
      );
  }
  40.36% {
    transform: rotate(calc(var(--wow-dir) * var(--wow-blade-mid-rot, 26deg)))
      translate(
        calc(var(--wow-dir) * var(--wow-blade-mid-tx, 3px)),
        var(--wow-blade-mid-ty, 3px)
      );
  }
  48.36% {
    transform: rotate(calc(var(--wow-dir) * var(--wow-blade-end-rot, 18deg))) translate(0, 0);
  }
  71.64% { transform: rotate(0deg) translate(0, 0); }
  100% { transform: rotate(0deg) translate(0, 0); }
}

@keyframes battle-wow-cut {
  0% { transform: rotate(0deg) translate(0, 0); }
  40% { transform: rotate(calc(var(--wow-dir) * -8deg)) translate(calc(var(--wow-dir) * 5px), 6px); }
  75% { transform: rotate(calc(var(--wow-dir) * 6deg)) translate(calc(var(--wow-dir) * 8px), -2px); }
  100% { transform: rotate(0deg) translate(calc(var(--wow-dir) * 3px), 0); }
}

@keyframes battle-wow-shake {
  0%, 100% { transform: translateX(0); }
  28% { transform: translateX(calc(var(--wow-dir) * -5px)); }
  58% { transform: translateX(calc(var(--wow-dir) * 4px)); }
  82% { transform: translateX(calc(var(--wow-dir) * -2px)); }
}

@keyframes battle-wow-vs-fade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes battle-wow-contact {
  0% { opacity: 0; transform: scale(0.7); }
  40% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}

@keyframes battle-wow-cutline {
  0% { opacity: 0; }
  12% { opacity: 0.95; }
  72% { opacity: 0.85; }
  100% { opacity: 0; }
}

@keyframes battle-wow-paper-hide {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes battle-wow-halves-on {
  0% { opacity: 0; visibility: hidden; }
  100% { opacity: 1; visibility: visible; }
}

@keyframes battle-wow-half-top {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  29% { transform: translate(calc(var(--wow-dir) * 12px), 10px) rotate(calc(var(--wow-dir) * 10deg)) scale(1); opacity: 1; }
  78% { transform: translate(calc(var(--wow-dir) * 22px), 72px) rotate(calc(var(--wow-dir) * 26deg)) scale(1); opacity: 0.72; }
  100% { transform: translate(calc(var(--wow-dir) * 24px), 86px) rotate(calc(var(--wow-dir) * 30deg)) scale(1); opacity: 0.46; }
}

@keyframes battle-wow-half-bottom {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  29% { transform: translate(calc(var(--wow-dir) * -6px), 14px) rotate(calc(var(--wow-dir) * -8deg)) scale(1); opacity: 1; }
  78% { transform: translate(calc(var(--wow-dir) * -12px), 90px) rotate(calc(var(--wow-dir) * -18deg)) scale(1); opacity: 0.68; }
  100% { transform: translate(calc(var(--wow-dir) * -14px), 108px) rotate(calc(var(--wow-dir) * -22deg)) scale(1); opacity: 0.4; }
}

@keyframes battle-wow-scrap {
  /* 0% stays invisible if any rule re-applies backwards fill. */
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  4% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  70% { opacity: 0.7; transform: translate(calc(var(--wow-dir) * var(--dx)), var(--dy)) rotate(var(--rot)); }
  100% { opacity: 0; transform: translate(calc(var(--wow-dir) * var(--dx)), var(--dy)) rotate(var(--rot)); }
}

@keyframes battle-wow-spark {
  0% { opacity: 0; transform: translate(0, 0) scale(1); }
  12% { opacity: 0.9; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(calc(var(--wow-dir) * var(--dx)), var(--dy)) scale(0.4); }
}

@keyframes battle-wow-glint {
  0% { opacity: 0; transform: scaleX(0.4); }
  35% { opacity: 0.95; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(0.2); }
}

@keyframes battle-wow-winner-pulse {
  0% { transform: scale(1); filter:
    drop-shadow(0 0 7px rgba(126, 232, 255, 0.22)); }
  32% { transform: scale(1.14); filter:
    drop-shadow(0 0 12px rgba(126, 232, 255, 0.5)); }
  62% { transform: scale(1.08); filter:
    drop-shadow(0 0 10px rgba(126, 232, 255, 0.42)); }
  100% { transform: scale(1.04); filter:
    drop-shadow(0 0 14px rgba(126, 232, 255, 0.7)); }
}

@keyframes battle-wow-gold-spark {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  35% { opacity: 0.9; transform: translate(var(--gdx, 6px), var(--gdy, -8px)) scale(1); }
  100% { opacity: 0; transform: translate(calc(var(--gdx, 6px) * 1.4), calc(var(--gdy, -8px) * 1.4)) scale(0.3); }
}

@keyframes battle-wow-winner-ring {
  0% { opacity: 0; transform: scale(0.86); }
  40% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0.2; transform: scale(1.08); }
}

@keyframes battle-wow-debris-fade {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes battle-wow-caption {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes battle-wow-victory {
  0% { opacity: 0; transform: scale(0.85); filter: brightness(1); }
  55% { opacity: 1; transform: scale(1.05); filter: brightness(1.35); }
  100% { opacity: 1; transform: scale(1); filter: brightness(1); }
}

.battle-moves {
  flex: none;
  margin-top: 0.35rem;
  padding: 0.15rem 0 0;
  background: transparent;
  border-top: none;
}

.battle-moves__title {
  display: none;
}

.battle-moves__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.battle-moves--hidden .battle-moves__grid,
.battle-moves--hidden .battle-moves__title {
  display: none;
}

.move-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.8rem 0.4rem;
  border-radius: 14px;
  border: 1px solid rgba(62, 207, 255, 0.22);
  background: rgba(8, 14, 28, 0.92);
  color: var(--rps-text);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
  min-height: 5.35rem;
  height: 5.35rem;
}

.move-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.move-btn--blue { --move-accent: var(--rps-blue); --move-glow: var(--rps-glow-blue); }
.move-btn--violet { --move-accent: var(--rps-violet); --move-glow: var(--rps-glow-violet); }
.move-btn--orange { --move-accent: var(--rps-orange); --move-glow: var(--rps-glow-orange); }

.move-btn__icon {
  width: 42px;
  height: 42px;
  color: var(--move-accent);
  transition: filter 0.2s, opacity 0.2s, transform 0.2s;
}

.move-btn__icon .match-move-icon {
  width: 100%;
  height: 100%;
  display: block;
}

.move-btn__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.move-btn:disabled,
.move-btn--locked {
  pointer-events: none;
}

.move-btn:not(:disabled):hover,
.move-btn:not(:disabled):focus-visible {
  border-color: rgba(126, 232, 255, 0.55);
  box-shadow: 0 0 14px rgba(62, 207, 255, 0.18);
  transform: translateY(-2px);
  outline: none;
}

.move-btn--selected {
  border-color: var(--move-accent);
  background: color-mix(in srgb, var(--move-accent) 12%, rgba(8, 14, 28, 0.96));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--move-accent) 34%, transparent),
    0 0 14px color-mix(in srgb, var(--move-accent) 22%, transparent);
}

.move-btn--selected .move-btn__icon {
  filter: drop-shadow(0 0 6px var(--move-accent));
  opacity: 1;
}

.battle-moves:has(.move-btn--selected) .move-btn:not(.move-btn--selected) {
  opacity: 0.4;
}

.battle-moves:has(.move-btn--selected) .move-btn:not(.move-btn--selected) .move-btn__icon {
  filter: saturate(0.7);
  opacity: 0.78;
}

.move-btn--selected:disabled,
.move-btn--locked.move-btn--selected {
  opacity: 1;
  cursor: default;
}

.battle-moves--choice-locked .move-btn:not(.move-btn--selected) {
  opacity: 0.32;
  filter: grayscale(0.2);
}

.battle-moves--revealing {
  opacity: 0.58;
  pointer-events: none;
}

.battle-arena:has(.battle-round-result:not(.battle-round-result--hidden)) .battle-moves .move-btn {
  opacity: 0.28;
  filter: grayscale(0.18);
  box-shadow: none;
}

.battle-locked-note {
  display: none;
}

.battle-locked-note--hidden {
  display: none;
}

.battle-match-result {
  position: relative;
  inset: auto;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  min-height: 0;
  padding: 0.25rem 0.1rem 0.1rem;
  background: transparent;
  text-align: center;
  overflow: visible;
}

.battle-match-result--hidden {
  display: none;
}

.battle-match-result--victory {
  background: radial-gradient(ellipse 72% 42% at 50% 26%, rgba(62, 207, 255, 0.1), transparent 72%);
}

.battle-match-result--defeat {
  background: radial-gradient(ellipse 72% 42% at 50% 26%, rgba(245, 158, 66, 0.09), transparent 72%);
}

.battle-match-result__title {
  margin: 0 0 0.7rem;
  font-size: clamp(1.75rem, 5.6vw, 2.4rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.1;
}

.battle-match-result--victory .battle-match-result__title {
  color: #8ef0d8;
  text-shadow:
    0 0 16px rgba(62, 207, 255, 0.32),
    0 0 28px rgba(52, 211, 153, 0.16);
}

.battle-match-result--defeat .battle-match-result__title {
  color: #ff9b6a;
  text-shadow:
    0 0 16px rgba(245, 158, 66, 0.3),
    0 0 26px rgba(239, 68, 68, 0.12);
}

.battle-match-result__sub {
  margin: 0 0 0.55rem;
  color: var(--rps-muted);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: pre-line;
}

.battle-match-result__sub--alert {
  color: #f3f7ff;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.battle-match-result__score {
  margin: 0 0 1.7rem;
  font-size: clamp(1.55rem, 4.4vw, 1.95rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--rps-text);
}

.battle-match-result__score:empty {
  display: none;
}

.battle-head-to-head {
  order: 4;
  width: min(300px, 100%);
  margin: 0 0 0.72rem;
  padding: 0.48rem 0.72rem 0.44rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.18rem;
  background: rgba(8, 12, 24, 0.38);
  border: 1px solid rgba(62, 207, 255, 0.28);
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.14),
    0 0 10px rgba(62, 207, 255, 0.05);
}

.battle-head-to-head--hidden {
  display: none;
}

.battle-head-to-head__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.4rem;
}

.battle-head-to-head__name {
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(226, 234, 248, 0.78);
}

.battle-head-to-head__name--self {
  text-align: left;
}

.battle-head-to-head__name--opp {
  text-align: right;
}

.battle-head-to-head__score {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.15;
  color: #f3f8ff;
  text-shadow: none;
}

.battle-head-to-head__meta {
  margin: 0;
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  line-height: 1.25;
  text-transform: uppercase;
  text-align: center;
  color: rgba(154, 163, 181, 0.72);
}

.battle-match-result:has(.battle-head-to-head:not(.battle-head-to-head--hidden)) .battle-match-result__score {
  margin-bottom: 0.7rem;
}

.battle-match-result__actions {
  order: 6;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.72rem;
  width: min(300px, 100%);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.battle-match-result__actions .btn {
  width: 100%;
}

.guest-match-teaser {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  width: 100%;
  margin-bottom: 0.25rem;
}

.guest-match-teaser__card {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-height: 58px;
  padding: 0.48rem 0.52rem;
  border: 1px solid rgba(91, 190, 231, 0.2);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(40,150,200,.06), rgba(87,52,145,.08));
  text-align: left;
}

.guest-match-teaser__card strong {
  color: rgba(220, 245, 252, 0.92);
  font-size: 0.57rem;
  letter-spacing: 0.08em;
}

.guest-match-teaser__card span {
  color: rgba(160, 187, 205, 0.72);
  font-size: 0.54rem;
  line-height: 1.3;
}

.battle-match-result .btn--primary,
.battle-match-result .btn--arena-primary {
  background: linear-gradient(135deg, #3ecfff 0%, #8b5cf6 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
}

.btn--match-play-another {
  min-height: 48px;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  border-radius: 12px !important;
  background: #102848 !important;
  border: 1px solid rgba(62, 207, 255, 0.7) !important;
  color: #f7fcff !important;
  box-shadow: 0 0 14px rgba(62, 207, 255, 0.2);
}

.btn--match-play-another:not(:disabled):hover {
  border-color: rgba(126, 232, 255, 0.9) !important;
  box-shadow: 0 0 20px rgba(62, 207, 255, 0.36);
}

.btn--match-lobby {
  min-height: 48px;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  border-radius: 12px !important;
  background: rgba(8, 14, 28, 0.42) !important;
  border: 1px solid rgba(226, 234, 248, 0.46) !important;
  color: #f7f9ff !important;
}

.btn--match-lobby:not(:disabled):hover {
  border-color: rgba(240, 246, 255, 0.7) !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

.battle-match-result > .battle-rematch {
  order: 5;
  width: min(300px, 100%);
  margin: 0 0 0.7rem;
  padding: 0.58rem 0.72rem 0.62rem;
  gap: 0.22rem;
  background: rgba(8, 12, 24, 0.42);
  border: 1px solid rgba(62, 207, 255, 0.3);
  border-radius: 11px;
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.16),
    0 0 12px rgba(62, 207, 255, 0.08);
}

.battle-rematch {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: min(360px, 100%);
  margin-top: 0.35rem;
  padding: 1rem 1.1rem;
  background: var(--rps-glass, rgba(12, 16, 28, 0.72));
  border: 1px solid var(--rps-border, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
}

.battle-rematch[hidden] {
  display: none;
}

.battle-rematch__title {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--rps-violet, #9b7dff);
}

.battle-match-result > .battle-rematch .battle-rematch__title {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: #c9b8ff;
}

.battle-rematch__body,
.battle-rematch__meta {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--rps-muted, #9aa3b5);
}

.battle-match-result > .battle-rematch .battle-rematch__body {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: rgba(154, 163, 181, 0.88);
}

.battle-match-result > .battle-rematch .battle-rematch__meta {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: rgba(62, 207, 255, 0.88);
}

.battle-match-result > .battle-rematch .battle-rematch__actions {
  gap: 0.4rem;
  margin-top: 0.16rem;
}

.battle-match-result > .battle-rematch > .btn,
.battle-match-result > .battle-rematch .battle-rematch__actions .btn {
  min-height: 40px;
  width: 100%;
}

.battle-match-result > .battle-rematch.battle-rematch--status > .btn {
  margin-top: 0.32rem;
}

.battle-match-result > .battle-rematch.battle-rematch--incoming .battle-rematch__actions .btn {
  margin-top: 0;
}

.battle-afk__warning {
  margin: 0.35rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: #fbbf24;
  white-space: pre-line;
  max-width: 22rem;
}

.battle-rematch__meta {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rps-blue, #3ecfff);
}

.battle-rematch__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (max-height: 700px) {
  .battle-match-result {
    padding: 0.1rem 0;
  }

  .battle-match-result__title {
    margin-bottom: 0.5rem;
    font-size: clamp(1.5rem, 6vw, 2.05rem);
  }

  .battle-match-result__score {
    margin-bottom: 1.15rem;
    font-size: clamp(1.35rem, 4vw, 1.7rem);
  }

  .battle-match-result__actions {
    gap: 0.58rem;
  }

  .battle-match-result__actions .btn {
    min-height: 44px;
  }
}

@media (max-height: 860px) {
  .battle-player__handle {
    display: none;
  }
}

@media (max-width: 900px) {
  .battle-arena__top {
    grid-template-columns: 1fr auto 1fr;
    gap: 0.35rem;
  }

  .battle-player__info {
    max-width: 5.6rem;
  }

  .battle-player__name {
    font-size: 0.75rem;
  }

  .battle-moves__grid {
    gap: 0.5rem;
  }

  .move-btn {
    min-height: 5.1rem;
    height: 5.1rem;
    padding: 0.65rem 0.3rem;
  }
}

@media (max-width: 480px) {
  .battle-score-center {
    font-size: 1.25rem;
    padding: 0.35rem 0.75rem;
  }
}


/* ——— DRAW clash (rock/rock, scissors/scissors, paper/paper) ——— */
/* Separate from accepted WIN cut / crush / cover. No winner halo. */
.battle-round-result--wow.battle-round-result--draw-clash {
  --draw-clash-x: 9.35rem;
  --draw-contact-y: 0px;
  --draw-recoil-x: 1.05rem;
  --draw-recoil-rot: 0deg;
  --draw-shake-px: 0px;
  --draw-squash-x: 1;
  --draw-squash-y: 1;
  --draw-vs-dim: 0.32;
}

.battle-round-result--draw-clash .battle-round-result__side--self.battle-draw-fighter {
  --draw-dir: 1;
}

.battle-round-result--draw-clash .battle-round-result__side--opp.battle-draw-fighter {
  --draw-dir: -1;
}

/* Horizontal ROCK / SCISSORS facing center (labels stay upright). */
.battle-round-result--draw-clash .battle-round-result__side--self .battle-rps-rock-orient {
  --rock-base-rot: 85deg;
  --rock-orient-sx: -1;
}

.battle-round-result--draw-clash .battle-round-result__side--opp .battle-rps-rock-orient {
  --rock-base-rot: -85deg;
  --rock-orient-sx: 1;
}

.battle-round-result--draw-clash .battle-round-result__side--self .battle-rps-scissors-orient {
  --scissors-base-rot: 85deg;
  --scissors-orient-sx: -1;
}

.battle-round-result--draw-clash .battle-round-result__side--opp .battle-rps-scissors-orient {
  --scissors-base-rot: -85deg;
  --scissors-orient-sx: 1;
}

.battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--impact .battle-draw-fighter {
  z-index: 4;
  transform: none;
  animation: none;
}

.battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--impact .battle-draw-fighter .battle-round-result__mark {
  z-index: 5;
  transform-origin: 50% 50%;
  animation: battle-draw-clash-mark var(--wow-impact-ms, 2000ms) linear 1 both;
}

.battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--impact .battle-draw-fighter .battle-round-result__move {
  transform: none;
  animation: none;
}

.battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--impact .battle-draw-fighter .battle-round-result__mark::after {
  content: none;
  display: none;
  animation: none;
  opacity: 0;
  border: none;
  box-shadow: none;
}

.battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--impact .battle-draw-duel {
  animation: none;
}

.battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--impact .battle-wow-vs {
  animation: battle-draw-vs var(--wow-impact-ms, 2000ms) linear 1 both;
}

.battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--impact .battle-wow-vs::before,
.battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--impact .battle-wow-vs::after {
  display: none;
  animation: none;
}

.battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--settled .battle-draw-fighter {
  transform: none;
  filter: none;
  opacity: 1;
  animation: none;
}

.battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--settled .battle-draw-fighter .battle-round-result__mark {
  transform: none;
  filter: none;
  animation: none;
}

.battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--settled .battle-draw-fighter .battle-round-result__mark::after {
  content: none;
  display: none;
  animation: none;
  opacity: 0;
  border: none;
  box-shadow: none;
}

.battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--settled .battle-draw-fighter .battle-round-result__glyph {
  filter: none;
}

.battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--settled .battle-wow-vs {
  opacity: 1;
  animation: none;
}

/*
 * impactMs 2000:
 * approach 0–30% (600), contact 30–39.5% (190), recoil 39.5–48.5% (180),
 * return 48.5–78.5% (600), settle to 100%.
 * --draw-contact-y: scissors blade offset (LEFT up / RIGHT down via --draw-dir).
 */
@keyframes battle-draw-clash-mark {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1, 1);
  }
  18% {
    transform:
      translate(
        calc(var(--draw-dir) * var(--draw-clash-x) * 0.6),
        calc(var(--draw-dir) * var(--draw-contact-y) * -0.4)
      )
      rotate(0deg)
      scale(1, 1);
  }
  30% {
    transform:
      translate(
        calc(var(--draw-dir) * var(--draw-clash-x)),
        calc(var(--draw-dir) * var(--draw-contact-y) * -1)
      )
      rotate(0deg)
      scale(var(--draw-squash-x), var(--draw-squash-y));
  }
  32% {
    transform:
      translate(
        calc(var(--draw-dir) * var(--draw-clash-x) + var(--draw-dir) * var(--draw-shake-px)),
        calc(var(--draw-dir) * var(--draw-contact-y) * -1)
      )
      rotate(0deg)
      scale(var(--draw-squash-x), var(--draw-squash-y));
  }
  35.5% {
    transform:
      translate(
        calc(var(--draw-dir) * var(--draw-clash-x) - var(--draw-dir) * var(--draw-shake-px)),
        calc(var(--draw-dir) * var(--draw-contact-y) * -1)
      )
      rotate(0deg)
      scale(var(--draw-squash-x), var(--draw-squash-y));
  }
  39.5% {
    transform:
      translate(
        calc(var(--draw-dir) * var(--draw-clash-x)),
        calc(var(--draw-dir) * var(--draw-contact-y) * -1)
      )
      rotate(0deg)
      scale(var(--draw-squash-x), var(--draw-squash-y));
  }
  48.5% {
    transform:
      translate(
        calc(var(--draw-dir) * var(--draw-clash-x) - var(--draw-dir) * var(--draw-recoil-x)),
        calc(var(--draw-dir) * var(--draw-contact-y) * -0.55)
      )
      rotate(calc(var(--draw-dir) * var(--draw-recoil-rot)))
      scale(1, 1);
  }
  78.5% {
    transform: translate(0, 0) rotate(0deg) scale(1, 1);
  }
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1, 1);
  }
}

@keyframes battle-draw-vs {
  0% { opacity: 1; }
  30% { opacity: 0.32; }
  48.5% { opacity: 0.32; }
  78.5% { opacity: 1; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .battle-timer--urgent {
    animation: none;
  }

  .battle-round-result__duel,
  .battle-round-result__title,
  .battle-status--outcome,
  .battle-round-result--charge .battle-round-result__silhouette,
  .battle-round-result--charge .battle-round-result__glyph,
  .battle-round-result--charge .battle-round-result__move,
  .battle-round-result--charge .battle-round-result__vs,
  .battle-round-result--impact .battle-round-result__side--self,
  .battle-round-result--impact .battle-round-result__side--opp,
  .battle-round-result--impact .battle-round-result__vs,
  .battle-round-result--impact .battle-round-result__vs::before,
  .battle-round-result--impact .battle-round-result__vs::after,
  .battle-round-result--settled .battle-round-result__side--winner .battle-round-result__mark,
  .battle-round-result--settled .battle-round-result__side--winner .battle-round-result__glyph,
  .battle-round-result--settled .battle-round-result__side--loser,
  .battle-round-result--settled .battle-round-result__side--loser .battle-round-result__mark,
  .battle-countdown--wow.battle-countdown--pulse,
  .battle-round-result--wow.battle-round-result--charge .battle-wow-flash,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-flash,
  .battle-round-result--wow.battle-round-result--charge .battle-round-result__glyph,
  .battle-round-result--wow.battle-round-result--charge .battle-round-result__move,
  .battle-round-result--wow.battle-round-result--charge .battle-round-result__vs,
  .battle-round-result--wow.battle-round-result--charge .battle-round-result__mark::after,
  .battle-round-result--wow.battle-round-result--impact,
  .battle-round-result--wow.battle-round-result--impact .battle-round-result__side--self,
  .battle-round-result--wow.battle-round-result--impact .battle-round-result__side--self .battle-round-result__mark,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-attacker,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-attacker .battle-round-result__mark,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-attacker .battle-round-result__mark::after,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-attacker .battle-round-result__glyph,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-duel,
  .battle-round-result--wow.battle-round-result--impact .battle-round-result__side--opp,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-vs,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-vs::before,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-vs::after,
  .battle-round-result--wow.battle-round-result--impact .battle-round-result__move,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-paper-side .battle-round-result__move,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-contact,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-cutline,
  .battle-round-result--wow.battle-round-result--impact .battle-round-result__side--self .battle-round-result__glyph,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-paper-side .battle-round-result__glyph,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-halves,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-half--top,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-half--bottom,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-scrap,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-spark,
  .battle-round-result--wow.battle-round-result--impact .battle-wow-gold-spark,
  .battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-attacker .battle-round-result__mark,
  .battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-attacker .battle-round-result__glyph,
  .battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-duel,
  .battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-contact,
  .battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-hitflash,
  .battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-halves,
  .battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-half--a,
  .battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-half--b,
  .battle-round-result--wow.battle-round-result--rock.battle-round-result--impact .battle-rock-spark,
  .battle-round-result--wow.battle-round-result--paper.battle-round-result--impact .battle-paper-attacker .battle-round-result__mark,
  .battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--impact .battle-draw-fighter .battle-round-result__mark,
  .battle-round-result--wow.battle-round-result--draw-clash.battle-round-result--impact .battle-wow-vs,
  .battle-round-result--wow.battle-round-result--paper.battle-round-result--impact .battle-wow-rock-side .battle-round-result__mark,
  .battle-round-result--wow.battle-round-result--paper.battle-round-result--impact .battle-wow-rock-side .battle-rps-rock-orient,
  .battle-round-result--wow.battle-round-result--settled .battle-wow-glint,
  .battle-round-result--wow.battle-round-result--settled .battle-wow-gold-spark,
  .battle-round-result--wow.battle-round-result--settled .battle-wow-paper-side,
  .battle-round-result--wow.battle-round-result--settled .battle-wow-attacker .battle-round-result__mark,
  .battle-round-result--wow.battle-round-result--settled .battle-wow-attacker .battle-round-result__mark::after,
  .battle-round-result--wow.battle-round-result--rock.battle-round-result--settled .battle-wow-scissors-side,
  .battle-round-result--wow.battle-round-result--paper.battle-round-result--settled .battle-wow-rock-side,
  .battle-status--wow.battle-status--outcome {
    animation: none;
  }

  .battle-round-result--charge .battle-round-result__silhouette {
    opacity: 0;
  }

  .battle-round-result--charge .battle-round-result__glyph,
  .battle-round-result--charge .battle-round-result__move {
    opacity: 1;
    transform: none;
  }

  .move-btn:not(:disabled):hover {
    transform: none;
  }
}

/* DEV preview chrome only — outside Game Frame, does not change match Reveal. */
html:has(.dev-reveal-preview),
body:has(.dev-reveal-preview) {
  overflow-x: auto;
  overflow-y: hidden;
}

/* Match keeps #app max-width: 660px; DEV needs room for frame + side panel. */
html:has(.dev-reveal-preview) #app,
#app:has(.dev-reveal-preview) {
  max-width: none;
  width: fit-content;
  margin-inline: auto;
}

.game-shell:has(.dev-reveal-preview) .game-shell__main {
  align-items: center;
  width: max-content;
  max-width: none;
  margin-inline: auto;
}

.dev-reveal-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  max-width: none;
  overflow: visible;
}

.dev-reveal-preview__layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 1.25rem;
  width: max-content;
  max-width: none;
  padding: 0.5rem 0.75rem 1rem;
  box-sizing: border-box;
}

.dev-reveal-preview__stage {
  flex: 0 0 620px;
  width: 620px;
  min-width: 620px;
  max-width: 620px;
}

.dev-reveal-preview__panel {
  flex: 0 0 13.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 13.5rem;
  padding: 0.65rem 0.55rem;
  border: 1px solid rgba(126, 232, 255, 0.28);
  border-radius: 10px;
  background: rgba(8, 16, 28, 0.72);
  box-sizing: border-box;
}

.dev-reveal-preview__panel-title {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(186, 242, 255, 0.85);
}

.dev-reveal-preview__dir,
.dev-reveal-preview__replay {
  width: 100%;
  min-height: 2.05rem;
  padding-inline: 0.55rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: normal;
}

.dev-reveal-preview__dir {
  opacity: 0.72;
}

.dev-reveal-preview__dir--active {
  opacity: 1;
  outline: 1px solid rgba(126, 232, 255, 0.55);
}

@media (max-width: 860px) {
  .dev-reveal-preview__layout {
    flex-direction: column;
    align-items: center;
  }

  .dev-reveal-preview__panel {
    flex-basis: auto;
    width: 620px;
  }
}

/* ── Premium RPS Arena hands in live match UI ───────────────────────────────
 * Self is always LEFT, opponent RIGHT. These rules only orient the art inside
 * existing boxes; they do not change layout, hit areas, timers or animations.
 */
.premium-match-gesture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  transform-origin: 50% 50%;
  background: transparent;
  box-shadow: none;
}

.premium-match-gesture--rock { filter: drop-shadow(0 1px 1.15px rgba(0, 17, 31, .78)) drop-shadow(0 0 4px rgba(29, 191, 232, .2)); }
.premium-match-gesture--scissors { filter: drop-shadow(0 1px 1.1px rgba(28, 8, 0, .76)) drop-shadow(0 0 4px rgba(233, 146, 36, .18)); }
.premium-match-gesture--paper { filter: drop-shadow(0 1px 1.1px rgba(13, 6, 24, .78)) drop-shadow(0 0 4px rgba(168, 91, 224, .2)); }

.match-move-icon {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: visible;
}

.match-move-icon__image {
  width: 92%;
  height: 92%;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--move-accent) 52%, transparent));
}

/* Local-player choice buttons = LEFT hand anatomy, facing the center/right. */
.match-move-icon--left.match-move-icon--rock .match-move-icon__image {
  transform: rotate(85deg) scaleX(-1);
}
.match-move-icon--left.match-move-icon--scissors .match-move-icon__image {
  transform: rotate(85deg) scaleX(-1);
}
.match-move-icon--left.match-move-icon--paper .match-move-icon__image {
  transform: scaleX(-1);
  width: 88%;
  height: 88%;
}

/* Available for any future right-side selector: right hand faces center/left. */
.match-move-icon--right.match-move-icon--rock .match-move-icon__image,
.match-move-icon--right.match-move-icon--scissors .match-move-icon__image {
  transform: rotate(-85deg);
}
.match-move-icon--right.match-move-icon--paper .match-move-icon__image {
  transform: none;
  width: 88%;
  height: 88%;
}

/* Standard non-WOW hand stage: same existing outer dimensions, premium art. */
.hand-visual--premium {
  display: grid;
  place-items: center;
  overflow: visible;
}
.hand-visual__premium-image {
  width: 92%;
  height: 92%;
}
.hand-visual--left.hand-visual--gesture-rock .hand-visual__premium-image,
.hand-visual--left.hand-visual--gesture-scissors .hand-visual__premium-image {
  transform: rotate(85deg) scaleX(-1);
}
.hand-visual--right.hand-visual--gesture-rock .hand-visual__premium-image,
.hand-visual--right.hand-visual--gesture-scissors .hand-visual__premium-image {
  transform: rotate(-85deg);
}
.hand-visual--left.hand-visual--gesture-paper .hand-visual__premium-image {
  transform: scaleX(-1);
  width: 88%;
  height: 88%;
}
.hand-visual--right.hand-visual--gesture-paper .hand-visual__premium-image {
  transform: none;
  width: 88%;
  height: 88%;
}

/* Live WOW scissors uses the same accepted inward-facing orientation as DEV. */
.battle-round-result--wow .battle-round-result__side--self .battle-rps-scissors-orient {
  --scissors-base-rot: 85deg;
  --scissors-orient-sx: -1;
}
.battle-round-result--wow .battle-round-result__side--opp .battle-rps-scissors-orient {
  --scissors-base-rot: -85deg;
  --scissors-orient-sx: 1;
}

/* Premium reveal image fills the exact old 4.85rem glyph box. */
.battle-round-result__glyph.premium-match-gesture {
  width: 4.85rem;
  height: 4.85rem;
  object-fit: contain;
  font-size: 0;
}

.battle-wow-half__premium {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
