/* Compact original shop window and deliberate Buy / Cancel inspection. */
#village-shop{--vendor-cell:48px;position:fixed;inset:0;margin:auto;width:max-content;max-width:calc(100% - 24px);max-height:90dvh;padding:7px;border:1px solid #b28c4b;border-radius:5px;background:#161710;box-shadow:0 12px 55px #000b,inset 0 0 0 3px #57462b55;overflow:auto}
#village-shop::backdrop{background:#0008}
#village-shop #shop-window{padding:7px;background:transparent;border:0;width:calc(var(--vendor-cell)*5 + 14px)}
#village-shop .section-heading{display:flex;align-items:center;gap:12px;margin:0 0 10px;padding:0 0 7px;border-bottom:1px solid #6f573280}
#village-shop h3{flex:1;font:20px/1.3 Georgia,serif;color:#ead9af;margin:0}
#village-shop #close-shop{display:grid;place-items:center;width:36px;min-height:36px;padding:0;border:0;background:none;color:#cdbb94;font:25px/1 Arial,sans-serif}
#village-shop .vendor-grid-scroll{max-height:calc(90dvh - 190px);overflow:auto;scrollbar-width:thin}
#village-shop #shop-items{display:grid;grid-template-columns:repeat(5,var(--vendor-cell));grid-template-rows:repeat(8,var(--vendor-cell));gap:0;width:max-content;padding:2px;background:#10120f;border:1px solid #75603b;box-sizing:content-box}
.vendor-slot{display:block;background:transparent url('/ui/assets/inventory-slot-frame.svg') center/100% 100% no-repeat;min-width:0;min-height:0;pointer-events:none}
#village-shop .vendor-item{position:relative;z-index:1;display:grid;place-items:center;width:var(--vendor-cell);height:100%;min-height:0;padding:4px;border:1px solid transparent;border-radius:0;background:transparent;touch-action:manipulation}
#village-shop .vendor-item:hover,#village-shop .vendor-item:focus-visible{border-color:#d2ad65;background:#b88b3222;outline:none}
#village-shop .vendor-item img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;min-height:0;object-fit:contain;pointer-events:none;-webkit-user-drag:none}
.vendor-item b{position:absolute;right:3px;bottom:2px;color:#f6e8c2;font:600 10px/1.2 Arial,sans-serif;text-shadow:0 1px 2px #000;pointer-events:none}
.vendor-wallet{display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 0;color:#c8b58d;font:11px/1.4 Arial,sans-serif}
.vendor-wallet img{width:18px;height:18px;object-fit:contain}
.vendor-wallet strong{font-weight:600;color:#e5ca8d;font-variant-numeric:tabular-nums}
.vendor-pages{display:flex;gap:4px;margin:0 0 8px}.vendor-pages[hidden]{display:none}
.vendor-pages button{flex:1;min-height:32px;padding:4px;background:transparent;border:1px solid #6f573280;border-radius:0;font-size:11px}
.vendor-pages button[aria-pressed=true]{border-color:#c69b4a;color:#edce88;background:#6f573222}
.vendor-selling{border-top:1px solid #6f573255;color:#b7aa8d;font:11px/1.5 Arial,sans-serif}
.vendor-selling>summary{cursor:pointer;padding:9px 0}
#village-shop #village-inventory h3{font-size:17px;margin:10px 0}
#village-shop #village-inventory{width:max-content;max-width:100%;margin:10px auto}
#village-shop #village-inventory .inventory-grid{grid-template-columns:repeat(5,var(--vendor-cell));grid-template-rows:repeat(9,var(--vendor-cell));grid-auto-rows:var(--vendor-cell);gap:0;padding:2px;width:max-content;box-sizing:content-box}
#village-shop #village-inventory .slot{width:var(--vendor-cell);height:100%;padding:3px;min-height:0;border:0;background-color:transparent;border-radius:0;background-image:var(--village-slot-frame,url('/ui/assets/inventory-slot-frame.svg'))!important;background-size:100% 100%;background-repeat:no-repeat}
#village-shop #village-inventory .segmented{gap:0;display:flex}
#village-shop #village-inventory .segmented button{flex:1;min-width:0;min-height:32px;padding:5px}
#village-shop #shop-sell-zone[hidden]{display:none!important}
#village-shop #shop-sell-zone{margin-top:10px;padding:10px;border:1px dashed #94723d;background:#6f57321a;font:11px/1.5 Arial,sans-serif;color:#cbb995}
#village-shop .vendor-done{width:100%;min-height:38px;margin-top:8px;padding:7px;background:#6f57321a;border:1px solid #82683d;color:#dfc99d;font:12px/1.4 Arial,sans-serif;border-radius:2px}
.shop-purchase-price{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:7px;margin:15px 0 10px;font:14px/1.5 Arial,sans-serif;color:#e4c37e}
.shop-purchase-price img{width:20px;height:20px;object-fit:contain}
.shop-purchase-price small{flex:0 0 100%;text-align:center;font-size:11px;color:#dcad95}
#item-dialog.shop-purchase .item-sheet-actions{display:grid;grid-template-columns:1fr 1fr}
@media(max-width:360px){#village-shop{--vendor-cell:44px}}
