/* ============================================================================
   Society MLBB — Treino de Caçar  (v5 · precisão de 1 ms)
   Carregar DEPOIS do tools.css.

   v5
   • HP calculado por uma única fórmula (hpAt) usada no desenho e no cast.
   • O erro é a diferença em ms entre o HP no instante do clique e o dano do
     Caçar; por isso é possível registrar 1,0 ms.
   • Leitura de precisão ao vivo abaixo da barra.
   ============================================================================ */

.rt {
  --rt-gold: #f0c14b;
  --rt-gold-soft: #ffe08a;
  --rt-gold-dim: rgba(240, 193, 75, .15);
  --rt-bg: #080b12;
  --rt-bg-2: #0d1119;
  --rt-surface: #131820;
  --rt-surface-2: #1a212c;
  --rt-surface-hi: #232b38;
  --rt-border: rgba(255, 255, 255, .07);
  --rt-border-2: rgba(255, 255, 255, .12);
  --rt-text: #e9ecf2;
  --rt-muted: #7c8595;
  --rt-muted-2: #5b6371;

  --rt-perfect: #4ade80;
  --rt-great: #22d3ee;
  --rt-good: #60a5fa;
  --rt-slow: #fbbf24;
  --rt-fail: #ef4444;

  --rt-hp-color: #4ade80;

  --rt-shadow-lg: 0 24px 48px -24px rgba(0, 0, 0, .9);
  --rt-shadow-sm: 0 8px 20px -12px rgba(0, 0, 0, .8);
  --rt-radius: 14px;
  --rt-radius-sm: 10px;

  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
  color: var(--rt-text);
  font-family: 'Rajdhani', 'Outfit', system-ui, -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
}

.rt *, .rt *::before, .rt *::after { box-sizing: border-box; }
.rt button { font: inherit; color: inherit; }
.rt :focus-visible {
  outline: 2px solid var(--rt-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ═══════════════════ ARENA ═══════════════════ */
.rt-arena {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(320px, 1fr);
  gap: 16px;
  min-height: 620px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--rt-border-2);
  border-radius: var(--rt-radius);
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%,
      rgba(240, 193, 75, .06), transparent 65%),
    radial-gradient(ellipse 90% 60% at 50% 100%,
      rgba(34, 211, 238, .04), transparent 70%),
    linear-gradient(180deg, var(--rt-bg-2), var(--rt-bg));
  box-shadow: var(--rt-shadow-lg);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.rt-arena::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    transparent 55%, rgba(0, 0, 0, .35) 100%);
  border-radius: inherit;
}

.rt-arena::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .012) 1px, transparent 1px);
  background-size: 48px 48px;
  border-radius: inherit;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 30%, transparent 80%);
}

/* ═══════════════════ HUD (topo) ═══════════════════ */
.rt-hud {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.rt-hud-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.rt-time {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(240, 193, 75, .35);
  border-radius: 8px;
  background: rgba(240, 193, 75, .08);
  color: var(--rt-gold);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.rt-title { display: grid; gap: 2px; min-width: 0; }
.rt-title b {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
  background: linear-gradient(180deg, #fff, var(--rt-gold-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rt-title small {
  color: var(--rt-muted);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.rt-scores { display: flex; gap: 8px; flex: none; }
.rt-scorebox {
  position: relative;
  min-width: 84px;
  padding: 8px 14px;
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-sm);
  background: linear-gradient(180deg, var(--rt-surface), var(--rt-bg-2));
  text-align: center;
  overflow: hidden;
}
.rt-scorebox::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
}
.rt-scorebox small {
  display: block;
  color: var(--rt-muted);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.rt-scorebox b {
  display: block;
  margin-top: 2px;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}
.rt-scorebox:first-child b {
  color: var(--rt-gold);
  text-shadow: 0 0 18px rgba(240, 193, 75, .45);
}
.rt-scorebox:last-child b {
  color: var(--rt-perfect);
  text-shadow: 0 0 18px rgba(74, 222, 128, .4);
}

/* ═══════════════════ HP BAR ═══════════════════ */
.rt-barwrap {
  position: relative;
  z-index: 2;
  padding-top: 36px;
}
.rt-marks {
  position: absolute;
  inset: 0 0 auto;
  height: 30px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
}
.rt-line-label {
  position: absolute;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border: 1px solid rgba(240, 193, 75, .55);
  border-radius: 6px;
  background: rgba(240, 193, 75, .14);
  color: var(--rt-gold);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  white-space: nowrap;
  transform: translateX(-50%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.rt-line-label::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 0;
  margin-left: -5px;
  margin-top: -1px;
  border: 5px solid transparent;
  border-top-color: rgba(240, 193, 75, .8);
}
.rt-hp-label {
  position: absolute;
  right: 0;
  top: 3px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .4);
  color: var(--rt-text);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* leitura de precisão ao vivo (ms) */
.rt-live {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 2px 0;
  color: var(--rt-muted, #8b93a7);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.rt-live b {
  color: var(--rt-text);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.rt-live[data-state="early"] b { color: var(--rt-gold, #f0c14b); }
.rt-live[data-state="late"] b,
.rt-live[data-state="secure"] b { color: var(--rt-perfect, #4ade80); }
.rt-live[data-state="fail"] b { color: var(--rt-fail, #ef4444); }

/* moldura da barra (sem overflow:hidden para não cortar os marcadores) */
.rt-bar {
  position: relative;
  height: 52px;
  padding: 0;
  border: 1px solid var(--rt-border-2);
  border-radius: 11px;
  background: linear-gradient(180deg, #05070b, #0a0e15);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, .7),
    inset 0 -1px 0 rgba(255, 255, 255, .04);
}

/* TRILHA: sistema de coordenadas único para fill, zona e linha.
   left:0 = 0% de HP · right:0 = 100% de HP. */
.rt-track {
  position: absolute;
  inset: 4px;
  border-radius: 8px;
}
/* segmentos de fundo (a cada 5%) */
.rt-track::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background-image: linear-gradient(90deg,
    rgba(255, 255, 255, .07) 0, rgba(255, 255, 255, .07) 1px,
    transparent 1px);
  background-size: 5% 100%;
  pointer-events: none;
  z-index: 3;
}

.rt-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  border-radius: 8px 0 0 8px;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--rt-hp-color) 90%, white) 0%,
      var(--rt-hp-color) 45%,
      color-mix(in srgb, var(--rt-hp-color) 70%, black) 100%);
  box-shadow:
    0 0 18px -4px color-mix(in srgb, var(--rt-hp-color) 60%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .25);
  /* SEM transição de largura: o que você vê é o que o jogo calcula */
  transition: background-color .3s ease;
  z-index: 1;
}
.rt-bar-fill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, .22) 0%,
    rgba(255, 255, 255, .04) 40%,
    transparent 60%);
  pointer-events: none;
}
/* ponta brilhante: é ELA que precisa cruzar a linha */
.rt-bar-fill::after {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  right: -1px;
  width: 3px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 8px #fff, 0 0 16px var(--rt-hp-color);
}
.rt-bar-fill.is-hit { animation: rt-bar-hit .18s ease-out; }
@keyframes rt-bar-hit {
  0%   { filter: brightness(2.2) saturate(1.4); }
  100% { filter: brightness(1) saturate(1); }
}

/* zona de secure: de 0 até a linha */
.rt-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: 8px 0 0 8px;
  background:
    repeating-linear-gradient(135deg,
      rgba(240, 193, 75, .30) 0 6px,
      rgba(240, 193, 75, .08) 6px 12px);
  box-shadow: inset 0 0 0 1px rgba(240, 193, 75, .35);
  pointer-events: none;
  z-index: 2;
}

/* linha de secure */
.rt-bar-line {
  position: absolute;
  top: -10px;
  bottom: -10px;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--rt-gold-soft);
  box-shadow:
    0 0 8px var(--rt-gold),
    0 0 18px rgba(240, 193, 75, .5);
  z-index: 4;
  pointer-events: none;
}
.rt-bar-line::before,
.rt-bar-line::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--rt-gold-soft);
  box-shadow: 0 0 10px var(--rt-gold);
}
.rt-bar-line::before { top: -5px; }
.rt-bar-line::after  { bottom: -5px; }

/* aproximando: ainda NÃO vale, mas fique pronto */
.rt.is-near:not(.is-open) .rt-line-label {
  border-color: var(--rt-slow);
  background: rgba(251, 191, 36, .16);
  color: var(--rt-slow);
}
.rt.is-near:not(.is-open) .rt-zone {
  background:
    repeating-linear-gradient(135deg,
      rgba(251, 191, 36, .34) 0 6px,
      rgba(251, 191, 36, .10) 6px 12px);
}

/* OPEN — a ponta do fill já está dentro da zona */
.rt.is-open .rt-bar {
  border-color: color-mix(in srgb, var(--rt-perfect) 60%, transparent);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, .7),
    0 0 0 3px rgba(74, 222, 128, .18),
    0 0 32px -8px var(--rt-perfect);
}
.rt.is-open .rt-zone {
  background:
    repeating-linear-gradient(135deg,
      rgba(74, 222, 128, .38) 0 6px,
      rgba(74, 222, 128, .12) 6px 12px);
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .6);
}
.rt.is-open .rt-bar-line {
  background: var(--rt-perfect);
  box-shadow: 0 0 14px var(--rt-perfect), 0 0 30px var(--rt-perfect);
  animation: rt-line-pulse .6s ease-in-out infinite alternate;
}
.rt.is-open .rt-bar-line::before,
.rt.is-open .rt-bar-line::after {
  background: var(--rt-perfect);
  box-shadow: 0 0 14px var(--rt-perfect);
}
@keyframes rt-line-pulse {
  from { filter: brightness(1); }
  to   { filter: brightness(1.5); }
}
.rt.is-open .rt-line-label {
  border-color: var(--rt-perfect);
  background: rgba(74, 222, 128, .18);
  color: var(--rt-perfect);
  box-shadow: 0 0 20px -4px var(--rt-perfect);
}
.rt.is-open .rt-line-label::after { border-top-color: var(--rt-perfect); }

/* ═══════════════════ STAGE ═══════════════════ */
.rt-stage {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 320px;
}

.rt-objective {
  width: min(200px, 40%);
  height: auto;
  color: var(--rt-gold);
  filter:
    drop-shadow(0 0 32px rgba(240, 193, 75, .25))
    drop-shadow(0 0 8px rgba(240, 193, 75, .15));
  animation: rt-obj-idle 4s ease-in-out infinite;
  transition: color .3s ease, filter .3s ease;
}
@keyframes rt-obj-idle {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-6px) scale(1.015); }
}
.rt.is-open .rt-objective {
  color: var(--rt-perfect);
  filter:
    drop-shadow(0 0 40px rgba(74, 222, 128, .55))
    drop-shadow(0 0 12px rgba(74, 222, 128, .35));
  animation: rt-obj-open .5s ease-in-out infinite alternate;
}
@keyframes rt-obj-open {
  from { transform: scale(1); }
  to   { transform: scale(1.05); }
}

.rt-hint {
  position: absolute;
  top: 0; left: 0; right: 0;
  margin: 0;
  color: var(--rt-muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-align: center;
  text-transform: uppercase;
}
.rt:not([data-phase="running"]) .rt-hint { visibility: hidden; }

.rt-unit {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--rt-muted);
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.rt-unit[hidden] { display: none; }
.rt-unit-dot {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--rt-good);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 30%,
      color-mix(in srgb, var(--rt-good) 30%, transparent),
      transparent 70%),
    color-mix(in srgb, var(--rt-good) 8%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .1),
    0 0 16px -4px color-mix(in srgb, var(--rt-good) 50%, transparent);
  transition: transform .2s, box-shadow .2s;
}
.rt-unit-rival .rt-unit-dot {
  border-color: var(--rt-fail);
  background:
    radial-gradient(circle at 50% 30%,
      color-mix(in srgb, var(--rt-fail) 30%, transparent),
      transparent 70%),
    color-mix(in srgb, var(--rt-fail) 8%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .1),
    0 0 16px -4px color-mix(in srgb, var(--rt-fail) 50%, transparent);
}
.rt-unit-rival { top: 12%; right: 12%; }
.rt-ally-a { top: 12%; left: 12%; }
.rt-ally-b { bottom: 22%; left: 10%; }
.rt-unit-rival.is-steal .rt-unit-dot {
  background: var(--rt-fail);
  box-shadow: 0 0 26px var(--rt-fail), 0 0 46px rgba(239, 68, 68, .6);
  animation: rt-steal .35s ease-out;
}
@keyframes rt-steal {
  0%   { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.rt-floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.rt-float {
  position: absolute;
  top: 18%;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  text-shadow:
    0 0 12px rgba(239, 68, 68, .65),
    0 2px 4px rgba(0, 0, 0, .9);
  opacity: 0;
  animation: rt-float .85s cubic-bezier(.2, .7, .4, 1) forwards;
}
@keyframes rt-float {
  0%   { opacity: 0; transform: translateY(0) scale(.7); }
  15%  { opacity: 1; transform: translateY(-4px) scale(1.05); }
  100% { opacity: 0; transform: translateY(56px) scale(.85); }
}

/* ═══════════════════ OVERLAY (início / resultado) ═══════════════════ */
.rt-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 22px;
  text-align: center;
  background:
    radial-gradient(ellipse at center, rgba(8, 11, 18, .85), rgba(8, 11, 18, .95));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: inherit;
  animation: rt-fade-in .2s ease-out;
}
@keyframes rt-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.rt[data-phase="running"] .rt-overlay { display: none; }

.rt-ov-title {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rt-gold);
  text-shadow: 0 0 24px rgba(240, 193, 75, .4);
  line-height: 1;
}
.rt-ov-title[data-kind="perfect"] { color: var(--rt-perfect); text-shadow: 0 0 26px rgba(74, 222, 128, .5); }
.rt-ov-title[data-kind="great"]   { color: var(--rt-great);   text-shadow: 0 0 26px rgba(34, 211, 238, .5); }
.rt-ov-title[data-kind="good"]    { color: var(--rt-good);    text-shadow: 0 0 26px rgba(96, 165, 250, .5); }
.rt-ov-title[data-kind="slow"]    { color: var(--rt-slow);    text-shadow: 0 0 26px rgba(251, 191, 36, .5); }
.rt-ov-title[data-kind="late"]    { color: var(--rt-slow);    text-shadow: 0 0 26px rgba(251, 191, 36, .35); }
.rt-ov-title[data-kind="fail"]    { color: var(--rt-fail);    text-shadow: 0 0 26px rgba(239, 68, 68, .5); }

.rt-ov-sub {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.rt-ov-detail {
  max-width: 48ch;
  margin: 4px 0 0;
  color: var(--rt-muted);
  font-size: .92rem;
  line-height: 1.55;
}
.rt-ov-pts {
  padding: 5px 14px;
  border: 1px solid rgba(240, 193, 75, .55);
  border-radius: 8px;
  background: rgba(240, 193, 75, .14);
  color: var(--rt-gold);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: 0 0 20px -6px rgba(240, 193, 75, .6);
}
.rt-ov-pts[hidden] { display: none; }

.rt-ov-hint {
  margin: 8px 0 0;
  color: var(--rt-muted-2);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.rt-start {
  min-height: 46px;
  margin-top: 8px;
  padding: 12px 32px;
  border: 1px solid var(--rt-gold);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--rt-gold-soft), var(--rt-gold));
  color: #17120a;
  font-family: inherit;
  font-weight: 800;
  font-size: .9rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 8px 24px -8px rgba(240, 193, 75, .6),
    inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .12s ease, box-shadow .2s;
}
.rt-start:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 32px -8px rgba(240, 193, 75, .8),
    inset 0 1px 0 rgba(255, 255, 255, .5);
}
.rt-start:active { transform: translateY(0); }

/* ═══════════════════ BOTÃO RESET ═══════════════════ */
.rt-reset {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  padding: 8px 14px;
  border: 1px solid var(--rt-border);
  border-radius: 8px;
  background: rgba(19, 24, 32, .8);
  color: var(--rt-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: color .15s, border-color .15s, background .15s;
}
.rt-reset:hover {
  color: var(--rt-text);
  border-color: rgba(240, 193, 75, .4);
  background: rgba(240, 193, 75, .08);
}

/* ═══════════════════ BOTÃO RETRI / CAÇAR (slot de spell) ═══════════════════ */
.rt-cast-wrap {
  position: absolute;
  right: 22px;
  bottom: 14px;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.rt-cast {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--rt-gold);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .08s ease;
  -webkit-tap-highlight-color: transparent;
}
.rt-cast:active { transform: scale(.94); }

.rt-cast::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%,
      rgba(255, 255, 255, .08),
      transparent 55%),
    radial-gradient(circle at 50% 80%,
      rgba(0, 0, 0, .4),
      transparent 60%),
    linear-gradient(180deg, #1a212c, #0d1119);
  border: 2px solid currentColor;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, .8),
    inset 0 -1px 0 rgba(255, 255, 255, .06),
    0 8px 22px -10px rgba(0, 0, 0, .9),
    0 0 0 4px rgba(0, 0, 0, .35);
  transition: border-color .2s, box-shadow .3s, background .2s;
}

.rt-cast-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
.rt.is-open .rt-cast-pulse {
  opacity: 1;
  border-color: var(--rt-perfect);
  animation: rt-cast-pulse 1.2s ease-out infinite;
}
@keyframes rt-cast-pulse {
  0%   { transform: scale(.9);  opacity: .9; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* imagem do Caçar (static/assets/caçar.png) */
.rt-cast-img {
  position: absolute;
  z-index: 1;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  filter: saturate(.9) brightness(.9);
  transition: filter .2s;
}
.rt-cast.has-img .rt-cast-icon { display: none; }
.rt.is-open .rt-cast-img {
  filter: saturate(1.15) brightness(1.1) drop-shadow(0 0 10px var(--rt-perfect));
}

/* ícone SVG (fallback) */
.rt-cast-icon {
  position: relative;
  z-index: 1;
  width: 62%;
  height: 62%;
  color: currentColor;
  transition: color .2s, filter .3s;
  filter: drop-shadow(0 0 8px color-mix(in srgb, currentColor 40%, transparent));
}

/* label sobre a imagem, com fundo para leitura */
.rt-cast-label {
  position: absolute;
  z-index: 2;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .65);
  text-align: center;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .2em;
  color: currentColor;
  text-transform: uppercase;
}
.rt-cast-dmg {
  position: absolute;
  z-index: 2;
  bottom: -22px;
  left: 0; right: 0;
  text-align: center;
  font-size: .82rem;
  font-weight: 800;
  color: var(--rt-text);
  text-shadow: 0 0 12px rgba(0, 0, 0, .8);
  letter-spacing: .04em;
}

.rt.is-open .rt-cast { color: var(--rt-perfect); }
.rt.is-open .rt-cast::before {
  border-color: var(--rt-perfect);
  background:
    radial-gradient(circle at 50% 30%,
      rgba(74, 222, 128, .18),
      transparent 55%),
    radial-gradient(circle at 50% 80%,
      rgba(0, 0, 0, .4),
      transparent 60%),
    linear-gradient(180deg, #16241c, #0a150f);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, .8),
    inset 0 -1px 0 rgba(74, 222, 128, .15),
    0 8px 22px -10px rgba(0, 0, 0, .9),
    0 0 32px -6px var(--rt-perfect),
    0 0 0 4px rgba(74, 222, 128, .12);
}
.rt.is-open .rt-cast-icon {
  filter: drop-shadow(0 0 14px var(--rt-perfect));
  animation: rt-icon-glow .6s ease-in-out infinite alternate;
}
@keyframes rt-icon-glow {
  from { filter: drop-shadow(0 0 10px var(--rt-perfect)); }
  to   { filter: drop-shadow(0 0 20px var(--rt-perfect)); }
}

/* ═══════════════════ PAINEL LATERAL ═══════════════════ */
.rt-side { display: grid; gap: 14px; min-width: 0; }

.rt-panel {
  position: relative;
  padding: 16px;
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-sm);
  background: linear-gradient(180deg, var(--rt-surface), var(--rt-bg-2));
  box-shadow: var(--rt-shadow-sm);
}
.rt-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
}
.rt-panel-title {
  margin: 0 0 12px;
  color: var(--rt-gold);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.rt-dmg-big {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--rt-gold-soft);
  letter-spacing: .02em;
  text-shadow: 0 0 24px rgba(240, 193, 75, .35);
}
.rt-dmg-sub {
  margin: 4px 0 14px;
  color: var(--rt-muted);
  font-size: .76rem;
}
.rt-level {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  color: var(--rt-muted);
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.rt-level b {
  color: var(--rt-gold);
  font-size: 1rem;
}
.rt-level input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--rt-gold);
}

.rt-opts { display: grid; gap: 6px; }
.rt-opts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rt-opts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.rt-opt {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--rt-border);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--rt-bg-2), var(--rt-bg));
  color: var(--rt-text);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s;
}
.rt-opt:hover {
  border-color: color-mix(in srgb, var(--rt-gold) 45%, var(--rt-border));
  transform: translateY(-1px);
}
.rt-opt b {
  font-size: .78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rt-opt small {
  color: var(--rt-muted);
  font-size: .66rem;
  line-height: 1.3;
}
.rt-opt[aria-pressed="true"] {
  border-color: var(--rt-gold);
  background: linear-gradient(180deg, rgba(240, 193, 75, .14), rgba(240, 193, 75, .04));
  box-shadow: 0 0 20px -8px rgba(240, 193, 75, .6);
}
.rt-opt[aria-pressed="true"] b { color: var(--rt-gold-soft); }
.rt-opt[aria-pressed="true"] small { color: rgba(240, 193, 75, .8); }

.rt-perf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.rt-perf-cell {
  padding: 9px 6px;
  border: 1px solid var(--rt-border);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--rt-bg-2), var(--rt-bg));
  text-align: center;
}
.rt-perf-cell small {
  display: block;
  color: var(--rt-muted);
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rt-perf-cell b {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.rt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
  min-height: 24px;
}
.rt-chip {
  min-width: 46px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .03);
  border-bottom: 2px solid currentColor;
  font-size: .68rem;
  font-weight: 800;
  text-align: center;
}
.rt-chip-perfect { color: var(--rt-perfect); }
.rt-chip-great   { color: var(--rt-great); }
.rt-chip-good    { color: var(--rt-good); }
.rt-chip-slow    { color: var(--rt-slow); }
.rt-chip-late    { color: var(--rt-slow); }
.rt-chip-fail    { color: var(--rt-fail); }

.rt-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-sm);
  background: rgba(19, 24, 32, .6);
  color: var(--rt-muted);
  font-size: .76rem;
  line-height: 1.55;
}

/* ═══════════════════ RESPONSIVO ═══════════════════ */
@media (max-width: 900px) {
  .rt { grid-template-columns: 1fr; }
  .rt-arena { min-height: 540px; }
  .rt-cast-wrap { right: 16px; bottom: 12px; }
  .rt-cast { width: 96px; height: 96px; }
  .rt-cast-label { bottom: 8px; font-size: .56rem; }
  .rt-cast-dmg { bottom: -20px; font-size: .76rem; }
}
@media (max-width: 520px) {
  .rt-arena { padding: 14px; min-height: 500px; }
  .rt-title b { font-size: 1.1rem; }
  .rt-scorebox { min-width: 68px; padding: 6px 10px; }
  .rt-scorebox b { font-size: 1.1rem; }
  .rt-bar { height: 46px; }
  .rt-cast { width: 86px; height: 86px; }
  .rt-opts-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-perf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-unit-dot { width: 30px; height: 30px; }
  .rt-line-label { font-size: .62rem; padding: 2px 6px; }
  .rt-hp-label { font-size: .66rem; padding: 1px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .rt-float, .rt-objective, .rt-cast-pulse,
  .rt.is-open .rt-bar-line, .rt.is-open .rt-cast-icon { animation: none !important; }
  .rt-cast { transition: none; }
}