/* Mobile storefront 787: visual-only, desktop and transaction behavior unchanged. */
@media (max-width:700px), (max-height:500px) and (max-width:1000px) {
 #shopframe#shopframe {padding:0; overscroll-behavior:contain}
 #shopframe#shopframe .sf-panel {width:100%;height:100%;max-height:100dvh;border:0;border-radius:0;padding:max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));gap:8px}
 #shopframe#shopframe .sf-top {display:flex;flex-wrap:nowrap;position:relative;gap:8px;min-height:46px;padding:0 0 8px;flex-shrink:0}
 #shopframe#shopframe .sf-logo,#shopframe#shopframe .sf-title {display:none}
 #shopframe#shopframe .sf-wallets {display:flex;flex:1 1 0;width:auto;min-width:0;padding:0;gap:6px;margin:0}
 #shopframe#shopframe .sf-wal {flex:1 1 0;width:0;max-width:none;height:44px;padding:0 2px 0 6px;gap:4px;border-radius:10px}
 #shopframe#shopframe .sf-wal b {font-size:12px!important;flex:1 1 0;max-width:none;text-align:center}
 #shopframe#shopframe .sf-wal-ic,#shopframe#shopframe .sf-wal-ic svg {width:18px;height:18px;flex-basis:18px}
 #shopframe#shopframe .sf-wallets .sf-plus {width:44px;height:44px;flex-basis:44px;background:transparent!important}
 #shopframe#shopframe .sf-closebtn {position:relative;top:auto;right:auto;flex:0 0 44px;margin:0;align-self:flex-start}
 #shopframe#shopframe .sf-body {display:flex;flex-direction:column;min-height:0;gap:8px}
 #shopframe#shopframe .sf-rail {display:flex;flex-direction:row;width:100%;flex:0 0 auto;gap:6px;padding:0 0 2px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;touch-action:pan-x}
 #shopframe#shopframe .sf-cat {min-height:44px;padding:7px 10px;gap:6px;font-size:12px;border-radius:10px;white-space:nowrap}
 #shopframe#shopframe .sf-cat .sf-cat-l {white-space:nowrap}
 #shopframe#shopframe .sf-cat .sf-cat-ic,#shopframe#shopframe .sf-cat .sf-cat-ic svg {width:18px;height:18px;flex-basis:18px}
 #shopframe#shopframe .sf-stage,#shopframe#shopframe .sf-mid {min-height:0;min-width:0;gap:6px}
 #shopframe#shopframe .sf-gridhead {gap:6px;flex-wrap:nowrap}
 #shopframe#shopframe .sf-sort {flex:0 1 160px}
 #shopframe#shopframe .sf-sort select {font-size:12px;padding-left:8px}
 #shopframe#shopframe .sf-scroll {padding:0 2px 8px;min-height:0;-webkit-overflow-scrolling:touch}
 #shopframe#shopframe .sf-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #shopframe#shopframe .sf-grp {padding:6px 0 2px;gap:2px 6px;font-size:12px}
 #shopframe#shopframe .sf-grp-hint {font-size:11px;line-height:1.4}
 #shopframe#shopframe .sf-card[class] {padding:8px!important;gap:4px;border-radius:13px}
 #shopframe#shopframe .sf-card .sf-art {aspect-ratio:1.4;height:auto;min-height:76px}
 #shopframe#shopframe .sf-card .sf-card-n {min-height:36px}
 #shopframe#shopframe .sf-card .sf-nm {font-size:13px!important;line-height:1.35!important}
 #shopframe#shopframe .sf-card .sf-price {height:32px;min-height:32px;border-radius:8px}
 #shopframe#shopframe .sc-sb-text {font-size:12px!important}
 #shopframe#shopframe .sf-panel.mode-bag .sf-bag {display:flex!important;flex-direction:column;gap:8px;min-height:0;overflow:hidden}
 #shopframe#shopframe .sf-panel.mode-bag .sf-load {display:grid;grid-template-columns:minmax(0,1fr) 80px;flex:0 0 clamp(124px,21dvh,180px);height:clamp(124px,21dvh,180px);max-height:none;gap:8px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-load-ship {width:100%;max-width:none;height:100%;min-height:0;padding:8px 8px 28px;border-radius:16px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-load-ship::after {font-size:12px;bottom:6px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-load-ring {bottom:24px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-load-row {display:grid;grid-template-columns:1fr;grid-template-rows:repeat(2,minmax(0,1fr));height:100%;gap:8px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-mini {height:100%;min-height:0;padding:4px 4px 18px;border-radius:12px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv {flex:1 1 0;height:auto;min-height:0;padding:8px;gap:6px;border-radius:16px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-head {display:none}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-tabs {gap:4px;padding:0 0 2px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;touch-action:pan-x}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-tab {min-height:44px;padding:8px 10px;font-size:11px;border-radius:9px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-scroll {padding:0 2px 4px;overflow-x:hidden;overflow-y:auto;touch-action:pan-y;-webkit-overflow-scrolling:touch}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-grid:not(.list) {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-grid:not(.list) .sf-cell {min-height:142px;padding:6px 6px 28px;border-radius:12px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-grid:not(.list) .sf-cell-art {height:76px;flex-basis:76px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-cell-n {font-size:12px;line-height:1.35}
 #shopframe#shopframe .sf-panel.mode-bag .sf-cell-tag {bottom:5px;padding:3px 4px;font-size:10px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-foot {padding-top:5px;gap:6px;flex-wrap:nowrap}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-foot .sf-sortbtn {font-size:11px;padding:6px 8px;flex-shrink:0}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-foot .sf-sort {flex:1 1 0;min-width:0}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-foot .sf-icobtn {flex:0 0 44px}
 #shopframe#shopframe .sf-dlg {padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
 #shopframe#shopframe .sf-dlg-card {padding:14px;gap:8px;max-height:100%;overflow-y:auto}
 #shopframe#shopframe .sf-d-name {font-size:19px;padding-right:30px}
 #shopframe#shopframe .sf-d-art {max-height:min(180px,25dvh)}
}
@media (max-width:350px) and (min-height:501px) {
 #shopframe#shopframe .sf-panel.mode-bag .sf-load {grid-template-columns:minmax(0,1fr) 70px;flex-basis:124px;height:124px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-tab {padding-inline:8px;font-size:10px}
}
@media (max-height:500px) and (max-width:1000px) and (orientation:landscape) {
 #shopframe#shopframe .sf-panel.mode-bag .sf-bag {display:grid!important;grid-template-columns:156px minmax(0,1fr);gap:8px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-load {display:flex;flex-direction:column;height:100%;gap:6px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-load-ship {height:auto;flex:1 1 0;min-height:70px;padding-top:4px;padding-bottom:24px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-load-row {grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr;height:52px;flex:0 0 52px;gap:6px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv {height:100%;padding:6px;gap:4px}
 #shopframe#shopframe .sf-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-grid:not(.list) {grid-template-columns:repeat(3,minmax(0,1fr))}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-grid:not(.list) .sf-cell {min-height:132px}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-grid:not(.list) .sf-cell-art {height:64px;flex-basis:64px}
 #shopframe#shopframe .sf-dlg-card {width:min(560px,100%)}
}
/* Short landscape phones: categories move left, keeping the item list usable. */
@media (max-height:500px) and (max-width:1000px) and (orientation:landscape) {
 #shopframe#shopframe .sf-body {flex-direction:row}
 #shopframe#shopframe .sf-rail {flex:0 0 98px;width:98px;flex-direction:column;overflow-x:hidden;overflow-y:auto;gap:5px;touch-action:pan-y}
 #shopframe#shopframe .sf-cat {width:100%;padding:7px 5px;font-size:10px;gap:4px}
 #shopframe#shopframe .sf-cat .sf-cat-l {white-space:normal;text-align:left;overflow-wrap:anywhere}
 #shopframe#shopframe .sf-stage {flex:1 1 0}
 #shopframe#shopframe .sf-panel.mode-bag .sf-bag {grid-template-columns:132px minmax(0,1fr)}
}
@media (max-height:500px) and (max-width:700px) and (orientation:landscape) {
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-grid:not(.list) {grid-template-columns:repeat(2,minmax(0,1fr))}
 #shopframe#shopframe .sf-panel.mode-bag .sf-inv-foot .sf-sortbtn {display:none}
}
