/* PopGo segmented tabs (2026-11-03): the tab bars outside the home page get the soft home-tab look and motion.
   A grey track, a white pill that springs to the chosen tab (squash + a brand-red dash that stretches while it travels,
   a faint sweep), the chosen label darkens and settles, its icon pops. seg.js adds the classes and the pill; the page's
   own switching code is untouched (it still just toggles .active). A bar with fewer than two visible tabs keeps its
   original look (.pgs-off). */
.pgseg:not(.pgs-off){--u:var(--pg-unit,1vw);position:relative;display:flex;align-items:center;column-gap:0!important;gap:0!important;padding:calc(.8 * var(--u))!important;background:var(--pgs-track,#F2F3F6)!important;border:0!important;border-radius:calc(3.2 * var(--u))!important;box-shadow:inset 0 1px 2px rgba(20,20,40,.05)!important;overflow:visible!important;isolation:isolate}
.pgseg-ink{display:none}
.pgseg:not(.pgs-off)>.pgseg-ink{display:block;will-change:transform;position:absolute;z-index:0;left:0;top:var(--pgs-y,0px);width:var(--pgs-w,0px);height:var(--pgs-h,0px);transform:translateX(var(--pgs-x,0px));border-radius:calc(2.4 * var(--u));background:#fff;border:1px solid rgba(20,20,40,.05);box-sizing:border-box;box-shadow:0 calc(.9 * var(--u)) calc(2.6 * var(--u)) calc(-.6 * var(--u)) rgba(20,20,40,.16),0 1px 2px rgba(20,20,40,.06);pointer-events:none;overflow:hidden;transition:transform .5s cubic-bezier(.3,1.28,.4,1),width .5s cubic-bezier(.3,1.28,.4,1),opacity .2s ease}
.pgseg:not(.pgs-off)>.pgseg-ink.pgs-now{transition:none}
.pgseg-ink::before{content:"";position:absolute;left:var(--pgs-dx,50%);bottom:calc(.75 * var(--u));width:calc(3.4 * var(--u));height:calc(.55 * var(--u));margin-left:calc(-1.7 * var(--u));border-radius:99px;background:#EC1C24;opacity:.92}
.pgseg-ink::after{content:"";position:absolute;top:0;bottom:0;left:-60%;width:45%;background:linear-gradient(100deg,rgba(255,255,255,0) 0%,rgba(236,28,36,.08) 50%,rgba(255,255,255,0) 100%)}
.pgseg-ink.pgs-squash{animation:pgsSquash .52s cubic-bezier(.34,1.42,.5,1)}
.pgseg-ink.pgs-squash::before{animation:pgsDash .62s cubic-bezier(.34,1.42,.5,1)}
.pgseg-ink.pgs-squash::after{animation:pgsSweep .9s .28s ease-out both}
.pgseg:not(.pgs-off)>.pgseg-tab{position:relative;z-index:1;flex:1 1 0;min-width:0;background:transparent!important;border-color:transparent!important;box-shadow:none!important;color:#8E8E96!important;font-weight:600!important;text-shadow:none!important;white-space:nowrap;transition:color .25s ease;-webkit-tap-highlight-color:transparent}
.pgseg:not(.pgs-off)>.pgseg-tab.active{color:#1C1C22!important;font-weight:700!important}
.pgseg:not(.pgs-off)>.pgseg-tab::after{content:none!important}
.pgseg:not(.pgs-off)>.pgseg-tab:active{transform:scale(.96)}
.pgseg-tab.pgs-pop{animation:pgsTx .42s cubic-bezier(.2,.8,.2,1)}
.pgseg-tab.pgs-pop img,.pgseg-tab.pgs-pop svg{animation:pgsPop .56s cubic-bezier(.3,1.6,.5,1)}
/* recharge: 充值 / 提款 */
.pgseg:not(.pgs-off)>.title-split{display:none!important}
/* recharge: 线上支付 / 虚拟货币 */
.pgseg.pgs-pay:not(.pgs-off){height:auto!important;margin:calc(3.2 * var(--u)) calc(4.266667 * var(--u)) calc(1.066667 * var(--u))!important}
.pgs-pay:not(.pgs-off)>.pgseg-tab{height:calc(9.6 * var(--u))!important;justify-content:center;font-size:calc(3.6 * var(--u))!important}
/* recharge: 现金提款 / 虚拟货币提款 */
.pgs-wd:not(.pgs-off)>.pgseg-tab{height:calc(9.6 * var(--u))!important;border:0!important}
/* warehouse: 潮玩 / 卡牌 (wrapped: the row also holds the safe-box entry) */
.pgseg.pgs-wh:not(.pgs-off){display:inline-flex;flex:0 0 auto;margin:calc(2.133333 * var(--u)) 0!important;padding:calc(.666667 * var(--u))!important}
.pgs-wh:not(.pgs-off)>.pgseg-tab{flex:0 0 auto;padding:0 calc(3.466667 * var(--u))!important;height:calc(7.733333 * var(--u));line-height:calc(7.733333 * var(--u))!important;display:flex;align-items:center;gap:calc(.533333 * var(--u))}
.pgs-wh:not(.pgs-off)>.pgseg-tab .wh-tab-count{color:inherit;opacity:.7;font-weight:500}
/* box detail draw-record sheet (sheet background is already light grey) */
.pgseg.pgs-rec{--pgs-track:#E5E6EC}
.pgseg.pgs-rec:not(.pgs-off){height:auto!important;margin:calc(1.066667 * var(--u)) 0 calc(2.133333 * var(--u))!important}
.pgs-rec:not(.pgs-off)>.pgseg-tab{height:calc(7.466667 * var(--u));border-radius:0!important}
.pgs-rec:not(.pgs-off)>.pgseg-tab .chart-tab-icon{color:inherit!important}
/* mine > draw records page: 潮玩 / 卡牌 */
.pgs-dr:not(.pgs-off)>.pgseg-tab{height:calc(8.533333 * var(--u));display:flex;align-items:center;justify-content:center}
/* draw-record trend chart: SP / A (small pill) */
.pgseg.pgs-trend:not(.pgs-off){display:inline-flex;padding:calc(.533333 * var(--u))!important;border-radius:calc(2.133333 * var(--u))!important}
.pgs-trend:not(.pgs-off)>.pgseg-tab{flex:0 0 auto;width:calc(11.2 * var(--u))!important;height:calc(6.4 * var(--u))!important;border-radius:0!important;display:flex;align-items:center;justify-content:center}
.pgs-trend:not(.pgs-off)>.pgseg-ink{border-radius:calc(1.6 * var(--u))}
.pgs-trend:not(.pgs-off)>.pgseg-ink::before{bottom:calc(.4 * var(--u));width:calc(2.4 * var(--u));margin-left:calc(-1.2 * var(--u));height:calc(.45 * var(--u))}
/* box detail online panel: 在线 / 排行榜 */
.pgseg.pgs-ol:not(.pgs-off){display:inline-flex;flex:0 0 auto!important;padding:calc(.666667 * var(--u))!important}
.pgs-ol:not(.pgs-off)>.pgseg-tab{flex:0 0 auto;padding:0 calc(3.2 * var(--u))!important;height:calc(8 * var(--u))!important;display:flex;align-items:center}
.pgs-ol:not(.pgs-off)>.pgseg-tab .ol-tab-indicator{display:none!important}
.pgseg.pgs-gray:not(.pgs-off)>.pgseg-tab img{transition:filter .3s ease,opacity .25s ease}
.pgseg.pgs-gray:not(.pgs-off)>.pgseg-tab:not(.active) img{filter:grayscale(1);opacity:.45}
/* box detail mode popup (单人 / 多人): the sheet springs in, options rise in turn, the chosen one gives a small bounce,
   its icon pops and the tick draws in */
.dt-mode-overlay.show{animation:pgsFade .2s ease both}
.dt-mode-overlay.show .dt-mode-popup{animation:pgsSheet .42s cubic-bezier(.34,1.36,.5,1) both}
.dt-mode-overlay.show .dt-mode-option-left{animation:pgsRise .38s cubic-bezier(.2,.8,.2,1) both}
.dt-mode-overlay.show .dt-mode-option:nth-child(1) .dt-mode-option-left{animation-delay:.06s}
.dt-mode-overlay.show .dt-mode-option:nth-child(2) .dt-mode-option-left{animation-delay:.12s}
.dt-mode-overlay.show .dt-mode-switch-btn{animation:pgsRise .38s cubic-bezier(.2,.8,.2,1) .18s both}
.dt-mode-option{transition:background-color .25s ease,border-color .25s ease,box-shadow .3s ease,transform .2s ease}
.dt-mode-option:active,.dt-mode-switch-btn:active{transform:scale(.97)}
.dt-mode-overlay.show .dt-mode-option.active{animation:pgsChosen .46s cubic-bezier(.34,1.5,.5,1) both;box-shadow:0 calc(1.6 * var(--pg-unit,1vw)) calc(4.266667 * var(--pg-unit,1vw)) calc(-1.6 * var(--pg-unit,1vw)) rgba(20,20,40,.22)}
.dt-mode-option.active .dt-mode-option-icon{animation:pgsPop .56s cubic-bezier(.3,1.6,.5,1)}
.dt-mode-option.active .dt-mode-option-check{animation:pgsTick .36s cubic-bezier(.3,1.6,.5,1) .05s both}
.dt-mode-switch-btn{transition:transform .2s ease}
@keyframes pgsFade{from{opacity:0}to{opacity:1}}
@keyframes pgsSheet{from{opacity:0;transform:translateY(calc(6 * var(--pg-unit,1vw))) scale(.94)}to{opacity:1;transform:none}}
@keyframes pgsRise{from{opacity:0;transform:translateY(calc(2.4 * var(--pg-unit,1vw)))}to{opacity:1;transform:none}}
@keyframes pgsChosen{0%{transform:scale(.97)}55%{transform:scale(1.025)}100%{transform:none}}
@keyframes pgsTick{from{opacity:0;transform:scale(.3) rotate(-20deg)}to{opacity:1;transform:none}}
/* warehouse grid slides in from the side of the chosen tab (like the home grid) */
#whGrid.pgs-in-l{animation:pgsInL .34s cubic-bezier(.2,.8,.25,1) both}
#whGrid.pgs-in-r{animation:pgsInR .34s cubic-bezier(.2,.8,.25,1) both}
@keyframes pgsInL{from{opacity:0;transform:translateX(calc(-4 * var(--pg-unit,1vw)))}to{opacity:1;transform:none}}
@keyframes pgsInR{from{opacity:0;transform:translateX(calc(4 * var(--pg-unit,1vw)))}to{opacity:1;transform:none}}
/* box detail "my warehouse" sheet: 潮玩 / 卡牌 (compact) */
.pgseg.pgs-dbp:not(.pgs-off){display:inline-flex;flex:0 0 auto}
.pgs-dbp:not(.pgs-off)>.pgseg-tab{flex:0 0 auto;padding:0 calc(3.733333 * var(--u))!important;height:calc(8 * var(--u))!important;display:flex;align-items:center;justify-content:center}
/* my orders: 全部 / 待发货 / 待收货 / 已完成 */
.pgs-order:not(.pgs-off)>.pgseg-tab{height:calc(8.533333 * var(--u));padding:0!important;display:flex;align-items:center;justify-content:center}
/* add to home screen: iOS v26 以下 / iOS v26 */
.pgs-install:not(.pgs-off)>.pgseg-tab{border:0!important;height:calc(9.6 * var(--u));display:flex;align-items:center;justify-content:center}
/* points mall categories and ledger (own page, no --pg-unit: 1vw) */
.pgseg.pgs-mall:not(.pgs-off){height:auto!important;pointer-events:auto!important}
.pgs-mall:not(.pgs-off)>.pgseg-tab{border:0!important;min-height:calc(9.6 * var(--u));display:flex;align-items:center;justify-content:center}
/* coupons: 未使用 / 已使用 */
.pgseg.pgs-coupon:not(.pgs-off){margin:calc(2.666667 * var(--u)) calc(4.266667 * var(--u))!important}
.pgs-coupon:not(.pgs-off)>.pgseg-tab{border:0!important;height:calc(9.6 * var(--u))!important;line-height:normal!important;display:flex;align-items:center;justify-content:center;gap:calc(.533333 * var(--u))}
/* balance detail: 全部明细 / 收入 / 支出 (compact, the month picker stays on the right) */
.pgseg.pgs-bd:not(.pgs-off){display:inline-flex;flex:0 0 auto}
.pgs-bd:not(.pgs-off)>.pgseg-tab{flex:0 0 auto;padding:0 calc(3.2 * var(--u))!important;height:calc(8 * var(--u))!important;display:flex;align-items:center;justify-content:center;margin:0!important}
.pgs-bd:not(.pgs-off)>.pgseg-tab::before,.pgs-bd:not(.pgs-off)>.pgseg-tab::after{content:none!important;display:none!important}
/* recharge amount cards: soft press, the chosen card settles with a small bounce */
.amount-card{transition:background-color .22s ease,border-color .22s ease,color .22s ease,transform .16s ease,box-shadow .3s ease}
.amount-card:active{transform:scale(.95)}
.amount-card.active{box-shadow:0 calc(1.066667 * var(--pg-unit,1vw)) calc(3.2 * var(--pg-unit,1vw)) calc(-1.6 * var(--pg-unit,1vw)) rgba(236,28,36,.35)}
.amount-card.pgs-chosen{animation:pgsChosen .44s cubic-bezier(.34,1.5,.5,1)}
.amount-card.pgs-chosen .amount-price,.amount-card.pgs-chosen input{animation:pgsTx .38s cubic-bezier(.2,.8,.2,1)}
@keyframes pgsSquash{0%{scale:1 1}30%{scale:1.06 .9}62%{scale:.98 1.04}100%{scale:1 1}}
@keyframes pgsDash{0%{transform:scaleX(.3);opacity:.25}35%{transform:scaleX(2.6);opacity:1}70%{transform:scaleX(.85)}100%{transform:scaleX(1);opacity:.92}}
@keyframes pgsSweep{0%{left:-60%;opacity:0}15%{opacity:1}100%{left:120%;opacity:0}}
@keyframes pgsTx{from{opacity:.5;transform:translateY(1px)}to{opacity:1;transform:none}}
@keyframes pgsPop{0%{transform:scale(.55) rotate(-14deg)}55%{transform:scale(1.2) rotate(6deg)}100%{transform:none}}
@media (prefers-reduced-motion:reduce){.amount-card.pgs-chosen,.amount-card.pgs-chosen .amount-price{animation:none}#whGrid.pgs-in-l,#whGrid.pgs-in-r{animation:none}.dt-mode-overlay.show,.dt-mode-overlay.show .dt-mode-popup,.dt-mode-overlay.show .dt-mode-option-left,.dt-mode-overlay.show .dt-mode-option.active,.dt-mode-overlay.show .dt-mode-switch-btn,.dt-mode-option.active .dt-mode-option-icon,.dt-mode-option.active .dt-mode-option-check{animation:none!important}.pgseg:not(.pgs-off)>.pgseg-ink{transition:none}.pgseg-ink.pgs-squash,.pgseg-ink.pgs-squash::before,.pgseg-ink.pgs-squash::after,.pgseg-tab.pgs-pop,.pgseg-tab.pgs-pop>*,.pgseg-tab.pgs-pop img,.pgseg-tab.pgs-pop svg{animation:none}}
