/* 钱包：我的钱包（更多页）+ 角色钱包（查手机）。全部以 .wl- 开头，不影响其它页面 */
.wl-screen { background: radial-gradient(120% 60% at 50% 0%, #ebe9e6 0%, #f4f3f1 55%, #f6f5f3 100%); }
.wl-main { padding: 10px 0 40px; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.wl-head-btn { font-size: 22px; line-height: 1; }

/* 横向叠放的卡堆：当前卡居中，左右两边各露出上一张 / 下一张 */
.wl-deck-wrap { padding: 20px 0 4px; }
.wl-deck { position: relative; width: min(300px, calc(100% - 104px)); margin: 0 auto; aspect-ratio: 1.6; }
.wl-card { position: absolute; inset: 0; box-sizing: border-box; border-radius: 22px; padding: 20px 20px 18px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: grab;
    background: linear-gradient(140deg, var(--g0), var(--g1));
    box-shadow: 0 18px 34px -14px rgba(40, 36, 50, .5), 0 3px 8px rgba(40, 36, 50, .1), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 0 0 1px rgba(255, 255, 255, .1);
    transition: transform .45s cubic-bezier(.22, .8, .3, 1), opacity .3s, filter .3s; will-change: transform; text-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.wl-card.drag { transition: none; cursor: grabbing; }
.wl-card:not(.top) { cursor: pointer; }
.wl-card::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(90% 70% at 100% 0%, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, 0) 60%), repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 2px, rgba(255, 255, 255, 0) 2px 7px); }
.wl-card::after { content: ''; position: absolute; right: -18%; bottom: -42%; width: 78%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 0 0 22px rgba(255, 255, 255, .04), 0 0 0 44px rgba(255, 255, 255, .03); pointer-events: none; }
.wl-card.frozen { filter: grayscale(.85); }
.wl-card-top, .wl-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; position: relative; z-index: 1; }
.wl-card-name { font-size: 14px; font-weight: 500; letter-spacing: 1px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .95; }
.wl-card-tag { font-size: 10px; letter-spacing: 1px; border: 1px solid rgba(255, 255, 255, .45); padding: 2px 9px; border-radius: 20px; flex: none; text-shadow: none; opacity: .92; }
.wl-card-mid { position: relative; z-index: 1; }
.wl-card-label { font-size: 11px; opacity: .8; letter-spacing: 1.5px; }
.wl-card-big { font-size: 30px; font-weight: 600; letter-spacing: .5px; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.wl-card-foot { font-size: 11.5px; }
.wl-card-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wl-card-l b { font-weight: 500; letter-spacing: 2px; opacity: .9; font-variant-numeric: tabular-nums; }
.wl-emv { width: 25px; height: 18px; border-radius: 4px; flex: none; background: linear-gradient(135deg, #f1e3bd, #c4a566); box-shadow: inset 0 0 0 1px rgba(110, 82, 28, .3); position: relative; }
.wl-emv::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(110, 82, 28, .35); }
.wl-emv::after { content: ''; position: absolute; top: 0; bottom: 0; left: 40%; width: 1px; background: rgba(110, 82, 28, .35); }
.wl-card-foot-r { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; opacity: .9; letter-spacing: .3px; }
.wl-dots { display: flex; justify-content: center; gap: 6px; padding: 18px 0 2px; min-height: 8px; }
.wl-dots i { width: 5px; height: 5px; border-radius: 3px; background: #cfcdc9; transition: all .25s; cursor: pointer; }
.wl-dots i.on { width: 16px; background: #3b3f46; }
.wl-hint { text-align: center; font-size: 11px; color: #aaa7a2; letter-spacing: 1px; min-height: 14px; margin: 5px 0 6px; }

/* 下方面板 */
.wl-below { padding: 0 18px; }
.wl-stat { display: flex; align-items: center; background: #fff; border-radius: 20px; padding: 14px 6px; box-shadow: 0 1px 2px rgba(40, 36, 30, .04), 0 8px 24px -12px rgba(40, 36, 30, .12); }
.wl-stat > div { flex: 1; text-align: center; }
.wl-stat > i { width: 1px; height: 30px; background: #ecebe8; flex: none; }
.wl-stat span { display: block; font-size: 11.5px; color: #a09d97; letter-spacing: 1px; }
.wl-stat b { display: block; margin-top: 5px; font-size: 18px; font-weight: 600; color: #2d3036; font-variant-numeric: tabular-nums; }
.wl-limit { background: #fff; border-radius: 20px; padding: 16px; box-shadow: 0 1px 2px rgba(40, 36, 30, .04), 0 8px 24px -12px rgba(40, 36, 30, .12); }
.wl-limit-row { display: flex; justify-content: space-between; font-size: 13px; color: #3c4046; margin-bottom: 10px; }
.wl-bar { height: 6px; background: #efeeeb; border-radius: 3px; overflow: hidden; }
.wl-bar i { display: block; height: 100%; background: linear-gradient(90deg, #d9a9b3, #b9798a); border-radius: 3px; transition: width .4s; }
.wl-limit-sub { font-size: 11px; color: #aaa7a2; margin-top: 10px; line-height: 1.6; }
.wl-note { font-size: 12.5px; color: #98958f; text-align: center; margin: 0 0 14px; font-style: italic; letter-spacing: .5px; }
.wl-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 18px 0 4px; }
.wl-acts button { border: 0; background: none; padding: 0; width: 62px; display: flex; flex-direction: column; align-items: center; gap: 7px; color: #6b6e74; font-size: 11px; cursor: pointer; letter-spacing: .5px; }
.wl-acts button i { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; color: #3b3f46; box-shadow: 0 1px 2px rgba(40, 36, 30, .05), 0 6px 14px -6px rgba(40, 36, 30, .18); transition: transform .15s; }
.wl-acts button:active i { transform: scale(.92); }
.wl-acts button.on { color: #3b3f46; }
.wl-acts button.on i { background: #3b3f46; color: #fff; }
.wl-acts button.danger, .wl-acts button.danger i { color: #c0645f; }

/* 记录 */
.wl-rec-wrap { margin-top: 18px; background: #fff; border-radius: 22px; padding: 8px 16px 12px; box-shadow: 0 1px 2px rgba(40, 36, 30, .04), 0 8px 24px -12px rgba(40, 36, 30, .12); }
.wl-rec-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 0; font-size: 15px; font-weight: 600; color: #2d3036; letter-spacing: .5px; }
.wl-link { border: 0; background: none; color: #98958f; font-size: 12px; padding: 2px 0; cursor: pointer; font-weight: 400; letter-spacing: .5px; }
.wl-day { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.5px; color: #a8a59f; padding: 16px 0 4px; letter-spacing: 1px; }
.wl-day em { font-style: normal; font-size: 11px; color: #bcb9b3; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.wl-rec { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.wl-rec + .wl-rec { border-top: 1px solid #f3f2ef; }
.wl-rec.fresh { background: linear-gradient(90deg, rgba(185, 121, 138, .12), transparent); border-radius: 10px; padding-left: 6px; }
.wl-rec-ic { width: 38px; height: 38px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.wl-rec-info { flex: 1; min-width: 0; }
.wl-rec-title { font-size: 14px; color: #2d3036; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-rec-sub { font-size: 11px; color: #aeaba5; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-rec-amt { font-size: 15px; font-weight: 600; color: #2d3036; flex: none; font-variant-numeric: tabular-nums; }
.wl-rec-amt.plus { color: #5c8f6d; }
.wl-empty { text-align: center; color: #bab7b1; font-size: 13px; padding: 30px 0 26px; letter-spacing: 1px; }
.wl-empty-ic { margin-bottom: 8px; opacity: .6; display: flex; justify-content: center; }
.wl-empty-ic svg { width: 30px; height: 30px; }
.wl-foot { text-align: center; margin-top: 20px; }

/* 弹窗 */
.wl-overlay { position: fixed; inset: 0; z-index: 100002; background: rgba(15, 20, 30, .42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; }
.wl-sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 24px 24px 0 0; padding: 20px 18px calc(16px + env(safe-area-inset-bottom, 0px)); max-height: 86%; overflow-y: auto; box-sizing: border-box; }
.wl-sheet-title { font-size: 16px; font-weight: 600; color: #333; text-align: center; margin-bottom: 12px; }
.wl-sheet-btns { display: flex; gap: 10px; margin-top: 16px; }
.wl-btn { flex: 1; border: 0; border-radius: 12px; padding: 11px; font-size: 14px; cursor: pointer; }
.wl-btn.ghost { background: #eef1f3; color: #667; }
.wl-btn.primary { background: var(--primary-color, #ff8fa3); color: #fff; }
.wl-btn.dark { background: var(--text-color, #2a3032); color: #fff; }
.wl-btn { border-radius: 22px; padding: 12px; letter-spacing: 1px; }
.wl-btn:disabled { opacity: .45; cursor: not-allowed; }
.wl-pay-amount { text-align: center; font-size: 30px; font-weight: 700; color: #222; font-variant-numeric: tabular-nums; }
.wl-pay-sub { text-align: center; font-size: 12px; color: #999; margin: 2px 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-pay-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid #eee; margin-bottom: 8px; cursor: pointer; }
.wl-pay-row.on { border-color: #3b3f46; background: rgba(59, 63, 70, .04); }
.wl-pay-row.off { opacity: .5; cursor: not-allowed; }
.wl-chip { width: 36px; height: 24px; border-radius: 6px; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.wl-pay-info { flex: 1; min-width: 0; }
.wl-pay-name { font-size: 14px; color: #333; }
.wl-pay-name em { font-style: normal; font-size: 11px; color: #999; margin-left: 6px; }
.wl-pay-hint { font-size: 12px; color: #999; margin-top: 2px; }
.wl-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #d3d7db; flex: none; box-sizing: border-box; }
.wl-pay-row.on .wl-radio { border-color: #3b3f46; background: radial-gradient(circle, #3b3f46 45%, transparent 50%); }
.wl-choice { padding: 12px; border: 1px solid #eee; border-radius: 12px; margin-bottom: 8px; cursor: pointer; }
.wl-choice-t { font-size: 15px; color: #333; }
.wl-choice-d { font-size: 12px; color: #999; margin-top: 3px; line-height: 1.5; }
.wl-form { display: flex; flex-direction: column; gap: 12px; }
.wl-f label { display: block; font-size: 12px; color: #8a9496; margin-bottom: 4px; }
.wl-f input, .wl-f select { width: 100%; box-sizing: border-box; border: 1px solid #e3e6e8; border-radius: 10px; padding: 9px 11px; font-size: 14px; background: #fff; color: #333; }
.wl-f small { display: block; font-size: 11px; color: #b5bcbf; margin-top: 4px; }
.wl-f-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #444; }
.wl-f-check input { margin-top: 2px; }
.wl-f-check small { display: block; font-size: 11px; color: #b5bcbf; margin-top: 2px; line-height: 1.5; }
.wl-f-note { font-size: 12px; color: #999; line-height: 1.6; background: #f8f9fa; border-radius: 10px; padding: 9px 11px; }

.wl-overlay.center { align-items: center; }
.wl-dialog { width: 78%; max-width: 300px; background: #fbfbfc; border-radius: 26px; padding: 24px 20px 18px; text-align: center; box-shadow: 0 18px 50px rgba(0, 0, 0, .22); animation: wlPop .28s cubic-bezier(.2, .8, .2, 1); box-sizing: border-box; }
@keyframes wlPop { from { transform: scale(.94) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.wl-dialog-ic { width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--primary-color, #cee4f1) 45%, #fff); color: var(--text-color, #2a3032); }
.wl-dialog-t { font-size: 15px; font-weight: 600; color: var(--text-color, #2a3032); }
.wl-dialog-amt { font-size: 28px; font-weight: 600; margin: 10px 0 2px; color: #2d3036; font-variant-numeric: tabular-nums; }
.wl-dialog-amt small { display: block; font-size: 11px; font-weight: 400; color: #a8a59f; letter-spacing: 1px; margin-top: 2px; }
.wl-dialog-note { font-size: 12.5px; color: #6f737a; margin-top: 10px; line-height: 1.6; word-break: break-all; }
.wl-dialog-d { font-size: 11px; color: #aaa7a2; margin-top: 12px; line-height: 1.6; }
.wl-dialog .wl-sheet-btns { margin-top: 16px; }
html[data-ui="dark"] .wl-dialog { background: #2b2b2b; }
html[data-ui="dark"] .wl-dialog-amt, html[data-ui="dark"] .wl-dialog-t { color: #e0e0e0; }

/* 深色模式 */
html[data-ui="dark"] .wl-screen { background: #151617; }
html[data-ui="dark"] .wl-rec-wrap, html[data-ui="dark"] .wl-stat > div { box-shadow: none; }
html[data-ui="dark"] .wl-rec + .wl-rec { border-top-color: #353637; }
html[data-ui="dark"] .wl-rec-ic { filter: brightness(.55) saturate(.9); }

html[data-ui="dark"] .wl-dots i.on { background: var(--primary-color, #ff8fa3); }
html[data-ui="dark"] .wl-stat > div, html[data-ui="dark"] .wl-limit, html[data-ui="dark"] .wl-rec-wrap { background: #2b2b2b; box-shadow: none; }
html[data-ui="dark"] .wl-stat b, html[data-ui="dark"] .wl-rec-title, html[data-ui="dark"] .wl-rec-amt, html[data-ui="dark"] .wl-rec-head, html[data-ui="dark"] .wl-limit-row { color: #d8d8d8; }
html[data-ui="dark"] .wl-acts button { background: #2b2b2b; color: #c8c8c8; box-shadow: none; }
html[data-ui="dark"] .wl-rec-ic { background: #1f2021; }
html[data-ui="dark"] .wl-rec { border-bottom-color: #353637; }
html[data-ui="dark"] .wl-bar { background: #3a3b3d; }
html[data-ui="dark"] .wl-sheet { background: #2b2b2b; }
html[data-ui="dark"] .wl-sheet-title, html[data-ui="dark"] .wl-pay-amount, html[data-ui="dark"] .wl-pay-name, html[data-ui="dark"] .wl-choice-t { color: #e0e0e0; }
html[data-ui="dark"] .wl-pay-row, html[data-ui="dark"] .wl-choice { border-color: #3a3b3d; }
html[data-ui="dark"] .wl-btn.ghost { background: #1f2021; color: #aeaeb5; }
html[data-ui="dark"] .wl-f input, html[data-ui="dark"] .wl-f select { background: #1a1b1c; border-color: #3a3b3d; color: #d2d2d2; }
html[data-ui="dark"] .wl-f-note { background: #1f2021; }

html[data-ui="dark"] .wl-stat, html[data-ui="dark"] .wl-limit, html[data-ui="dark"] .wl-rec-wrap { background: #232425; box-shadow: none; }
html[data-ui="dark"] .wl-stat > i { background: #353637; }
html[data-ui="dark"] .wl-acts button i { background: #2b2b2b; color: #d0d0d0; box-shadow: none; }
html[data-ui="dark"] .wl-acts button.on i { background: #d0d0d0; color: #232425; }
html[data-ui="dark"] .wl-acts button { color: #9a9a9a; }
html[data-ui="dark"] .wl-dots i.on { background: #d0d0d0; }
html[data-ui="dark"] .wl-rec + .wl-rec { border-top-color: #353637; }
html[data-ui="dark"] .wl-rec-ic { filter: brightness(.6); }
/* 聊天里的亲属卡邀请：小横条，配色跟问卷卡一致（跟随主题色，低饱和） */
.wl-invite { width: 188px; border-radius: 14px; overflow: hidden; cursor: pointer; color: var(--text-color, #2a3032); text-shadow: none;
    background: linear-gradient(160deg, color-mix(in srgb, var(--primary-color, #cee4f1) 34%, #fff) 0%, #fff 64%);
    box-shadow: 0 3px 12px rgba(0, 0, 0, .07), 0 0 0 1px rgba(0, 0, 0, .04); transition: transform .15s; margin: 0 8px; flex: none; align-self: flex-start; }
.wl-invite:active { transform: scale(.98); }
.wl-invite.done .wl-invite-foot em { color: #8a9496; }
.wl-invite-main { display: flex; align-items: center; gap: 10px; padding: 11px 12px 9px; }
.wl-invite-ic { width: 34px; height: 34px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--primary-color, #cee4f1); color: var(--text-color, #2a3032); }
.wl-invite-tx { min-width: 0; }
.wl-invite-t { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.wl-invite-s { font-size: 11px; color: #8a9496; margin-top: 2px; font-variant-numeric: tabular-nums; }
.wl-invite-foot { display: flex; justify-content: space-between; align-items: center; padding: 5px 12px 6px; border-top: 1px solid rgba(0, 0, 0, .05); font-size: 10px; color: #a3abae; letter-spacing: .5px; }
.wl-invite-foot em { font-style: normal; }
html[data-ui="dark"] .wl-invite { color: #e4e6e7; background: linear-gradient(160deg, color-mix(in srgb, var(--primary-color, #cee4f1) 20%, #2c2f31) 0%, #2a2c2e 70%); box-shadow: 0 3px 12px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .06); }
html[data-ui="dark"] .wl-invite-ic { background: color-mix(in srgb, var(--primary-color, #cee4f1) 38%, #2c2f31); color: #eef1f2; }
html[data-ui="dark"] .wl-invite-s { color: #9ba3a6; }
html[data-ui="dark"] .wl-invite-foot { border-top-color: rgba(255, 255, 255, .08); color: #8b9295; }
html[data-ui="dark"] .wl-invite.done .wl-invite-foot em { color: #a4abae; }
html[data-ui="dark"] .wl-dialog-ic { background: color-mix(in srgb, var(--primary-color, #cee4f1) 30%, #2b2b2b); color: #f0f2f3; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
html[data-ui="dark"] .wl-btn.dark { background: #e4e6e7; color: #222; }
html[data-ui="dark"] .wl-dialog-note { color: #a9afb2; }
html[data-ui="dark"] .wl-dialog-d, html[data-ui="dark"] .wl-dialog-amt small { color: #8d9497; }
/* 我给角色开的亲属卡：聊天里的小卡片（发出 / 回应 / 刷卡） */
.wl-invite.wl-gv { cursor: default; }
.wl-invite.wl-gv:active { transform: none; }
.wl-invite.wl-gv.mine { align-self: flex-end; }
.wl-invite.wl-gv.fail .wl-invite-foot em { color: #b0707e; }
html[data-ui="dark"] .wl-invite.wl-gv.fail .wl-invite-foot em { color: #d38a98; }

