/* ================================================================
   NO PERRY — Combat Armory 37A
   Dark forged iron / moss / ember. Not gold UI. Not tapestry.
   Safe surfaces own their bounds. No card-in-frame.
   ================================================================ */

#guild-constellation.np-combat-armory {
  --armory-ink: #e6ddd0;
  --armory-mute: #8a8276;
  --armory-iron: #16141a;
  --armory-iron-2: #1e1b22;
  --armory-edge: rgba(143, 166, 91, 0.28);
  --armory-ember: #8a3a2a;
  --armory-moss: var(--np-moss-readable, #8FA65B);
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  min-height: auto;
  padding: 4.5rem 1.25rem 5rem;
  color: var(--armory-ink);
  background:
    radial-gradient(ellipse 70% 50% at 50% 18%, rgba(90, 40, 24, 0.16), transparent 62%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(40, 50, 28, 0.18), transparent 70%),
    linear-gradient(180deg, #07060a 0%, #0b090c 48%, #08080c 100%);
}

#guild-constellation.np-combat-armory .np-world-scene,
#guild-constellation.np-combat-armory .np-world-scene__fog-front,
#guild-constellation.np-combat-armory .np-world-scene__vignette,
#guild-constellation.np-combat-armory .np-world-scene__edge-mask {
  opacity: 0.22;
  pointer-events: none;
  z-index: 1;
}

#guild-constellation.np-combat-armory #np-combat-armory-root {
  position: relative;
  z-index: 9;
}

.np-armory {
  position: relative;
  z-index: 9;
  width: min(1180px, 100%);
  margin: 0 auto;
  max-width: 1180px;
}

.np-armory__head {
  text-align: center;
  max-width: 38rem;
  margin: 0 auto 1.75rem;
}

.np-armory__eyebrow {
  margin: 0 0 0.65rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--armory-moss);
}

.np-armory__title {
  margin: 0 0 0.45rem;
  font-family: var(--font-title, 'Cinzel', serif);
  font-size: clamp(1.85rem, 4vw, 2.85rem);
  letter-spacing: 0.08em;
  font-weight: 700;
}

.np-armory__tagline,
.np-armory__tagline {
  margin: 0;
  color: var(--armory-mute);
  font-size: 1.02rem;
}

.np-armory__doctrines {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.np-armory__doctrine {
  appearance: none;
  border: 1px solid rgba(143, 166, 91, 0.28);
  background: rgba(18, 16, 20, 0.82);
  color: var(--armory-ink);
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  border-radius: 2px;
}

.np-armory__doctrine.is-active {
  border-color: rgba(143, 166, 91, 0.7);
  background: rgba(48, 58, 32, 0.55);
  color: var(--armory-moss);
}

.np-armory__doctrine:focus-visible {
  outline: 2px solid var(--armory-moss);
  outline-offset: 2px;
}

.np-armory__stage-wrap {
  position: relative;
}

.np-armory__stage-wrap {
  position: relative;
}

.np-armory__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 1.25rem 1.5rem;
  align-items: stretch;
}

.np-armory__rack {
  --rack-safe: 1.1rem;
  position: relative;
  min-height: 520px;
  padding: var(--rack-safe);
  border: 1px solid rgba(90, 84, 74, 0.45);
  background:
    radial-gradient(ellipse 50% 40% at 50% 42%, rgba(80, 36, 22, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(22, 20, 24, 0.94), rgba(12, 11, 14, 0.96));
  overflow: hidden;
}

.np-armory__rack::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.28)),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 255, 255, 0.015) 46px 47px);
  opacity: 0.7;
}

.np-armory__figure {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(210px, 38%);
  height: 310px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.np-armory__silhouette {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 40% 18% at 50% 8%, rgba(180, 160, 130, 0.35), transparent 70%),
    linear-gradient(180deg, rgba(50, 46, 42, 0.95) 0%, rgba(24, 22, 26, 0.98) 100%);
  clip-path: polygon(
    48% 4%, 52% 4%, 58% 14%, 60% 22%, 78% 30%, 80% 38%, 62% 36%,
    64% 58%, 72% 92%, 62% 92%, 54% 62%, 46% 62%, 38% 92%, 28% 92%,
    36% 58%, 38% 36%, 20% 38%, 22% 30%, 40% 22%, 42% 14%
  );
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.55);
  opacity: 0.92;
}

.np-armory__smoke,
.np-armory__smoke {
  position: absolute;
  inset: auto 10% 8% 10%;
  height: 70px;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 80%, rgba(90, 80, 70, 0.28), transparent 70%);
  filter: blur(8px);
  animation: np-armory-smoke 16s ease-in-out infinite;
}

@keyframes np-armory-smoke {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 0.6; transform: translateY(-8px); }
}

.np-armory__slot {
  position: absolute;
  width: 72px;
  z-index: 2;
}

.np-armory__slot[data-slot='head'] { left: 50%; top: 6%; transform: translateX(-50%); }
.np-armory__slot[data-slot='mainHand'] { left: 6%; top: 34%; }
.np-armory__slot[data-slot='offHand'] { right: 6%; top: 34%; left: auto; }
.np-armory__slot[data-slot='armor'] { left: 50%; top: 48%; transform: translateX(-50%); }
.np-armory__slot[data-slot='shoes'] { left: 18%; bottom: 14%; top: auto; }
.np-armory__slot[data-slot='cape'] { right: 18%; bottom: 14%; left: auto; top: auto; }
.np-armory__slot[data-slot='food'] { left: 8%; bottom: 6%; top: auto; }
.np-armory__slot[data-slot='potion'] { right: 8%; bottom: 6%; left: auto; top: auto; }
.np-armory__slot[data-slot='bag'],
.np-armory__slot[data-slot='bag'] { left: 38%; bottom: 4%; top: auto; }
.np-armory__slot[data-slot='mount'],
.np-armory__slot[data-slot='mount'] { right: 38%; bottom: 4%; left: auto; top: auto; }

.np-armory__slot-btn {
  width: 72px;
  height: 72px;
  padding: 6px;
  border: 1px solid rgba(143, 166, 91, 0.32);
  background: rgba(10, 9, 12, 0.88);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.np-armory__slot-btn:focus-visible {
  outline: 2px solid var(--armory-moss);
}

.np-armory__slot-btn.is-empty {
  opacity: 0.45;
}

.np-armory__slot-btn img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  image-rendering: auto;
}

.np-armory__slots {
  display: contents;
}

.np-armory__figure {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(210px, 38%);
  height: 310px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.np-armory__slot-lab,
.np-armory__slot-lab {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--armory-mute);
  text-align: center;
}

.np-armory__identity {
  padding: 1.15rem 1.2rem 1.3rem;
  border: 1px solid rgba(90, 84, 74, 0.45);
  background: rgba(16, 14, 18, 0.92);
  min-width: 0;
}

.np-armory__status {
  display: inline-block;
  margin: 0 0 0.55rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--armory-moss);
  border: 1px solid rgba(143, 166, 91, 0.35);
  padding: 0.28rem 0.5rem;
}

.np-armory__build-title,
.np-armory__build-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-title, 'Cinzel', serif);
  font-size: 1.35rem;
}

.np-armory__meta {
  margin: 0 0 0.85rem;
  color: var(--armory-mute);
  font-size: 0.86rem;
}

.np-armory__purpose {
  margin: 0 0 1rem;
  line-height: 1.5;
  color: #cfc6b8;
}

.np-armory__roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}

.np-armory__role {
  appearance: none;
  border: 1px solid rgba(120, 110, 96, 0.4);
  background: transparent;
  color: var(--armory-ink);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

.np-armory__role.is-active {
  border-color: rgba(138, 58, 42, 0.8);
  background: rgba(138, 58, 42, 0.18);
}

.np-armory__source,
.np-armory__source {
  margin: 0;
  font-size: 0.75rem;
  color: var(--armory-mute);
  line-height: 1.45;
}

.np-armory__source a,
.np-armory__source a {
  color: var(--armory-moss);
}

.np-armory__nav {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 1rem;
}

.np-armory__nav-btn,
.np-armory__nav-btn {
  flex: 1;
  appearance: none;
  border: 1px solid rgba(143, 166, 91, 0.3);
  background: rgba(12, 11, 14, 0.8);
  color: var(--armory-ink);
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.65rem 0.5rem;
  cursor: pointer;
}

.np-armory__detail {
  position: absolute;
  z-index: 8;
  width: min(280px, calc(100% - 1.6rem));
  padding: 0.85rem 0.9rem 0.95rem;
  border: 1px solid rgba(143, 166, 91, 0.4);
  background: rgba(12, 11, 14, 0.96);
  color: var(--armory-ink);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.np-armory__detail[hidden] { display: none; }

.np-armory__detail-name {
  margin: 0 0 0.2rem;
  font-family: var(--font-title, 'Cinzel', serif);
  font-size: 0.95rem;
}

.np-armory__detail-tier,
.np-armory__detail-ability,
.np-armory__detail-role {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #cfc6b8;
}

.np-armory__detail-close {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  border: 0;
  background: transparent;
  color: var(--armory-mute);
  cursor: pointer;
  font-size: 1.1rem;
}

.np-armory__sheet-scrim,
.np-armory__sheet-scrim {
  display: none;
}

@media (max-width: 900px) {
  .np-armory__stage,
  .np-armory__stage {
    grid-template-columns: 1fr;
  }

  .np-armory__rack {
    min-height: 0;
    padding: 1rem 0.75rem 1.1rem;
  }

  .np-armory__figure {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 140px;
    height: 200px;
    margin: 0 auto 0.85rem;
  }

  .np-armory__slot {
    position: static;
    transform: none;
    width: auto;
  }

  .np-armory__slots {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.2rem 0.15rem 0.4rem;
    -webkit-overflow-scrolling: touch;
  }

  .np-armory__slot-btn {
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
  }

  .np-armory__slot-btn img {
    width: 48px;
    height: 48px;
  }

  .np-armory__detail {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    border-radius: 14px 14px 0 0;
    padding: 1.1rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
  }

  .np-armory__sheet-scrim,
  .np-armory__sheet-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 7;
    background: rgba(0, 0, 0, 0.45);
  }

  .np-armory__sheet-scrim[hidden],
  .np-armory__sheet-scrim[hidden] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .np-armory__smoke,
  .np-armory__figure,
  .np-armory__slot-btn img {
    animation: none !important;
    transition: none !important;
  }
}

html.np-reduced .np-armory__smoke,
html.np-reduced .np-armory__smoke {
  animation: none;
}

.np-armory__portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.np-armory__abilities {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.np-armory__abilities li {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--armory-mute);
  border: 1px solid rgba(120, 110, 96, 0.35);
  padding: 0.22rem 0.4rem;
}

.np-armory__slot-btn.is-enter {
  animation: np-armory-slot-in 0.32s ease both;
}

.np-armory__slot[data-slot='mainHand'] .np-armory__slot-btn.is-enter {
  animation-duration: 0.44s;
}

.np-armory__figure.is-enter {
  animation: np-armory-figure-in 0.36s ease both;
}

@keyframes np-armory-slot-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes np-armory-figure-in {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .np-armory__slot-btn.is-enter,
  .np-armory__figure.is-enter,
  .np-armory__smoke {
    animation: none !important;
    transition: none !important;
  }
}

.np-armory__stage-wrap { position: relative; }
.np-armory__tagline { margin: 0; color: var(--armory-mute); font-size: 1.02rem; }
.np-armory__kind {
  margin: 0.45rem 0 0;
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--armory-mute, #8a8276);
}
.np-armory__smoke { position: absolute; inset: auto 10% 8% 10%; height: 70px; pointer-events: none; background: radial-gradient(ellipse at 50% 80%, rgba(90, 80, 70, 0.28), transparent 70%); filter: blur(8px); animation: np-armory-smoke 16s ease-in-out infinite; }
.np-armory__slot-lab { display: block; margin-top: 0.2rem; font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--armory-mute); text-align: center; }
.np-armory__build-title { margin: 0 0 0.35rem; font-family: var(--font-title, 'Cinzel', serif); font-size: 1.35rem; }
.np-armory__source { margin: 0; font-size: 0.75rem; color: var(--armory-mute); line-height: 1.45; }
.np-armory__source a { color: var(--armory-moss); }
.np-armory__nav-btn { flex: 1; appearance: none; border: 1px solid rgba(143, 166, 91, 0.3); background: rgba(12, 11, 14, 0.8); color: var(--armory-ink); font-family: var(--font-mono, monospace); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.65rem 0.5rem; cursor: pointer; }
.np-armory__sheet-scrim { display: none; }

@media (max-width: 900px) {
  .np-armory__figure { position: relative; left: auto; top: auto; transform: none; width: 140px; height: 200px; margin: 0 auto 0.85rem; }
  .np-armory__sheet-scrim { display: block; position: fixed; inset: 0; z-index: 7; background: rgba(0, 0, 0, 0.45); }
  .np-armory__sheet-scrim[hidden] { display: none; }
}

