/* 金色只用于边框，文字和商品保持商城自身现有资源。 */
#ydxz-shop-overlay[hidden] { display: none !important; }
/* 安全区应用在整个商城容器上，标题、问号和关闭按钮一起避开状态栏。 */
#ydxz-shop-overlay { position: fixed; inset: auto; z-index: 2147483000; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: max(0px, calc(env(safe-area-inset-top, 0px) - var(--shop-top, 0px))) max(0px, calc(env(safe-area-inset-right, 0px) - var(--shop-right, 0px))) max(0px, calc(env(safe-area-inset-bottom, 0px) - var(--shop-bottom, 0px))) max(0px, calc(env(safe-area-inset-left, 0px) - var(--shop-left, 0px))); background: rgba(12, 9, 5, .7); overscroll-behavior: contain; touch-action: auto; }
.ydxz-shop-window { position: relative; box-sizing: border-box; width: 100%; height: 100%; border: 2px solid #b48b3e; background: #f6ecd6; box-shadow: inset 0 0 0 2px #f5d994; overflow: hidden; }
.ydxz-shop-window iframe { display: block; width: 100%; height: 100%; border: 0; background: #f6ecd6; touch-action: auto; }
.ydxz-shop-close { position: absolute; z-index: 1; top: 9px; right: 9px; box-sizing: border-box; width: 44px; height: 44px; padding: 0; border: 2px solid #edd093; border-radius: 50%; background: #725026; box-shadow: 0 1px 4px #0006; cursor: pointer; touch-action: manipulation; }
.ydxz-shop-close span::before, .ydxz-shop-close span::after { content: ''; position: absolute; top: 18px; left: 11px; width: 18px; height: 3px; border-radius: 2px; background: #fff0c8; transform: rotate(45deg); }
.ydxz-shop-close span::after { transform: rotate(-45deg); }
.ydxz-shop-close:focus-visible { outline: 3px solid #fff1bc; outline-offset: 2px; }
/* 父页将浮层定位到实际游戏区域，商城完整占满该区域。 */
/* 裁切层与可见 canvas 重合，闲置只藏半个按钮，空白区域不拦游戏操作。 */
#ydxz-shop-launcher-layer{position:fixed;z-index:2147482990;overflow:hidden;pointer-events:none}
#ydxz-shop-launcher-layer[hidden]{display:none!important}
#ydxz-shop-launcher{position:absolute;box-sizing:border-box;display:flex;align-items:center;justify-content:center;pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;padding:0;border:2px solid #edcd77;border-radius:50%;background:radial-gradient(circle at 35% 25%,#ffeab0,#dcaa43 58%,#a66b22);color:#5e350c;box-shadow:inset 0 0 0 2px #fff0b866,0 2px 6px #0006;font:900 15px/1 system-ui,'Microsoft YaHei',sans-serif;cursor:pointer;transition:transform .2s,opacity .2s;opacity:1}
#ydxz-shop-launcher.is-idle{opacity:.65}
#ydxz-shop-launcher.is-idle[data-side=left]{transform:translateX(-50%)}
#ydxz-shop-launcher.is-idle[data-side=right]{transform:translateX(50%)}
#ydxz-shop-launcher.is-dragging{cursor:grabbing;transition:none}
#ydxz-shop-launcher:focus-visible{outline:2px solid #fff6c9;outline-offset:-5px}
