:root{--store-visible-height:100vh;--store-visible-top:0px;--store-safe-bottom:env(safe-area-inset-bottom,0px)}
#store-photo-viewer{position:fixed;inset:0;margin:auto;padding:0;border:0;width:100%;max-width:none;height:var(--store-visible-height);max-height:100%;background:#171717;color:white;overflow:hidden}
#store-photo-viewer[open]{display:flex;flex-direction:column}
#store-photo-viewer::backdrop{background:#171717}
.store-zoom-tools{display:flex;align-items:center;gap:4px;padding:calc(4px + env(safe-area-inset-top,0px)) 8px 4px;background:#202020}
.store-zoom-tools button{width:44px;height:44px;color:white;background:transparent;border:0;font-size:18px;cursor:pointer}
.store-zoom-tools button:disabled{opacity:.4;cursor:default}
.store-zoom-tools output{min-width:3ch;text-align:center;color:white;font-variant-numeric:tabular-nums}
.store-zoom-tools [data-zoom-close]{margin-left:auto}
.store-zoom-port{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;cursor:grab;touch-action:pan-x pan-y pinch-zoom}
.store-zoom-port:active{cursor:grabbing}
.store-zoom-sheet{width:max-content;min-width:100%;min-height:100%;display:grid;place-items:center}
.store-zoom-sheet img{display:block;max-width:none;max-height:none;user-select:none}
#store-photo-viewer :focus-visible{outline:2px solid #fff;outline-offset:-3px}
@supports(height:100dvh){:root{--store-visible-height:100dvh}}
#store-image-modal{top:var(--store-visible-top);bottom:auto;height:var(--store-visible-height);box-sizing:border-box;padding:16px}
#store-image-modal .shop-image-dialog{max-height:100%;grid-template-rows:minmax(0,1fr) auto}
.shop-product-scroll{display:contents}
#store-image-large{grid-column:1;grid-row:1 / span 2;min-height:0}
#store-image-modal .shop-image-info{grid-column:2;grid-row:1;min-height:0}
.shop-product-actions{grid-column:2;grid-row:2;padding:12px 24px 20px;background:#fff;border-top:1px solid #e5e5e5}
#store-modal-submit{min-height:48px;height:auto;white-space:normal;font-size:16px;line-height:1.3;color:#fff;background:#222;border-color:#222}
#store-modal-submit:disabled{opacity:1;background:#e5e5e5;border-color:#ddd;color:#555}
#store-modal-submit:focus-visible{outline:3px solid #2185c5;outline-offset:2px}
#store-image-modal .shop-image-close{z-index:2}
#store-image-modal .is-photo-zoom .shop-product-actions{display:none}
#store-image-modal .is-photo-zoom #store-image-large{height:calc(var(--store-visible-height) - 32px);max-height:100%}
.shop-privacy{max-width:1200px;margin:20px auto 0;font-size:13px;line-height:1.5}.shop-privacy summary{cursor:pointer;min-height:44px;display:flex;align-items:center}.shop-privacy p{max-width:900px}
@media(max-width:900px){
    #store-image-modal{align-items:stretch;padding:calc(8px + env(safe-area-inset-top,0px)) 8px 0}
    #store-image-modal .shop-image-dialog{display:flex;flex-direction:column;width:100%;height:100%;max-height:100%;overflow:hidden}
    .shop-product-scroll{display:block;flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
    #store-image-modal #store-image-large{height:auto;max-height:calc(var(--store-visible-height) * .42);object-fit:contain}
    #store-image-modal .shop-image-info{padding:24px 16px 16px;overflow:visible}
    .shop-product-actions{flex:0 0 auto;padding:12px 16px calc(24px + var(--store-safe-bottom));padding-bottom:max(24px,calc(12px + var(--store-safe-bottom)))}
    #store-image-modal .shop-modal-message{margin-top:6px;font-size:12px;line-height:1.35}
    #store-image-modal .is-photo-zoom #store-image-large{width:100%;height:100%;max-height:100%}
    #store-image-modal .is-photo-zoom .shop-product-scroll{display:flex;align-items:center}
    .shop-side{top:var(--store-visible-top);bottom:auto;height:var(--store-visible-height);padding-bottom:calc(30px + var(--store-safe-bottom))}
}
