:root {
  --npc-accent: var(--k-gold-2, #f1c96d);
  --npc-accent-soft: rgba(214, 168, 79, .12);
  --npc-panel: rgba(15, 17, 18, .95);
  --npc-line: rgba(236, 205, 142, .18);
}

body.npc-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, var(--npc-accent-soft), transparent 30rem),
    linear-gradient(180deg, #08090a 0%, #0c0d0e 52%, #080706 100%);
}

.page-shell.npc-shell {
  width: min(1540px, calc(100% - 30px));
  margin: 0 auto;
  padding: 24px 0 60px;
  display: grid;
  gap: 18px;
}

.npc-hero {
  position: relative;
  min-height: clamp(390px, 30vw, 500px);
  display: grid;
  grid-template-columns: minmax(0, 850px) minmax(0, 1fr);
  align-items: center;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background: #090a0a;
}

/*
 * NPC bannery používají stejnou skladbu jako ostatní hlavní stránky:
 * ilustrace vyplňuje celý header a text leží nad ní vlevo.
 */
.npc-hero__art {
  position: absolute;
  z-index: 0;
  inset: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 38%, var(--npc-accent-soft), transparent 34rem),
    linear-gradient(180deg, #26221c, #111313 70%, #090a0a);
}

.npc-hero__art::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(7, 8, 9, .98) 0%,
      rgba(7, 8, 9, .94) 20%,
      rgba(7, 8, 9, .78) 38%,
      rgba(7, 8, 9, .38) 54%,
      rgba(7, 8, 9, .08) 72%,
      rgba(7, 8, 9, .02) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .2), transparent 28%, transparent 67%, rgba(0, 0, 0, .58));
}

.npc-hero__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  image-rendering: pixelated;
}

.npc-hero__fallback {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 26px;
  color: var(--npc-accent);
  text-align: center;
  background:
    radial-gradient(circle at 72% 38%, var(--npc-accent-soft), transparent 35%),
    linear-gradient(180deg, rgba(30, 28, 24, .8), rgba(10, 11, 12, .98));
}

.npc-hero__fallback[hidden] { display: none; }
.npc-hero__fallback span { font-size: clamp(4rem, 8vw, 7rem); filter: drop-shadow(0 8px 14px rgba(0,0,0,.55)); }
.npc-hero__fallback strong { color: var(--k-text); font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; }

.npc-hero__copy {
  position: relative;
  z-index: 2;
  grid-column: 1;
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 850px);
  padding: clamp(34px, 4.5vw, 64px);
  margin: 0;
  background: none;
  text-shadow: 0 3px 14px rgba(0, 0, 0, .82);
}

.npc-hero__copy .eyebrow { margin-bottom: 8px; }
.npc-hero h1 {
  margin: 0 0 8px;
  color: var(--k-text);
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: .9;
  letter-spacing: -.05em;
}

.npc-hero__role {
  max-width: 760px;
  margin: 0 0 16px;
  color: var(--npc-accent);
  font-size: clamp(1rem, 1.75vw, 1.45rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.npc-hero__copy > p:not(.eyebrow):not(.npc-hero__role) {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--k-muted);
  line-height: 1.62;
}

.npc-hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}


.npc-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
}

.npc-search label {
  display: block;
  margin-bottom: 7px;
  color: var(--npc-accent);
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.npc-toolbar .search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.npc-toolbar .search-row input {
  flex: 1;
  min-width: min(410px, 100%);
}

.npc-toolbar .status-line { margin: 8px 0 0; }

.npc-owner {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 220px;
  padding: 11px 13px;
  border-left: 1px solid var(--npc-line);
}

.npc-owner > span,
.npc-owner .owner-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--npc-line);
  border-radius: 10px;
  background: rgba(0,0,0,.28);
  font-size: 1.35rem;
}

.npc-owner small,
.npc-owner strong { display: block; }
.npc-owner small { color: var(--k-muted); }
.npc-owner strong { margin-top: 3px; color: var(--npc-accent); }

.npc-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  margin: 0;
}

.npc-summary-grid .summary-card {
  min-width: 0;
  min-height: 94px;
}

.npc-services {
  padding: 16px;
}

.npc-service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.npc-service-grid article {
  min-width: 0;
  min-height: 82px;
}

.npc-content {
  min-width: 0;
}

body.npc-page--blacksmith { --npc-accent-soft: rgba(214, 129, 62, .15); }
body.npc-page--hunter { --npc-accent-soft: rgba(116, 159, 86, .14); }
body.npc-page--maelis { --npc-accent-soft: rgba(124, 83, 157, .16); }

@media (max-width: 1080px) {
  .npc-hero {
    min-height: 420px;
    grid-template-columns: minmax(0, 720px) minmax(0, 1fr);
  }

  .npc-hero__art::after {
    background:
      linear-gradient(90deg,
        rgba(7, 8, 9, .98) 0%,
        rgba(7, 8, 9, .92) 28%,
        rgba(7, 8, 9, .68) 49%,
        rgba(7, 8, 9, .18) 72%,
        rgba(7, 8, 9, .04) 100%),
      linear-gradient(180deg, rgba(0,0,0,.18), transparent 30%, transparent 66%, rgba(0,0,0,.62));
  }

  .npc-hero__copy { width: min(100%, 720px); }
  .npc-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .page-shell.npc-shell { width: min(100% - 18px, 1540px); padding-top: 14px; }

  .npc-hero {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .npc-hero__art img { object-position: 68% center; }

  .npc-hero__art::after {
    background:
      linear-gradient(90deg, rgba(7,8,9,.94), rgba(7,8,9,.64) 70%, rgba(7,8,9,.38)),
      linear-gradient(180deg, rgba(7,8,9,.48), rgba(7,8,9,.25) 22%, rgba(7,8,9,.66) 74%, rgba(7,8,9,.92));
  }

  .npc-hero__copy {
    width: 100%;
    min-height: 430px;
    padding: 34px 22px 28px;
    justify-content: flex-end;
  }

  .npc-hero h1 { font-size: clamp(2.7rem, 14vw, 4.5rem); }
  .npc-hero__role { font-size: .98rem; }
  .npc-toolbar { grid-template-columns: 1fr; }
  .npc-owner { min-width: 0; border-left: 0; border-top: 1px solid var(--npc-line); }
  .npc-toolbar .search-row { flex-direction: column; }
  .npc-toolbar .search-row input,
  .npc-toolbar .search-row .k-button { width: 100%; min-width: 0; }
  .npc-service-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .npc-page *, .npc-page *::before, .npc-page *::after { transition: none !important; }
}
