.npc-contacts-screen {
  min-height: calc(100dvh - var(--app-top-stack-height) - var(--app-bottom-nav-height));
  padding: clamp(14px, 3vw, 30px);
  background:
    radial-gradient(circle at 15% 8%, rgba(157, 171, 111, .18), transparent 30rem),
    linear-gradient(145deg, #1e2521, #141916 72%);
  color: #f2ead8;
}

.npc-contacts-shell { width: min(1080px, 100%); margin: 0 auto; }
.npc-contacts-header { height: auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.npc-contacts-header h1 { margin: 2px 0 4px; font-size: clamp(1.8rem, 5vw, 2.8rem); }
.npc-contacts-header p { max-width: 650px; margin: 0; color: rgba(242, 234, 216, .66); }
.npc-contacts-kicker { color: #bbc78f; font-size: .7rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.npc-icon-button { width: 44px; min-width: 44px; height: 44px; margin: 0; border: 1px solid rgba(226, 211, 177, .2); border-radius: 50%; background: rgba(255,255,255,.06); color: #eadfbe; cursor: pointer; }
.npc-icon-button.is-active { color: #e1c66d; background: rgba(170, 138, 49, .18); }

.npc-contact-filters { display: flex; gap: 7px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.npc-contact-filter { flex: 0 0 auto; min-height: 38px; margin: 0; padding: 7px 13px; border: 1px solid rgba(226, 211, 177, .15); border-radius: 999px; background: rgba(255,255,255,.04); color: rgba(242,234,216,.7); font: inherit; font-size: .75rem; font-weight: 800; cursor: pointer; }
.npc-contact-filter.is-active { border-color: rgba(187,199,143,.58); background: rgba(112,128,73,.3); color: #fff8e7; }
.npc-contacts-state { min-height: 48vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: rgba(242,234,216,.68); text-align: center; }
.npc-contacts-state[hidden], .npc-contacts-layout[hidden] { display: none !important; }
.npc-contacts-state > i { color: #bbc78f; font-size: 2.5rem; }

.npc-contacts-layout { min-height: min(650px, 66vh); border: 1px solid rgba(226,211,177,.14); border-radius: 16px; overflow: hidden; background: rgba(10,14,12,.36); display: grid; grid-template-columns: minmax(260px, 37%) minmax(0, 1fr); }
.npc-contact-list { border-right: 1px solid rgba(226,211,177,.12); overflow-y: auto; }
.npc-contact-card { width: 100%; min-height: 92px; margin: 0; padding: 13px; border: 0; border-bottom: 1px solid rgba(226,211,177,.1); border-radius: 0; background: transparent; color: inherit; display: grid; grid-template-columns: 48px minmax(0,1fr) 16px; align-items: center; gap: 11px; text-align: left; cursor: pointer; }
.npc-contact-card:hover, .npc-contact-card:focus-visible, .npc-contact-card.is-selected { background: rgba(112,128,73,.18); }
.npc-contact-card.is-selected { box-shadow: inset 3px 0 #bbc78f; }
.npc-contact-avatar, .npc-contact-detail-avatar { position: relative; overflow: hidden; flex: none; border: 1px solid rgba(226,211,177,.2); border-radius: 50%; background: linear-gradient(145deg, rgba(187,199,143,.2), rgba(255,255,255,.03)); display: inline-flex; align-items: center; justify-content: center; color: #cbd5a5; }
.npc-contact-avatar img, .npc-contact-detail-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.npc-exchange-heading { min-width: 0; display: flex; align-items: center; gap: 12px; }
.npc-exchange-portrait { position: relative; overflow: hidden; flex: 0 0 48px; width: 48px; height: 48px; border: 1px solid rgba(226,211,177,.2); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #cbd5a5; background: #29332b; }
.npc-exchange-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.npc-contact-avatar { width: 48px; height: 48px; font-size: 1.3rem; }
.npc-contact-card-copy, .npc-contact-card-title, .npc-contact-card-place { min-width: 0; display: flex; }
.npc-contact-card-copy { flex-direction: column; gap: 3px; }
.npc-contact-card-title { align-items: center; gap: 7px; }
.npc-contact-card-title strong, .npc-contact-card-meta, .npc-contact-card-place { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.npc-contact-card-title i { color: #e1c66d; font-size: .72rem; }
.npc-contact-card-meta { color: #bbc78f; font-size: .68rem; font-weight: 800; }
.npc-contact-card-place { color: rgba(242,234,216,.52); font-size: .68rem; }
.npc-contact-chevron { color: rgba(242,234,216,.28); }
.npc-filter-empty { padding: 30px 16px; color: rgba(242,234,216,.55); text-align: center; }

.npc-contact-detail { height: auto; min-width: 0; padding: clamp(16px, 3vw, 28px); overflow-y: auto; }
.npc-contact-detail-placeholder { min-height: 45vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: rgba(242,234,216,.45); }
.npc-contact-detail-placeholder i { font-size: 2.3rem; }
.npc-contact-detail-header { height: auto; display: grid; grid-template-columns: 144px minmax(0,1fr) 44px; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(226,211,177,.12); }
.npc-contact-detail-avatar { width: 144px; height: 144px; font-size: 4rem; }
.npc-contact-detail-heading { min-width: 0; overflow-wrap: anywhere; }
.npc-contact-detail-heading h2 { margin: 2px 0; font-size: clamp(1.45rem, 4vw, 2rem); }
.npc-contact-detail-heading p { margin: 0; color: rgba(242,234,216,.6); }
.npc-detail-back { display: none; }
.npc-detail-section { padding: 19px 0; border-bottom: 1px solid rgba(226,211,177,.1); }
.npc-detail-section h3 { margin: 0 0 10px; color: #bbc78f; font-size: .72rem; letter-spacing: .11em; text-transform: uppercase; }
.npc-detail-section p { margin: 6px 0; color: rgba(242,234,216,.75); line-height: 1.5; }
.npc-detail-section ul { margin: 10px 0 0; padding-left: 20px; color: rgba(242,234,216,.72); }
.npc-detail-location p { display: grid; grid-template-columns: 22px 1fr; gap: 1px 8px; }
.npc-detail-location p > i { grid-row: 1 / 3; color: #bbc78f; }
.npc-detail-location p > span { grid-column: 2; color: rgba(242,234,216,.48); font-size: .72rem; }
.npc-contact-navigation-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.npc-contact-navigation { min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid rgba(113,190,255,.4); border-radius: 10px; background: rgba(47,128,255,.12); color: #d8ecff; font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }
.npc-contact-navigation:hover:not(:disabled), .npc-contact-navigation:focus-visible { background: rgba(47,128,255,.25); }
.npc-contact-navigation:disabled { opacity: .48; cursor: not-allowed; }
.npc-contact-navigation i { margin-right: 6px; }
.npc-offer-grid { display: grid; gap: 8px; }
.npc-offer-button { width: 100%; min-height: 62px; margin: 0; padding: 10px 12px; border: 1px solid rgba(187,199,143,.24); border-radius: 10px; background: rgba(112,128,73,.12); color: #f2ead8; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 9px; text-align: left; cursor: pointer; }
.npc-offer-button:hover:not(:disabled), .npc-offer-button:focus-visible:not(:disabled) { background: rgba(112,128,73,.25); border-color: rgba(187,199,143,.55); }
.npc-offer-button:disabled { opacity: .48; cursor: not-allowed; }
.npc-offer-button > i { color: #bbc78f; font-size: 1.15rem; text-align: center; }
.npc-offer-button span { display: flex; flex-direction: column; gap: 3px; }
.npc-offer-button small, .npc-muted { color: rgba(242,234,216,.55); font-size: .68rem; }
.npc-history-list { display: grid; gap: 8px; }
.npc-history-entry { display: grid; grid-template-columns: 24px 1fr; gap: 8px; color: rgba(242,234,216,.72); }
.npc-history-entry > i { color: rgba(187,199,143,.7); margin-top: 2px; }
.npc-history-entry span { display: flex; flex-direction: column; gap: 2px; }
.npc-history-entry strong { font-size: .78rem; font-weight: 700; }
.npc-history-entry small { color: rgba(242,234,216,.42); font-size: .64rem; }

@media (max-width: 720px) {
  .npc-contacts-screen { padding: 12px; }
  .npc-contacts-layout { position: relative; display: block; min-height: 62vh; overflow: hidden; }
  .npc-contact-list { height: 62vh; border-right: 0; }
  .npc-contact-detail { position: absolute; inset: 0; z-index: 2; background: #171d1a; transform: translateX(102%); transition: transform .2s ease; }
  .npc-contact-detail.is-open { transform: translateX(0); }
  .npc-contact-detail-header { grid-template-columns: 112px minmax(0,1fr) 40px; gap: 9px; }
  .npc-detail-back { grid-column: 1 / -1; justify-self: start; width: 40px; height: 40px; margin: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.06); color: #f2ead8; display: inline-flex; align-items: center; justify-content: center; }
  .npc-contact-detail-avatar { width: 112px; height: 112px; font-size: 3rem; }
  .npc-contact-detail-heading h2 { font-size: 1.35rem; }
}
.npc-challenge h4 { margin: 0 0 8px; color: #f2ead8; font-size: 1.05rem; }
.npc-challenge-requirements { display: grid; gap: 5px; }
.npc-challenge-complete { margin-top: 14px; padding: 10px 16px; border: 1px solid rgba(187,199,143,.5); border-radius: 10px; background: rgba(187,199,143,.16); color: #f2ead8; cursor: pointer; }
.npc-challenge-complete:disabled { opacity: .55; cursor: default; }
.npc-challenge-done { color: #bbc78f !important; font-weight: 700; }
