/* 关注公众号领新人礼：弹窗（设计稿「关注公众号 · 10元新人礼弹窗」「关注成功 · 新人礼到账弹窗」460×520）
   + 官网 / 开放平台顶栏的「领新人礼」胶囊与用户菜单横条。入口显隐只看 me.newcomer_gift_eligible，关注成功后由 JS 直接隐藏 */
.newcomer-gift{display:none;position:fixed;inset:0;z-index:1350}
.newcomer-gift.is-open,.newcomer-gift.show{display:block}
.newcomer-gift__overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(17,24,39,.5);backdrop-filter:blur(2px)}
/* 卡片：设计稿圆角 32、渐变描边 #FFD5EA→#FFF8DF→#FFE1A0、两层外阴影 */
.newcomer-gift .ng-card{position:relative;width:460px;max-width:calc(100vw - 32px);height:520px;max-height:calc(100vh - 48px);overflow:hidden;border-radius:32px;background:linear-gradient(180deg,#F82D7C 0%,#FF426D 100%);box-shadow:0 0 0 1px #FFEBCB,0 12px 28px -8px rgba(231,45,100,.1),-5px 3px 26px -5px rgba(255,220,167,.12);font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;text-align:center}
/* 红包封口：香槟金弧边压在奶油纸面下方露出金边。引导视图是两枚 660×410 椭圆（边 ~190 / 中 ~235），
   到账视图是设计稿的路径 M0 0h460v326q-230 80-460 0（边 326 / 中 366，金边下移 5），「10 元」整块落在奶油区，红底只托按钮 */
.newcomer-gift .ng-card::before{content:"";position:absolute;left:-100px;top:-163px;width:660px;height:410px;border-radius:50%;background:linear-gradient(180deg,#FFD5C4 0%,#FFF7E9 42%,#FFF5C9 80%,#F8CD92 100%);z-index:0}
.newcomer-gift .ng-card::after{content:"";position:absolute;left:-100px;top:-169px;width:660px;height:410px;border-radius:50%;background:linear-gradient(160deg,#FFFFFF 0%,#FFFEFC 45%,#FFF0F8 78%,#FFD8EB 100%);z-index:0}
.newcomer-gift .ng-card[data-view="granted"]::before{left:0;top:0;width:460px;height:520px;border-radius:0;clip-path:path("M0 5h460v326q-230 80-460 0z")}
.newcomer-gift .ng-card[data-view="granted"]::after{left:0;top:0;width:460px;height:520px;border-radius:0;clip-path:path("M0 0h460v326q-230 80-460 0z")}
/* 两道光感按设计稿：各自 50% 透明度，左下暖金（中心 0,72%）、右侧玫粉反射（中心 100%,68%） */
.newcomer-gift .ng-glow{position:absolute;inset:0;z-index:0;pointer-events:none;opacity:.5;background:radial-gradient(242px 250px at 0% 72%,rgba(255,224,157,.8) 0%,rgba(255,197,141,.41) 30%,rgba(255,217,190,.09) 65%,rgba(255,231,210,0) 100%),radial-gradient(133px 239px at 100% 68%,rgba(255,228,242,.7) 0%,rgba(255,182,229,.31) 35%,rgba(255,228,242,0) 100%)}
.newcomer-gift .ng-view{position:relative;z-index:1;height:100%;display:flex;flex-direction:column;align-items:center}
.newcomer-gift .ng-view[hidden]{display:none}
.newcomer-gift .ng-close{position:absolute;right:16px;top:16px;z-index:2;width:30px;height:30px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid #F3DED2;background:#FFF1E9;color:#A48B81;cursor:pointer}
.newcomer-gift .ng-close svg{width:16px;height:16px}
.newcomer-gift .ng-close:hover{background:#FFE6D8}
.newcomer-gift .ng-close:focus-visible,.newcomer-gift .ng-ok:focus-visible{outline:2px solid #FFC58D;outline-offset:2px}
.newcomer-gift .ng-head{display:flex;flex-direction:column;align-items:center;gap:8px;padding:28px 28px 16px}
.newcomer-gift .ng-tag{display:inline-flex;align-items:center;padding:5px 12px;border-radius:20px;border:1px solid #FFE2BA;background:#FFF0D9;color:#BD5834;font-size:12px;font-weight:600;letter-spacing:2px}
.newcomer-gift .ng-title{margin:0;font-size:28px;line-height:1.3;font-weight:700;color:#47363B}
.newcomer-gift .ng-hero{display:flex;align-items:baseline;justify-content:center;gap:4px;color:#EB1D66;font-size:32px;font-weight:700;line-height:1.1}
.newcomer-gift .ng-hero b{font-family:Inter,"D-DIN",DIN,Arial,sans-serif;font-size:52px;font-weight:800;letter-spacing:-2px;text-shadow:0 2px 0 #FFFDF0}
.newcomer-gift .ng-scan{display:flex;flex-direction:column;align-items:center;gap:14px;padding:8px 28px 28px}
.newcomer-gift .ng-qr{position:relative;width:244px;height:244px;display:flex;align-items:center;justify-content:center;border-radius:18px;background:#fff;border:6px solid transparent;background-clip:padding-box;box-shadow:0 0 0 6px #FFE9B8,0 10px 30px rgba(120,20,60,.25)}
.newcomer-gift .ng-qr img{width:214px;height:214px;display:block;object-fit:contain}
.newcomer-gift .ng-qr[data-state="expired"] img,.newcomer-gift .ng-qr[data-state="error"] img,.newcomer-gift .ng-qr[data-state="conflict"] img{opacity:.18;filter:grayscale(1) blur(1px)}
.newcomer-gift .ng-qr-loading{width:28px;height:28px;border-radius:50%;border:3px solid #FFD6E4;border-top-color:#EB1D66;animation:ng-spin .8s linear infinite}
@keyframes ng-spin{to{transform:rotate(360deg)}}
.newcomer-gift .ng-qr-refresh{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:2;padding:8px 14px;border:0;border-radius:999px;background:#EB1D66;color:#fff;font-size:13px;font-weight:600;cursor:pointer;box-shadow:0 4px 12px rgba(235,29,102,.35)}
.newcomer-gift .ng-qr-refresh[hidden]{display:none}
.newcomer-gift .ng-hint{margin:0;color:#fff;font-size:14px;font-weight:600;line-height:1.5}
.newcomer-gift .ng-head--granted{gap:10px;padding:40px 32px 0}
.newcomer-gift .ng-check{width:44px;height:44px;color:#EB1D66}
/* 到账视图纵向按设计稿绝对位：标题块到 130，金额行框 176..264，「新人礼到账」272，说明 311，按钮 416 */
.newcomer-gift .ng-amount{display:flex;align-items:flex-end;justify-content:center;gap:6px;margin-top:46px;color:#EB1D66;line-height:1}
.newcomer-gift .ng-amount b{font-family:Inter,"D-DIN",DIN,Arial,sans-serif;font-size:80px;font-weight:700;letter-spacing:-3px;line-height:1.1}
.newcomer-gift .ng-amount span{padding-bottom:12px;font-size:32px;font-weight:800}
.newcomer-gift .ng-amount-label{margin-top:8px;color:#EB1D66;font-size:22px;font-weight:600;line-height:1.3}
.newcomer-gift .ng-note{margin:10px 0 0;color:#986342;font-size:12px;line-height:1.5}
.newcomer-gift .ng-ok{position:absolute;left:40px;right:40px;bottom:40px;height:64px;border:0;border-radius:32px;background:linear-gradient(180deg,#FFFFF3 0%,#FFF0CE 40%,#FFE1AD 100%);color:#A82A55;font-size:22px;font-weight:700;cursor:pointer;box-shadow:0 0 0 1.5px #FFE9C4,0 5px 12px -3px rgba(200,21,80,.14)}
.newcomer-gift .ng-ok:hover{filter:brightness(1.02)}

/* 顶栏头像 pill 在可领时变成「头像 + 领新人礼 + 下拉箭头」胶囊（设计稿「领新人礼胶囊」：32 高、圆角 7、底 #FFF7E8、边 #FFE4BA、字 #D25F00 13/600、头像 24）。
   胶囊仍是用户菜单的触发器，弹窗从菜单里的横条打开；关注成功后 JS 摘掉 is-gift 即恢复普通 pill */
.header-user__gift,.user-pill .user-gift{display:none}
.header-user__pill.is-gift,.user-pill.is-gift{height:32px;padding:3px 10px 3px 4px;gap:6px;border-radius:7px;border:1px solid #FFE4BA;background:#FFF7E8;color:#D25F00}
.header-user__pill.is-gift .header-user__name,.user-pill.is-gift .user-meta{display:none}
.header-user__pill.is-gift .header-user__gift,.user-pill.is-gift .user-gift{display:inline;font-size:13px;font-weight:600;line-height:1.57;color:#D25F00;white-space:nowrap}
.header-user__pill.is-gift>i,.user-pill.is-gift .user-caret{color:#D25F00}
.header-user__pill.is-gift .header-user__avatar,.user-pill.is-gift .user-avatar{width:24px;height:24px;font-size:11px}/* 用户菜单横条（官网 .header-user__menu 与开放平台 .user-menu 共用）：36 高、圆角 8、底 #FFF7E8、字 #D25F00 12/500 */
.ng-menu-bar,.header-user__menu button.ng-menu-bar[role="menuitem"]{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;height:36px;margin:0 0 4px;padding:0 10px;border:0;border-radius:8px;background:#FFF7E8;color:#D25F00;font-family:inherit;font-size:12px;line-height:1;font-weight:500;cursor:pointer;text-align:left}
.ng-menu-bar:hover,.header-user__menu button.ng-menu-bar[role="menuitem"]:hover{background:#FFF0D6;color:#D25F00}
.ng-menu-bar svg,.ng-menu-bar .ficon{width:16px;height:16px;flex-shrink:0;stroke-width:2}
/* 开放平台：横条与账号卡、余额卡各留 8px，左右各缩 2px 与余额卡对齐 */
.user-menu .ng-menu-bar{margin:8px 2px 8px;width:calc(100% - 4px)}
.ng-menu-bar[hidden]{display:none!important}
