/* ==========================================================================
   Gopnik NFT Marketplace — v2 Arena (Iteration 4)
   All styles scoped under `.mpv2a-*`.  Depends on nft_tokens_v2.css for
   design tokens and nft_marketplace_v2.css for the shared nav / chrome.
   ========================================================================== */

/* ── Body wrapper (fills viewport and owns background paint) ───────────── */
.mpv2a {
  --mpv2a-layout-max: 1440px;
  --mpv2a-rail-w: 320px;
  color: var(--mpv2-text);
  font-family: var(--mpv2-font-body);
  min-height: 100vh;
  background:
    radial-gradient(90% 70% at 50% -20%, rgba(239,68,68,0.15), transparent 70%),
    radial-gradient(40% 30% at 90% 10%, rgba(139,92,246,0.20), transparent 70%),
    radial-gradient(50% 40% at 10% 60%, rgba(34,211,238,0.12), transparent 70%),
    var(--mpv2-bg-deep);
  overflow-x: hidden;
}
.mpv2a * { box-sizing: border-box; }

/* ── Headline strip ───────────────────────────────────────────────────── */
/*
 * Isolate the headline (CSS containment) so the stage's SSE-driven
 * floaters and HP fills below can never invalidate the headline's paint
 * layer.  This, combined with the nav's GPU promotion in
 * nft_marketplace_v2.css, fixes the "top banner flickers" report.
 */
.mpv2a-headline {
  border-bottom: 1px solid var(--mpv2-border);
  contain: layout paint style;
  isolation: isolate;
  position: relative;
  z-index: 1;
}
.mpv2a-headline-inner {
  max-width: var(--mpv2a-layout-max);
  margin: 0 auto;
  padding: 28px 24px 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.mpv2a-h1 {
  font-family: var(--mpv2-font-disp);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.02em;
  margin: 14px 0 6px;
  background: var(--mpv2-grad-title);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.mpv2a-sub {
  color: var(--mpv2-text-dim);
  font-size: 0.95rem;
  max-width: 640px;
  line-height: 1.5;
}
.mpv2a-headline-stats {
  display: flex;
  gap: 12px;
}
.mpv2a-stat {
  background: var(--mpv2-bg-panel);
  border: 1px solid var(--mpv2-border);
  border-radius: var(--mpv2-radius-md);
  padding: 12px 18px;
  min-width: 120px;
}
.mpv2a-stat-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mpv2-text-faint);
  font-weight: 700;
  margin-bottom: 4px;
}
.mpv2a-stat-val {
  font-family: var(--mpv2-font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--mpv2-text);
  display: inline-block;
}
.mpv2a-stat-val small {
  font-size: 0.7rem;
  color: var(--mpv2-text-dim);
  margin-left: 4px;
}

/* ── Three-column grid ────────────────────────────────────────────────── */
/*
 * Default: 3-column lobby (left roster, center stage, right queue).
 * Tablet landscape (1000-1200px): stage takes the full top row, roster +
 *   queue cards share the row below it — still feels like a lobby, no
 *   card cut-off.
 * Tablet portrait / phone (≤1000px): single column stack.
 */
.mpv2a-grid {
  max-width: var(--mpv2a-layout-max);
  margin: 0 auto;
  padding: 24px 24px 72px;
  display: grid;
  grid-template-columns: var(--mpv2a-rail-w) 1fr var(--mpv2a-rail-w);
  grid-template-areas: "left stage right";
  gap: 24px;
  align-items: start;
}
.mpv2a-left  { grid-area: left;  }
.mpv2a-stage { grid-area: stage; }
.mpv2a-right { grid-area: right; }

@media (max-width: 1200px) {
  .mpv2a-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "stage stage"
      "left  right";
  }
  .mpv2a-stage { min-height: 620px; }
}
@media (max-width: 1000px) {
  .mpv2a-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "stage"
      "left"
      "right";
  }
}

/* ── Shared panel header ──────────────────────────────────────────────── */
.mpv2a-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--mpv2-border);
}
.mpv2a-panel-head h2, .mpv2a-panel-head h3 {
  font-family: var(--mpv2-font-disp);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}
.mpv2a-stage-hint {
  color: var(--mpv2-text-faint);
  font-family: var(--mpv2-font-mono);
  font-size: 0.72rem;
}

/* ── Filter chips (roster + modes) ────────────────────────────────────── */
.mpv2a-chip {
  padding: 4px 10px;
  background: transparent;
  color: var(--mpv2-text-dim);
  border: 1px solid var(--mpv2-border);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--mpv2-dur-fast);
}
.mpv2a-chip:hover { background: rgba(139,92,246,0.10); color: var(--mpv2-text); }
.mpv2a-chip.is-active {
  background: rgba(139,92,246,0.22);
  color: var(--mpv2-text);
  border-color: var(--mpv2-border-hi);
}

/* ── LEFT: roster ─────────────────────────────────────────────────────── */
.mpv2a-left, .mpv2a-right, .mpv2a-queue-card, .mpv2a-history-card {
  background: var(--mpv2-bg-panel);
  border: 1px solid var(--mpv2-border);
  border-radius: var(--mpv2-radius-lg);
  box-shadow: var(--mpv2-shadow-card);
  overflow: hidden;
}
.mpv2a-left .mpv2a-panel-head { flex-wrap: wrap; }
.mpv2a-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mpv2a-roster {
  list-style: none;
  margin: 0;
  padding: 8px;
  max-height: 720px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.mpv2a-roster-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: var(--mpv2-radius-md);
  background: rgba(15,18,55,0.35);
  border: 1px solid transparent;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all var(--mpv2-dur-fast);
}
.mpv2a-roster-item:hover {
  border-color: var(--mpv2-border-hi);
  background: rgba(139,92,246,0.10);
  transform: translateY(-1px);
}
.mpv2a-roster-thumb {
  width: 52px; height: 52px;
  border-radius: var(--mpv2-radius-sm);
  background: #0a0a1a;
  overflow: hidden;
  position: relative;
}
.mpv2a-roster-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.mpv2a-roster-meta { min-width: 0; }
.mpv2a-roster-name {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mpv2a-roster-owner {
  font-family: var(--mpv2-font-mono);
  font-size: 0.7rem;
  color: var(--mpv2-text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
}
.mpv2a-roster-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.mpv2a-roster-mode,
.mpv2a-roster-stake {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-family: var(--mpv2-font-mono);
  font-weight: 700;
  text-transform: uppercase;
}
.mpv2a-roster-mode { background: rgba(139,92,246,0.18); color: var(--mpv2-text); }
.mpv2a-roster-mode[data-mode="ranked"]   { background: rgba(245,158,11,0.22); }
.mpv2a-roster-mode[data-mode="friendly"] { background: rgba(52,211,153,0.22); }
.mpv2a-roster-mode[data-mode="bot"]      { background: rgba(100,116,139,0.22); }
.mpv2a-roster-stake {
  background: rgba(34,211,238,0.18);
  color: var(--mpv2-cyan);
}
.mpv2a-roster-cta {
  padding: 8px 12px;
  background: rgba(239,68,68,0.18);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: var(--mpv2-radius-sm);
  font-weight: 700;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all var(--mpv2-dur-fast);
}
.mpv2a-roster-cta:hover { background: rgba(239,68,68,0.32); color: #fff; }
.mpv2a-roster-empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--mpv2-text-dim);
}
.mpv2a-roster-empty-icon {
  font-size: 2.4rem;
  margin-bottom: 10px;
  opacity: 0.5;
}
.mpv2a-hint {
  font-size: 0.78rem;
  color: var(--mpv2-text-faint);
  margin-top: 6px;
}
.mpv2a-roster-foot {
  padding: 10px 18px;
  border-top: 1px solid var(--mpv2-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--mpv2-text-dim);
}

/* ── CENTER: stage ───────────────────────────────────────────────────── */
/*
 * The stage is the frame-driven heart of the arena — HP bars animate at
 * 10+ fps, damage floaters spawn + remove every turn, the ultimate
 * overlay flashes in, etc.  `contain: layout paint` keeps every one of
 * those invalidations inside the card so they never ripple out to
 * repaint the headline or nav (root cause of the "banner flicker" bug).
 */
.mpv2a-stage {
  background: var(--mpv2-bg-panel);
  border: 1px solid var(--mpv2-border);
  border-radius: var(--mpv2-radius-lg);
  box-shadow: var(--mpv2-shadow-card);
  position: relative;
  overflow: hidden;
  min-height: 720px;
  contain: layout paint;
  isolation: isolate;
}
.mpv2a-stage-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--mpv2-border);
}
.mpv2a-stage-head h2 {
  font-family: var(--mpv2-font-disp);
  font-weight: 800;
  font-size: 1rem;
  margin: 0;
  flex: 1;
}
.mpv2a-stage-speed {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--mpv2-text-dim);
}
.mpv2a-stage-speed select {
  background: rgba(15,18,55,0.65);
  border: 1px solid var(--mpv2-border);
  color: var(--mpv2-text);
  padding: 4px 10px;
  border-radius: var(--mpv2-radius-sm);
  font-family: var(--mpv2-font-mono);
  font-size: 0.75rem;
  cursor: pointer;
}

/* ── Fighters (VS panel) ─────────────────────────────────────────────── */
.mpv2a-fighters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 28px 24px 24px;
  position: relative;
}
.mpv2a-fighter {
  display: grid;
  grid-template-columns: clamp(84px, 14vw, 120px) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 8px 14px;
  align-items: center;
  background: rgba(15,18,55,0.42);
  border: 1px solid var(--mpv2-border);
  border-radius: var(--mpv2-radius-md);
  padding: 16px;
  position: relative;
  min-width: 0;
  transition: border-color var(--mpv2-dur-fast);
}
.mpv2a-fighter[data-acting="true"] {
  border-color: var(--mpv2-amber);
  box-shadow: 0 0 24px rgba(245,158,11,0.22);
}
.mpv2a-fighter[data-defeated="true"] {
  opacity: 0.55;
  filter: grayscale(0.6);
}
.mpv2a-fighter-frame {
  grid-row: 1 / span 3;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 120px;
  border-radius: var(--mpv2-radius-md);
  position: relative;
  overflow: hidden;
  background: #0a0a1a;
}
.mpv2a-fighter-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.mpv2a-fighter-aura {
  position: absolute; inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), rgba(139,92,246,0.55), transparent 60%);
  opacity: 0; transition: opacity 200ms;
  pointer-events: none;
}
.mpv2a-fighter[data-acting="true"] .mpv2a-fighter-aura {
  opacity: 1;
  animation: mpv2a-spin 3s linear infinite;
}
.mpv2a-fighter-b {
  grid-template-columns: 1fr 120px;
  text-align: right;
}
.mpv2a-fighter-b .mpv2a-fighter-frame { grid-column: 2; }
.mpv2a-fighter-b .mpv2a-fighter-meta,
.mpv2a-fighter-b .mpv2a-hp-row,
.mpv2a-fighter-b .mpv2a-stats-ticker { grid-column: 1; }
.mpv2a-fighter-name {
  font-family: var(--mpv2-font-disp);
  font-weight: 800;
  font-size: 1.05rem;
}
.mpv2a-fighter-owner {
  font-size: 0.7rem;
  color: var(--mpv2-text-dim);
}
.mpv2a-hp-row {
  display: flex; align-items: center; gap: 8px;
}
.mpv2a-fighter-b .mpv2a-hp-row { flex-direction: row-reverse; }
.mpv2a-hp-label {
  font-family: var(--mpv2-font-mono);
  font-size: 0.65rem;
  color: var(--mpv2-text-faint);
  font-weight: 700;
}
.mpv2a-hp-bar {
  flex: 1;
  height: 10px;
  background: rgba(100,116,139,0.25);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.mpv2a-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mpv2-green), #84ffb0);
  border-radius: inherit;
  transition: width 300ms var(--mpv2-ease-out);
}
.mpv2a-fighter-b .mpv2a-hp-fill {
  margin-left: auto;
  background: linear-gradient(270deg, var(--mpv2-green), #84ffb0);
}
.mpv2a-hp-fill[data-low="true"] {
  background: linear-gradient(90deg, var(--mpv2-red), #ffb4b4);
  animation: mpv2a-hp-pulse 1s ease-in-out infinite;
}
.mpv2a-hp-val {
  font-family: var(--mpv2-font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--mpv2-text);
  min-width: 70px;
  text-align: right;
}
.mpv2a-fighter-b .mpv2a-hp-val { text-align: left; }
.mpv2a-stats-ticker {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.mpv2a-fighter-b .mpv2a-stats-ticker { justify-content: flex-end; }
.mpv2a-pill {
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--mpv2-font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(139,92,246,0.18);
  color: var(--mpv2-text);
}
.mpv2a-pill[data-stat="atk"]  { background: rgba(239,68,68,0.22);  color: #fca5a5; }
.mpv2a-pill[data-stat="def"]  { background: rgba(34,211,238,0.22); color: #67e8f9; }
.mpv2a-pill[data-stat="spd"]  { background: rgba(245,158,11,0.22); color: #fcd34d; }
.mpv2a-pill[data-stat="hp"]   { background: rgba(52,211,153,0.22); color: #86efac; }

/* ── VS centerpiece ──────────────────────────────────────────────────── */
.mpv2a-vs {
  display: grid; place-items: center; gap: 4px;
  text-align: center;
}
.mpv2a-vs-lightning {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 12px rgba(245,158,11,0.7));
}
.mpv2a-vs-label {
  font-family: var(--mpv2-font-disp);
  font-weight: 900;
  font-size: 1.4rem;
  background: var(--mpv2-grad-title);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  letter-spacing: 0.15em;
}
.mpv2a-vs-turn {
  font-family: var(--mpv2-font-mono);
  font-size: 0.7rem;
  color: var(--mpv2-text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Damage floaters ─────────────────────────────────────────────────── */
.mpv2a-floaters {
  position: absolute;
  top: 60px; left: 0; right: 0; bottom: 200px;
  pointer-events: none;
}
.mpv2a-floater {
  position: absolute;
  font-family: var(--mpv2-font-disp);
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--mpv2-red);
  text-shadow: 0 2px 8px rgba(0,0,0,0.8), 0 0 18px rgba(239,68,68,0.6);
  animation: mpv2a-floater-up 1200ms ease-out forwards;
  pointer-events: none;
}
.mpv2a-floater[data-kind="crit"] {
  color: #fcd34d;
  font-size: 1.8rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8), 0 0 20px rgba(245,158,11,0.8);
}
.mpv2a-floater[data-kind="heal"] {
  color: var(--mpv2-green);
}

/* ── Ultimate cut-in ─────────────────────────────────────────────────── */
.mpv2a-ult {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.55), rgba(0,0,0,0.85));
  display: grid; place-items: center;
  z-index: 20;
  animation: mpv2a-ult-in 200ms var(--mpv2-ease-out);
}
.mpv2a-ult-card {
  text-align: center;
  padding: 32px 48px;
  border-radius: var(--mpv2-radius-lg);
  background: rgba(139,92,246,0.22);
  border: 2px solid var(--mpv2-border-hi);
  box-shadow: 0 0 60px rgba(139,92,246,0.55);
  transform: scale(1);
  animation: mpv2a-ult-punch 380ms var(--mpv2-ease-spring);
}
.mpv2a-ult-kicker {
  font-family: var(--mpv2-font-disp);
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  color: var(--mpv2-amber);
  margin-bottom: 10px;
}
.mpv2a-ult-title {
  font-family: var(--mpv2-font-disp);
  font-weight: 900;
  font-size: 2.2rem;
  background: var(--mpv2-grad-title);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  letter-spacing: -0.02em;
}

/* ── Log ─────────────────────────────────────────────────────────────── */
.mpv2a-log-card {
  margin: 0 24px 24px;
  background: rgba(10,10,26,0.55);
  border: 1px solid var(--mpv2-border);
  border-radius: var(--mpv2-radius-md);
  overflow: hidden;
}
.mpv2a-log {
  list-style: none;
  margin: 0;
  padding: 8px 12px 14px;
  max-height: 200px;
  overflow-y: auto;
  font-family: var(--mpv2-font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
}
.mpv2a-log li {
  padding: 4px 6px;
  border-radius: var(--mpv2-radius-xs);
  color: var(--mpv2-text-dim);
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: baseline;
}
.mpv2a-log li .mpv2a-log-turn {
  color: var(--mpv2-text-faint);
  font-weight: 700;
}
.mpv2a-log li[data-kind="crit"]   { color: #fcd34d; }
.mpv2a-log li[data-kind="attack"] { color: var(--mpv2-text); }
.mpv2a-log li[data-kind="end"]    { color: var(--mpv2-green); font-weight: 700; }
.mpv2a-log li[data-kind="start"]  { color: var(--mpv2-cyan);  font-weight: 700; }
.mpv2a-log li[data-kind="status"] { color: var(--mpv2-amber); font-style: italic; }

/* ── Empty / result overlay ──────────────────────────────────────────── */
.mpv2a-stage-overlay {
  position: absolute; inset: 60px 0 200px;
  display: grid; place-items: center;
  text-align: center;
  color: var(--mpv2-text-dim);
  background: radial-gradient(ellipse at center, rgba(5,5,16,0.85), transparent 70%);
  pointer-events: none;
}
.mpv2a-stage-overlay[hidden] { display: none; }
.mpv2a-overlay-icon {
  font-size: 3rem;
  opacity: 0.4;
  margin-bottom: 10px;
}

/* ── RIGHT: queue card ───────────────────────────────────────────────── */
.mpv2a-queue-card { padding-bottom: 18px; }
.mpv2a-field { display: block; padding: 10px 18px 4px; }
.mpv2a-field-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mpv2-text-faint);
  font-weight: 700;
  margin-bottom: 6px;
}
.mpv2a-field select,
.mpv2a-field input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  background: rgba(15,18,55,0.65);
  border: 1px solid var(--mpv2-border);
  color: var(--mpv2-text);
  border-radius: var(--mpv2-radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
}
.mpv2a-field input[type="number"] { font-family: var(--mpv2-font-mono); }
.mpv2a-mode-row {
  display: flex; gap: 6px; flex-wrap: wrap;
  font-size: 0.8rem;
}
.mpv2a-mode-row label {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 10px;
  background: rgba(15,18,55,0.45);
  border: 1px solid var(--mpv2-border);
  border-radius: var(--mpv2-radius-sm);
  cursor: pointer;
}
.mpv2a-muted { color: var(--mpv2-text-faint); font-weight: 500; }
.mpv2a-preview {
  margin: 14px 18px 0;
  padding: 14px;
  background: rgba(10,10,26,0.55);
  border: 1px solid var(--mpv2-border);
  border-radius: var(--mpv2-radius-md);
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}
.mpv2a-preview-img {
  width: 72px; height: 72px;
  border-radius: var(--mpv2-radius-sm);
  overflow: hidden;
  background: #0a0a1a;
}
.mpv2a-preview-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mpv2a-preview-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.mpv2a-queue-actions {
  padding: 14px 18px 4px;
  display: flex; gap: 8px;
}
.mpv2a-queue-actions .mpv2-btn { flex: 1; }
.mpv2a-queue-hint {
  margin: 6px 18px 0;
  font-size: 0.72rem;
  color: var(--mpv2-text-faint);
  line-height: 1.45;
}

.mpv2a-cta-ghost {
  background: transparent !important;
  color: var(--mpv2-text-dim) !important;
  border: 1px solid var(--mpv2-border) !important;
}
.mpv2a-cta-ghost:hover {
  color: var(--mpv2-text) !important;
  background: rgba(139,92,246,0.10) !important;
  border-color: var(--mpv2-border-hi) !important;
}

/* ── History ─────────────────────────────────────────────────────────── */
.mpv2a-history-card { margin-top: 18px; }
.mpv2a-history {
  list-style: none;
  margin: 0;
  padding: 8px;
  max-height: 320px;
  overflow-y: auto;
}
.mpv2a-history li {
  padding: 10px 12px;
  border-radius: var(--mpv2-radius-sm);
  background: rgba(15,18,55,0.35);
  margin-bottom: 6px;
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background var(--mpv2-dur-fast);
}
.mpv2a-history li:hover { background: rgba(139,92,246,0.12); }
.mpv2a-history-result {
  font-family: var(--mpv2-font-mono);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
}
.mpv2a-history-result[data-r="W"] { background: rgba(52,211,153,0.22); color: #86efac; }
.mpv2a-history-result[data-r="L"] { background: rgba(239,68,68,0.22);  color: #fca5a5; }
.mpv2a-history-result[data-r="D"] { background: rgba(100,116,139,0.22); color: var(--mpv2-text-dim); }
.mpv2a-history-empty {
  padding: 24px 14px;
  text-align: center;
  color: var(--mpv2-text-faint);
  font-size: 0.8rem;
}

/* ── Modal ───────────────────────────────────────────────────────────── */
.mpv2a-modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 24px;
}
.mpv2a-modal[hidden] { display: none; }
.mpv2a-modal-scrim { position: absolute; inset: 0; background: rgba(5,5,16,0.78); backdrop-filter: blur(6px); }
.mpv2a-modal-card {
  position: relative;
  background: var(--mpv2-bg-panel-hi);
  border: 1px solid var(--mpv2-border-hi);
  border-radius: var(--mpv2-radius-lg);
  max-width: 480px; width: 100%;
  box-shadow: var(--mpv2-shadow-hover);
  overflow: hidden;
}
.mpv2a-modal-head, .mpv2a-modal-foot {
  padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
}
.mpv2a-modal-head {
  border-bottom: 1px solid var(--mpv2-border);
  justify-content: space-between;
}
.mpv2a-modal-foot {
  border-top: 1px solid var(--mpv2-border);
  justify-content: flex-end;
}
.mpv2a-modal-body { padding: 20px; font-size: 0.88rem; line-height: 1.55; }
.mpv2a-modal-x {
  background: transparent; border: 0; color: var(--mpv2-text-dim);
  font-size: 1.4rem; cursor: pointer; padding: 0 6px;
}
.mpv2a-modal-x:hover { color: var(--mpv2-text); }

/* ── Animations ──────────────────────────────────────────────────────── */
@keyframes mpv2a-spin      { to { --angle: 360deg; } }
@keyframes mpv2a-hp-pulse  { 0%,100% { opacity: 1; } 50% { opacity: 0.65; } }
@keyframes mpv2a-floater-up{
  0%   { opacity: 0; transform: translateY(0) scale(0.8); }
  20%  { opacity: 1; transform: translateY(-4px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-80px) scale(0.95); }
}
@keyframes mpv2a-ult-in    { from { opacity: 0; } to { opacity: 1; } }
@keyframes mpv2a-ult-punch {
  0%   { transform: scale(0.6) rotate(-3deg); opacity: 0; }
  60%  { transform: scale(1.08) rotate(1deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* =====================================================================
   Iteration 6 — Arena mobile layout pass (additive over Iter 4 arena).
   Iteration 7 (debug pass): adds a proper tablet stacking rule so cards
   and fighter portraits never get cut off on 9–12" iPad-class devices.
   ===================================================================*/
/* Tablet: prevent the VS fighters row from getting squished. */
@media (max-width: 900px) {
  .mpv2a-fighters {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 14px;
  }
  .mpv2a-vs { padding: 4px 0; }
  .mpv2a-vs-lightning { font-size: 1.8rem; }
  .mpv2a-vs-label { font-size: 1.15rem; }
  /* Flip B back to left-aligned in single-column mode so the frame is on
     the same side as Fighter A for a cleaner vertical stack. */
  .mpv2a-fighter-b { grid-template-columns: clamp(84px, 22vw, 120px) minmax(0, 1fr); text-align: left; }
  .mpv2a-fighter-b .mpv2a-fighter-frame { grid-column: 1; }
  .mpv2a-fighter-b .mpv2a-fighter-meta,
  .mpv2a-fighter-b .mpv2a-hp-row,
  .mpv2a-fighter-b .mpv2a-stats-ticker { grid-column: 2; }
  .mpv2a-fighter-b .mpv2a-hp-row { flex-direction: row; }
  .mpv2a-fighter-b .mpv2a-hp-val { text-align: right; }
  .mpv2a-fighter-b .mpv2a-stats-ticker { justify-content: flex-start; }
  .mpv2a-stage { min-height: 540px; }
  .mpv2a-log-card { margin: 0 14px 14px; }
  .mpv2a-stage-head { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .mpv2a-stage-head h2 { flex-basis: 100%; font-size: 0.95rem; }
  .mpv2a-roster { max-height: 420px; }
}

@media (max-width: 768px) {
  .mpv2a-headline-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .mpv2a-h1 { font-size: 26px; }
  .mpv2a-headline-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
    display: grid;
  }
  .mpv2a-stat { padding: 8px 6px; min-width: 0; }
  .mpv2a-stat-val { font-size: 18px; }
  .mpv2a-grid { gap: 12px; padding: 16px 14px 48px; }
  .mpv2a-fighters { padding: 20px 14px 14px; }
  .mpv2a-fighter { padding: 12px; }
}
@media (max-width: 480px) {
  .mpv2a-headline-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .mpv2a-stat-val { font-size: 16px; }
  .mpv2a-modal { border-radius: 14px 14px 0 0; max-height: 86vh; }
  .mpv2a-sub { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .mpv2a-hp-pulse,
  .mpv2a-ult-in,
  .mpv2a-ult-punch { animation: none !important; }
}
