/* =========================================================
   DOMINION ARENA — landing
   Palette and type scale mirror Assets/UI/Common/DesignTokens.uss
   so the page reads as a continuation of the game, not a separate
   marketing skin. Keep the two in sync when the game's tokens move.
   ========================================================= */

:root {
  /* base */
  --void: #01030a;
  --deep: #02050f;
  --panel: #061025;
  --panel-2: #0a1830;
  --line: #0d2342;
  --line-strong: #16407a;

  /* foregrounds */
  --fg-1: #ffffff;
  --fg-2: #cfe9ff;
  --fg-3: rgba(255, 255, 255, 0.55);
  --fg-4: rgba(255, 255, 255, 0.35);

  /* neon accents */
  --cyan: #00d8ff;
  --cyan-soft: rgba(0, 216, 255, 0.35);
  --cyan-glow: rgba(0, 216, 255, 0.55);
  --pink: #ff0b8a;
  --pink-soft: rgba(255, 11, 138, 0.35);
  --pink-glow: rgba(255, 11, 138, 0.55);
  --gold: #ffd166;
  --amber: #ff8a3d;

  /* semantic */
  --ok: #25ff9a;
  --bad: #ff2e7a;
  --neutral: #8aa0bd;

  /* battle palette */
  --damage: #ff4b54;
  --crit: #ffb820;
  --heal: #47e08b;
  --shield: #00d8ff;
  --burnout: #ff6525;
  --erosion: #b252ff;
  --haste: #28e0ff;
  --stun: #ffb526;
  --aegis: #ffe880;
  --mark: #ff3a71;
  --redirect: #48a5ff;
  --regeneration: #52ff84;
  --resource: #9ec7eb;

  /* type */
  --font-display: "Tektur", "Segoe UI", system-ui, sans-serif;
  --font-body: "Barlow", "Segoe UI", system-ui, sans-serif;

  --ls-base: 0.12em;
  --ls-wide: 0.2em;
  --ls-title: 0.28em;

  --maxw: 1240px;
  --nav-h: 62px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--fg-2);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(100% - 40px, var(--maxw));
  margin-inline: auto;
}

/* ---------- shared type ---------- */

.kicker {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: var(--ls-title);
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 12px;
}

.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
  color: var(--fg-1);
  text-transform: uppercase;
}

h2 {
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: 0.04em;
}

h3 {
  font-size: 18px;
  letter-spacing: var(--ls-base);
}

p {
  margin: 0 0 1em;
}

.lead {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--fg-3);
  max-width: 62ch;
}

/* accent keyword span coming out of the game's rich text */
.kw {
  color: var(--kw, var(--cyan));
  font-weight: 600;
}

/* ---------- background layers ---------- */

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.34;
  pointer-events: none;
}

.bg-fallback {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 18% -8%, rgba(0, 216, 255, 0.13), transparent 60%),
    radial-gradient(900px 600px at 88% 8%, rgba(255, 11, 138, 0.11), transparent 62%),
    radial-gradient(1200px 800px at 50% 108%, rgba(0, 216, 255, 0.07), transparent 60%),
    var(--void);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(0, 216, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 216, 255, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}

/* scanline veil — the one effect that sells "arena feed" instantly */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.35;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.22) 3px,
    rgba(0, 0, 0, 0) 4px
  );
}

main,
header,
footer {
  position: relative;
  z-index: 3;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(1, 3, 10, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  color: var(--fg-1);
  text-transform: uppercase;
  white-space: nowrap;
}

.brand span {
  color: var(--cyan);
}

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.nav-links a {
  color: var(--fg-3);
  transition: color 0.18s;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.22s;
}

.nav-links a:hover {
  color: var(--cyan);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* language toggle */
.lang {
  display: flex;
  border: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.lang button {
  background: transparent;
  border: 0;
  color: var(--fg-4);
  padding: 5px 9px;
  cursor: pointer;
  font: inherit;
  transition: 0.18s;
}

.lang button[aria-pressed="true"] {
  background: var(--cyan);
  color: var(--void);
  font-weight: 700;
}

.icon-link {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--fg-3);
  transition: 0.18s;
}

.icon-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 14px var(--cyan-soft);
}

.icon-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* ---------- buttons ---------- */

.btn {
  --btn-accent: var(--cyan);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--void);
  background: var(--btn-accent);
  border: 1px solid var(--btn-accent);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.16s, box-shadow 0.2s, background 0.2s;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 26px var(--btn-accent);
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55), transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.55s;
}

.btn:hover::after {
  transform: translateX(120%);
}

.btn.sm {
  padding: 9px 16px;
  font-size: 11px;
}

.btn.ghost {
  background: transparent;
  color: var(--btn-accent);
}

.btn.ghost:hover {
  background: color-mix(in srgb, var(--btn-accent) 12%, transparent);
}

.btn.pink {
  --btn-accent: var(--pink);
  color: #fff;
}

/* ---------- hero section ---------- */

.hero {
  padding: clamp(48px, 8vh, 92px) 0 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 42px;
}

@media (min-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    gap: 56px;
    align-items: center;
  }
}

.hero h1 {
  font-size: clamp(46px, 8.2vw, 92px);
  letter-spacing: 0.02em;
  margin: 18px 0 0;
  line-height: 0.92;
}

.hero h1 .l2 {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--cyan);
  text-shadow: 0 0 34px var(--cyan-soft);
}

.hero-sub {
  font-size: clamp(16px, 1.7vw, 20px);
  color: var(--fg-3);
  max-width: 52ch;
  margin: 22px 0 0;
}

.hero-sub strong {
  color: var(--fg-1);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-meta {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg-4);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-meta span::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--cyan);
  transform: rotate(45deg);
}

/* glitch headline */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.glitch.go::before {
  color: var(--pink);
  animation: gl-a 0.42s steps(2, end) 2;
}

.glitch.go::after {
  color: var(--cyan);
  animation: gl-b 0.42s steps(2, end) 2;
}

@keyframes gl-a {
  0%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
  20% { opacity: 0.85; transform: translate(-3px, 1px); clip-path: inset(8% 0 62% 0); }
  55% { opacity: 0.7; transform: translate(3px, -2px); clip-path: inset(48% 0 28% 0); }
}

@keyframes gl-b {
  0%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
  30% { opacity: 0.8; transform: translate(3px, -1px); clip-path: inset(28% 0 44% 0); }
  70% { opacity: 0.6; transform: translate(-3px, 2px); clip-path: inset(66% 0 8% 0); }
}

/* ---------- battle viewport ---------- */

.battle {
  position: relative;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(6, 16, 37, 0.86), rgba(1, 3, 10, 0.94)),
    var(--arena-bg, none) center/cover no-repeat;
  padding: 14px;
  box-shadow: 0 0 0 1px rgba(0, 216, 255, 0.08), 0 24px 70px rgba(0, 0, 0, 0.7);
}

.battle::before,
.battle::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid var(--cyan);
  pointer-events: none;
}

.battle::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.battle::after {
  bottom: -1px;
  right: -1px;
  border-left: 0;
  border-top: 0;
}

.battle.shake {
  animation: shake 0.24s;
}

@keyframes shake {
  0%, 100% { transform: none; }
  25% { transform: translate(2px, -2px); }
  50% { transform: translate(-2px, 1px); }
  75% { transform: translate(1px, 2px); }
}

.battle-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg-4);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--bad);
  border-radius: 50%;
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--pink-soft); }
  50% { opacity: 0.55; box-shadow: 0 0 0 6px transparent; }
}

.battle-clock {
  margin-left: auto;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

/* ---------- arena stage ----------
   Two squads facing each other across a lane. Portraits sit against the
   lane and the enemy side is mirrored, so the fight reads as a fight and
   not as two lists of progress bars. Skill effects travel through
   .fx-layer, which spans the whole stage. */

.arena {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: 6px 0 2px;
  isolation: isolate;
}

/* arena floor: a faint horizon behind the squads */
.arena::before {
  content: "";
  position: absolute;
  inset: -6px -4px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 80% at 50% 50%, rgba(0, 216, 255, 0.07), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0, 216, 255, 0.05) 0 1px, transparent 1px 46px);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* the clash lane */
.lane {
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: grid;
  place-items: center;
}

.lane::before {
  content: "";
  position: absolute;
  top: 6%;
  bottom: 6%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--cyan-soft), var(--pink-soft), transparent);
  opacity: 0.5;
}

.lane span {
  position: relative;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--fg-4);
  background: var(--deep);
  padding: 5px 0;
}

/* ---------- fighter card ---------- */

.fighter {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(0, 216, 255, 0.05), rgba(2, 5, 15, 0.72) 55%);
  transition: border-color 0.2s, opacity 0.5s, filter 0.5s, transform 0.18s;
}

/* enemy squad mirrors: portrait against the lane, gradient from the right */
.fighter.enemy {
  grid-template-columns: minmax(0, 1fr) 74px;
  border-color: rgba(255, 11, 138, 0.2);
  background: linear-gradient(270deg, rgba(255, 11, 138, 0.05), rgba(2, 5, 15, 0.72) 55%);
}

.fighter.enemy .fighter-art {
  order: 2;
}

.fighter.enemy .fighter-body {
  order: 1;
  text-align: right;
}

.fighter.enemy .fighter-name {
  flex-direction: row-reverse;
}

.fighter.enemy .statuses {
  justify-content: flex-end;
}

.fighter-art {
  position: relative;
  width: 74px;
  height: 96px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--deep);
}

.fighter-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 10%;
  filter: saturate(0.9) contrast(1.05);
  transition: filter 0.3s;
}

/* both squads look toward the lane */
.fighter.enemy .fighter-art img {
  transform: scaleX(-1);
}

/* muzzle/impact flash painted over the portrait */
.fighter-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--flash, transparent);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.fighter.flash .fighter-art::after {
  animation: flash 0.34s ease-out;
}

@keyframes flash {
  0% { opacity: 0.85; }
  100% { opacity: 0; }
}

.fighter.casting {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 216, 255, 0.22) inset, 0 0 14px rgba(0, 216, 255, 0.18);
}

.fighter.enemy.casting {
  border-color: var(--pink);
  box-shadow: 0 0 20px rgba(255, 11, 138, 0.22) inset, 0 0 14px rgba(255, 11, 138, 0.18);
}

.fighter.casting .fighter-art img {
  filter: saturate(1.2) contrast(1.1) brightness(1.15);
}

/* recoil: knocked away from the lane */
.fighter.recoil {
  animation: recoil-l 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.fighter.enemy.recoil {
  animation-name: recoil-r;
}

@keyframes recoil-l {
  0% { transform: none; }
  30% { transform: translateX(-9px); }
  100% { transform: none; }
}

@keyframes recoil-r {
  0% { transform: none; }
  30% { transform: translateX(9px); }
  100% { transform: none; }
}

/* lunge: melee closes on the lane before the hit lands */
.fighter.lunge {
  animation: lunge-r 0.3s ease-out;
}

.fighter.enemy.lunge {
  animation-name: lunge-l;
}

@keyframes lunge-r {
  0%, 100% { transform: none; }
  55% { transform: translateX(12px); }
}

@keyframes lunge-l {
  0%, 100% { transform: none; }
  55% { transform: translateX(-12px); }
}

.fighter.dead {
  opacity: 0.3;
  filter: grayscale(1);
}

.fighter.dead .fighter-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(135deg, transparent 45%, var(--bad) 46%, var(--bad) 54%, transparent 55%);
  opacity: 0.8;
}

.fighter.dying {
  animation: dying 0.5s ease-out;
}

@keyframes dying {
  0% { filter: brightness(2.6) saturate(0); transform: scale(1.03); }
  100% { filter: none; transform: none; }
}

.fighter-body {
  min-width: 0;
  align-self: center;
}

.fighter-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
}

.fighter-name .nm {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fighter-hp-num {
  margin-left: auto;
  font-size: 11px;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
  flex: none;
}

.fighter.enemy .fighter-hp-num {
  margin-left: 0;
  margin-right: auto;
}

.bar {
  position: relative;
  height: 7px;
  background: rgba(255, 255, 255, 0.07);
  margin-top: 6px;
  overflow: hidden;
}

.bar i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: 100%;
  background: linear-gradient(90deg, var(--heal), #7dffc0);
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.fighter.enemy .bar i {
  background: linear-gradient(90deg, var(--damage), #ff8a8f);
}

/* the slice of HP just lost, draining a beat behind the bar */
.bar u {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.45s ease-out 0.12s, left 0.45s ease-out 0.12s;
}

.bar.shield {
  height: 4px;
  margin-top: 3px;
  background: rgba(0, 216, 255, 0.09);
}

.bar.shield i {
  background: linear-gradient(90deg, var(--shield), #9beeff);
  width: 0;
}

.statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 5px;
  min-height: 14px;
}

.st {
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 4px;
  border: 1px solid currentColor;
  color: var(--st-c, var(--cyan));
  line-height: 1.4;
  animation: pop 0.25s;
}

@keyframes pop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---------- fx layer ---------- */

.fx-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

/* travelling shot (Projectile.Bolt) */
.proj {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--fx, var(--cyan)) 42%, transparent 72%);
  box-shadow: 0 0 16px 3px var(--fx, var(--cyan));
}

.proj::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 2px;
  transform: translate(-100%, -50%);
  background: linear-gradient(90deg, transparent, var(--fx, var(--cyan)));
  opacity: 0.75;
}

/* instant lance (Projectile.Beam) */
.beam {
  position: absolute;
  height: 2px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, transparent, var(--fx, var(--cyan)) 12%, #fff 50%, var(--fx, var(--cyan)) 88%, transparent);
  box-shadow: 0 0 14px 2px var(--fx, var(--cyan));
}

/* close sweep (Melee.Slash) — plays on the target, never crosses the lane */
.slash {
  position: absolute;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border: 2px solid var(--fx, var(--damage));
  border-radius: 50%;
  clip-path: polygon(50% 50%, 100% 8%, 100% 92%);
  box-shadow: 0 0 14px var(--fx, var(--damage));
}

/* impact ring */
.burst {
  position: absolute;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--fx, var(--damage));
  border-radius: 50%;
  box-shadow: 0 0 18px var(--fx, var(--damage));
}

/* self-cast pulse */
.ring {
  position: absolute;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 1px solid var(--fx, var(--cyan));
  border-radius: 50%;
}

/* floating combat numbers */
.float {
  position: absolute;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  pointer-events: none;
  z-index: 6;
  animation: float-up 1.05s ease-out forwards;
  text-shadow: 0 0 12px currentColor, 0 2px 5px #000;
  white-space: nowrap;
  transform: translate(-50%, 0);
}

.float.crit {
  font-size: 26px;
  letter-spacing: 0.04em;
}

.float.crit::after {
  content: " CRIT";
  font-size: 9px;
  letter-spacing: 0.18em;
  vertical-align: super;
}

@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.6); }
  16% { opacity: 1; transform: translate(-50%, -4px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(0.95); }
}

/* skill call-out line */
.battle-log {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
  min-height: 34px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: flex;
  align-items: center;
  gap: 9px;
}

.battle-log .who {
  color: var(--cyan);
}

.battle-log.enemy .who {
  color: var(--pink);
}

.battle-log .sk {
  color: var(--fg-1);
}

.battle-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.timeline {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  cursor: pointer;
}

.timeline i {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  width: 0;
}

.replay-btn {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--fg-3);
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 11px;
  cursor: pointer;
  transition: 0.18s;
}

.replay-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.battle-verdict {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  background: rgba(1, 3, 10, 0.82);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  z-index: 6;
}

.battle-verdict.on {
  opacity: 1;
}

.battle-verdict b {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 44px);
  letter-spacing: var(--ls-title);
  color: var(--ok);
  text-shadow: 0 0 30px rgba(37, 255, 154, 0.5);
}

.battle-verdict small {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg-4);
}

/* ---------- generic section ---------- */

.section {
  padding: clamp(64px, 10vh, 118px) 0;
}

.section-head {
  max-width: 68ch;
  margin-bottom: 46px;
}

.section-head h2 {
  margin: 14px 0 16px;
}

/* Scroll reveal. The hidden state is scoped to html.js and the class is set
   by an inline script in <head>: if scripting is off or app.js never runs,
   the page must still render its content rather than stay blank. */
html.js .rv {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js .rv.in {
  opacity: 1;
  transform: none;
}

html.js .rv.in .pillar,
html.js .rv.in .step,
html.js .rv.in .hcard {
  animation: rise 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}

html.js .rv.in .pillar:nth-child(2),
html.js .rv.in .step:nth-child(2),
html.js .rv.in .hcard:nth-child(2) { animation-delay: 0.08s; }
html.js .rv.in .pillar:nth-child(3),
html.js .rv.in .step:nth-child(3),
html.js .rv.in .hcard:nth-child(3) { animation-delay: 0.16s; }
html.js .rv.in .pillar:nth-child(4),
html.js .rv.in .step:nth-child(4),
html.js .rv.in .hcard:nth-child(4) { animation-delay: 0.24s; }
html.js .rv.in .hcard:nth-child(n+5) { animation-delay: 0.3s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

.bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 200;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
  pointer-events: none;
}

/* ---------- pillars ---------- */

.pillars {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (min-width: 760px) {
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .pillars {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pillar {
  background: rgba(2, 5, 15, 0.82);
  padding: 28px 24px 30px;
  position: relative;
  transition: background 0.25s;
}

.pillar:hover {
  background: rgba(6, 16, 37, 0.92);
}

.pillar .n {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--cyan);
  opacity: 0.6;
}

.pillar h3 {
  margin: 14px 0 10px;
  color: var(--fg-1);
}

.pillar p {
  font-size: 14.5px;
  color: var(--fg-3);
  margin: 0;
}

.pillar::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transition: width 0.35s;
}

.pillar:hover::after {
  width: 100%;
}

/* ---------- loop steps ---------- */

.loop {
  display: grid;
  gap: 14px;
  counter-reset: step;
}

@media (min-width: 900px) {
  .loop {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step {
  border: 1px solid var(--line);
  background: rgba(2, 5, 15, 0.7);
  padding: 22px 20px 24px;
  position: relative;
  counter-increment: step;
}

.step::before {
  content: "0" counter(step);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  display: block;
  line-height: 1;
  margin-bottom: 12px;
}

.step h3 {
  font-size: 14px;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--fg-3);
  margin: 0;
}

.step.last {
  border-color: var(--cyan-soft);
  background: linear-gradient(180deg, rgba(0, 216, 255, 0.07), rgba(2, 5, 15, 0.7));
}

.step.last::before {
  -webkit-text-stroke: 1px var(--cyan);
}

/* ---------- hub footer: run timeline ----------
   Ported from Assets/UI/TournamentHub/HubShell.uss (.footer-layer,
   .progression-header, .progression-day and its state modifiers). Reward
   calendar and outcome marks come from TournamentHubManager: days 1/3/5 give
   a skill, 2/4 a hero, playoff days 1, 2 and the final give a perk; outcomes
   read as a check, a cross, or a filled dot for today. */

.hub-footer {
  margin-top: 34px;
  padding: 18px 20px 16px;
  background: rgba(2, 5, 15, 0.92);
  border-top: 1px solid rgba(0, 216, 255, 0.4);
}

.prog-header {
  display: flex;
  width: 100%;
  margin-bottom: 8px;
}

.prog-header-cell {
  flex: 1 1 0;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 216, 255, 0.16);
  background: rgba(0, 216, 255, 0.04);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(0, 216, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
}

.prog-header-cell.playoff {
  border-color: rgba(255, 11, 138, 0.2);
  background: rgba(255, 11, 138, 0.05);
  color: rgba(255, 11, 138, 0.62);
}

.prog-header-cell.active {
  border-color: rgba(0, 216, 255, 0.55);
  background: rgba(0, 216, 255, 0.1);
  color: var(--fg-1);
}

.prog-header-cell.playoff.active {
  border-color: var(--pink);
  background: rgba(255, 11, 138, 0.14);
  color: var(--fg-1);
}

.prog-days {
  display: flex;
  width: 100%;
}

.prog-day {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

/* ── day reward ── */
.prog-day-reward {
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
  border: 1px solid rgba(0, 216, 255, 0.28);
  background: rgba(0, 216, 255, 0.07);
  color: rgba(0, 216, 255, 0.78);
}

/* an empty reward keeps its box: without it the nodes sit at different heights */
.prog-day-reward.none {
  visibility: hidden;
}

.prog-day.rw-hero .prog-day-reward {
  border-color: rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.08);
  color: rgba(255, 215, 0, 0.9);
}

.prog-day.rw-perk .prog-day-reward {
  border-color: rgba(255, 11, 138, 0.45);
  background: rgba(255, 11, 138, 0.1);
  color: rgba(255, 11, 138, 0.92);
}

/* ── path line and day node ── */
.prog-day-track {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
}

.prog-day-line {
  flex: 1 1 auto;
  height: 2px;
  background: rgba(0, 216, 255, 0.16);
}

.prog-day-line.hidden {
  visibility: hidden;
}

.prog-day-node {
  min-width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border: 1px solid rgba(0, 216, 255, 0.32);
  background: rgba(4, 10, 20, 0.95);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(0, 216, 255, 0.62);
}

/* ── outcome ── */
.prog-day-mark {
  height: 14px;
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: rgba(0, 216, 255, 0.5);
}

/* ── behind you: the road already walked reads brighter ── */
.prog-day.past .prog-day-line {
  background: rgba(0, 216, 255, 0.42);
}

.prog-day.past .prog-day-node {
  color: rgba(0, 216, 255, 0.85);
}

.prog-day.win .prog-day-node {
  border-color: rgba(44, 255, 191, 0.85);
  background: rgba(10, 40, 36, 0.95);
  color: rgba(44, 255, 191, 0.95);
}

.prog-day.win .prog-day-mark {
  color: rgba(44, 255, 191, 0.95);
}

.prog-day.loss .prog-day-node {
  border-color: rgba(255, 75, 84, 0.8);
  background: rgba(40, 12, 16, 0.95);
  color: rgba(255, 105, 112, 0.95);
}

.prog-day.loss .prog-day-mark {
  color: rgba(255, 105, 112, 0.95);
}

/* ── today ── */
.prog-day.current .prog-day-node {
  min-width: 40px;
  height: 40px;
  border-width: 2px;
  border-color: var(--pink);
  background: rgba(255, 11, 138, 0.16);
  font-size: 15px;
  color: var(--fg-1);
}

.prog-day.current .prog-day-mark {
  color: var(--pink);
}

.prog-day.current .prog-day-reward {
  border-color: var(--pink);
  color: var(--fg-1);
}

/* ── ahead: quieter, still legible ── */
.prog-day.future .prog-day-node {
  opacity: 0.7;
}

.prog-day.future .prog-day-reward {
  opacity: 0.8;
}

/* ── playoff and final ── */
.prog-day.playoff .prog-day-node {
  border-color: rgba(255, 11, 138, 0.35);
  color: rgba(255, 11, 138, 0.7);
}

.prog-day.playoff.past .prog-day-line {
  background: rgba(255, 11, 138, 0.4);
}

.prog-day.final .prog-day-node {
  min-width: 62px;
  height: 38px;
  border-color: rgba(255, 215, 0, 0.75);
  color: rgba(255, 215, 0, 0.95);
  font-size: 10px;
}

/* the group stage ends here, playoffs start */
.prog-day.phase-start {
  border-left: 1px solid rgba(255, 11, 138, 0.35);
}

.prog-legend {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--fg-4);
}

@media (max-width: 720px) {
  .hub-footer {
    overflow-x: auto;
    padding-inline: 12px;
  }
  .prog-header,
  .prog-days {
    min-width: 640px;
  }
  .prog-day-reward {
    font-size: 8px;
    letter-spacing: 0;
    padding: 0 3px;
  }
}

/* ---------- heroes ---------- */

.roster-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg-4);
}

.roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.hcard {
  position: relative;
  border: 1px solid var(--line);
  background: var(--deep);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 2 / 3;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.22s, transform 0.22s, box-shadow 0.22s;
}

.hcard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1), filter 0.35s;
  filter: saturate(0.75) contrast(1.05) brightness(0.82);
}

.hcard::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(1, 3, 10, 0.92) 88%);
  pointer-events: none;
}

.hcard:hover,
.hcard:focus-visible {
  border-color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.6), 0 0 22px var(--cyan-soft);
  outline: none;
}

.hcard:hover img,
.hcard:focus-visible img {
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.05) brightness(1);
}

.hcard-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 11px 11px;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.hcard-name {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg-1);
  line-height: 1.15;
}

.hcard-role {
  display: block;
  font-family: var(--font-display);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hcard-stats {
  display: flex;
  gap: 9px;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--fg-4);
}

.hcard-stats b {
  color: var(--fg-2);
  font-weight: 600;
}

/* ---------- hero detail modal ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 3, 10, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s;
}

.sheet.on {
  opacity: 1;
  pointer-events: auto;
}

.sheet-box {
  position: relative;
  width: min(1060px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(6, 16, 37, 0.98), rgba(1, 3, 10, 0.99));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
  transform: translateY(18px) scale(0.985);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.3, 1);
  overscroll-behavior: contain;
}

.sheet.on .sheet-box {
  transform: none;
}

.sheet-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(1, 3, 10, 0.7);
  border: 1px solid var(--line-strong);
  color: var(--fg-2);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: 0.18s;
}

.sheet-close:hover {
  color: var(--pink);
  border-color: var(--pink);
}

.sheet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 960px) {
  .sheet {
    padding: 16px;
    align-items: stretch;
  }
  .sheet-box {
    width: min(1240px, calc(100vw - 32px));
    height: 90vh;
    max-height: 90vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: min(38vw, calc(90vh * 2 / 3)) minmax(0, 1fr);
  }
  .sheet-grid { display: contents; }
  .sheet-art { min-height: 0; height: 90vh; }
  .sheet-art img {
    max-height: none;
    height: 100%;
    object-fit: cover;
    object-position: 50% 12%;
  }
  .sheet-art::after {
    background: linear-gradient(90deg, transparent 60%, rgba(1, 3, 10, 0.85));
  }
  .sheet-main {
    overflow: auto;
    min-height: 0;
    height: 90vh;
    padding: 18px 22px 18px;
  }
}
@media (min-width: 880px) and (max-width: 959px) {
  .sheet-grid {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

.sheet-art {
  position: relative;
  background: var(--deep);
  min-height: 260px;
}

.sheet-art img {
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: cover;
  object-position: 50% 20%;
}

.sheet-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(1, 3, 10, 0.9));
  pointer-events: none;
}

@media (min-width: 880px) {
  .sheet-art::after {
    background: linear-gradient(90deg, transparent 60%, rgba(1, 3, 10, 0.85));
  }
  .sheet-art img {
    max-height: none;
  }
}

.sheet-main {
  padding: 26px 28px 30px;
  min-width: 0;
}

.sheet-name {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-1);
  line-height: 1;
}

.sheet-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid var(--cyan-soft);
  padding: 3px 7px;
}

.sheet-stats {
  display: flex;
  gap: 22px;
  margin: 18px 0;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}

.stat .k {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg-4);
}

.stat .v {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--fg-1);
  line-height: 1.1;
}

.sheet-lore {
  font-size: 14.5px;
  color: var(--fg-3);
  line-height: 1.65;
}

.block-title {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg-4);
  margin: 24px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.block-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.passive {
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--gold);
  background: rgba(255, 209, 102, 0.05);
  padding: 14px 16px;
}

.passive h4 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.passive p {
  margin: 0;
  font-size: 13.5px;
  color: var(--fg-3);
}

.perks {
  display: grid;
  gap: 10px;
}

@media (min-width: 620px) {
  .perks {
    grid-template-columns: 1fr 1fr;
  }
}

.perk {
  border: 1px solid var(--line);
  padding: 12px 14px;
  background: rgba(2, 5, 15, 0.6);
}

.perk .path {
  font-family: var(--font-display);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink);
}

.perk h4 {
  margin: 5px 0 6px;
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-1);
}

.perk p {
  margin: 0;
  font-size: 13px;
  color: var(--fg-3);
}

.skills {
  display: grid;
  gap: 8px;
}

.skill {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  background: rgba(2, 5, 15, 0.6);
  padding: 11px 14px;
  transition: border-color 0.2s, background 0.2s;
}

.skill:hover {
  border-color: var(--cyan-soft);
  background: rgba(0, 216, 255, 0.04);
}

.skill-cd {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  border: 1px solid var(--cyan-soft);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  align-self: start;
  line-height: 1;
  flex-direction: column;
}

.skill-cd small {
  display: block;
  font-size: 7px;
  letter-spacing: 0.1em;
  color: var(--fg-4);
  font-weight: 400;
}

.skill h4 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg-1);
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
}

.skill h4 em {
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--fg-4);
}

.skill p {
  margin: 0;
  font-size: 13px;
  color: var(--fg-3);
  line-height: 1.55;
}

/* ---------- tournament board ----------
   Ported from the game's own board (Assets/UI/TournamentHub/Screens/
   Screen_Board.*): the same two tabs, the same group table columns, and
   the same lane divider that splits a group into the upper and lower
   bracket. The zoom/pan/my-path controls of the in-game screen are
   deliberately left behind — a landing reads, it doesn't navigate. */

.fmt {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 26px;
}

.fmt span {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  border: 1px solid var(--line-strong);
  padding: 5px 10px;
  background: rgba(2, 5, 15, 0.6);
}

.fmt span b {
  color: var(--cyan);
  font-weight: 700;
}

.board-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.board-tab {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg-4);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
}

.board-tab:hover {
  color: var(--fg-2);
}

.board-tab[aria-selected="true"] {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.board-view[hidden] {
  display: none;
}

/* ---- group tables ---- */

.groups {
  display: grid;
  gap: 14px;
}

@media (min-width: 1000px) {
  .groups {
    grid-template-columns: 1fr 1fr;
  }
}

.group-card {
  border: 1px solid rgba(0, 216, 255, 0.22);
  border-top: 2px solid var(--pink);
  background: rgba(3, 9, 22, 0.93);
  overflow: hidden;
}

.group-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(0, 216, 255, 0.1);
  border-bottom: 1px solid rgba(0, 216, 255, 0.25);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: var(--ls-base);
  text-transform: uppercase;
  color: var(--fg-1);
}

.group-head em {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--fg-4);
}

.gt {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.gt th {
  font-family: var(--font-display);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-4);
  font-weight: 400;
  text-align: left;
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.gt td {
  padding: 5px 6px;
  border-bottom: 1px solid rgba(13, 35, 66, 0.5);
  color: var(--fg-3);
  vertical-align: middle;
}

.gt tr:last-child td {
  border-bottom: 0;
}

.gt .c-rank {
  width: 26px;
  font-family: var(--font-display);
  color: var(--fg-4);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.gt .c-name {
  color: var(--fg-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.gt .c-num {
  width: 30px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
  font-size: 11px;
}

.gt .c-hp {
  width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--fg-4);
  font-size: 11px;
}

.gt .w b {
  color: var(--ok);
}

.gt .l b {
  color: var(--bad);
}

/* the user's row, same emphasis the game gives it */
.gt tr.you td {
  background: rgba(0, 216, 255, 0.09);
  color: var(--fg-1);
}

.gt tr.you .c-name {
  color: var(--cyan);
  font-weight: 600;
}

.you-tag {
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--void);
  background: var(--cyan);
  padding: 1px 4px;
  margin-left: 6px;
  vertical-align: 1px;
}

/* three-hero roster thumbnails */
.mini {
  display: flex;
  gap: 2px;
}

.mini img {
  width: 18px;
  height: 22px;
  object-fit: cover;
  object-position: 50% 8%;
  border: 1px solid var(--line);
  background: var(--deep);
}

/* W/L form strip */
.form {
  display: flex;
  gap: 2px;
}

.form i {
  width: 9px;
  height: 9px;
  display: block;
  border: 1px solid transparent;
}

.form i.w {
  background: rgba(37, 255, 154, 0.75);
}

.form i.l {
  background: rgba(255, 46, 122, 0.6);
}

.form i.n {
  border-color: var(--line-strong);
}

/* lane divider inside a group */
.lane-split td {
  padding: 0;
  border: 0;
}

.lane-split div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 5px;
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.lane-split div::before,
.lane-split div::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(255, 138, 61, 0.5), transparent);
}

.groups-hint {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--fg-4);
}

/* ---- bracket ----
   Ported from the in-game board rather than reinvented:

   - node geometry from TournamentBracketLayout (280x100, 16px min gap,
     72/56 side pads, 34/40 top-bottom pads, stage columns)
   - node skin from Screen_Board.uss (.board-match-node and friends):
     glass card, lane-coloured border, 44px participant rows, 26px avatar,
     winner row tinted green, loser dimmed
   - elbow connectors from BracketConnectorElement: from -> (elbowX, from.y)
     -> (elbowX, to.y) -> to, cyan for the upper lane, magenta for the lower,
     gold into the grand final, player path thickened with a glow pass

   Upper and lower are two independent lane canvases stacked vertically, and
   the grand final sits between them on the right — the same composition the
   game screen builds. */

.bracket-note {
  font-size: 14px;
  color: var(--fg-3);
  margin-bottom: 16px;
  max-width: 70ch;
}

.bracket-note b {
  color: var(--fg-1);
  font-weight: 600;
}

.bracket-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(900px 400px at 30% 0%, rgba(0, 216, 255, 0.05), transparent 65%),
    rgba(2, 5, 15, 0.72);
}

/* natural-size canvas; JS scales it down to fit like the board's FIT VIEW */
.bracket-fit {
  overflow: hidden;
}

.bracket {
  position: relative;
  transform-origin: 0 0;
}

.bracket-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* lane caption sitting above each tree */
.lane-cap {
  position: absolute;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  white-space: nowrap;
}

.lane-cap.upper {
  color: var(--cyan);
}

.lane-cap.lower {
  color: #ff32dc;
}

.lane-cap.final {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.45);
}

/* day header band — .board-day-header-cell */
.day-cell {
  position: absolute;
  top: 0;
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(8, 16, 32, 0.65);
  border: 1px solid rgba(0, 216, 255, 0.14);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* ---- match node ---- */

.mnode {
  position: absolute;
  width: 280px;
  height: 100px;
  background: rgba(8, 18, 40, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.mnode.upper {
  border-color: rgba(0, 216, 255, 0.3);
}

.mnode.lower {
  border-color: rgba(255, 50, 220, 0.3);
}

.mnode.final {
  border-color: rgba(255, 215, 0, 0.55);
  background: rgba(18, 14, 4, 0.92);
}

/* the player's own matches take the gold accent, as in the game */
.mnode.hl {
  border-color: rgba(255, 215, 0, 0.6);
}

.mnode:hover {
  background: rgba(12, 26, 56, 0.95);
  border-color: rgba(255, 255, 255, 0.28);
}

/* a node whose loser drops somewhere is worth pointing at */
.mnode.linked {
  cursor: pointer;
}

/* .board-match-node--feed-hover: both ends of the revealed drop */
.mnode.feed,
.mnode.feed:hover {
  border-color: rgba(242, 66, 71, 0.9);
  background: rgba(34, 12, 18, 0.94);
}

.mnode.feed:hover {
  border-color: rgba(255, 98, 102, 1);
}

.mnode.upper:hover {
  border-color: rgba(0, 216, 255, 0.65);
}

.mnode.lower:hover {
  border-color: rgba(255, 50, 220, 0.65);
}

.mnode.final:hover,
.mnode.hl:hover {
  border-color: rgba(255, 215, 0, 0.9);
}

.mrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  height: 44px;
}

.mrow.win {
  background: rgba(0, 200, 100, 0.08);
}

.msep {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 10px;
}

.mav {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  background: rgba(0, 216, 255, 0.12);
  border: 1px solid rgba(0, 216, 255, 0.35);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  color: rgba(0, 216, 255, 0.9);
  overflow: hidden;
}

.mav.user {
  background: rgba(0, 216, 255, 0.28);
  border-color: rgba(0, 216, 255, 0.85);
}

.mav img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 8%;
}

.mname {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mname.user {
  color: rgb(0, 216, 255);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 216, 255, 0.6);
}

.mrow.win .mname {
  color: rgba(100, 255, 160, 0.95);
}

.mrow.lose .mname {
  color: rgba(255, 255, 255, 0.3);
}

.mscore {
  flex: none;
  min-width: 20px;
  text-align: right;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  margin-left: 6px;
}

.mrow.win .mscore {
  color: rgba(100, 255, 160, 0.95);
  text-shadow: 0 0 6px rgba(100, 255, 160, 0.5);
}

.mrow.lose .mscore {
  color: rgba(255, 255, 255, 0.25);
}

.champion {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid var(--gold);
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.1), transparent 70%);
}

.champion .lbl {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg-4);
}

.champion .who {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1;
}

.champion .route {
  margin-left: auto;
  font-size: 13px;
  color: var(--fg-3);
  text-align: right;
}

/* ---------- final CTA ---------- */

.cta {
  position: relative;
  border: 1px solid var(--line-strong);
  padding: clamp(34px, 6vw, 62px);
  text-align: center;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(0, 216, 255, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(6, 16, 37, 0.9), rgba(1, 3, 10, 0.95));
  overflow: hidden;
}

.cta h2 {
  margin-bottom: 16px;
}

.cta .lead {
  margin-inline: auto;
  text-align: center;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
}

.cta-note {
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: 9.5px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg-4);
}

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 30px 0 44px;
  font-size: 13px;
  color: var(--fg-4);
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.foot-links {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.foot-links a:hover {
  color: var(--cyan);
}

/* ---------- crosshair cursor ---------- */

.xhair {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.12s;
  mix-blend-mode: screen;
}

.xhair::before,
.xhair::after {
  content: "";
  position: absolute;
  background: var(--cyan);
  opacity: 0.75;
}

.xhair::before {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
}

.xhair::after {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  transform: translateY(-50%);
}

.xhair.on {
  opacity: 1;
}

.xhair.hot {
  transform: scale(1.5) rotate(45deg);
}

/* ---------- reduced motion / low-end ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .rv {
    opacity: 1;
    transform: none;
  }
  .bar,
  .scanlines,
  #bg-canvas,
  .xhair {
    display: none;
  }
}

body.lite .scanlines,
body.lite #bg-canvas,
body.lite .xhair {
  display: none;
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
  /* The nav row is the only thing that can outgrow a 375px viewport:
     brand + language + X + wishlist don't fit. Drop the X (it is in the
     final CTA and the footer) and tighten the rest. */
  .nav .wrap {
    gap: 10px;
  }
  .brand {
    font-size: 12px;
    letter-spacing: 0.12em;
  }
  .nav-actions .icon-link {
    display: none;
  }
  .nav-actions {
    gap: 8px;
  }
  .nav-actions .btn.sm {
    padding: 8px 12px;
    font-size: 10px;
    letter-spacing: 0.12em;
    gap: 7px;
  }
  .lang button {
    padding: 5px 7px;
  }
  .xhair {
    display: none;
  }
  /* One column on phones: the squads stack, so the lane runs horizontally
     between them and shots travel top-to-bottom instead of across. */
  .arena {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .lane {
    align-self: auto;
    height: 26px;
  }
  .lane::before {
    top: 50%;
    bottom: auto;
    left: 8%;
    right: 8%;
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan-soft), var(--pink-soft), transparent);
  }
  .lane span {
    padding: 0 10px;
  }
  /* portraits stay on the outside edges so the squads still face the lane */
  .fighter.enemy {
    grid-template-columns: 74px minmax(0, 1fr);
  }
  .fighter.enemy .fighter-art {
    order: 1;
  }
  .fighter.enemy .fighter-body {
    order: 2;
    text-align: left;
  }
  .fighter.enemy .fighter-name {
    flex-direction: row;
  }
  .fighter.enemy .statuses {
    justify-content: flex-start;
  }
  .fighter.enemy .fighter-hp-num {
    margin-left: auto;
    margin-right: 0;
  }
  .fighter.enemy .fighter-art img {
    transform: none;
  }
  /* six stacked cards would run past a phone screen at desktop size */
  .fighter,
  .fighter.enemy {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 9px;
    padding: 5px;
  }
  .fighter-art {
    width: 60px;
    height: 78px;
  }
  .side {
    gap: 6px;
  }
}
