.stats-body {
  padding: max(12px, env(safe-area-inset-top)) 0 calc(72px + env(safe-area-inset-bottom));
}

.stats-header {
  margin-bottom: clamp(48px, 8vw, 104px);
}

.stats-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: rgba(246, 239, 225, 0.055);
}

.stats-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out), transform 160ms var(--ease-out);
}

.stats-nav a:hover {
  color: var(--color-ink);
}

.stats-nav a[aria-current="page"] {
  background: var(--color-paper);
  color: #060604;
}

.stats-main {
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto;
}

.stats-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: end;
  padding-bottom: clamp(48px, 7vw, 88px);
}

.stats-hero .display-title {
  max-width: 720px;
}

.stats-hero .lead-copy {
  max-width: 520px;
  margin: 0;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 5px rgba(216, 255, 63, 0.12), 0 0 22px rgba(216, 255, 63, 0.5);
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
  background: var(--color-line);
}

.sum-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-5);
  background:
    linear-gradient(180deg, rgba(246, 239, 225, 0.08), rgba(246, 239, 225, 0.035)),
    var(--color-panel);
}

.sum-card.is-champion {
  background:
    radial-gradient(circle at 82% 10%, rgba(216, 255, 63, 0.13), transparent 38%),
    linear-gradient(180deg, rgba(246, 239, 225, 0.08), rgba(246, 239, 225, 0.035)),
    var(--color-panel);
}

.sum-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-dim);
}

.sum-value {
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.match-list {
  padding-top: clamp(64px, 9vw, 116px);
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.m-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 12% 0%, rgba(77, 163, 255, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(246, 239, 225, 0.07), rgba(246, 239, 225, 0.03));
  box-shadow: var(--shadow-soft);
}

.m-card.is-final {
  border-color: rgba(215, 169, 86, 0.44);
}

.m-card.is-active {
  border-color: rgba(216, 255, 63, 0.40);
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(216, 255, 63, 0.08) inset;
}

.m-card.is-done {
  opacity: 0.74;
}

.m-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-dim);
}

.m-vs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
}

.m-team {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.m-team.is-right {
  text-align: right;
}

.m-team-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.m-team-votes {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.m-team.is-winner .m-team-name {
  color: var(--color-primary);
}

.m-team.is-loser {
  opacity: 0.42;
}

.m-vs-divider {
  display: grid;
  place-items: center;
  width: 48px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--color-paper);
  color: #060604;
  font-family: var(--font-brand);
  transform: rotate(-4deg);
}

.m-bar {
  position: relative;
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 91, 67, 0.28);
}

.m-bar-a,
.m-bar-b {
  position: absolute;
  top: 0;
  bottom: 0;
  transition: width 420ms var(--ease-out);
}

.m-bar-a {
  left: 0;
  background: linear-gradient(90deg, var(--color-blue), #bce4ff);
}

.m-bar-b {
  right: 0;
  background: linear-gradient(270deg, var(--color-red), #ffc0ad);
}

.m-meta {
  margin-top: auto;
}

.m-meta-pct {
  color: var(--color-paper);
}

.stats-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: clamp(48px, 7vw, 88px) 0 0;
  color: var(--color-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stats-foot a {
  color: var(--color-primary);
}

@media (max-width: 900px) {
  .stats-hero {
    grid-template-columns: 1fr;
  }

  .stats-summary,
  .match-grid {
    grid-template-columns: 1fr;
  }

  .sum-card {
    min-height: 128px;
  }
}

@media (max-width: 640px) {
  .stats-body {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: 48px;
  }

  .stats-header {
    margin-bottom: var(--space-4);
  }

  .stats-nav {
    display: none;
  }

  .stats-main {
    width: calc(100% - 18px);
  }

  .stats-hero {
    gap: var(--space-3);
    padding-bottom: var(--space-5);
  }

  .stats-hero .display-title {
    font-size: clamp(38px, 11.4vw, 50px);
    line-height: 0.9;
  }

  .stats-hero .lead-copy {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: 13px;
    line-height: 1.48;
  }

  .stats-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 22px;
  }

  .sum-card {
    min-height: 104px;
    padding: var(--space-3);
  }

  .sum-label {
    font-size: 8px;
    letter-spacing: 0.08em;
  }

  .sum-value {
    font-size: 31px;
  }

  .m-card {
    min-height: auto;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: 22px;
  }

  .m-vs {
    grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
    gap: var(--space-2);
  }

  .m-team.is-right {
    text-align: right;
  }

  .m-vs-divider {
    width: 36px;
    justify-self: center;
  }

  .m-team-name {
    font-size: 24px;
  }

  .m-team-votes,
  .m-meta {
    font-size: 9px;
  }

  .m-meta,
  .stats-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* v49: match cards follow the same quieter arena language as the mini-app. */
.stats-header,
.stats-summary,
.sum-card,
.m-card {
  border: 0 !important;
  box-shadow: none !important;
}

.stats-header {
  background:
    linear-gradient(180deg, rgba(20, 21, 18, 0.88), rgba(5, 5, 5, 0.72)),
    rgba(5, 5, 5, 0.62);
}

.stats-hero .display-title,
.section-h,
.sum-value,
.m-team-name {
  font-family: var(--font-uni);
  font-weight: 900;
}

.m-card {
  background:
    linear-gradient(180deg, rgba(246, 239, 225, 0.06), rgba(246, 239, 225, 0.018)),
    #080807;
}

.m-team.is-loser {
  opacity: 0.4;
  filter: grayscale(1) blur(0.35px);
}

.m-team.is-loser .m-team-name {
  position: relative;
  text-shadow: 0 0 12px rgba(246, 239, 225, 0.22);
}

.m-team.is-loser .m-team-name::before,
.m-team.is-loser .m-team-name::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: 50%;
  height: 5px;
  border-radius: 999px;
  background: rgba(246, 239, 225, 0.96);
  box-shadow: 0 0 14px rgba(255, 91, 67, 0.42);
  transform-origin: center;
  animation: statCrossDraw 540ms var(--ease-out) both;
}

.m-team.is-loser .m-team-name::before { transform: rotate(12deg) scaleX(0); }
.m-team.is-loser .m-team-name::after { transform: rotate(-12deg) scaleX(0); animation-delay: 110ms; }

@keyframes statCrossDraw {
  to { transform: rotate(var(--stat-cross, 12deg)) scaleX(1); }
}

.m-team.is-loser .m-team-name::before { --stat-cross: 12deg; }
.m-team.is-loser .m-team-name::after { --stat-cross: -12deg; }

.m-bar {
  height: 15px;
  background: rgba(255, 91, 67, 0.22);
}

.m-bar::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,0.26), transparent 42%, rgba(255,255,255,0.1));
  opacity: 0.34;
  pointer-events: none;
}

.m-bar-a,
.m-bar-b {
  animation: statsBarFill 820ms var(--ease-out) both;
  transform-origin: left center;
}

.m-bar-a {
  background: linear-gradient(90deg, #4da3ff 0%, #8fdfff 48%, #d8ff3f 100%);
}

.m-bar-b {
  background: linear-gradient(270deg, #ff5b43, rgba(255, 91, 67, 0.48));
}

@keyframes statsBarFill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.match-grid {
  animation: statsEnter 620ms var(--ease-out) both;
}

@keyframes statsEnter {
  from { opacity: 0; transform: translateY(18px); filter: blur(7px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* v50: remove remaining visible frames from the standalone stats page. */
.stats-body,
.stats-header,
.stats-summary,
.sum-card,
.m-card,
.stats-foot {
  border: 0 !important;
  box-shadow: none !important;
}

.stats-body *:not(:focus-visible),
.stats-body *::before,
.stats-body *::after {
  border-color: transparent !important;
}

.stats-foot {
  display: none !important;
}

/* v58: align standalone stats with the current plush navy mini-app shell. */
body.stats-body {
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) 8px calc(92px + env(safe-area-inset-bottom)) !important;
  background:
    radial-gradient(circle at 50% -14%, rgba(77, 163, 255, 0.14), transparent 34%),
    radial-gradient(circle at 18% 32%, rgba(216, 255, 63, 0.04), transparent 28%),
    #05121c !important;
  color: var(--plush-cream);
}

body.stats-body::before,
body.stats-body::after {
  display: none !important;
  content: none !important;
}

.stats-header {
  width: min(620px, calc(100vw - 18px)) !important;
  min-height: 56px !important;
  margin: 0 auto clamp(38px, 8vw, 64px) !important;
  padding: 7px !important;
  border: 0 !important;
  border-radius: 28px !important;
  background:
    radial-gradient(circle at 18% 6%, rgba(255, 255, 255, 0.10), transparent 22%),
    linear-gradient(180deg, rgba(12, 48, 73, 0.98), rgba(5, 17, 26, 0.98)) !important;
  box-shadow:
    0 10px 0 rgba(0, 0, 0, 0.54),
    0 18px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}

.stats-header::before,
.stats-header::after {
  display: none !important;
  content: none !important;
}

.stats-lang-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--plush-cream);
  font-family: var(--font-uni);
  font-size: 10px;
  font-weight: 950;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.stats-tools {
  width: auto !important;
  margin-left: auto;
  justify-content: flex-end !important;
}

.stats-wallet-btn {
  min-width: 118px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 0 !important;
  border-radius: 999px;
  background: rgba(218, 237, 248, 0.96) !important;
  box-shadow: none !important;
  color: var(--plush-blue-900) !important;
  font-family: var(--font-uni);
  font-size: 11px;
  font-weight: 950;
  text-decoration: none;
}

.stats-nav {
  display: none !important;
}

.stats-main {
  width: min(620px, calc(100vw - 18px)) !important;
  margin: 0 auto !important;
}

.stats-hero {
  display: block !important;
  padding: 0 0 22px !important;
}

.stats-hero .page-kicker {
  display: none !important;
}

.stats-hero .display-title {
  max-width: 100%;
  margin: 0;
  color: var(--plush-cream);
  font-family: var(--font-uni);
  font-size: clamp(42px, 12vw, 72px);
  font-weight: 950;
  line-height: 0.88;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.48);
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 0 !important;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.055) !important;
  box-shadow: none !important;
}

.sum-card {
  min-height: 104px;
  padding: 14px;
  border: 0 !important;
  background:
    radial-gradient(circle at 86% 0%, rgba(216, 255, 63, 0.06), transparent 32%),
    rgba(8, 33, 51, 0.58) !important;
  box-shadow: none !important;
}

.sum-label,
.m-meta,
.m-team-votes {
  color: rgba(246, 239, 225, 0.48);
  font-family: var(--font-uni);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.sum-value {
  color: var(--plush-cream);
  font-family: var(--font-uni);
  font-size: clamp(30px, 8vw, 44px);
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.match-list {
  padding-top: 54px !important;
}

.match-list .section-eyebrow {
  display: none !important;
}

.section-h {
  margin: 0 0 14px;
  color: var(--plush-cream);
  font-family: var(--font-uni);
  font-size: clamp(30px, 9vw, 48px);
  font-weight: 950;
  line-height: 0.92;
  text-transform: uppercase;
}

.match-grid {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 16px;
}

.m-card {
  min-height: 156px;
  gap: 14px;
  padding: 18px;
  border: 0 !important;
  border-radius: 26px;
  background:
    radial-gradient(circle at 14% 0%, rgba(77, 163, 255, 0.10), transparent 36%),
    linear-gradient(180deg, rgba(8, 33, 51, 0.82), rgba(4, 15, 23, 0.96)) !important;
  box-shadow: none !important;
}

.m-card.is-active {
  background:
    radial-gradient(circle at 14% 0%, rgba(77, 163, 255, 0.13), transparent 36%),
    linear-gradient(180deg, rgba(8, 33, 51, 0.90), rgba(4, 15, 23, 0.98)) !important;
}

.m-card.is-final {
  background:
    radial-gradient(circle at 80% 0%, rgba(215, 169, 86, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(8, 33, 51, 0.86), rgba(4, 15, 23, 0.98)) !important;
}

.m-vs {
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 10px;
}

.m-team-name {
  color: var(--plush-cream);
  font-family: var(--font-uni);
  font-size: clamp(24px, 8vw, 34px);
  font-weight: 950;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.m-team.is-winner .m-team-name {
  color: var(--plush-lime);
}

.m-team.is-loser {
  opacity: 0.4;
  filter: grayscale(1) blur(0.35px);
}

.m-vs-divider {
  width: 42px;
  background: rgba(218, 237, 248, 0.95);
  color: var(--plush-blue-900);
  box-shadow: none;
}

.m-bar {
  height: 14px;
  background: rgba(4, 15, 23, 0.72);
  box-shadow: none;
}

.m-bar-a {
  background: linear-gradient(90deg, #4da3ff 0%, #91dbff 48%, #d8ff3f 100%) !important;
}

.m-bar-b {
  background: linear-gradient(90deg, rgba(255, 96, 76, 0.52), #ff5b43) !important;
}

.stats-foot {
  display: none !important;
}

@media (max-width: 420px) {
  .stats-body {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .stats-wallet-btn {
    min-width: 116px;
    padding-inline: 14px;
  }

  .stats-hero .display-title {
    font-size: clamp(38px, 11.4vw, 48px);
  }
}

/* v63 stats monochrome override */
.stats-body {
  background: #050505 !important;
  color: #f7f7f2 !important;
  font-family: var(--font-body) !important;
}

.stats-main,
.stats-hero,
.match-list {
  color: #f7f7f2 !important;
}

.stats-nav,
.stats-summary,
.m-card {
  border: 1px solid rgba(247, 247, 242, 0.12) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    #0b0b0b !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 18px 44px rgba(0, 0, 0, 0.34) !important;
}

.m-card.is-active,
.m-card.is-final {
  border-color: rgba(247, 247, 242, 0.18) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.018)),
    #0b0b0b !important;
}

.stats-nav a[aria-current="page"],
.stats-wallet-btn,
.m-vs-divider {
  background: #f7f7f2 !important;
  color: #050505 !important;
  box-shadow: none !important;
}

.live-dot {
  background: #f7f7f2 !important;
  box-shadow: none !important;
}

.m-team-name,
.m-team.is-winner .m-team-name {
  color: #f7f7f2 !important;
  font-family: var(--font-display) !important;
}

.m-team.is-loser {
  opacity: 0.42 !important;
  filter: grayscale(1) blur(0.2px) !important;
}

.m-bar {
  background: rgba(247, 247, 242, 0.09) !important;
}

.m-bar-a,
.m-bar-b {
  background: linear-gradient(90deg, #ffffff, #b8b8b0) !important;
}

/* v70: match mini-app black/gray glass language with #5FB6FF accents. */
.stats-body {
  background:
    radial-gradient(circle at 50% -16%, rgba(95, 182, 255, 0.12), transparent 34%),
    linear-gradient(180deg, #050505, #020202 55%, #050505) !important;
  color: #f5f5f2 !important;
  font-family: "Lato", "Montserrat", sans-serif !important;
}

.stats-header {
  background:
    linear-gradient(180deg, rgba(48, 50, 52, 0.68), rgba(5, 5, 6, 0.82)) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
}

.stats-summary,
.sum-card,
.m-card {
  background:
    radial-gradient(circle at 86% 10%, rgba(95, 182, 255, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(36, 37, 39, 0.68), rgba(7, 7, 8, 0.78)) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
}

.stats-wallet-btn,
.stats-lang-btn,
.m-vs-divider {
  background: #f5f5f2 !important;
  color: #050505 !important;
  border: 0 !important;
}

.m-bar-a,
.m-bar-b {
  background: linear-gradient(90deg, #5FB6FF, #ffffff) !important;
}
