﻿/* NO PERRY — War Ladder UI */

.np-war-ladder {
  position: relative;
  padding: 8vh 0 10vh;
  background:
    radial-gradient(ellipse 55% 40% at 50% 0%, rgba(92, 110, 58, 0.12), transparent 70%),
    linear-gradient(180deg, #0a0b10, #08090d 88%);
  /* Must stay visible — overflow-x:clip computes y to clip and hides crest/wings */
  overflow: visible;
}

.np-war-ladder-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gap-lg);
  overflow: visible;
}

.np-war-head {
  text-align: center;
  margin-bottom: 2.4rem;
}

.np-war-head .eyebrow {
  color: var(--np-accent-moss-readable);
  letter-spacing: 0.18em;
}

.np-war-head h2 {
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  color: #f2ece0;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
}

.np-war-sub {
  margin-top: 0.85rem;
  color: #d0c9bc;
  line-height: 1.55;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.np-war-metric {
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(196, 210, 178, 0.9);
}

.np-war-pve-explainer {
  margin: 0.55rem auto 0;
  max-width: 42rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(196, 210, 178, 0.82);
  text-align: center;
}

.np-war-period {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(140, 168, 120, 0.88);
}

.np-war-health {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.4rem;
  margin: 0.55rem auto 0;
  max-width: 44rem;
  font-size: 0.68rem;
  color: rgba(168, 182, 156, 0.78);
}

.np-war-health__block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: min(100%, 18rem);
  flex: 1 1 18rem;
  padding: 0.4rem 0.6rem;
  border-left: 2px solid rgba(140, 168, 120, 0.55);
  text-align: left;
}

.np-war-health__block[data-health-state='degraded'] {
  border-left-color: rgba(198, 148, 92, 0.7);
}

.np-war-health__title {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(214, 224, 200, 0.95);
}

.np-war-health__block[data-health-state='degraded'] .np-war-health__title {
  color: rgba(224, 186, 138, 0.95);
}

.np-war-health__copy {
  font-size: 0.66rem;
  line-height: 1.45;
  color: rgba(168, 182, 156, 0.8);
}

/* 49D — War Room reads the canonical War Ladder ranking owner. */
.np-war-room__rank {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(140, 168, 120, 0.28);
  border-radius: 4px;
  background: rgba(12, 18, 12, 0.35);
}

.np-war-room__rank-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(196, 210, 178, 0.9);
}

.np-war-room__rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}

.np-war-room__rank-item {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
}

.np-war-room__rank-pos {
  font-variant-numeric: tabular-nums;
  color: rgba(224, 196, 122, 0.95);
}

.np-war-room__rank-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-war-room__rank-fame {
  font-variant-numeric: tabular-nums;
  color: rgba(196, 210, 178, 0.9);
}

.np-war-room__rank-empty,
.np-war-room__rank-note {
  margin: 0.4rem 0 0;
  font-size: 0.66rem;
  line-height: 1.45;
  color: rgba(168, 182, 156, 0.75);
}

.war-podium__metric-label {
  margin: 0.2rem 0 0.35rem;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(140, 168, 120, 0.8);
}

.np-war-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.2rem;
  margin-top: 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b8ae9c;
}

.np-war-meta span {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(143, 166, 91, 0.22);
  border-radius: 999px;
  background: rgba(8, 8, 16, 0.55);
}

/* 50A — PvP / PvE ladder switch */
.np-war-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.3rem auto 0;
  padding: 0.3rem;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(143, 166, 91, 0.28);
  border-radius: 999px;
  background: rgba(8, 8, 16, 0.6);
}

.np-war-tab {
  appearance: none;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  padding: 0.6rem 1.6rem;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(184, 174, 156, 0.85);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition:
    color 200ms ease,
    background 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    filter 200ms ease;
  will-change: box-shadow, filter;
}

/* 50D — restrained premium breathing glow (PvP gold / PvE emerald) */
@keyframes np-war-tab-breathe-pvp {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(203, 149, 74, 0.22),
      0 0 10px rgba(180, 120, 40, 0.14),
      inset 0 1px 0 rgba(255, 220, 160, 0.08);
    filter: brightness(1);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(230, 180, 90, 0.45),
      0 0 18px rgba(210, 150, 55, 0.32),
      inset 0 1px 0 rgba(255, 230, 180, 0.18);
    filter: brightness(1.04);
  }
}

@keyframes np-war-tab-breathe-pve {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(70, 140, 100, 0.22),
      0 0 10px rgba(40, 110, 85, 0.14),
      inset 0 1px 0 rgba(160, 220, 190, 0.07);
    filter: brightness(1);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(90, 180, 130, 0.42),
      0 0 18px rgba(55, 150, 110, 0.3),
      inset 0 1px 0 rgba(180, 235, 205, 0.16);
    filter: brightness(1.04);
  }
}

@keyframes np-war-tab-breathe-pvp-active {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(230, 185, 95, 0.55),
      0 0 16px rgba(210, 150, 50, 0.4),
      0 0 28px rgba(170, 110, 30, 0.18),
      inset 0 1px 0 rgba(255, 240, 200, 0.35);
    filter: brightness(1.02);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(245, 205, 120, 0.75),
      0 0 22px rgba(230, 170, 70, 0.55),
      0 0 36px rgba(190, 130, 40, 0.28),
      inset 0 1px 0 rgba(255, 245, 210, 0.5);
    filter: brightness(1.06);
  }
}

@keyframes np-war-tab-breathe-pve-active {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(90, 175, 130, 0.5),
      0 0 16px rgba(50, 140, 105, 0.38),
      0 0 28px rgba(30, 100, 80, 0.16),
      inset 0 1px 0 rgba(190, 235, 210, 0.28);
    filter: brightness(1.02);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(110, 200, 150, 0.7),
      0 0 22px rgba(70, 170, 125, 0.52),
      0 0 36px rgba(40, 130, 95, 0.26),
      inset 0 1px 0 rgba(210, 245, 225, 0.42);
    filter: brightness(1.06);
  }
}

.np-war-tab--pvp {
  border-color: rgba(180, 130, 55, 0.35);
  color: rgba(220, 190, 130, 0.88);
  animation: np-war-tab-breathe-pvp 2.6s ease-in-out infinite;
  animation-delay: 0s;
}

.np-war-tab--pve {
  border-color: rgba(70, 130, 100, 0.35);
  color: rgba(160, 200, 175, 0.88);
  animation: np-war-tab-breathe-pve 2.6s ease-in-out infinite;
  animation-delay: 1.3s;
}

.np-war-tab:hover {
  color: #e6dcc6;
  filter: brightness(1.08);
}

.np-war-tab--pvp:hover {
  border-color: rgba(220, 170, 80, 0.65);
  box-shadow:
    0 0 0 1px rgba(230, 180, 90, 0.55),
    0 0 20px rgba(210, 150, 55, 0.4);
}

.np-war-tab--pve:hover {
  color: #d4efe0;
  border-color: rgba(100, 180, 140, 0.65);
  box-shadow:
    0 0 0 1px rgba(100, 190, 145, 0.5),
    0 0 20px rgba(60, 150, 115, 0.38);
}

.np-war-tab.is-active {
  color: #0a0a12;
  background: linear-gradient(180deg, #cbbd86, #8fa65b);
  border-color: rgba(203, 189, 134, 0.75);
}

.np-war-tab--pvp.is-active {
  color: #1a1208;
  background: linear-gradient(180deg, #e0c88a, #b8893a 55%, #8a6528);
  border-color: rgba(230, 185, 95, 0.85);
  animation: np-war-tab-breathe-pvp-active 2.4s ease-in-out infinite;
  animation-delay: 0s;
}

.np-war-tab--pve.is-active {
  color: #06140f;
  background: linear-gradient(180deg, #9fd4b4, #4f9a72 55%, #2f6b52);
  border-color: rgba(110, 190, 145, 0.85);
  animation: np-war-tab-breathe-pve-active 2.4s ease-in-out infinite;
  animation-delay: 0s;
}

.np-war-tab:focus-visible {
  outline: 2px solid rgba(203, 189, 134, 0.9);
  outline-offset: 3px;
}

.np-war-tab--pve:focus-visible {
  outline-color: rgba(120, 200, 160, 0.95);
}

@media (prefers-reduced-motion: reduce) {
  .np-war-tab--pvp,
  .np-war-tab--pve,
  .np-war-tab--pvp.is-active,
  .np-war-tab--pve.is-active {
    animation: none;
  }

  .np-war-tab--pvp {
    box-shadow:
      0 0 0 1px rgba(203, 149, 74, 0.28),
      0 0 12px rgba(180, 120, 40, 0.18);
  }

  .np-war-tab--pve {
    box-shadow:
      0 0 0 1px rgba(70, 140, 100, 0.28),
      0 0 12px rgba(40, 110, 85, 0.18);
  }

  .np-war-tab--pvp.is-active {
    box-shadow:
      0 0 0 1px rgba(230, 185, 95, 0.65),
      0 0 18px rgba(210, 150, 50, 0.42);
  }

  .np-war-tab--pve.is-active {
    box-shadow:
      0 0 0 1px rgba(90, 175, 130, 0.65),
      0 0 18px rgba(50, 140, 105, 0.4);
  }
}

.np-war-panel[hidden] {
  display: none;
}

/* These lines used to sit in the centered .np-war-head; keep them centered
   now that each tab panel owns its own copy. */
.np-war-panel > .np-war-metric,
.np-war-panel > .np-war-period,
.np-war-panel > .np-war-rules-btn,
.np-war-panel > .np-war-rules-panel {
  text-align: center;
}

.np-war-panel > .np-war-rules-btn.np-pixel-btn {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 520px) {
  .np-war-tabs {
    width: 100%;
    gap: 0.35rem;
  }

  .np-war-tab {
    flex: 1 1 0;
    padding: 0.6rem 0.5rem;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
  }
}

/* Rules toggle uses np-pixel-btn; spacing only — do not touch ::before/::after (caps) */
.np-war-rules-btn.np-pixel-btn {
  margin-top: 1rem;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}

.np-war-ladder-shell {
  position: relative;
}
.np-war-ladder-shell::before {
  content: none !important;
  display: none !important;
  background: none !important;
}
.np-war-ladder-shell > * {
  position: relative;
  z-index: 1;
}
.np-war-podium {
  /* Grid geometry owned by .np-podium-25b-root in podium-25b.css */
  margin-bottom: 2.5rem;
  overflow: visible;
  background: transparent;
}

/* 25B — podium geometry owned by css/podium-25b.css */
.np-war-card {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  overflow: visible;
}

.np-war-chassis,
.np-war-art-shell,
.np-war-rank-frame,
.np-war-portrait-relic,
.np-relic-layer,
.np-relic-layer--crown,
.np-relic-layer--sides,
.np-relic-layer--base,
.np-war-rank-frame .np-relic-medallion,
.np-war-card-bg,
.np-rank-approved-frame,
.np-rank-recess,
.np-podium-visual {
  display: none;
}

.np-podium-frame.is-art-missing,
.np-rank-approved-emblem__img.is-art-missing {
  display: none;
  visibility: hidden;
  width: 0;
  height: 0;
}

.np-war-card--champion::before,
.np-war-card--silver::before,
.np-war-card--bronze::before,
.np-war-card--champion::after,
.np-war-card--silver::after,
.np-war-card--bronze::after {
  content: none;
  display: none;
}

.np-war-card--champion {
  --np-rank-hi: #f8e6a8;
  --np-rank-mid: #d4a02e;
  --np-rank-lo: #6a4210;
}

.np-war-card--silver {
  --np-rank-hi: #f4f8ff;
  --np-rank-mid: #9eb4cc;
  --np-rank-lo: #35485c;
}

.np-war-card--bronze {
  --np-rank-hi: #efc090;
  --np-rank-mid: #b0682c;
  --np-rank-lo: #4a220c;
}

.np-podium-25b .np-war-card-body,
.np-podium-25b .np-rank-live-content {
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 0 14px rgba(0, 0, 0, 0.4);
}

.np-war-rank {
  display: none;
}

.np-war-champion-copy {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  color: #f6edd8;
  font-size: 0.95rem;
}

.np-war-champion-head {
  display: none;
}

.np-war-portrait {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0.85rem auto 0.55rem;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.np-rank-approved-emblem {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 138px;
  height: 138px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.np-rank-approved-emblem__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
  outline: none;
  background: transparent;
  filter: none;
  -webkit-user-drag: none;
  user-select: none;
}

.np-war-portrait-relic {
  display: none !important;
}

.np-war-portrait-relic__svg,
.np-war-portrait-relic__img {
  display: none !important;
}

.np-war-card--champion .np-war-portrait {
  width: 118px;
  height: 118px;
  margin-top: 1.7rem;
}

.np-war-card--champion .np-rank-approved-emblem {
  width: 158px;
  height: 158px;
}

.np-war-portrait img.member-avatar {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 50%;
  border: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45);
}

.np-war-card--champion .np-war-portrait img.member-avatar {
  border-color: transparent;
  border-radius: 50%;
}

.np-war-card--silver .np-war-portrait img.member-avatar {
  border-radius: 50%;
  border-color: transparent;
}

.np-war-card--bronze .np-war-portrait img.member-avatar {
  border-radius: 50%;
  border-color: transparent;
}

.np-war-portrait .member-ring {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}

@media (max-width: 767px) {
  .np-war-card--champion .np-war-portrait { width: 92px; height: 92px; }
  .np-war-portrait { width: 80px; height: 80px; }
  .np-rank-approved-emblem { width: 112px; height: 112px; }
  .np-war-card--champion .np-rank-approved-emblem { width: 128px; height: 128px; }
}

.np-war-card--champion:hover,
.np-war-card--silver:hover,
.np-war-card--bronze:hover {
  transform: none;
}


.np-war-name {
  margin-top: 0.7rem;
  text-align: center;
  font-family: var(--font-title);
  letter-spacing: 0.08em;
  color: #f4eee2;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.np-war-level {
  margin-top: 0.45rem;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: #d8c792;
}

.np-war-xp {
  margin-top: 0.55rem;
}

.np-war-xp-label {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: #b8b0a2;
  margin-bottom: 0.25rem;
}

.np-war-xp-level {
  flex-shrink: 0;
  color: #d8c792;
  letter-spacing: 0.14em;
}

.np-war-xp-level-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0.12rem;
  min-width: 0;
}

.np-war-xp-level-ratio {
  color: #d2cbc0;
  white-space: nowrap;
}

.np-war-xp-level-hint {
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8f877c;
  line-height: 1.2;
}

.np-war-xp-level-hint-short {
  display: none;
}

.np-war-xp-total {
  margin-top: 0.3rem;
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7f786e;
  text-align: right;
}

.np-war-xp-rail {
  height: 10px;
  box-sizing: border-box;
  border-radius: 999px;
  background: linear-gradient(180deg, #1a1a20, #08080c);
  border: 1px solid var(--np-moss-border);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.65);
  position: relative;
  z-index: 2;
}

.np-war-xp-fill {
  display: block;
  height: 100%;
  min-height: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--np-moss-dark) 0%, var(--np-moss-main) 55%, var(--np-moss-readable) 100%);
  box-shadow: inset 0 1px 0 rgba(200, 220, 160, 0.22);
  transition: width 0.35s ease;
  opacity: 1;
  visibility: visible;
}

.np-war-board .np-war-xp-fill {
  background: linear-gradient(90deg, var(--np-moss-dark) 0%, var(--np-moss-main) 55%, var(--np-moss-readable) 100%);
  box-shadow: inset 0 1px 0 rgba(200, 220, 160, 0.22);
}
.np-war-board .np-war-row:first-of-type .np-war-xp-fill {
  background: linear-gradient(90deg, #5a3c10 0%, var(--rank-gold) 52%, var(--rank-gold-bright) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 236, 180, 0.28);
}

.np-war-card--champion .np-war-xp-fill {
  background: linear-gradient(90deg, #5a3c10 0%, #b8923c 52%, #e2c878 100%);
}

.np-war-card--silver .np-war-xp-rail {
  border-color: rgba(154, 172, 191, 0.28);
}

.np-war-card--silver .np-war-xp-fill {
  background: linear-gradient(90deg, #2a3848 0%, #7a90a8 55%, #c8d8e8 100%);
  box-shadow: inset 0 1px 0 rgba(220, 235, 250, 0.28);
}

.np-war-card--bronze .np-war-xp-rail {
  border-color: rgba(160, 96, 48, 0.28);
}

.np-war-card--bronze .np-war-xp-fill {
  background: linear-gradient(90deg, #3a2010 0%, #a06030 55%, #d4a070 100%);
  box-shadow: inset 0 1px 0 rgba(240, 200, 150, 0.22);
}

@media (max-width: 767px) {
  .np-war-xp-rail {
    height: 7px;
    box-sizing: border-box;
  }
}

.np-war-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-top: 0.75rem;
}

/* 50B — weekly + lifetime fame pair, then combat triple while events may be stale. */
.np-war-stats--fame-pair {
  grid-template-columns: repeat(2, 1fr);
}

.np-war-stats--combat-triple {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 0.35rem;
}

.np-war-stat--fame-total strong {
  color: #cfc5b4;
  font-size: 0.88rem;
}

/* 49D — fame + kills + deaths + participations sit as a 2x2 block. */
.np-war-stats--quad {
  grid-template-columns: repeat(2, 1fr);
}

/* PvE podium carries a single metric — no combat columns to balance against. */
.np-war-stats--solo {
  grid-template-columns: 1fr;
}

.np-war-stat {
  text-align: center;
  padding: 0.22rem 0.1rem;
  border-radius: 0;
  background: transparent;
  border: none;
}

.np-war-card--silver .np-war-stat {
  border-color: transparent;
}

.np-war-card--bronze .np-war-stat {
  border-color: transparent;
}

.np-war-stat strong {
  display: block;
  font-family: var(--font-mono, monospace);
  color: #f2ece0;
  font-size: 0.95rem;
}

.np-war-stat span {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: #b8ae9c;
  text-transform: uppercase;
}

.np-war-combat-partial-note {
  margin: 0.35rem 0 0;
  padding: 0 0.15rem;
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  line-height: 1.35;
  color: #9a9284;
  text-transform: uppercase;
  text-align: center;
}

.np-war-stats--combat-triple[data-combat-partial="1"] .np-war-stat span {
  color: #c4b89e;
}

.np-war-highlight {
  margin-top: 0.7rem;
  padding: 0.35rem 0.2rem;
  border-radius: 0;
  background: transparent;
  border: none;
}

.np-war-highlight-kicker {
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  color: var(--np-moss-readable);
  text-transform: uppercase;
}

.np-war-highlight p {
  margin-top: 0.35rem;
  color: #d8d2c8;
  font-size: 0.78rem;
  line-height: 1.45;
}

.np-war-cta-row {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.45rem;
  align-items: stretch;
  justify-content: center;
  margin-top: 0.85rem;
  width: 88%;
  margin-left: auto;
  margin-right: auto;
}

/* Legacy bare anchors (if any) — pixel buttons own their look via game-ui.css */
.np-war-cta-row a:not(.np-pixel-btn) {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.52rem 0.85rem;
  border-radius: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(201, 162, 39, 0.38);
  color: #f6f0e4;
  -webkit-text-fill-color: #f6f0e4;
  background: rgba(8, 8, 10, 0.94);
  text-decoration: none;
}

.np-war-cta-row .np-pixel-btn {
  width: 100%;
}

.np-war-card--silver .np-war-cta-row .np-pixel-btn--compact {
  filter: drop-shadow(0 3px 0 #050403);
  box-shadow:
    inset 0 var(--pixel-unit, 4px) 0 rgba(200, 216, 232, 0.22),
    inset 0 calc(var(--pixel-unit, 4px) * -1) 0 rgba(0, 0, 0, 0.55);
}

.np-war-card--bronze .np-war-cta-row .np-pixel-btn--compact {
  filter: drop-shadow(0 3px 0 #050403);
  box-shadow:
    inset 0 var(--pixel-unit, 4px) 0 rgba(220, 180, 130, 0.22),
    inset 0 calc(var(--pixel-unit, 4px) * -1) 0 rgba(0, 0, 0, 0.55);
}

/* Ranking section: keep primary/ghost labels visible in all states */
#war-ladder .btn-primary,
#war-ladder .btn-ghost,
.np-war-ladder .btn-primary,
.np-war-ladder .btn-ghost {
  color: inherit;
}
#war-ladder .btn-primary,
.np-war-ladder .btn-primary {
  color: #0a0a0a;
  -webkit-text-fill-color: #0a0a0a;
}
#war-ladder .btn-primary:hover,
#war-ladder .btn-primary:focus-visible,
#war-ladder .btn-primary:active,
.np-war-ladder .btn-primary:hover,
.np-war-ladder .btn-primary:focus-visible,
.np-war-ladder .btn-primary:active {
  color: #0a0a0a;
  -webkit-text-fill-color: #0a0a0a;
}
#war-ladder .btn-primary::before,
.np-war-ladder .btn-primary::before {
  z-index: -1;
}
#war-ladder .btn-ghost,
.np-war-ladder .btn-ghost {
  color: var(--np-moss-readable);
  -webkit-text-fill-color: var(--np-moss-readable);
}
#war-ladder .btn-ghost:hover,
#war-ladder .btn-ghost:focus-visible,
#war-ladder .btn-ghost:active,
.np-war-ladder .btn-ghost:hover,
.np-war-ladder .btn-ghost:focus-visible,
.np-war-ladder .btn-ghost:active {
  color: var(--np-moss-hover);
  -webkit-text-fill-color: var(--np-moss-hover);
}

.np-war-rules-btn {
  z-index: 1;
}

.np-war-board-wrap {
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(95, 122, 58, 0.22);
}

.np-war-board-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.np-war-board-head h3 {
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  color: #f2ece0;
}

.np-war-slots-filled {
  margin: 0;
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8274;
  white-space: nowrap;
  opacity: 0.85;
}

.np-war-slots-filled[hidden] {
  display: none !important;
}

.np-war-board {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 11.5rem;
}

.np-war-row {
  display: grid;
  grid-template-columns: 44px minmax(280px, 1fr) auto minmax(90px, auto);
  gap: 0.75rem 1rem;
  align-items: center;
  min-height: 84px;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.14);
  background: rgba(10, 10, 16, 0.72);
  transition: border-color 0.2s ease, background 0.2s ease;
  overflow: visible;
}

.np-war-row--slot-empty {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 0;
  height: auto;
  padding: 0.28rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(120, 110, 90, 0.1);
  background: transparent;
  opacity: 0.55;
  pointer-events: none;
}

.np-war-row--slot-empty:hover,
.np-war-row--slot-empty:focus-within {
  border-color: rgba(120, 110, 90, 0.1);
  background: transparent;
}

.np-war-row-rank--slot {
  flex: 0 0 2.2rem;
  font-size: 0.68rem;
  color: #6e675c;
  text-align: left;
}

.np-war-row-slot-sep {
  flex: 0 0 1.25rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(143, 166, 91, 0.35), transparent);
}

.np-war-row-slot-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7a7368;
}

.np-war-row:hover,
.np-war-row:focus-within {
  border-color: var(--np-moss-border);
  background: rgba(16, 14, 20, 0.88);
}

.np-war-row--slot-empty:hover,
.np-war-row--slot-empty:focus-within {
  border-color: rgba(120, 110, 90, 0.1);
  background: transparent;
}

.np-war-row-rank {
  font-family: var(--font-mono, monospace);
  color: var(--np-moss-readable);
  font-size: 0.82rem;
  text-align: center;
  align-self: center;
}
.np-war-board .np-war-row[data-slot-occupied="1"]:first-of-type .np-war-row-rank {
  color: var(--rank-gold-bright);
}

.np-war-row-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.np-war-row-avatar {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  overflow: visible;
}

.np-war-row-portrait {
  width: 72px;
  height: 72px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.np-war-row-portrait .member-avatar {
  position: absolute !important;
  top: 48% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: 76% !important;
  height: 76% !important;
  margin: 0 !important;
  object-fit: cover;
  object-position: center 16%;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  border: none !important;
  box-shadow: none;
  transform: translate(-50%, -50%) !important;
  transform-origin: center center;
  z-index: 1;
  opacity: 1;
  filter: none;
}

.np-war-row-portrait .member-ring {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: 118% !important;
  height: 118% !important;
  transform: translate(-50%, -50%) !important;
  object-fit: contain;
  pointer-events: none;
  overflow: visible;
  z-index: 2;
  opacity: 1;
}

.np-war-row-identity {
  flex: 1;
  min-width: 0;
}

.np-war-row-name-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  line-height: 1.25;
  min-width: 0;
}

.np-war-row-name {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: #f4eee2;
  text-transform: uppercase;
  min-width: 0;
}

.np-war-row-level {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #d8c792;
  white-space: nowrap;
}

.np-war-row-xp {
  margin-top: 0.35rem;
  width: 100%;
  max-width: 100%;
}

.np-war-xp--compact .np-war-xp-label {
  justify-content: flex-start;
}

.np-war-xp--compact .np-war-xp-level-progress {
  align-items: flex-start;
  text-align: left;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
}

.np-war-xp--compact .np-war-xp-level-hint-full {
  display: none;
}

.np-war-xp--compact .np-war-xp-level-hint-short {
  display: inline;
}

.np-war-xp--compact .np-war-xp-total {
  text-align: left;
}

@media (max-width: 767px) {
  .np-war-xp-level-hint-full {
    display: none;
  }
  .np-war-xp-level-hint-short {
    display: inline;
  }
  .np-war-xp-label {
    flex-wrap: wrap;
    gap: 0.2rem 0.45rem;
  }
  .np-war-xp-level-progress {
    align-items: flex-start;
    text-align: left;
    width: 100%;
  }
  .np-war-xp-total {
    text-align: left;
  }
}

.np-war-row-kd {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #cfc7ba;
  text-align: center;
  white-space: nowrap;
  line-height: 1.45;
  min-width: 0;
}

.np-war-row-metric__label {
  color: #cfc7ba;
  font-weight: 400;
}

.np-war-row-metric__value {
  color: #e8e2d6;
  font-weight: 600;
}

.np-war-row-kd a {
  color: inherit;
}

.np-war-row-score-col {
  text-align: right;
  min-width: 90px;
  justify-self: end;
  flex-shrink: 0;
}

.np-war-row-score {
  display: block;
  font-family: var(--font-mono, monospace);
  color: #f2ece0;
  font-size: 0.9rem;
  white-space: nowrap;
}

.np-war-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #cfc7ba;
  border: 1px dashed rgba(201, 162, 39, 0.25);
  border-radius: 14px;
}

.np-war-board-degraded,
.np-war-board-degraded.np-war-empty {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 11.5rem;
  margin: 0;
  padding: 2.4rem 1.35rem;
  text-align: center;
  color: #cfc7ba;
  border: 1px solid rgba(95, 122, 58, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(18, 16, 12, 0.92) 0%, rgba(8, 8, 12, 0.88) 100%);
  box-shadow:
    inset 0 1px 0 rgba(201, 162, 39, 0.08),
    inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.np-war-board-degraded__kicker,
.np-war-board-degraded__status {
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: #c9a227;
  margin: 0;
}

.np-war-board-degraded__status {
  color: #d4b84a;
}

.np-war-board-degraded__title {
  color: #f2ece0;
  font-size: 1.05rem;
  margin: 0.2rem 0 0;
  max-width: 36rem;
}

.np-war-board-degraded__copy,
.np-war-board-degraded__resume,
.np-war-board-degraded__last {
  color: #b8ae9c;
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0.2rem 0 0;
  max-width: 34rem;
}

.np-war-board-degraded__resume {
  color: #9a927f;
  font-size: 0.8rem;
}

.np-war-board-delayed--partial {
  border-color: rgba(180, 140, 60, 0.45);
  background: rgba(28, 22, 10, 0.78);
}

.np-war-board-delayed--partial .np-war-board-delayed__status {
  color: #e0c070;
}

.np-war-health__block[data-health-state="partial"] .np-war-health__title {
  color: #d4b84a;
}

.np-relic.is-provisional .np-relic__provisional,
.np-relic__provisional {
  margin: 0.15rem 0 0;
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9a227;
}

.np-war-board-delayed__status {
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: #d4b84a;
  margin: 0 0 0.25rem;
}

.np-war-board-delayed__copy {
  margin: 0;
  font-size: 0.8rem;
  color: #b8ae9c;
  line-height: 1.4;
}

@media (max-width: 430px) {
  .np-war-board,
  .np-war-board-degraded,
  .np-war-board-degraded.np-war-empty {
    min-height: 9.5rem;
  }
  .np-war-board-degraded,
  .np-war-board-degraded.np-war-empty {
    padding: 1.6rem 1rem;
  }
  .np-war-board-wrap {
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
  }
  .np-war-board-head {
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
  }
  .np-war-slots-filled {
    font-size: 0.56rem;
    letter-spacing: 0.1em;
  }
  .np-war-row--slot-empty {
    padding: 0.18rem 0.55rem;
    gap: 0.45rem;
  }
  .np-war-row-slot-label {
    font-size: 0.52rem;
  }
}

.war-podium--vacant .war-podium__identity {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: #b8ae9c;
}

.war-podium--vacant .np-war-portrait {
  opacity: 0.45;
}

.np-war-rules-panel {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(143, 166, 91, 0.22);
  background: rgba(8, 8, 16, 0.88);
  color: #d8d2c8;
  line-height: 1.55;
  font-size: 0.85rem;
}

.np-war-rules-panel[hidden] { display: none; }

.np-war-rules-panel h4 {
  color: #f2ece0;
  letter-spacing: 0.08em;
  margin-bottom: 0.55rem;
}

.np-war-rules-panel ul {
  margin: 0.5rem 0 0 1rem;
}

.np-war-champion-transition {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgba(4, 4, 8, 0.82);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.np-war-champion-transition.is-active {
  opacity: 1;
  pointer-events: auto;
}

.np-war-champion-transition-card {
  text-align: center;
  padding: 1.5rem 2rem;
  border-radius: 18px;
  border: 1px solid rgba(232, 197, 71, 0.45);
  background: linear-gradient(180deg, rgba(24, 20, 16, 0.96), rgba(8, 8, 14, 0.96));
  max-width: 420px;
}

.np-war-champion-transition-card h3 {
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  color: #f6edd8;
}

.np-war-champion-transition-card p {
  margin-top: 0.65rem;
  color: #d8d2c8;
}

@media (max-width: 980px) {
  .np-war-ladder-shell::before { display: none; }

  .np-war-card--champion { order: -1; }
  .np-war-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 0.5rem 0.75rem;
    min-height: 0;
    align-items: start;
  }
  .np-war-row-rank {
    grid-column: 1;
    grid-row: 1;
    text-align: left;
  }
  .np-war-row-score-col {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }
  .np-war-row-player {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .np-war-row-kd {
    grid-column: 1 / -1;
    grid-row: 3;
    text-align: left;
    font-size: 0.68rem;
    opacity: 0.78;
  }
    white-space: normal;
  }
  .np-war-row-avatar {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
  }
  .np-war-row-portrait {
    width: 54px;
    height: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .np-war-xp-fill { transition: none; }
}

/* 17B7A — staging badge + non-competitive special row */
.np-war-staging-badge {
  display: inline-block;
  margin-top: 0.65rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(180, 210, 230, 0.75);
  border: 1px solid rgba(120, 160, 190, 0.35);
  border-radius: 2px;
  background: rgba(20, 40, 55, 0.45);
}

.np-war-row--special {
  margin-top: 0.55rem;
  border: 1px dashed rgba(180, 140, 60, 0.35);
  background: rgba(40, 28, 12, 0.35);
}

.np-war-row-rank--special {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: #c9a24a;
  writing-mode: horizontal-tb;
}

.np-war-row-jester {
  margin-left: 0.35rem;
  opacity: 0.7;
  font-size: 0.85em;
}

.np-war-row-special-note {
  margin: 0.2rem 0 0;
  font-size: 0.68rem;
  color: rgba(200, 180, 140, 0.55);
  letter-spacing: 0.04em;
}

.np-war-row-score--special {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(180, 160, 120, 0.7);
  text-transform: uppercase;
}

.np-shame-wall[hidden] {
  display: none !important;
}

.np-shame-plaque {
  max-width: 22rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  text-align: center;
  border: 1px solid rgba(160, 120, 50, 0.35);
  background: rgba(28, 20, 10, 0.55);
}

.np-shame-name {
  margin: 0;
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-size: 1.35rem;
  color: #e8dcc0;
}

.np-shame-xp {
  margin: 0.5rem 0 0;
  letter-spacing: 0.2em;
  color: #c9a24a;
}

.np-shame-punitive {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(200, 160, 110, 0.85);
  cursor: help;
}

.np-shame-seal {
  margin: 0.75rem 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(200, 180, 140, 0.65);
}

.np-shame-copy {
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(210, 200, 180, 0.7);
}

@media (max-width: 430px) {
  .np-war-row-kd {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
  }
  .np-war-stat--participations {
    display: none;
  }
}
