/* NPC shops hub + shop pages (preview). Uses the site palette variables from styles.css. */
.wm-wrap{position:relative;max-width:100%}.wm-wrap img{width:100%;height:auto;display:block;border-radius:6px;background:var(--bg-tertiary)}
.wm-dot,.wm-portal{position:absolute;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 3px #000}
.wm-dot{background:#e53935;width:18px;height:18px;margin:-9px 0 0 -9px;animation:nsPulse 1.6s ease-in-out infinite}
.wm-portal{background:#1e88e5}.wm-portal.ns-target{width:20px;height:20px;margin:-10px 0 0 -10px;animation:nsPulse 1.6s ease-in-out infinite}
@keyframes nsPulse{0%,100%{box-shadow:0 0 0 0 rgba(255,255,255,.7),0 0 3px #000}50%{box-shadow:0 0 0 7px rgba(255,255,255,0),0 0 3px #000}}
.wm-key{position:relative;display:inline-block;margin:0 0 0 6px;vertical-align:middle;animation:none}
.wm-fig{margin:14px 0 6px}.wm-fig figcaption{margin-top:8px;color:var(--text-muted);font-size:.92rem}
.wm-fig .tip-line,.q-lines .tip-line{display:block}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* hero */
.ns-hero .boss-detail-identity>img{width:auto;max-width:140px;min-height:90px}
.ns-nosprite{display:inline-flex;align-items:center;justify-content:center;width:90px;height:90px;border-radius:12px;background:var(--bg-tertiary);color:var(--text-muted);font-size:2rem;flex-shrink:0}
.ns-hub-hero h1{margin-bottom:10px}.ns-lede .tip-line{display:block;margin:4px 0}
/* town nav + cards */
.ns-townnav{margin:4px 0 6px;line-height:2}.ns-townnav a{font-weight:600}
.ns-town{margin:26px 0 12px;font-size:1.25rem;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--border);padding-bottom:6px}
.ns-town small{color:var(--text-muted);font-weight:400;font-size:.85rem}
.ns-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.ns-card{display:flex;gap:12px;align-items:center;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary);color:var(--text);text-decoration:none;transition:transform .12s,border-color .12s,box-shadow .12s;border-inline-start:4px solid var(--accent)}
.ns-card:hover,.ns-card:focus-visible{transform:translateY(-2px);border-color:var(--accent-border);box-shadow:0 6px 18px rgba(0,0,0,.25)}
.ns-card.ns-t-weapon{border-inline-start-color:#e57373}.ns-card.ns-t-armor{border-inline-start-color:#64b5f6}.ns-card.ns-t-general{border-inline-start-color:#81c784}
.ns-card.ns-t-scroll{border-inline-start-color:#ba68c8}.ns-card.ns-t-furniture{border-inline-start-color:#a1887f}
.ns-card-img{width:64px;height:72px;display:flex;align-items:flex-end;justify-content:center;flex-shrink:0}
.ns-card-img img{max-width:64px;max-height:72px;image-rendering:pixelated;object-fit:contain}
.ns-card-img .ns-nosprite{width:56px;height:56px;font-size:1.4rem}
.ns-card-body{display:flex;flex-direction:column;gap:1px;min-width:0}
.ns-card-body strong{font-size:1.05rem}.ns-card-he{color:var(--text-secondary);font-size:.9rem}
.ns-card-type{color:var(--accent);font-weight:700;font-size:.9rem}.ns-card-map,.ns-card-n{color:var(--text-muted);font-size:.85rem;overflow-wrap:anywhere}
/* shop inventory table */
.ns-table-box{overflow-x:auto;margin-top:12px}
.ns-table{width:100%;border-collapse:collapse;font-size:.97rem}
.ns-table th,.ns-table td{padding:8px 10px;border-bottom:1px solid var(--border-secondary);text-align:start;vertical-align:middle}
.ns-table thead th{color:var(--text-muted);font-weight:600;font-size:.88rem;position:sticky;top:0;background:var(--bg-secondary)}
.ns-table tr.ns-grp th{background:var(--bg-tertiary);color:var(--text);font-size:.95rem;padding:7px 10px}
.ns-table tbody tr:not(.ns-grp):hover{background:var(--accent-bg)}
.ns-ic{width:44px}.ns-ic img{width:32px;height:32px;object-fit:contain;image-rendering:pixelated;display:block}
.ns-noicon{display:block;width:32px;height:32px;border-radius:6px;background:var(--bg-tertiary)}
.ns-name a{font-weight:600;color:var(--text);text-decoration:none}.ns-name a:hover{color:var(--accent)}
.ns-name small{display:block;color:var(--text-muted);font-size:0.8125rem;text-align:right}
.ns-buy{font-weight:800;font-size:1.12rem;color:var(--accent);white-space:nowrap}.ns-buy small{font-weight:500;font-size:0.8125rem;color:var(--text-muted);margin-inline-start:4px}
.ns-sell{color:var(--text-muted);font-size:.85rem;white-space:nowrap}
th.ns-sell{font-size:0.8125rem}
/* steps */
.ns-steps>li{margin-bottom:14px}.ns-steps .wm-fig{max-width:760px}
.ns-map{max-width:900px}
/* hub item cards */
#i-list .i-card .q-lines img{vertical-align:middle;image-rendering:pixelated;object-fit:contain}
.ns-buyline{font-size:1.05rem}.ns-buyline b{color:var(--accent);font-weight:800}
.ns-sellline{color:var(--text-muted);font-size:.86rem}
@media (max-width:640px){
  .ns-grid{grid-template-columns:1fr}
  .ns-table{font-size:.92rem}.ns-table th,.ns-table td{padding:7px 6px}
  .ns-ic{width:38px}.ns-ic img,.ns-noicon{width:28px;height:28px}
  .ns-buy{font-size:1.02rem}
  .ns-hero .boss-detail-identity>img{max-width:100px;min-height:0}
}
.ns-map-gms{max-width:560px}.ns-map-gms .wm-wrap img{max-height:520px;object-fit:contain;object-position:right top}
.ns-hero .boss-detail-identity h1{margin:6px 0 10px}
.ns-unk{color:var(--text-muted)!important;font-weight:600!important;font-size:.92rem!important}
#i-list .i-card .q-lines>.tip-line:first-child{display:flex;align-items:center;gap:8px}
#i-list .i-card .q-lines>.tip-line:first-child img{width:28px;height:28px;flex-shrink:0}

/* ---- location image near the top ---- */
.ns-place .ns-loc{max-width:900px;margin:0 auto}
.ns-place .ns-loc .wm-wrap img{display:block;width:100%;height:auto}
.ns-place .ns-map-gms{max-width:560px}
.ns-pin{position:absolute;transform:translate(-50%,-50%);pointer-events:none;z-index:2}
.ns-pin-dot{display:block;width:16px;height:16px;border-radius:50%;background:#e53935;border:3px solid #fff;animation:nsPulse 1.6s ease-in-out infinite}
.ns-pin-portal .ns-pin-dot{background:#1e88e5}
.ns-pin-label{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);white-space:nowrap;background:rgba(20,20,28,.88);color:#fff;font-size:13px;font-weight:700;line-height:1.3;padding:3px 9px;border-radius:6px;box-shadow:0 2px 6px rgba(0,0,0,.35)}
.ns-pin-label:after{content:"";position:absolute;top:100%;left:50%;margin-left:-5px;border:5px solid transparent;border-top-color:rgba(20,20,28,.88)}

/* ---- stock: shop window replica beside the table ---- */
.ns-stock-grid{display:grid;grid-template-columns:340px minmax(0,1fr);gap:22px;align-items:start}
.ns-win-col{position:sticky;top:84px}
.ns-table-col{min-width:0}
.ns-table-col .ns-table-box{margin-top:0}
@media (max-width:980px){.ns-stock-grid{grid-template-columns:1fr}.ns-win-col{position:static}}
.msw-fig{margin:0}
.msw-fig figcaption{font-size:13px;opacity:.8;text-align:start;margin-top:8px;line-height:1.5}
.msw-real{display:block;max-width:100%;height:auto;margin:0 auto;border-radius:6px}
.msw{width:100%;max-width:340px;margin:0 auto;direction:ltr;text-align:left;font-family:Tahoma,Verdana,"Segoe UI",Arial,sans-serif;font-size:0.8125rem;color:#3b2a14;
  background:linear-gradient(#f9f1dc,#efe1bd);border:2px solid #3a2a17;border-radius:7px;box-shadow:inset 0 0 0 2px #fffaf0,inset 0 0 0 3px #b99b66,0 6px 16px rgba(0,0,0,.35);padding:0 7px 7px;overflow:hidden}
.msw-bar{display:flex;align-items:center;justify-content:space-between;margin:0 -7px 7px;padding:4px 8px;background:linear-gradient(#7b5a33,#5a3f20);border-bottom:2px solid #3a2a17;color:#ffe9a8}
.msw-title{font-weight:700;letter-spacing:.14em;font-size:0.8125rem;text-shadow:0 1px 0 #2a1a08}
.msw-x{display:inline-grid;place-items:center;width:16px;height:16px;border-radius:3px;background:linear-gradient(#e8d6a8,#bfa26a);color:#3a2a17;font-weight:700;font-size:0.8125rem;line-height:1;border:1px solid #3a2a17}
.msw-head{display:flex;align-items:center;gap:10px;background:#fffaf0;border:1px solid #b99b66;border-radius:5px;padding:6px 8px;margin-bottom:6px}
.msw-npc{width:72px;height:80px;flex:0 0 72px;display:grid;place-items:end center;background:radial-gradient(circle at 50% 70%,#fff 0,#f3e7c8 70%);border:1px solid #cdb385;border-radius:4px;overflow:hidden}
.msw-npc img{max-width:68px;max-height:78px;image-rendering:auto}
.msw-nospr{align-self:center;font-size:28px;font-weight:700;color:#b99b66}
.msw-npcinfo{display:flex;flex-direction:column;gap:2px;min-width:0}
.msw-npcinfo strong{font-size:14px;color:#2b1d0b}
.msw-npcinfo span{font-size:0.8125rem;color:#7a6440;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.msw-cols{display:flex;justify-content:space-between;padding:3px 10px 3px 50px;margin-bottom:3px;background:linear-gradient(#a3814e,#86663a);color:#fff3cf;font-size:0.8125rem;font-weight:700;letter-spacing:.1em;border-radius:3px}
.msw-cols span:last-child{margin-right:52px}
.msw-list{list-style:none;margin:0;padding:3px;height:380px;overflow-y:auto;background:#fffdf6;border:1px solid #8f7448;border-radius:3px;box-shadow:inset 0 1px 3px rgba(0,0,0,.18);scrollbar-width:thin;scrollbar-color:#a3814e #efe1bd}
.msw-list::-webkit-scrollbar{width:11px}
.msw-list::-webkit-scrollbar-track{background:#efe1bd;border-left:1px solid #c9ad7a}
.msw-list::-webkit-scrollbar-thumb{background:linear-gradient(90deg,#c9a76c,#94723f);border:1px solid #5a3f20;border-radius:5px}
.msw-list li{display:grid;grid-template-columns:36px minmax(0,1fr) auto 40px;align-items:center;gap:6px;padding:3px 4px;border-bottom:1px dotted #dccaa0;min-height:42px}
.msw-list li:nth-child(even){background:#fbf4e2}
.msw-list li:hover{background:#d9ecff;outline:1px solid #7fb0e0}
.msw-slot{width:34px;height:34px;display:grid;place-items:center;background:linear-gradient(#fff,#ece0c4);border:1px solid #a88a58;border-radius:4px;box-shadow:inset 0 0 0 1px #fff}
.msw-slot img{max-width:32px;max-height:32px}
.msw-name{font-weight:700;color:#2b1d0b;font-size:0.8125rem;line-height:1.25;overflow:hidden;text-overflow:ellipsis}
.msw-name small{display:block;font-weight:400;color:#8a7350;font-size:0.8125rem}
.msw-price{white-space:nowrap;font-weight:700;color:#3b2a14;font-size:0.8125rem;display:inline-flex;align-items:center;gap:3px}
.msw-unk{color:#a0866a}
.msw-coin{display:inline-block;width:11px;height:11px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff6b0 0,#f4c430 45%,#b8860b 100%);border:1px solid #7a5a00;box-shadow:inset 0 -1px 0 rgba(0,0,0,.2)}
.msw-buy,.msw-btn{display:inline-grid;place-items:center;font-size:0.8125rem;font-weight:700;letter-spacing:.05em;color:#fff;text-shadow:0 1px 0 rgba(0,0,0,.45);
  background:linear-gradient(#ffd27a 0,#f5a623 48%,#e08a00 52%,#f0a83a 100%);border:1px solid #8a5200;border-radius:4px;box-shadow:inset 0 1px 0 rgba(255,255,255,.65),0 1px 1px rgba(0,0,0,.25);height:20px;user-select:none}
.msw-foot{display:flex;align-items:center;gap:6px;margin-top:7px}
.msw-count{margin-right:auto;font-size:0.8125rem;font-weight:700;color:#7a6440;letter-spacing:.06em}
.msw-btn{padding:0 14px;height:22px;font-size:0.8125rem}
.msw-btn:not(.msw-btn-buy){background:linear-gradient(#e8e3d6 0,#c8bfa8 48%,#b3a88c 52%,#cfc6ae 100%);border-color:#5c513a;color:#3a2a17;text-shadow:0 1px 0 rgba(255,255,255,.6)}
@media (max-width:640px){.msw{max-width:100%}.msw-list{height:320px}}
.ns-meso{display:inline-block;width:16px;height:16px;vertical-align:-3px;margin-inline-start:3px;object-fit:contain}
.ns-table td.ns-buy,.ns-table td.ns-sell{white-space:nowrap;width:1%}
.ns-table thead th{white-space:nowrap}
