/* NO PERRY — Mesa de Guerra single sovereign background (55E)
   One continuous drop-composition battlefield from hero through builder.
   Secondary serpent art = localized accent only. Loads after 55G. */

.np-war-table-scene {
  --wt-scene-void: #060508;
  --wt-scene-moss: rgba(143, 166, 91, 0.22);
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  background: var(--wt-scene-void);
}

/* ── Layer A: master battlefield plate (full section height) ── */
.np-war-table-scene__plate {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.np-war-table-scene__picture,
.np-war-table-scene__img {
  display: block;
  width: 100%;
  height: 100%;
}

.np-war-table-scene__img {
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.03);
  transform-origin: center 34%;
}

/* ── Layer B: unified atmospheric overlays ── */
.np-war-table-scene__shade,
.np-war-table-scene__moss,
.np-war-table-scene__vignette,
.np-war-table-scene__builder-toning {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.np-war-table-scene__shade {
  z-index: 1;
  background:
    linear-gradient(
      180deg,
      rgba(4, 3, 6, 0.52) 0%,
      rgba(4, 3, 6, 0.22) 34%,
      rgba(4, 3, 6, 0.38) 58%,
      rgba(6, 5, 8, 0.62) 100%
    ),
    radial-gradient(ellipse 78% 48% at 50% 16%, rgba(0, 0, 0, 0.38), transparent 72%);
}

.np-war-table-scene__moss {
  z-index: 2;
  background:
    radial-gradient(ellipse 52% 38% at 74% 14%, rgba(90, 130, 60, 0.16), transparent 66%),
    radial-gradient(ellipse 38% 32% at 16% 48%, rgba(70, 100, 55, 0.09), transparent 68%);
  mix-blend-mode: soft-light;
  opacity: 0.88;
}

.np-war-table-scene__vignette {
  z-index: 3;
  background:
    radial-gradient(ellipse 96% 88% at 50% 42%, transparent 40%, rgba(0, 0, 0, 0.52) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.42) 0%, transparent 12%, transparent 88%, rgba(0, 0, 0, 0.42) 100%);
}

/* Progressive darkening behind builder panels — not a second scene */
.np-war-table-scene__builder-toning {
  z-index: 4;
  background:
    linear-gradient(
      180deg,
      transparent 0%,
      transparent 26%,
      rgba(6, 5, 8, 0.18) 42%,
      rgba(6, 5, 8, 0.48) 58%,
      rgba(8, 7, 11, 0.68) 100%
    );
}

/* ── Layer D: serpent accent — partial width, decorative only ── */
.np-war-table-scene__accent {
  position: absolute;
  right: -6%;
  top: 36%;
  width: min(38vw, 460px);
  height: min(52vh, 520px);
  z-index: 1;
  pointer-events: none;
  opacity: 0.11;
  background:
    url('../assets/images/serpentes.png') center 42% / contain no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%, #000 72%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 38%, #000 72%, transparent 100%);
  filter: saturate(0.85) brightness(0.92);
}

/* ── Hero: local overlays only; scene plate owns the artwork ── */
.np-war-table-scene .np-war-table-hero {
  position: relative;
  z-index: 2;
  background: transparent;
}

.np-war-table-scene .np-war-table-hero__media .np-war-table-hero__img {
  opacity: 0;
}

.np-war-table-scene .np-war-table-hero__dissolve {
  background:
    linear-gradient(180deg, transparent 0%, rgba(6, 5, 8, 0.28) 55%, rgba(6, 5, 8, 0.48) 100%);
}

.np-war-table-scene .np-war-table-hero__bottom {
  background:
    linear-gradient(180deg, transparent 42%, rgba(6, 5, 8, 0.35) 78%, transparent 100%);
}

/* ── Builder host: transparent — no second full-bleed background ── */
.np-war-table-scene #guild-constellation.np-arsenal-host.np-combat-armory {
  position: relative;
  z-index: 2;
  margin-top: -1px;
  padding-top: 2rem;
  background: transparent !important;
}

.np-war-table-scene #guild-constellation.np-arsenal-host.np-combat-armory::before,
.np-war-table-scene #guild-constellation.np-arsenal-host::before {
  content: none !important;
  display: none !important;
}

.np-war-table-scene #guild-constellation .np-world-scene,
.np-war-table-scene #guild-constellation .np-world-scene__fog-front,
.np-war-table-scene #guild-constellation .np-world-scene__vignette,
.np-war-table-scene #guild-constellation .np-world-scene__edge-mask {
  display: none !important;
}

/* ── Layer C: stronger panel contrast (identity via frames, not bg swap) ── */
.np-war-table-scene .np-arsenal__gateway .np-arsenal__gate {
  background:
    linear-gradient(180deg, rgba(18, 16, 14, 0.94), rgba(8, 7, 8, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(168, 138, 74, 0.32),
    0 10px 24px rgba(0, 0, 0, 0.42);
}

.np-war-table-scene .np-arsenal__war-table .np-arsenal__forge-center.np-arsenal__selected-warrior {
  background:
    linear-gradient(165deg, rgba(20, 18, 16, 0.96) 0%, rgba(8, 7, 8, 0.98) 100%);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.58),
    inset 0 0 0 3px rgba(26, 23, 20, 0.95),
    inset 0 0 0 4px rgba(168, 138, 74, 0.48),
    inset 0 0 0 6px color-mix(in srgb, var(--np-role-edge, #8fa65b) 42%, transparent);
}

.np-war-table-scene .np-arsenal__war-table .np-arsenal__warrior-marker[data-role-family] {
  box-shadow:
    inset 0 0 0 2px rgba(42, 38, 34, 0.92),
    inset 0 0 0 3px rgba(168, 138, 74, 0.42),
    inset 0 0 0 4px color-mix(in srgb, var(--np-role-edge) 36%, transparent),
    0 10px 22px rgba(0, 0, 0, 0.48);
}

.np-war-table-scene .np-arsenal__equip-chamber {
  box-shadow:
    inset 0 0 0 1px rgba(48, 44, 40, 0.82),
    inset 0 2px 10px rgba(0, 0, 0, 0.5),
    inset 0 0 0 2px color-mix(in srgb, var(--np-role-edge) 28%, transparent);
}

.np-war-table-scene .np-arsenal__board-preview {
  background:
    linear-gradient(180deg, rgba(10, 9, 8, 0.58) 0%, rgba(8, 7, 8, 0.76) 100%),
    url('../assets/war-table/no-perry-drop-composition-hero.webp') center 38% / cover no-repeat;
}

@media (max-width: 900px) {
  .np-war-table-scene__img {
    object-position: 48% 32%;
    transform: scale(1.08);
  }

  .np-war-table-scene__accent {
    width: min(44vw, 320px);
    height: min(40vh, 360px);
    opacity: 0.08;
    right: -10%;
  }
}

@media (max-width: 640px) {
  .np-war-table-scene__img {
    object-position: 50% 30%;
    transform: scale(1.18);
  }

  .np-war-table-scene__accent {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .np-war-table-scene__img {
    transform: none !important;
  }
}
