/* Fama da Guilda 49C / visual reforge 50F — analytical progression layer */
.np-fame-ladder {
  --fame-moss: rgba(143, 166, 91, 0.92);
  --fame-moss-dim: rgba(100, 124, 88, 0.35);
  --fame-ink: rgba(214, 224, 204, 0.94);
  --fame-muted: rgba(150, 164, 140, 0.78);
  --fame-panel: linear-gradient(165deg, rgba(14, 18, 14, 0.96), rgba(8, 10, 9, 0.98));
  position: relative;
  margin: clamp(2.2rem, 4.5vw, 3.4rem) auto;
  padding: clamp(1.7rem, 3.2vw, 2.6rem) clamp(1rem, 3vw, 1.75rem) clamp(2rem, 3.5vw, 2.8rem);
  max-width: min(100%, 74rem);
  border: 1px solid rgba(100, 124, 88, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(90, 120, 70, 0.14), transparent 70%),
    var(--fame-panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.np-fame-ladder::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(143, 166, 91, 0.55), transparent);
  pointer-events: none;
}

.np-fame-ladder-shell {
  position: relative;
  z-index: 1;
}

.np-fame-ladder__head {
  text-align: center;
  margin-bottom: 1.1rem;
}

.np-fame-ladder__title {
  margin: 0;
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-size: clamp(1.55rem, 3.2vw, 2.25rem);
  letter-spacing: 0.14em;
  color: rgba(206, 220, 186, 0.96);
  text-shadow: 0 0 28px rgba(120, 150, 90, 0.18);
}

.np-fame-ladder__sub {
  margin: 0.6rem auto 0;
  max-width: 42rem;
  color: var(--fame-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.np-fame-ladder__period {
  display: inline-block;
  margin: 0.85rem 0 0;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(140, 168, 120, 0.35);
  border-radius: 999px;
  background: rgba(12, 18, 12, 0.72);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(168, 196, 140, 0.92);
}

.np-fame-ladder__health {
  margin: 0.45rem 0 0;
  font-size: 0.68rem;
  color: rgba(130, 148, 118, 0.72);
}

.np-fame-ladder__health[data-profile-health="delayed"],
.np-fame-ladder__health[data-profile-health="stale"] {
  color: rgba(210, 180, 110, 0.88);
}

.np-fame-metric-hint {
  margin: 0.85rem auto 0;
  max-width: 36rem;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(168, 186, 150, 0.78);
}

.np-fame-index-help {
  margin: 0.55rem auto 0;
  max-width: 34rem;
  text-align: center;
  font-size: 0.84rem;
  line-height: 1.4;
  color: rgba(170, 186, 156, 0.82);
}

.np-fame-index-help[hidden] {
  display: none;
}

.np-fame-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  justify-content: center;
  margin: 1.25rem auto 1.1rem;
  padding: 0.3rem;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(100, 124, 88, 0.3);
  border-radius: 999px;
  background: rgba(6, 8, 6, 0.65);
  -webkit-overflow-scrolling: touch;
}

.np-fame-tab {
  appearance: none;
  margin: 0;
  flex: 0 0 auto;
  padding: 0.52rem 0.95rem;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(180, 194, 168, 0.82);
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.np-fame-tab:hover {
  color: rgba(220, 230, 210, 0.96);
  border-color: rgba(140, 168, 120, 0.35);
}

.np-fame-tab.is-active,
.np-fame-tab:focus-visible {
  color: #0c100c;
  background: linear-gradient(180deg, #c5d4a4, #8fa65b);
  border-color: rgba(180, 200, 140, 0.7);
  box-shadow: 0 0 14px rgba(140, 168, 100, 0.28);
  outline: none;
}

.np-fame-tab:focus-visible {
  outline: 2px solid rgba(203, 189, 134, 0.75);
  outline-offset: 2px;
}

#np-fame-ladder-root[data-active-fame-tab="pvp"] .np-fame-tab.is-active {
  background: linear-gradient(180deg, #e0c88a, #b8893a);
  border-color: rgba(230, 185, 95, 0.75);
  box-shadow: 0 0 14px rgba(190, 140, 50, 0.3);
}

#np-fame-ladder-root[data-active-fame-tab="pve"] .np-fame-tab.is-active {
  background: linear-gradient(180deg, #9fd4b4, #4f9a72);
  border-color: rgba(110, 190, 145, 0.75);
  box-shadow: 0 0 14px rgba(60, 140, 105, 0.28);
}

#np-fame-ladder-root[data-active-fame-tab="coleta"] .np-fame-tab.is-active {
  background: linear-gradient(180deg, #c4b58a, #7a6a42);
  border-color: rgba(180, 160, 100, 0.7);
}

#np-fame-ladder-root[data-active-fame-tab="craft"] .np-fame-tab.is-active {
  background: linear-gradient(180deg, #c9b8a4, #8a6f58);
  border-color: rgba(180, 140, 110, 0.7);
}

.np-fame-board {
  display: grid;
  gap: 0.45rem;
  max-width: 46rem;
  margin: 0 auto;
}

.np-fame-row {
  display: grid;
  grid-template-columns: 3rem 3.4rem minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(80, 100, 70, 0.32);
  border-radius: 12px;
  background: linear-gradient(100deg, rgba(14, 18, 14, 0.96), rgba(8, 10, 9, 0.98));
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.np-fame-row:hover {
  border-color: rgba(140, 168, 120, 0.45);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.np-fame-row.is-top {
  border-color: rgba(143, 166, 91, 0.42);
  background: linear-gradient(100deg, rgba(22, 28, 18, 0.98), rgba(10, 12, 10, 0.98));
}

.np-fame-row.is-top-1 {
  box-shadow: inset 0 0 0 1px rgba(203, 189, 134, 0.18), 0 10px 24px rgba(0, 0, 0, 0.28);
}

.np-fame-row.is-top-2 {
  box-shadow: inset 0 0 0 1px rgba(170, 180, 190, 0.14);
}

.np-fame-row.is-top-3 {
  box-shadow: inset 0 0 0 1px rgba(160, 120, 80, 0.16);
}

.np-fame-row__rank {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: rgba(150, 176, 126, 0.9);
}

.np-fame-row__portrait {
  position: relative;
  width: 3.2rem;
  height: 3.2rem;
  flex: 0 0 auto;
}

.np-fame-row__portrait .np-avatar-aperture,
.np-fame-row__portrait .member-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.np-fame-row__portrait .member-ring {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  pointer-events: none;
}

.np-fame-row__body {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
}

.np-fame-row__name {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--fame-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-fame-row__metric {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(150, 168, 138, 0.78);
}

.np-fame-row__rail {
  margin-top: 0.2rem;
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(30, 36, 28, 0.95);
  overflow: hidden;
}

.np-fame-row__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(120, 150, 90, 0.55), rgba(180, 200, 140, 0.92));
}

#np-fame-ladder-root[data-active-fame-tab="pvp"] .np-fame-row__fill {
  background: linear-gradient(90deg, rgba(150, 110, 40, 0.55), rgba(230, 185, 95, 0.92));
}

#np-fame-ladder-root[data-active-fame-tab="pve"] .np-fame-row__fill {
  background: linear-gradient(90deg, rgba(40, 110, 85, 0.55), rgba(110, 200, 150, 0.9));
}

#np-fame-ladder-root[data-active-fame-tab="coleta"] .np-fame-row__fill {
  background: linear-gradient(90deg, rgba(90, 80, 40, 0.55), rgba(180, 160, 100, 0.9));
}

#np-fame-ladder-root[data-active-fame-tab="craft"] .np-fame-row__fill {
  background: linear-gradient(90deg, rgba(90, 70, 55, 0.55), rgba(190, 150, 120, 0.9));
}

.np-fame-row__value {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: rgba(210, 224, 190, 0.96);
  text-align: right;
  white-space: nowrap;
}

.np-fame-row__unit {
  margin-left: 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(160, 180, 140, 0.85);
}

.np-fame-row__delta {
  letter-spacing: 0.02em;
}

.np-fame-empty {
  text-align: center;
  color: rgba(150, 164, 140, 0.78);
  font-size: 0.9rem;
  padding: 1.6rem 0.75rem;
}

.np-fame-empty--truthful {
  border: 1px dashed rgba(100, 124, 88, 0.35);
  border-radius: 14px;
  background: rgba(8, 10, 8, 0.55);
}

.np-fame-empty__kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(160, 180, 140, 0.78);
}

.np-fame-empty__count {
  margin: 0.55rem 0 0;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: rgba(200, 214, 184, 0.92);
}

.np-fame-empty__copy {
  margin: 0.55rem auto 0;
  max-width: 28rem;
  line-height: 1.45;
}

.np-fame-empty__baseline {
  margin: 0.7rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(150, 176, 126, 0.85);
}

.np-fame-detail {
  margin: 1.25rem auto 0;
  max-width: 46rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(100, 124, 88, 0.3);
  border-radius: 14px;
  background: rgba(8, 10, 8, 0.72);
}

.np-fame-detail__name {
  margin: 0 0 0.75rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.08em;
  color: rgba(210, 224, 190, 0.95);
}

.np-fame-detail__block h4 {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: rgba(150, 168, 138, 0.8);
}

.np-fame-detail__block ul {
  margin: 0 0 0.85rem;
  padding-left: 1.1rem;
  color: rgba(190, 202, 176, 0.88);
}

.np-fame-detail__close {
  appearance: none;
  margin: 0;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(120, 140, 100, 0.4);
  border-radius: 999px;
  background: transparent;
  color: rgba(200, 214, 184, 0.9);
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  cursor: pointer;
}

@media (max-width: 560px) {
  .np-fame-tabs {
    justify-content: flex-start;
    width: 100%;
  }

  .np-fame-row {
    grid-template-columns: 2.4rem 2.8rem minmax(0, 1fr);
    grid-template-areas:
      "rank portrait body"
      "rank portrait value";
    gap: 0.45rem 0.55rem;
  }

  .np-fame-row__rank { grid-area: rank; }
  .np-fame-row__portrait { grid-area: portrait; width: 2.7rem; height: 2.7rem; }
  .np-fame-row__body { grid-area: body; }
  .np-fame-row__value {
    grid-area: value;
    text-align: left;
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .np-fame-tab,
  .np-fame-row {
    transition: none;
  }
}
