/* BlackVeil v0.2.59.5 — compact NPC merchant, aligned with the inventory UI.
   No store-front promotional cards, portrait, or client-side transaction logic. */
.bv-shop-overlay[hidden],.bv-shop-overlay [hidden]{display:none!important}
.bv-shop-overlay{
 position:fixed;inset:0;z-index:3600;display:flex;align-items:center;justify-content:center;
 padding:calc(9px + env(safe-area-inset-top)) calc(9px + env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) calc(9px + env(safe-area-inset-left));
 background:rgba(3,5,4,.66)
}
.bv-shop-window{
 box-sizing:border-box;display:flex;flex-direction:column;width:min(680px,100%);max-height:calc(100dvh - 18px);min-height:0;
 overflow:hidden;border:1px solid #72634a;border-radius:3px;
 background:#1b1e19;box-shadow:0 12px 35px #000b,inset 0 0 0 2px #333127;
 color:#dcd3bf;font:12px/1.35 var(--bv-font-ui,'Malgun Gothic',sans-serif)
}
.bv-shop-window *{box-sizing:border-box}
.bv-shop-window button{font:inherit;color:#ddd2bd;cursor:pointer;border:1px solid #675c47;border-radius:2px;background:#33362d;touch-action:manipulation}
.bv-shop-window button:hover{background:#48483b;border-color:#998465}
.bv-shop-window button:disabled{cursor:not-allowed;opacity:.5}
.bv-shop-window button:focus-visible,.bv-shop-window input:focus-visible{outline:2px solid #d2b27d;outline-offset:1px}
.bv-shop-header{display:flex;flex:none;justify-content:space-between;align-items:center;gap:10px;height:42px;padding:6px 11px 6px 14px;border-bottom:1px solid #5b513e;background:#272a23}
.bv-shop-header h2{font:700 16px/1.2 var(--bv-font-story,serif);margin:0;color:#e7dac1}
.bv-shop-window .bv-shop-close{font-size:21px;line-height:1;width:30px;height:28px;background:#252720}
.bv-shop-layout{display:grid;grid-template-columns:minmax(0,1fr) 216px;min-height:0;overflow:hidden}
.bv-shop-catalog{display:flex;flex-direction:column;min-width:0;min-height:0;padding:11px 12px 12px;border-right:1px solid #4b493a;background:#1b1f1b}
.bv-shop-toolbar{display:flex;flex:none;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}
.bv-shop-toolbar strong{font-size:12px;color:#cfc4ad;font-weight:600}
.bv-shop-filters{display:flex;gap:3px}
.bv-shop-filters button{height:27px;min-width:39px;padding:0 8px;background:#272c25;color:#c3b9a7}
.bv-shop-filters button[aria-pressed=true]{background:#545442;border-color:#a18a62;color:#fff0cf}
.bv-shop-products{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));align-content:start;gap:5px;min-height:0;max-height:min(41dvh,250px);overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#605847 #1b1f1b;scrollbar-width:thin}
.bv-shop-window .bv-shop-product{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:100%;min-width:0;height:70px;padding:3px 1px 2px;background:#252c24;border:1px solid #4e5146;box-shadow:inset 0 0 0 1px #121912}
.bv-shop-product img{display:block;width:42px;height:42px;max-width:100%;object-fit:contain;image-rendering:auto}
.bv-shop-product span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.bv-shop-product small{font-size:10px;line-height:1.1;color:#ccb78c;white-space:nowrap}
.bv-shop-window .bv-shop-product.is-selected{border-color:#ccb17e;background:#33392c;box-shadow:inset 0 0 0 1px #ae9465}
.bv-shop-detail{display:flex;flex-direction:column;gap:8px;padding:11px 12px;min-width:0;background:#242720}
.bv-shop-detail>header{display:flex;align-items:center;justify-content:space-between;gap:4px;padding-bottom:6px;border-bottom:1px solid #494837}
.bv-shop-detail>header strong{font-size:12px;font-weight:600;color:#dfd2ba}
.bv-shop-detail>header small{font-size:10px;color:#a99d87}
.bv-shop-empty{display:flex;flex:1;justify-content:center;align-items:center;text-align:center;min-height:132px;color:#b4ab98;font-size:12px}
.bv-shop-selection{display:flex;flex-direction:column;gap:8px}
.bv-shop-selected-item{display:grid;grid-template-columns:48px 1fr;grid-template-rows:auto auto;column-gap:8px;align-items:center;min-height:50px}
.bv-shop-item-icon{grid-row:1/3;display:grid;place-items:center;width:48px;height:48px;border:1px solid #4d5446;background:#1a201b}
.bv-shop-item-icon img{width:43px;height:43px;object-fit:contain}
.bv-shop-selected-item strong{font-size:12px;align-self:end;color:#f0e0c1;white-space:normal}
.bv-shop-selected-item span{font-size:11px;align-self:start;color:#bfb29a}
.bv-shop-effect{display:flex;flex-direction:column;gap:2px;border-left:2px solid #85714d;padding:4px 0 4px 8px;background:rgba(14,20,15,.35)}
.bv-shop-effect strong{font-size:12px;line-height:1.3;color:#d7d5b1;font-weight:700}
.bv-shop-effect small{font-size:10px;line-height:1.3;color:#b4a993}

.bv-shop-quantity-line,.bv-shop-total-line{display:flex;align-items:center;justify-content:space-between;gap:5px}
.bv-shop-quantity-line label,.bv-shop-total-line>span{white-space:nowrap;color:#c6bdac;font-size:11px}
.bv-shop-quantity-control{display:flex;gap:3px;align-items:center}
.bv-shop-quantity-control button{height:28px;min-width:27px;font-size:16px}
#bv-shop-quantity{width:47px;height:28px;padding:0 2px;text-align:center;background:#171c17;border:1px solid #665b46;border-radius:2px;color:#f1e2c9;font:13px var(--bv-font-ui,sans-serif)}
#bv-shop-quantity::-webkit-outer-spin-button,#bv-shop-quantity::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.bv-shop-quick-qty{display:flex;justify-content:flex-end;gap:4px;margin-top:-2px}
.bv-shop-quick-qty button{height:24px;min-width:39px;padding:0 5px;font-size:10px;color:#cfc2ac;background:#292e27}
.bv-shop-quick-qty button[aria-pressed=true]{border-color:#a88e60;color:#f4dfb9;background:#444637}
.bv-shop-total-line{border-top:1px solid #474638;padding-top:7px}
#bv-shop-total{font-size:14px;font-weight:700;white-space:nowrap;color:#e4c18a}
.bv-shop-window .bv-shop-buy{height:32px;font-weight:700;background:#4a4836;border-color:#96805e;color:#f1dfbf}
.bv-shop-window .bv-shop-buy:hover{background:#5a5540}
.bv-shop-status{margin:0;min-height:16px;font-size:11px;line-height:1.3;color:#dfbe88;overflow-wrap:anywhere}
.bv-shop-hint{margin-top:auto;color:#a69d87;font-size:10px;line-height:1.4}
.bv-shop-footer{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 12px;border-top:1px solid #55503d;background:#232720}
.bv-shop-footer span{font-size:10px;color:#9e9581}
.bv-shop-window .bv-shop-footer button{height:27px;padding:2px 11px;background:#34372e}
@media(max-width:600px){
 .bv-shop-window{width:min(100%,430px)}
 .bv-shop-header{height:38px;padding:5px 10px}
 .bv-shop-header h2{font-size:15px}
 .bv-shop-layout{display:flex;flex-direction:column;overflow:auto;overscroll-behavior:contain}
 .bv-shop-catalog{padding:9px 10px;flex:none;border-right:0;border-bottom:1px solid #4b493a}
 .bv-shop-toolbar{margin-bottom:6px}
 .bv-shop-products{max-height:205px;gap:4px}
 .bv-shop-window .bv-shop-product{height:63px}
 .bv-shop-product img{width:34px;height:34px}
 .bv-shop-product small{font-size:9px}
 .bv-shop-detail{padding:8px 10px;gap:6px}
 .bv-shop-detail>header{padding-bottom:4px}
 .bv-shop-selection{gap:6px}
 .bv-shop-empty{min-height:58px}
 .bv-shop-selected-item{min-height:42px;grid-template-columns:43px 1fr}
 .bv-shop-item-icon{height:42px;width:42px}
 .bv-shop-item-icon img{width:36px;height:36px}
 .bv-shop-hint{display:none}
 .bv-shop-status{min-height:13px}
 .bv-shop-footer{padding:4px 10px}
}
@media(max-width:355px){.bv-shop-products{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-height:420px) and (min-width:601px){
 .bv-shop-header{height:33px}
 .bv-shop-catalog,.bv-shop-detail{padding:7px 9px;gap:4px}
 .bv-shop-toolbar{margin-bottom:5px}
 .bv-shop-window .bv-shop-product{height:58px}
 .bv-shop-product img{width:30px;height:30px}
 .bv-shop-selected-item{min-height:40px;grid-template-columns:40px 1fr}
 .bv-shop-item-icon{width:38px;height:38px}
 .bv-shop-item-icon img{width:34px;height:34px}
 .bv-shop-quantity-line{gap:2px}
 .bv-shop-quick-qty button{height:22px}
 .bv-shop-hint{display:none}
 .bv-shop-footer{padding:3px 10px}
}
@media(prefers-reduced-motion:reduce){.bv-shop-overlay *{scroll-behavior:auto}}

/* v0.2.59.8: compact equipment resale tab; same NPC panel, no cash-shop cards. */
.bv-shop-modes{display:flex;flex:none;gap:4px;padding:6px 10px 5px;background:#21251e;border-bottom:1px solid #4e4838}
.bv-shop-modes button{min-width:70px;height:27px;padding:2px 12px}
.bv-shop-modes button[aria-pressed="true"]{background:#4c4b39;color:#f1dcad;border-color:#ad9163}
.bv-shop-sell-products{max-height:min(50dvh,330px)}
.bv-shop-window .bv-shop-sell-product{height:72px}
.bv-shop-sell-check{position:absolute;top:2px;right:3px;color:#b5e69d;background:#1c291dcc;font-size:13px;line-height:1;border-radius:2px;padding:1px}
.bv-shop-sell-summary{display:flex;justify-content:space-between;gap:8px;color:#c8bcaa;font-size:12px}
.bv-shop-sell-tip{margin:2px 0;color:#b6a890;font-size:11px;line-height:1.5}
.bv-shop-sell-none{grid-column:1/-1;margin:12px 3px;color:#b6ab94}
@media(max-width:600px){.bv-shop-sell-products{max-height:38dvh}.bv-shop-window .bv-shop-sell-product{height:65px}}
