/* 魔術代儲：讀取特效 C（按下的按鈕自己轉星星，不再跳條狀跑燈）。只用在 magic888topup.com。 */
html[data-store-motion="magic"] .sm-work.mg-hidework{display:none!important}
html[data-store-motion="magic"] .mg-btn-busy{position:relative!important;overflow:hidden!important;color:transparent!important;pointer-events:none!important;opacity:1!important;filter:brightness(.92) saturate(1.1)!important}
html[data-store-motion="magic"] .mg-btn-busy > :not(.mg-btn-load):not(.mg-btn-line){opacity:0!important}
html[data-store-motion="magic"] .mg-btn-load{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:7px;font-weight:900;font-size:14px;white-space:nowrap;color:var(--mg-load-c,#fff);text-shadow:0 1px 3px rgba(60,40,0,.45);animation:mg-load-in .22s ease-out}
html[data-store-motion="magic"] .mg-btn-load svg{width:17px;height:17px;flex:none;animation:mg-flip 1.1s cubic-bezier(.6,0,.3,1) infinite}
html[data-store-motion="magic"] svg.mg-spin-x.mg-spin-x{animation-iteration-count:infinite!important}
html[data-store-motion="magic"] .mg-btn-line{position:absolute;left:0;bottom:0;height:3px;width:0;border-radius:0 3px 3px 0;background:#e8c46a;animation:mg-line 2.4s cubic-bezier(.2,.7,.3,1) forwards}

/* 沒有按鈕可以轉時（自動重算金額等），改成頂部小膠囊，不用條狀跑燈 */
html[data-store-motion="magic"] .sm-work.mg-pill{left:50%!important;right:auto!important;top:calc(12px + env(safe-area-inset-top,0px))!important;transform:translateX(-50%)!important;width:auto!important;max-width:calc(100vw - 32px)!important;display:flex!important;align-items:center!important;gap:8px!important;padding:9px 16px 9px 12px!important;border-radius:999px!important;background:#241d38!important;color:#fff!important;box-shadow:0 10px 24px rgba(36,29,56,.25)!important;border:0!important}
html[data-store-motion="magic"] .sm-work.mg-pill .sm-track{display:none!important}
html[data-store-motion="magic"] .sm-work.mg-pill .sm-work-label{font-size:13px!important;font-weight:700!important;margin:0!important}
html[data-store-motion="magic"] .sm-work.mg-pill svg{width:16px;height:16px;color:#e8c46a;flex:none;animation:mg-flip 1.1s cubic-bezier(.6,0,.3,1) infinite}
html[data-store-motion="magic"] .sm-dialog-work.mg-pill{position:relative!important;left:auto!important;top:auto!important;transform:none!important;margin:10px auto 0!important;width:max-content!important}
@keyframes mg-flip{0%{transform:rotate(0) scale(1)}45%{transform:rotate(200deg) scale(.7)}70%{transform:rotate(180deg) scale(1.1)}100%{transform:rotate(180deg) scale(1)}}
@keyframes mg-line{to{width:92%}}
@keyframes mg-load-in{from{opacity:0;transform:translateY(8px)}}
@media (prefers-reduced-motion:reduce){html[data-store-motion="magic"] .mg-btn-load svg,html[data-store-motion="magic"] .sm-work.mg-pill svg,html[data-store-motion="magic"] .mg-btn-line{animation:none!important}}
