/* Black market sits above the lower-right inventory and growth controls. */
#hud>#shop-button{position:fixed;inset:auto var(--market-right,24px) var(--market-bottom,calc(var(--console) + 120px)) auto;z-index:25;margin:0;padding:2px;width:42px;height:42px;background:#101b16;border:1px solid #877346;box-shadow:0 2px 8px #0008}
#shop-button>img{display:block;width:100%;height:100%;object-fit:cover}
#shop-dialog.market-compact{zoom:1;inset:auto calc(var(--market-right,24px) + 50px) var(--market-bottom,calc(var(--console) + 120px)) auto;transform:none;margin:0;width:max-content;max-width:calc(100vw - 72px);height:42px;max-height:none;padding:0;border:0;background:none;box-shadow:none;overflow:visible;gap:6px;align-items:center}
#shop-dialog.market-compact[open]{display:flex}
#shop-dialog.market-compact #market-drag-handle{flex:none;width:18px;height:36px;margin:0;padding:0;border:0;background:#101b1699;color:#bfb18c;font-size:22px;line-height:1;cursor:grab;touch-action:none;user-select:none}
#shop-button[data-ui-drag]{cursor:grab;touch-action:none;user-select:none}
#shop-button[data-ui-drag]>img{pointer-events:none;-webkit-user-drag:none}
#shop-dialog.market-dragging,#shop-button.market-dragging,#shop-dialog.market-dragging #market-drag-handle{cursor:grabbing}
#shop-dialog.market-compact.market-dragging :is(.market-item-popover,.market-control-popover){display:none!important}
#shop-dialog.market-compact .tabs,#shop-dialog.market-compact .market-heading h2,#shop-dialog.market-compact #shop-balance{display:none}
#shop-dialog.market-compact .market-heading{order:4;display:block;margin:0;padding:0;border:0}
#shop-dialog.market-compact .market-heading form{margin:0}
#shop-dialog.market-compact .market-close{position:static;width:22px;height:30px;margin:0;padding:0;font-size:20px;line-height:1;background:#101b16d9;border:1px solid #6b6745;color:#c5c9ad}
#shop-dialog.market-compact #shop-offers{display:flex;gap:6px;margin:0;padding:0}
#shop-dialog.market-compact .market-slot{position:relative;width:42px;height:42px;flex:none;opacity:1}
#shop-dialog.market-compact .market-item-icon{position:relative;display:block;width:42px;height:42px;padding:2px;border:1px solid #887548;background:#101b16;box-shadow:0 2px 8px #0008}
.market-item-icon>img{display:block;width:100%;height:100%;object-fit:cover}
#shop-dialog.market-compact .market-item-icon:focus-visible{outline-offset:2px}
#shop-dialog.market-compact .market-slot.sold-out .market-item-icon>img{filter:grayscale(1);opacity:.45}
#shop-dialog.market-compact .market-slot.is-locked .market-item-icon{border-color:#ffe099}
.market-lock-mark,.market-pill-count{position:absolute;right:0;bottom:0;background:#0c1715ed;padding:0 3px;color:#ffe099;font:11px/16px sans-serif}
.market-sold-mark{position:absolute;inset:0;display:grid;place-items:center;color:#f0c6a2;font-size:30px;text-shadow:0 1px 3px #000}
#shop-dialog.market-compact .market-item-popover{display:none;position:absolute;bottom:100%;left:var(--market-tip-left,auto);right:auto;z-index:4;transform:none;width:min(300px,calc(100vw - 24px));height:auto;max-height:var(--market-tip-height,calc(100dvh - 100px));margin:0;padding:0;overflow:auto;border:1px solid #a48a50;border-radius:3px;background:#101b17fa;box-shadow:0 8px 24px #0009;text-align:left;color:#e7e4d4;cursor:default}
#shop-dialog.market-compact .market-slot:is(:hover,:focus-within)>.market-item-popover,#shop-dialog.market-compact .market-slot:has(.pointer-hover)>.market-item-popover{display:block}
#shop-dialog.market-compact .market-slot.market-hover-active>.market-item-popover{display:block}
#shop-dialog.market-compact:has(.market-slot:hover,.market-slot .pointer-hover,.market-refresh-control:hover,.market-refresh-control .pointer-hover) .market-slot:not(:hover):not(:has(.pointer-hover)):not(.market-hover-active)>.market-item-popover{display:none}
#shop-dialog.market-compact .market-item-popover .info-title{padding:12px 12px 8px;gap:8px}
#shop-dialog.market-compact .market-item-popover .info-title>img{width:32px;height:32px}
#shop-dialog.market-compact .market-item-popover h3{font-size:16px;line-height:1.4;margin:0;letter-spacing:0}
#shop-dialog.market-compact .market-item-popover .info-content{padding:0 12px 8px;gap:6px}
#shop-dialog.market-compact .market-item-popover p{font-size:13px;line-height:1.65;margin:4px 0;color:#e0e5d4}
#shop-dialog.market-compact .market-item-popover .market-note{font-size:12px;color:#aebca4}
#shop-dialog.market-compact .market-branch{padding:0 12px 8px}
#shop-dialog.market-compact .market-purchase-hint{padding:0 12px;color:#e7bd7b}
#shop-dialog.market-compact .market-purchase-hint:empty{display:none}
#shop-dialog.market-compact .info-actions{display:flex;gap:6px;align-items:center;padding:9px 12px!important;border-top:1px solid #7d70454d}
#shop-dialog.market-compact .info-actions>button{min-height:29px;margin:0;padding:4px 8px;font-size:12px;position:static;width:auto;height:auto}
#shop-dialog.market-compact .info-actions>[data-buy]{margin-left:auto;color:#f4d48d}
#shop-dialog.market-compact button:disabled{cursor:default}
#shop-dialog.market-compact .market-footer{display:flex;order:3;gap:0;padding:0;margin:0;border:0}
#shop-dialog.market-compact #refresh-shop{width:30px;height:36px;padding:0;margin:0;font-size:25px;line-height:1;color:#dec387;background:#101b16e8;border:1px solid #6b6745}
.market-control-popover{display:none}
#shop-dialog.market-compact .market-refresh-control{position:relative;display:block}
#shop-dialog.market-compact .market-control-popover{position:absolute;bottom:100%;left:var(--market-tip-left,auto);right:auto;z-index:5;width:236px;max-width:calc(100vw - 24px);max-height:var(--market-tip-height,calc(100dvh - 100px));overflow:auto;padding:10px 12px;border:1px solid #a48a50;border-radius:3px;background:#101b17fa;box-shadow:0 8px 24px #0009;color:#e5dbbd;font:12px/1.7 "Microsoft YaHei",sans-serif;white-space:pre-line}
#shop-dialog.market-compact .market-refresh-control:is(:hover,:focus-within)>.market-control-popover,#shop-dialog.market-compact .market-refresh-control:has(.pointer-hover)>.market-control-popover{display:block}
#shop-dialog.market-compact .market-refresh-control.market-hover-active>.market-control-popover{display:block}
#shop-dialog.market-compact #shop-message{position:absolute;left:0;top:48px;pointer-events:none;white-space:nowrap;color:#f0d598;background:#101b17ee;font-size:12px;padding:4px 8px;border-radius:2px}
#shop-dialog.market-compact #shop-message:empty{display:none}
#shop-dialog.market-compact #market-pills{display:flex;gap:6px;margin:0;padding:0 0 0 6px;border-left:1px solid #827247}
#shop-dialog.market-compact #market-pills:empty{display:none}
#shop-dialog.market-compact .market-pill{padding:12px}
#shop-dialog.market-compact .market-pill-slot .market-item-icon{border-color:#8b9f78}
#shop-dialog.market-compact[data-market-tip-side=below] :is(.market-item-popover,.market-control-popover){bottom:auto;top:100%}
#shop-dialog.market-compact[data-market-tip-side=below] #shop-message{top:auto;bottom:48px}
