/* 仅补正式身份、订单反馈与对话框；源主页面的尺寸、卡片和布局由原CSS控制。 */
[data-hgm-private][hidden],[data-hgm-profile-panel][hidden],[data-hgm-guest-only][hidden],[data-hgm-account-logout][hidden],
[data-hgm-pay-order][hidden],[data-hgm-pay-link][hidden],[data-hgm-pay-retry][hidden],[data-hgm-register-field][hidden]{display:none!important}
.hg-member-dialog{box-sizing:border-box;width:min(460px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;margin:auto;border:1px solid #51462f;border-radius:14px;background:#151515;color:#eee;padding:24px;overscroll-behavior:contain}
.hg-member-dialog::backdrop{background:#000b}
.hg-member-close{position:sticky;top:0;float:right;z-index:2;display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:#282828;color:inherit;font-size:24px;cursor:pointer}
.hg-member-form{clear:both;display:grid;gap:12px}
.hg-member-form>.field{display:grid;gap:6px}
.hg-member-form input{box-sizing:border-box;width:100%;min-width:0;padding:11px 12px;border:1px solid #3c3c3c;border-radius:6px;background:#202020;color:inherit}
.hg-member-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.hg-member-order{overflow-wrap:anywhere;margin:12px 0;padding:12px;border:1px solid #3c3427;border-radius:8px;font-size:13px}
.hg-member-order p{margin:6px 0}
.hg-member-order .btn-ghost{margin:4px;white-space:normal}
.hg-member-toast{position:fixed;z-index:2147483600;left:50%;bottom:calc(90px + env(safe-area-inset-bottom));transform:translateX(-50%);width:max-content;max-width:calc(100vw - 40px);padding:10px 16px;border-radius:8px;background:#2b251d;color:#f5d497;box-shadow:0 4px 24px #0008;overflow-wrap:anywhere;pointer-events:none}
[data-hgm-avatar]{display:inline-grid;place-items:center;flex-shrink:0;font-weight:700;color:#fff;background:#5e4c2f;overflow:hidden}
[data-hgm-settings] input:disabled{opacity:.45;cursor:not-allowed}
/* 资料弹窗关闭即解除滚动锁；独立按钮沿用源卡片尺寸，消除嵌套按钮语义。 */
:root:has([data-hgm-profile-editor][open]),body:has([data-hgm-profile-editor][open]){overflow:hidden}
[data-hgm-profile-editor] input[type=color]{min-height:44px;padding:6px}
:where([data-hgm-asset-link]) button{border:0;font-family:inherit;cursor:pointer}
[data-hgm-private-status]{padding:24px;text-align:center}
[data-hgm-products] button,[data-hgm-channels] button{cursor:pointer}
[data-hgm-product][aria-disabled=true],[data-hgm-channel][aria-disabled=true]{opacity:.5;cursor:wait}
.hg-member-pay-dialog{width:min(1060px,calc(100vw - 24px));padding:16px}
.hg-member-pay-dialog .d-main,.hg-member-pay-dialog .app-main{padding:0;margin:0;min-height:0}
.hg-member-pay-dialog .d-container{width:100%;max-width:none;padding:0}
.hg-member-pay-dialog .d-pay{max-width:none}
.hg-member-pay-dialog .m-view{margin:0;min-height:0}
.hg-member-pay-dialog .m-pay-body{padding-bottom:12px}
/* 会员说明及原价直接展示目录文本，新增说明节点也兼容独立会员页。 */
[data-hgm-pay-root=vip] .vpd{margin-top:8px;color:var(--text-3,#a5a0ad);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
[data-hgm-pay-root=vip] .vpo{text-decoration:line-through}
@media(min-width:1024px){[data-hgm-private] .m-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1023px){
    /* 正式独立支付页保留固定CTA，沿源底栏高度和安全区避让，并为页尾留出完整操作空间。 */
    .hg-business-shell:is([data-hg-page=vip],[data-hg-page=recharge]) > [data-hg-device=h5] .m-pay-cta{bottom:calc(var(--tabbar-h,60px) + env(safe-area-inset-bottom,0px) + 10px)}
    .hg-business-shell:is([data-hg-page=vip],[data-hg-page=recharge]) > [data-hg-device=h5] .m-pay-body,
    .hg-business-shell:is([data-hg-page=vip],[data-hg-page=recharge]) .hg-footer .d-footer-inner{padding-bottom:calc(var(--tabbar-h,60px) + env(safe-area-inset-bottom,0px) + 50px + 30px)}
    .hg-member-pay-dialog{padding:12px}
    .hg-member-pay-dialog .m-backtop{display:none}
    /* 弹窗内支付沿自身滚动流，避免独立页的viewport固定按钮被dialog裁切。 */
    .hg-member-pay-dialog [data-hgm-pay-mount]{clear:both}
    .hg-member-pay-dialog .m-pay-cta{position:static;display:block;width:100%;flex-shrink:0;margin:14px 0}
    /* 记录入口参与同一换行布局；窄屏不足时独占下一行，不覆盖会员页签。 */
    .hg-member-pay-dialog .m-pay-tabs{flex-wrap:wrap;justify-content:flex-start;gap:12px 16px}
    .hg-member-pay-dialog .m-pay-tab{flex-shrink:0;margin-bottom:0;padding-bottom:6px}
    .hg-member-pay-dialog .m-pay-records{position:static;flex-shrink:0;margin-left:auto}
    /* 手机购买弹窗单独排版；沿真实目录填充，独立支付页继续使用原布局。 */
    .hg-member-pay-dialog{width:min(480px,calc(100vw - 24px));padding:12px 16px 20px;border-color:#51452d;border-radius:20px;background:#141418;overflow-x:hidden;scroll-padding:56px 0 20px}
    .hg-member-pay-dialog > .hg-member-close{width:44px;height:44px;min-width:44px;min-height:44px;background:#28272c;color:#e7e3dc}
    .hg-member-pay-dialog .m-view{width:100%;max-width:none;background:transparent}
    .hg-member-pay-dialog .m-pay-body{display:flex;flex-direction:column;gap:16px;min-width:0;padding:0}
    .hg-member-pay-dialog .m-pay-tabs{align-items:stretch;gap:8px 12px;margin:0;padding:0 0 12px}
    .hg-member-pay-dialog .m-pay-tab{display:inline-flex;align-items:center;min-height:44px;padding:8px 0;font-size:14px;line-height:1.4}
    .hg-member-pay-dialog .m-pay-records{min-height:44px;padding:8px 12px;align-self:center;line-height:1.4}
    .hg-member-pay-dialog .m-vip-hero{margin:0;padding:20px;border-color:#4b3f27;border-radius:16px;background:linear-gradient(135deg,#302817,#17171e 72%)}
    .hg-member-pay-dialog .m-vip-hero h2{margin:10px 0 8px;font-size:22px;line-height:1.35}
    .hg-member-pay-dialog .m-vip-hero p{margin:0;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
    .hg-member-pay-dialog .m-pay-body > .m-section{margin:0;font-size:15px;line-height:22px}
    .hg-member-pay-dialog .m-pay-body > .m-section::before{top:3px;width:3px;height:16px}
    /* auto-fit填满实际套餐数量，badge回到正常流；价格span显式继承卡片价格字号。 */
    .hg-member-pay-dialog .m-vip-rights,.hg-member-pay-dialog .m-vip-plans{grid-template-columns:repeat(auto-fit,minmax(min(100%,120px),1fr));align-items:stretch;gap:12px;margin:0}
    .hg-member-pay-dialog .m-vip-rights .vr{min-width:0;padding:14px 12px;border-color:#2d2c35;text-align:left}
    .hg-member-pay-dialog .m-vip-rights .vrt{margin:0;line-height:1.6;overflow-wrap:anywhere}
    .hg-member-pay-dialog .m-vip-rights [data-hgm-benefit-title]{color:#e9e6e0;font-size:13px}
    .hg-member-pay-dialog .m-vip-rights [data-hgm-benefit-detail]{margin-top:6px;color:#b4b1bb}
    .hg-member-pay-dialog .m-vip-rights:has([data-hgm-benefits]:empty),.hg-member-pay-dialog .m-section:has(+ .m-vip-rights [data-hgm-benefits]:empty){display:none}
    /* 各卡片固定同一行槽，空角标或原价也不使名称和价格上下错位。 */
    .hg-member-pay-dialog .m-vip-plans .vp{display:grid;grid-template-rows:minmax(24px,auto) 1fr auto 18px minmax(18px,auto);grid-template-columns:minmax(0,1fr);align-items:center;justify-items:center;gap:8px;min-width:0;min-height:172px;padding:12px;border-color:#3d3946;border-radius:14px;background:#1b1b23}
    .hg-member-pay-dialog .m-vip-plans .vp.active{border-color:#f0c66c;background:linear-gradient(145deg,#3b301b,#1e1c21)}
    .hg-member-pay-dialog .m-vip-plans .vpt{grid-row:1;grid-column:1;position:static;transform:none;align-self:center;width:max-content;max-width:100%;padding:4px 10px;font-size:11px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
    .hg-member-pay-dialog .m-vip-plans .vpt:has([data-hgm-option-badge]:empty){display:none}
    .hg-member-pay-dialog .m-vip-plans .vpn{grid-row:2;grid-column:1;font-size:15px;font-weight:600;line-height:1.45;overflow-wrap:anywhere}
    .hg-member-pay-dialog .m-vip-plans .vpp{grid-row:3;grid-column:1;margin:0;color:#ffcf68;font-size:26px;font-weight:800;line-height:1.2;white-space:nowrap}
    .hg-member-pay-dialog .m-vip-plans .vpp [data-hgm-option-price]{color:inherit;font-size:inherit;font-weight:inherit}
    .hg-member-pay-dialog .m-vip-plans .vpo{grid-row:4;grid-column:1;margin:0;color:#918b99;font-size:12px;line-height:1.4}
    .hg-member-pay-dialog .m-vip-plans .vpd{grid-row:5;grid-column:1;margin:0;color:#b4a98f;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
    .hg-member-pay-dialog .m-chips{gap:8px;margin:0}
    .hg-member-pay-dialog .m-chips .pill{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px;border-color:#38323f;background:#211e29;color:#c7bfce;font-size:13px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
    .hg-member-pay-dialog .m-chips .pill.active{border-color:#dbb65f;background:#3a2e18;color:#ffe19b}
    .hg-member-pay-dialog .m-pay-body > .m-pay-note{margin:0;padding:12px 14px;border-color:#463a25;background:#241f17;color:#bda984;font-size:12px;line-height:1.7;overflow-wrap:anywhere}
    .hg-member-pay-dialog [data-hgm-pay-status]:empty{display:none}
    .hg-member-pay-dialog .m-pay-body [data-hgm-pay-reload]{align-self:flex-start;width:auto;min-width:0;min-height:44px;height:auto;padding:10px 16px;border:1px solid #45404b;border-radius:12px;background:#24222b;color:#e2d9ca;font:inherit;font-size:13px;line-height:1.4}
    .hg-member-pay-dialog .m-pay-cta{min-height:50px;height:auto;margin:0;padding:14px 16px;border-radius:14px;background:linear-gradient(110deg,#ffe39a,#efbd56);box-shadow:0 6px 20px #0004;line-height:1.4}
}
