/* 资产页 · 现货账户，对照 iPhone 14 Pro 参考图（exports/account-detail-audit/spot-reference.png）逐块量出。
   数值都是参考图与截图同位置墨迹的差，量法见 scripts/capture-assets-overlay.mjs + overlay-pages.py。 */

/* 币种行（现货和总览「全部资产」共用）：图标 20px、图标到币名 8px，右列数量与估值上下对齐左列 */
.mobile-app.screen-assets .x-asset-main{gap:8px}
.mobile-app.screen-assets .x-asset-main>.x-coin-icon{width:20px;height:20px;margin-top:1px}
.mobile-app.screen-assets .x-asset-main>div{gap:2px}
.mobile-app.screen-assets .x-asset-main>div:nth-child(2)>b{display:flex;align-items:center;height:21px}
.mobile-app.screen-assets .x-asset-pnl{margin-left:28px}

/* 「持币生息」标签：图标 + 文字 + 箭头，灰底圆角 */
.mobile-app .x-earn-badge{display:inline-flex;align-items:center;height:17px;margin-left:4.5px;padding:0 6.8px 0 3.4px;border-radius:4px;background:var(--m-fill);font-size:10px;line-height:17px;font-weight:400;color:var(--m-text);vertical-align:middle}
.x-earn-badge .x-earn-icon{width:14px;height:14px;flex:0 0 14px;margin-right:.5px}
.x-earn-badge .x-earn-chevron{width:7px;height:10.2px;flex:0 0 7px;margin-left:3.6px}

/* 以下只作用于现货账户 */
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-assets-tabs{padding-top:8px;padding-bottom:7px}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-asset-spot-tabs{gap:14px}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-asset-spot-tabs>b{padding:4px 10px 4px 8px}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-asset-spot-tabs>button:last-child{margin-left:10px}

.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-balance-label>span{transform:translate(2px,-1.6px)}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-balance-label>.x-eye{transform:translate(1.3px,-2.5px)}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-balance-label>div{transform:translateY(-.8px) scale(.95)}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-balance-number>strong{transform:translateY(-.6px)}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-balance-number>button{transform:translate(-.7px,-1.3px);gap:1.5px}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-fiat{font-size:14px;margin-top:0;transform:translateY(-.5px)}

/* 今日盈亏：绿字 14px、箭头 14px 浅灰，整行上移 3px 后按钮区补回 2px */
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-today>b{font-size:14px!important;letter-spacing:0}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-today .m-icon{width:14px;height:14px;margin-left:1px;color:#9c9c9c}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-asset-actions{margin-top:13px}

/* 小额兑换卡片：左右各内缩 16px，图标 16px，文字 12px */
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-small-convert{margin-left:16px;margin-right:16px;width:calc(100% - 32px);padding:0 14px;gap:8px;font-size:12px}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-small-convert .m-icon{width:17.5px;height:17.5px;flex:0 0 17.5px;margin-right:-1.5px}

/* 「资产」标题行：标题色 #1e2329，搜索与设置图标间距 20px */
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-asset-list-tabs{align-items:flex-start;padding-top:7.5px}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-spot-assets-heading{color:#1e2329}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-asset-list-tabs>div{gap:20px;transform:translateY(1px)}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-asset-list-tabs .m-icon{color:#9c9c9c}

/* 现货币种行：首行下移 1px，成本价 / 未实现盈亏行距按参考图收紧 */
.mobile-app.screen-assets:has([data-asset-view="spot"]) article.x-spot-asset-row:first-of-type{padding-top:10px}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-spot-asset-row .x-asset-pnl{margin-top:6px}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-spot-asset-row .x-asset-pnl+.x-asset-pnl{margin-top:1.3px}
.mobile-app.screen-assets:has([data-asset-view="spot"]) .x-spot-asset-row+.x-spot-asset-row{padding-top:13.3px;padding-bottom:9.1px}

/* 资产页主按钮黄：资产与 sept26 各参考图都是 #fcd535（全局 --x-yellow 仍是 #ffda32，别的页未核对不动） */
.mobile-app.screen-assets .x-asset-actions>button.primary{background:#fcd535}

/* 合约资产页（sept29/assets-futures.jpg）：保证金比率 50%–80% 用黄，涨跌红取参考图 #f6465d */
.mobile-app .x-position-grid .warn{color:#d4a20b}
.mobile-app.screen-assets .x-position .down,.mobile-app.screen-assets .x-pnl .down{color:#f6465d}
.mobile-app.screen-assets:has(.x-asset-contract-tabs) .x-fiat{transform:translate(-.2px,-4.8px)}
.mobile-app.screen-assets:has(.x-asset-contract-tabs) .x-today>b{font-size:14px!important;letter-spacing:0}
.mobile-app.screen-assets:has(.x-asset-contract-tabs) .x-today .m-icon{width:14px;height:14px;margin-left:1px;color:#9c9c9c}
.mobile-app.screen-assets:has(.x-asset-contract-tabs) .x-wallet-stats span{font-size:12px;line-height:15px;margin-top:1.5px}
.mobile-app.screen-assets .x-position-title{transform:translateY(1.2px)}
.mobile-app.screen-assets .x-position-title em{font-size:10px;padding:0 4.4px;margin-left:0}
.mobile-app.screen-assets .x-position-title em+em{margin-left:.6px}
.mobile-app.screen-assets:has(.x-asset-contract-tabs) .x-wallet-stats span{transform:translateY(.7px)}
.mobile-app.screen-assets:has(.x-asset-contract-tabs) .x-wallet-stats>div+div span{transform:translateY(-.3px)}
/* 资产总览·账户（sept29/assets-overview.jpg）：今日盈亏字号 14、整行下移 3pt；分组标签下移 3pt；右上图标上移 */
.mobile-app.screen-assets .x-assets-summary[data-asset-view="overview"] .x-today{position:relative;top:3px}
.mobile-app.screen-assets .x-assets-summary[data-asset-view="overview"] .x-today>b{font-size:13.75px}
.mobile-app.screen-assets .x-asset-list-tabs>button{position:relative;top:3px}
.mobile-app.screen-assets .x-assets-summary[data-asset-view="overview"] .x-balance-label>div{position:relative;top:-2.7px}
.mobile-app.screen-assets .x-assets-summary[data-asset-view="overview"] .x-balance-label>span{position:relative;top:-1.3px}
.mobile-app.screen-assets [data-asset-view="overview"] .x-balance-number>button{gap:2px;transform:translateX(-1px)}
.mobile-app.screen-assets [data-asset-view="overview"] .x-balance-number>button svg{width:13px!important;height:13px!important;color:#1e2329}
/* 总览、合约两页顶部标签比参考图高 1pt（现货页已单独对齐） */
.mobile-app.screen-assets:has(.x-assets-summary:not([data-asset-view="spot"])) .x-assets-tabs>button{position:relative;top:1px}
/* 合约资产 · 收益卡（sept29/assets-futures.jpg）：利率 12px、名称 11.5px、箭头深灰 */
.mobile-app.screen-assets .x-earn b{font-size:12px;font-weight:500}
.mobile-app.screen-assets .x-earn>button>span,.mobile-app.screen-assets .x-earn>div>span{font-size:11.5px}
.mobile-app.screen-assets .x-earn>button>svg:last-child{color:#474d57}
/* 平仓弹窗（sept29/close-sheet-0g.jpg）：价格框底色 #ededed（原规则被 :not() 选择器压住）；价格/数量标签下移 2pt，标题下移 1pt */
#trade-dialog.p-close-sheet .p-close-price>input:not([type=range]):not([type=hidden]){background:#ededed}
#trade-dialog.p-close-sheet .p-close-label{position:relative;top:2px}
#trade-dialog.p-close-sheet .dialog-heading h2{position:relative;top:1px}
#trade-dialog.p-close-sheet .p-close-price select{text-indent:4.6px}
/* 交易记录页：顶部固定，只有记录滚动 */
.mobile-app.screen-history .x-history-top{position:sticky;top:0;z-index:3;background:var(--m-bg)}
/* 仓位历史顶部按 sept29/position-history.jpg 逐块量出的偏移（pt） */
.mobile-app.screen-history .x-history-header>button:first-child{position:relative;left:1px;top:-1px}
.mobile-app.screen-history .x-history-header>button:last-child{position:relative;left:-2.3px;top:-1px}
.mobile-app.screen-history .x-history-tabs{position:relative;left:-1.3px;top:-.3px}
.mobile-app.screen-history .x-history-filters>button:not(.x-filter-more){position:relative;left:-1px;top:.3px}
.mobile-app.screen-history .x-history-filters>.x-filter-more{position:relative;left:-1px}
.mobile-app.screen-history .x-history-header>div{translate:0 -.3px}.mobile-app.screen-history .x-history-header>div>button{translate:.7px 0}
.screen-history:not(.device-android) .x-history-card .x-position-title>span:not(.x-direction){position:relative;left:2px}
.screen-history:not(.device-android) .x-history-card .x-position-title>em{position:relative;top:1.3px}
.screen-history:not(.device-android) .x-history-card [data-mobile-action=history-share] .m-icon{width:19px;height:19px;margin-right:-1px}
