/* Kroniky Ziratis 0.10.25a130c3
   Jednotný vizuální systém pro Borina, Kaelena, Maelis a Arena. */

/* Běžná stavová lišta pouze opakovala režim návštěvníka. Zobrazujeme ji jen
   po chybě nebo po výsledku skutečné uživatelské akce. */
.npc-page .status-bar { display: none; }
.npc-page .status-bar.is-error,
.npc-page .status-bar.is-success { display: flex; }

/* Jednotná výška a skladba hlavních NPC bannerů. */
.npc-page .npc-hero {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 340px !important;
  min-height: 340px !important;
  max-height: 340px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.npc-page .npc-hero__art,
.npc-page .npc-hero__art img {
  height: 100% !important;
  min-height: 0 !important;
}
.npc-page .npc-hero__copy {
  align-self: start !important;
  justify-self: start !important;
  width: min(100%, 900px) !important;
  max-width: 900px !important;
  min-width: 0 !important;
  padding: 38px 48px !important;
}
.npc-page .npc-hero h1 {
  max-width: 900px !important;
  margin: 0 0 8px !important;
  font-size: clamp(3rem, 4.6vw, 4.7rem) !important;
  line-height: .92 !important;
}
.npc-page .npc-hero__role {
  margin-bottom: 12px !important;
  font-size: clamp(.9rem, 1.35vw, 1.15rem) !important;
}
.npc-page .npc-hero__copy > p:not(.eyebrow):not(.npc-hero__role) {
  max-width: 760px !important;
  line-height: 1.55 !important;
}
.npc-page .npc-hero .hero-actions { margin-top: 16px !important; }

/* Společné rozložení obsahu: hlavní pracovní část + profil NPC. */
.npc-page .npc-content-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 320px) !important;
  gap: 18px !important;
  align-items: start !important;
}
.npc-page .npc-main-column {
  min-width: 0;
  display: grid;
  gap: 24px;
  align-content: start;
}
.npc-page .recipe-section,
.npc-page .quest-section { min-width: 0; }

/* Jednotná profilová karta pod portrétem. */
.npc-page .npc-profile-card {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 0;
  padding: 14px !important;
  overflow: hidden;
}
.npc-page .npc-profile-card > img {
  width: 100% !important;
  height: auto !important;
  max-height: 250px !important;
  aspect-ratio: 1.16 / 1;
  object-fit: cover !important;
  object-position: center top !important;
  border: 1px solid rgba(236,205,142,.13);
  border-radius: 10px;
  background: rgba(0,0,0,.25);
}
.npc-page .npc-profile-copy { padding: 15px 4px 4px; }
.npc-page .npc-profile-role {
  margin: 0 0 5px;
  color: var(--npc-accent, var(--k-gold-2));
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.npc-page .npc-profile-card h2 {
  margin: 0 0 10px;
  color: var(--k-text);
  font-family: var(--k-font-display);
  font-size: 1.55rem;
  line-height: 1.08;
}
.npc-page .npc-profile-card p:not(.npc-profile-role) {
  margin: 0;
  color: var(--k-muted);
  line-height: 1.58;
}

/* Společná mřížka pracovních karet. Karty v každém řádku mají shodnou výšku. */
.npc-page .npc-work-grid,
.npc-page .recipe-list.npc-work-grid,
.npc-page .quest-list.npc-work-grid,
.npc-page .cosmetic-list.npc-work-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: stretch !important;
  min-width: 0;
}
.npc-page .npc-work-grid > .loading-card,
.npc-page .npc-work-grid > .empty-state { grid-column: 1 / -1; }

.npc-page .npc-work-card,
.npc-page .recipe-card,
.npc-page .quest-card,
.npc-page .secret-card,
.npc-page .cosmetic-card {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 15px !important;
  writing-mode: horizontal-tb !important;
}
.npc-page .npc-work-card *,
.npc-page .recipe-card *,
.npc-page .quest-card *,
.npc-page .secret-card *,
.npc-page .cosmetic-card * {
  min-width: 0;
  writing-mode: horizontal-tb;
}

/* Výroba a alchymie používají stejnou skladbu. */
.npc-page .recipe-card,
.npc-page .secret-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 13px !important;
}
.npc-page .recipe-card__result,
.npc-page .potion-result {
  display: grid !important;
  grid-template-columns: 104px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  gap: 4px 13px !important;
  align-items: center !important;
}
.npc-page .recipe-card__result img,
.npc-page .potion-result img {
  grid-row: 1 / 3;
  width: 96px !important;
  height: 96px !important;
  object-fit: contain !important;
}
.npc-page .recipe-card__result > .k-button,
.npc-page .potion-result > .k-button {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  margin-top: 8px;
}
.npc-page .recipe-card h3,
.npc-page .potion-result h3,
.npc-page .quest-card h3,
.npc-page .secret-card h3,
.npc-page .cosmetic-card h3 {
  margin: 3px 0 5px !important;
  max-width: none !important;
  color: var(--k-text);
  font-size: 1.12rem !important;
  line-height: 1.24 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}
.npc-page .recipe-card small,
.npc-page .recipe-card p,
.npc-page .quest-card p,
.npc-page .secret-card p,
.npc-page .cosmetic-card p,
.npc-page .effect-text {
  margin-top: 0;
  color: var(--k-muted);
  line-height: 1.48 !important;
}
.npc-page .requirements {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin-top: 0 !important;
}
.npc-page .requirement {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-width: 0 !important;
  padding: 7px 9px;
}
.npc-page .recipe-card > .tag { align-self: flex-start; }
.npc-page .recipe-card__head,
.npc-page .quest-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.npc-page .secret-card > .k-button { align-self: flex-start; }

/* Lovecké a epilogové úkoly jsou kompaktní, dvousloupcové záznamy. */
.npc-page .quest-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 9px !important;
}
.npc-page .quest-card__head { margin-bottom: 0 !important; }
.npc-page .quest-card > p { margin: 0 !important; }
.npc-page .quest-card .progress-wrap { margin-top: 3px; }
.npc-page .quest-card.is-hidden {
  padding-top: 13px !important;
  padding-bottom: 13px !important;
  opacity: .84;
}

/* Kosmetické odměny používají stejnou velikost jako ostatní pracovní karty. */
.npc-page .cosmetic-card {
  display: grid !important;
  grid-template-columns: 62px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  gap: 8px 13px !important;
  align-items: start !important;
}
.npc-page .cosmetic-card > img {
  grid-row: 1 / 3;
  width: 58px !important;
  height: 58px !important;
  object-fit: contain;
}
.npc-page .cosmetic-card > .action-row {
  grid-column: 2;
  justify-self: start;
}

.npc-page .section-heading {
  align-items: end !important;
  margin-bottom: 13px !important;
}
.npc-page .section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem) !important;
}

/* Barvy profilů a pracovních karet zůstávají tematické, rozložení je společné. */
.npc-page--blacksmith { --npc-accent: #e1a24f; }
.npc-page--hunter { --npc-accent: #9abe72; }
.npc-page--maelis { --npc-accent: #c29ae8; }
.npc-page--aren { --npc-accent: #9fb4f0; }

@media (max-width: 1240px) {
  .npc-page .npc-hero {
    height: 330px !important;
    min-height: 330px !important;
    max-height: 330px !important;
  }
  .npc-page .npc-hero__copy { padding: 34px 40px !important; }
}

@media (max-width: 1080px) {
  .npc-page .npc-hero {
    height: 320px !important;
    min-height: 320px !important;
    max-height: 320px !important;
  }
  .npc-page .npc-content-grid {
    grid-template-columns: minmax(0, 1fr) 280px !important;
  }
  .npc-page .npc-work-grid,
  .npc-page .recipe-list.npc-work-grid,
  .npc-page .quest-list.npc-work-grid,
  .npc-page .cosmetic-list.npc-work-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 850px) {
  .npc-page .npc-content-grid { grid-template-columns: 1fr !important; }
  .npc-page .npc-profile-card { position: static; }
  .npc-page .npc-profile-card > img {
    max-height: 330px !important;
    aspect-ratio: auto;
    object-fit: contain !important;
  }
}

@media (max-width: 760px) {
  .npc-page .npc-hero {
    height: auto !important;
    min-height: 320px !important;
    max-height: none !important;
    align-items: end !important;
  }
  .npc-page .npc-hero__copy {
    align-self: end !important;
    padding: 25px 19px !important;
  }
  .npc-page .npc-hero h1 { font-size: 3.2rem !important; }
  .npc-page .hero-actions .k-button { width: 100%; }
  .npc-page .requirements { grid-template-columns: 1fr !important; }
  .npc-page .recipe-card__result,
  .npc-page .potion-result,
  .npc-page .cosmetic-card {
    grid-template-columns: 76px minmax(0, 1fr) !important;
  }
  .npc-page .recipe-card__result img,
  .npc-page .potion-result img,
  .npc-page .cosmetic-card > img {
    width: 70px !important;
    height: 70px !important;
  }
}

/* a194h: stránky bez portrétního bočního panelu používají plnou šířku. */
.npc-page .npc-content-grid.is-single{grid-template-columns:minmax(0,1fr)!important;}

/* 0.10.25a194i – jednotné výrobní požadavky */
.npc-page .requirement-summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:14px 0 8px;
  padding:9px 11px;
  border:1px solid rgba(214,168,79,.28);
  border-radius:9px;
  background:rgba(214,168,79,.07);
  color:#d9c5a2;
}
.npc-page .requirement-summary strong { color:var(--k-gold-2); font-size:1rem; }
.npc-page .requirement-summary.is-ready {
  border-color:rgba(119,184,91,.52);
  background:rgba(119,184,91,.11);
  color:#cfeab9;
}
.npc-page .requirement-summary.is-ready strong { color:#b7e49c; }
.npc-page .requirement-item { display:flex; align-items:center; gap:8px; min-width:0; }
.npc-page .requirement-item > img {
  width:36px;
  height:36px;
  flex:0 0 36px;
  object-fit:contain;
  image-rendering:pixelated;
}
.npc-page .requirement-gold-icon {
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  flex:0 0 36px;
  border:1px solid rgba(214,168,79,.28);
  border-radius:50%;
  color:#e2bd6c;
  background:rgba(214,168,79,.09);
  font-size:.92rem;
  font-weight:900;
}

.npc-page .requirement-gold-icon .k-currency-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
}

.npc-page .requirement.is-ready {
  border-color:rgba(119,184,91,.55)!important;
  background:linear-gradient(90deg,rgba(119,184,91,.13),rgba(119,184,91,.035))!important;
  box-shadow:inset 3px 0 0 rgba(119,184,91,.72);
}
.npc-page .requirement.is-missing {
  border-color:rgba(176,70,57,.48)!important;
  background:linear-gradient(90deg,rgba(143,44,37,.12),rgba(143,44,37,.025))!important;
  box-shadow:inset 3px 0 0 rgba(176,70,57,.62);
}
.npc-page .recipe-card.can-craft {
  border-color:rgba(119,184,91,.5)!important;
  box-shadow:inset 0 0 0 1px rgba(119,184,91,.12),0 12px 30px rgba(0,0,0,.16)!important;
}
.npc-page .recipe-card.can-craft .recipe-card__result,
.npc-page .recipe-card.can-craft .potion-result {
  background:linear-gradient(90deg,rgba(119,184,91,.075),transparent 68%);
}

/* Per-NPC focal positions: preserve hero geometry and horizontal positioning. */
.npc-page--blacksmith { --npc-banner-y: 0%; }
.npc-page--maelis { --npc-banner-y: 0%; }
.npc-page--hunter { --npc-banner-y: 0%; }
.npc-page--blacksmith .npc-hero__art img,
.npc-page--maelis .npc-hero__art img,
.npc-page--hunter .npc-hero__art img {
  object-position: 50% var(--npc-banner-y);
}
@media (max-width: 760px) {
  .npc-page--blacksmith .npc-hero__art img,
  .npc-page--maelis .npc-hero__art img,
  .npc-page--hunter .npc-hero__art img { object-position: 68% var(--npc-banner-y); }
}
