.points-recharge-dialog {
  width: min(760px, calc(100vw - 32px)) !important;
  max-height: min(850px, calc(100vh - 24px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #eef2f8;
  background: #0d1017;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 20px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .62);
}
.points-recharge-dialog > .points-recharge-head,
.points-recharge-dialog > header.points-recharge-head {
  min-height: 76px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
}
.points-recharge-head h2 { margin: 0; color: #f7f9fc; font-size: 24px; font-weight: 850; letter-spacing: 0; }
.points-recharge-head p { margin: 6px 0 0; color: #8c97a7; font-size: 13px; }
.points-recharge-head > button { width: 36px; height: 36px; flex: 0 0 36px; padding: 0; border: 0; color: #8f9aaa; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; }
.points-recharge-tabs { flex: 0 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 70px; border-bottom: 1px solid rgba(148, 163, 184, .16); }
.points-recharge-tabs button { position: relative; min-height: 70px; border: 0; color: #8e98a8; background: transparent; font-size: 17px; font-weight: 750; cursor: pointer; }
.points-recharge-tabs button::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 0; height: 3px; background: transparent; }
.points-recharge-tabs button.is-active { color: #15d1e9; }
.points-recharge-tabs button.is-active::after { background: #15d1e9; }
.points-recharge-body { min-height: 0; overflow: auto; }
.points-recharge-panel { padding: 28px; }
.points-recharge-section-title { margin: 0 0 16px; color: #8f99aa; font-size: 16px; font-weight: 650; }
.points-recharge-packages { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 14px !important; padding: 0 !important; }
.points-recharge-packages > p { grid-column: 1 / -1; color: #8f99aa; text-align: center; }
.points-recharge-packages button { min-height: 112px !important; display: grid !important; place-items: center !important; align-content: center !important; gap: 7px !important; padding: 12px !important; border: 1px solid rgba(148, 163, 184, .22) !important; border-radius: 16px !important; color: #f7f9fc !important; background: #151b24 !important; cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.points-recharge-packages button:hover { border-color: rgba(21, 209, 233, .7) !important; transform: translateY(-1px); }
.points-recharge-packages button.is-selected { border-color: #15d1e9 !important; background: rgba(11, 51, 64, .74) !important; box-shadow: inset 0 0 0 1px rgba(21, 209, 233, .24); }
.points-recharge-packages button strong { color: #f7f9fc; font-size: 26px !important; line-height: 1.1; }
.points-recharge-packages button span { color: #15d1e9 !important; font-size: 15px !important; }
.points-recharge-method-title { margin-top: 30px; }
.points-recharge-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.points-recharge-methods button { min-height: 76px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid rgba(148, 163, 184, .22); border-radius: 16px; color: #f7f9fc; background: #151b24; font-size: 18px; font-weight: 800; cursor: pointer; }
.points-recharge-methods button:hover { border-color: rgba(21, 209, 233, .7); }
.points-recharge-methods button.is-selected { border-color: #15d1e9; background: rgba(11, 51, 64, .74); box-shadow: inset 0 0 0 1px rgba(21, 209, 233, .24); }
.payment-brand-icon { width: 30px; height: 30px; display: inline-grid; place-items: center; flex: 0 0 30px; }
.payment-brand-icon svg { width: 30px; height: 30px; display: block; }
.payment-brand-icon.alipay { border-radius: 6px; color: #fff; background: #1677ff; font-size: 21px; font-weight: 900; line-height: 30px; }
.payment-brand-icon.wechat svg { overflow: visible; }
.points-recharge-tip { margin-top: 30px; padding: 16px 18px; border: 1px solid rgba(206, 157, 16, .55); border-radius: 14px; color: #9ba5b3; background: rgba(106, 78, 5, .13); font-size: 13px; line-height: 1.7; }
.points-recharge-tip strong { display: block; margin-bottom: 5px; color: #ffd232; font-size: 16px; }
.points-recharge-tip ol { margin: 0; padding-left: 22px; }
.points-recharge-redeem { padding-top: 6px; }
.points-recharge-redeem input { width: 100%; height: 54px; box-sizing: border-box; padding: 0 16px; border: 1px solid rgba(148, 163, 184, .24); border-radius: 12px; outline: 0; color: #f7f9fc; background: #151b24; font-size: 16px; }
.points-recharge-redeem input:focus { border-color: #15d1e9; box-shadow: 0 0 0 3px rgba(21, 209, 233, .12); }
.points-recharge-redeem-status { min-height: 22px; margin: 10px 2px 0; color: #8f99aa; font-size: 13px; }
.points-recharge-dialog > .points-recharge-foot,
.points-recharge-dialog > footer.points-recharge-foot { flex: 0 0 auto; display: flex; justify-content: flex-end; gap: 14px; padding: 20px 28px 24px; border-top: 1px solid rgba(148, 163, 184, .16); }
.points-recharge-foot button { min-width: 112px; height: 48px; padding: 0 20px; border: 1px solid rgba(148, 163, 184, .28); border-radius: 12px; color: #9ca6b5; background: transparent; font-size: 16px; font-weight: 750; cursor: pointer; }
.points-recharge-foot button[data-recharge-confirm] { border-color: #15d1e9; color: #07151b; background: #15d1e9; }
.points-recharge-foot button:disabled { opacity: .55; cursor: wait; }
.points-recharge-account-hidden { display: none !important; }
@media (max-width: 620px) {
  .points-recharge-dialog { width: calc(100vw - 20px) !important; max-height: calc(100vh - 20px); border-radius: 16px; }
  .points-recharge-dialog > .points-recharge-head, .points-recharge-dialog > header.points-recharge-head { min-height: 66px; padding: 0 18px; }
  .points-recharge-head h2 { font-size: 20px; }
  .points-recharge-tabs, .points-recharge-tabs button { min-height: 58px; }
  .points-recharge-tabs button { font-size: 15px; }
  .points-recharge-panel { padding: 20px 18px; }
  .points-recharge-packages { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .points-recharge-packages button { min-height: 92px !important; border-radius: 12px !important; }
  .points-recharge-packages button strong { font-size: 21px !important; }
  .points-recharge-methods { gap: 10px; }
  .points-recharge-methods button { min-height: 64px; font-size: 15px; border-radius: 12px; }
  .points-recharge-dialog > .points-recharge-foot, .points-recharge-dialog > footer.points-recharge-foot { padding: 16px 18px 18px; }
}
/* Keep the shared recharge dialog centered against the viewport on every page. */
#dashboardRecharge,
#studioRecharge,
#webRechargeModal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 12000 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  box-sizing: border-box !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 18px !important;
  overflow: auto !important;
  background: rgba(0, 0, 0, .72) !important;
  backdrop-filter: blur(5px);
}

#dashboardRecharge.hidden,
#studioRecharge.hidden,
#webRechargeModal.hidden {
  display: none !important;
}

#dashboardRecharge > .points-recharge-dialog,
#studioRecharge > .points-recharge-dialog,
#webRechargeModal > .points-recharge-dialog {
  position: relative !important;
  inset: auto !important;
  margin: auto !important;
  transform: none !important;
  justify-self: center !important;
  align-self: center !important;
  flex: 0 0 auto !important;
}

@media (max-width: 620px) {
  #dashboardRecharge,
  #studioRecharge,
  #webRechargeModal {
    padding: 10px !important;
  }
}

/* Let fixed edges define the viewport; explicit viewport sizes can shrink under page scaling. */
#dashboardRecharge,
#studioRecharge,
#webRechargeModal {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
}

/* Compact the controls inside the recharge dialog. */
.points-recharge-dialog {
  width: min(680px, calc(100vw - 32px)) !important;
}

.points-recharge-dialog > .points-recharge-head,
.points-recharge-dialog > header.points-recharge-head {
  min-height: 64px;
  padding: 0 22px;
}

.points-recharge-head h2 { font-size: 21px; }
.points-recharge-head p { margin-top: 4px; font-size: 11px; }
.points-recharge-head > button { width: 32px; height: 32px; flex-basis: 32px; font-size: 24px; }

.points-recharge-tabs,
.points-recharge-tabs button {
  min-height: 56px;
}

.points-recharge-tabs button { font-size: 15px; }
.points-recharge-tabs button::after { height: 2px; }
.points-recharge-panel { padding: 20px 22px; }
.points-recharge-section-title { margin-bottom: 10px; font-size: 14px; }

.points-recharge-packages {
  gap: 10px !important;
}

.points-recharge-packages button {
  min-height: 82px !important;
  gap: 5px !important;
  padding: 9px !important;
  border-radius: 12px !important;
}

.points-recharge-packages button strong { font-size: 22px !important; }
.points-recharge-packages button span { font-size: 13px !important; }
.points-recharge-method-title { margin-top: 20px; }
.points-recharge-methods { gap: 10px; }

.points-recharge-methods button {
  min-height: 56px;
  gap: 9px;
  border-radius: 12px;
  font-size: 15px;
}

.payment-brand-icon,
.payment-brand-icon svg {
  width: 26px;
  height: 26px;
}

.payment-brand-icon { flex-basis: 26px; }
.payment-brand-icon.alipay { font-size: 18px; line-height: 26px; }

.points-recharge-tip {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.55;
}

.points-recharge-tip strong { margin-bottom: 3px; font-size: 14px; }
.points-recharge-tip ol { padding-left: 20px; }

.points-recharge-dialog > .points-recharge-foot,
.points-recharge-dialog > footer.points-recharge-foot {
  gap: 10px;
  padding: 14px 22px 18px;
}

.points-recharge-foot button {
  min-width: 92px;
  height: 40px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 14px;
}

@media (max-width: 620px) {
  .points-recharge-dialog { width: calc(100vw - 20px) !important; }
  .points-recharge-panel { padding: 16px; }
  .points-recharge-packages button { min-height: 74px !important; }
  .points-recharge-methods button { min-height: 50px; }
}

/* Restore the dialog scale; only keep the inner choice boxes compact. */
.points-recharge-dialog {
  width: min(760px, calc(100vw - 32px)) !important;
}

.points-recharge-dialog > .points-recharge-head,
.points-recharge-dialog > header.points-recharge-head {
  min-height: 76px;
  padding: 0 28px;
}

.points-recharge-head h2 { font-size: 24px; }
.points-recharge-head p { margin-top: 6px; font-size: 13px; }
.points-recharge-head > button { width: 36px; height: 36px; flex-basis: 36px; font-size: 28px; }

.points-recharge-tabs,
.points-recharge-tabs button {
  min-height: 70px;
}

.points-recharge-tabs button { font-size: 17px; }
.points-recharge-tabs button::after { height: 3px; }
.points-recharge-panel { padding: 24px 28px; }
.points-recharge-section-title { margin-bottom: 12px; font-size: 16px; }

.points-recharge-packages {
  gap: 12px !important;
}

.points-recharge-packages button {
  min-height: 90px !important;
  gap: 6px !important;
  padding: 10px !important;
  border-radius: 14px !important;
}

.points-recharge-packages button strong { font-size: 25px !important; }
.points-recharge-packages button span { font-size: 14px !important; }
.points-recharge-method-title { margin-top: 24px; }
.points-recharge-methods { gap: 12px; }

.points-recharge-methods button {
  min-height: 60px;
  gap: 11px;
  border-radius: 14px;
  font-size: 17px;
}

.payment-brand-icon,
.payment-brand-icon svg {
  width: 28px;
  height: 28px;
}

.payment-brand-icon { flex-basis: 28px; }
.payment-brand-icon.alipay { font-size: 20px; line-height: 28px; }

.points-recharge-tip {
  margin-top: 24px;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.points-recharge-tip strong { margin-bottom: 4px; font-size: 15px; }
.points-recharge-tip ol { padding-left: 21px; }

.points-recharge-dialog > .points-recharge-foot,
.points-recharge-dialog > footer.points-recharge-foot {
  gap: 12px;
  padding: 16px 28px 20px;
}

.points-recharge-foot button {
  min-width: 104px;
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 15px;
}

@media (max-width: 620px) {
  .points-recharge-dialog { width: calc(100vw - 20px) !important; }
  .points-recharge-panel { padding: 18px; }
  .points-recharge-packages button { min-height: 80px !important; }
  .points-recharge-methods button { min-height: 54px; }
}

/* Keep the dialog size, but make the controls inside it narrower and denser. */
.points-recharge-body [data-recharge-panel="credits"] {
  width: calc(100% - 72px);
  max-width: 620px;
  margin: 0 auto;
}

.points-recharge-body [data-recharge-panel="redeem"] {
  width: calc(100% - 72px);
  max-width: 620px;
  margin: 0 auto;
}

.points-recharge-panel {
  padding: 22px 0;
}

.points-recharge-packages {
  gap: 10px !important;
}

.points-recharge-packages button {
  min-height: 78px !important;
  padding: 8px !important;
  border-radius: 12px !important;
}

.points-recharge-packages button strong {
  font-size: 22px !important;
}

.points-recharge-packages button span {
  font-size: 13px !important;
}

.points-recharge-method-title {
  margin-top: 20px;
}

.points-recharge-methods {
  gap: 10px;
}

.points-recharge-methods button {
  min-height: 52px;
  border-radius: 11px;
  font-size: 15px;
}

.points-recharge-tip {
  margin-top: 18px;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.points-recharge-tip strong {
  font-size: 14px;
}

@media (max-width: 620px) {
  .points-recharge-body [data-recharge-panel="credits"],
  .points-recharge-body [data-recharge-panel="redeem"] {
    width: calc(100% - 28px);
  }
}

/* QR payment stays in a compact card on the current page. */
.points-recharge-dialog.is-payment-view {
  position: relative;
  width: min(400px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 32px);
  border-radius: 16px;
  background: #0d1017;
}
.points-recharge-dialog.is-payment-view > .points-recharge-head,
.points-recharge-dialog.is-payment-view > header.points-recharge-head {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  min-height: 0;
  height: 58px;
  padding: 0 18px;
  border: 0;
  pointer-events: none;
}
.points-recharge-dialog.is-payment-view .points-recharge-head > div { display: none; }
.points-recharge-dialog.is-payment-view .points-recharge-head > button {
  margin-left: auto;
  color: #8f99aa;
  pointer-events: auto;
}
.points-recharge-dialog.is-payment-view .points-recharge-tabs,
.points-recharge-dialog.is-payment-view .points-recharge-foot,
.points-recharge-dialog.is-payment-view footer.points-recharge-foot {
  display: none !important;
}
.points-recharge-dialog.is-payment-view .points-recharge-body { overflow: hidden; }
.points-recharge-payment { width: 100%; }
.points-payment-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  padding: 38px 34px 34px;
  text-align: center;
}
.points-payment-title {
  margin: 0 0 18px;
  color: #f7f9fc;
  font-size: 20px;
  font-weight: 800;
}
.points-payment-qr-shell {
  width: 236px;
  height: 236px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 10px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}
.points-payment-qr {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
}
.points-payment-price {
  margin-top: 22px;
  color: #f7f9fc;
  font-size: 29px;
  line-height: 1;
}
.points-payment-arrival {
  margin: 14px 0 0;
  color: #8f99aa;
  font-size: 13px;
}
.points-payment-status {
  min-height: 20px;
  margin: 8px 0 0;
  color: #e8c84a;
  font-size: 13px;
}
.points-payment-status.is-paid { color: #32d583; font-weight: 700; }
@media (max-width: 620px) {
  .points-recharge-dialog.is-payment-view { width: min(360px, calc(100vw - 20px)) !important; }
  .points-payment-view { padding: 34px 22px 30px; }
  .points-payment-qr-shell { width: min(226px, calc(100vw - 104px)); height: min(226px, calc(100vw - 104px)); }
}
/* Alipay-only payment selector */
.points-recharge-methods {
  display: flex !important;
  justify-content: center !important;
}
.points-recharge-methods button {
  width: calc(50% - 7px);
  max-width: 360px;
  flex: 0 1 auto;
}
