/* BitTide H5 — 深空霓虹主题（对齐原生 App 视觉） */

:root {
    --bg: #040712;
    --card: #0A1022;
    --inset: #131C36;
    --cyan: #22D3EE;
    --blue: #3B82F6;
    --violet: #8B5CF6;
    --mint: #2ED4A7;
    --down: #F6465D;
    --warn: #F0B90B;
    --text: #FFFFFF;
    --text2: #8B94A7;
    --text3: #4A5265;
    --hairline: rgba(255, 255, 255, 0.08);
    --content-max: 480px;
    /* 安全区：套壳内由原生（WebShellView）注入真值；浏览器预览回退 env()，桌面再回退 0 */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --tabbar-h: calc(52px + var(--safe-bottom));
    --radius: 16px;
    --gradient: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet));
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, "PingFang SC", "Helvetica Neue", sans-serif;
    font-size: 15px;
    overflow: hidden;
}

/* ---------- 极光背景 ---------- */

.aurora { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .25; }
.blob-violet { width: 60vw; height: 60vw; background: var(--violet); top: -10%; left: -10%; animation: drift1 18s ease-in-out infinite alternate; }
.blob-blue { width: 55vw; height: 55vw; background: var(--blue); top: 15%; right: -15%; animation: drift2 22s ease-in-out infinite alternate; }
.blob-cyan { width: 65vw; height: 65vw; background: var(--cyan); bottom: -20%; left: 10%; opacity: .12; animation: drift3 26s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(9vw, 6vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-8vw, 9vh) scale(1.1); } }
@keyframes drift3 { to { transform: translate(6vw, -8vh) scale(1.2); } }

/* ---------- 页面栈 ---------- */

#pages { position: fixed; inset: 0 0 var(--tabbar-h) 0; z-index: 1; }

.page {
    position: absolute; inset: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: calc(10px + var(--safe-top)) 16px 24px;
    animation: page-in .22s ease;
}
.page.pushed { animation: push-in .25s ease; z-index: 2; background: var(--bg); }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes push-in { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }

.page-inner { max-width: var(--content-max); margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

.page-header { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.page-header h1 { font-size: 30px; font-weight: 800; flex: 1; }
.page-header .sub { font-size: 13px; color: var(--text2); margin-top: 2px; }
.back-btn {
    border: none; background: var(--inset); color: var(--text);
    width: 34px; height: 34px; border-radius: 10px; font-size: 17px; flex: none;
}

/* ---------- 通用组件 ---------- */

.card {
    background: rgba(10, 16, 34, 0.90);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 14px;
}
.section-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.section-title::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--gradient); }
.section-title .trailing { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--text2); }

.chip {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600; color: #fff;
    padding: 3px 9px; border-radius: 999px;
    background: var(--gradient);
}
.chip.plain { background: var(--inset); color: var(--text2); }

.btn {
    display: block; width: 100%; border: none; cursor: pointer;
    padding: 14px; border-radius: 14px; font-size: 15px; font-weight: 600; color: #fff;
    background: var(--gradient);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.35);
}
.btn:disabled { opacity: .7; }
.btn.secondary {
    background: var(--inset); color: var(--cyan);
    border: 1px solid rgba(34, 211, 238, 0.4); box-shadow: none;
}
.btn.danger { background: rgba(246, 70, 93, 0.15); color: var(--down); box-shadow: none; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--text2); }
.field input {
    background: var(--inset); border: 1px solid var(--hairline); border-radius: 12px;
    padding: 13px 14px; font-size: 15px; color: var(--text); outline: none; width: 100%;
}
.field input:focus { border-color: rgba(34, 211, 238, 0.5); }

.error-banner {
    display: flex; gap: 8px; align-items: flex-start;
    background: rgba(246, 70, 93, 0.12); color: var(--down);
    border-radius: 12px; padding: 11px 13px; font-size: 13px; margin-bottom: 14px;
}
.success-banner {
    display: flex; gap: 8px; align-items: flex-start;
    background: rgba(46, 212, 167, 0.12); color: var(--mint);
    border-radius: 12px; padding: 11px 13px; font-size: 13px; margin-bottom: 14px;
}

.empty { text-align: center; color: var(--text2); padding: 44px 16px; font-size: 13px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty .icon { font-size: 34px; }

.row-between { display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--text2); font-size: 12px; }
.up { color: var(--mint); }
.down-text { color: var(--down); }
.num { font-variant-numeric: tabular-nums; }

.glow { text-shadow: 0 0 18px currentColor; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Tab 栏 ---------- */

#tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    height: var(--tabbar-h);
    display: flex;
    background: rgba(6, 9, 20, 0.92); backdrop-filter: blur(16px);
    border-top: 1px solid var(--hairline);
}
.tab-item {
    flex: 1; border: none; background: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--text3); font-size: 10px;
}
.tab-item .tab-icon { font-size: 20px; filter: grayscale(1) opacity(.6); }
.tab-item.active { color: var(--cyan); }
.tab-item.active .tab-icon { filter: none; }

/* ---------- 行情 ---------- */

.search-box {
    display: flex; align-items: center; gap: 8px;
    background: rgba(10, 16, 34, 0.9); border: 1px solid var(--hairline);
    border-radius: 12px; padding: 11px 14px;
}
.search-box input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 14px; }

.refresh-btn {
    flex: none; border: none; background: var(--inset); color: var(--cyan);
    width: 36px; height: 36px; border-radius: 12px; font-size: 17px; cursor: pointer;
}
.refresh-btn.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.chip.warn { background: rgba(240, 185, 11, .15); color: var(--warn); }

/* 市场概览 */
.overview-card { display: flex; flex-direction: column; gap: 12px; }
.overview-card .gainloss { display: flex; flex-direction: column; gap: 6px; }
.overview-card .gainloss .bar { height: 6px; border-radius: 3px; background: rgba(246, 70, 93, .5); overflow: hidden; }
.overview-card .gainloss .bar > i { display: block; height: 100%; border-radius: 3px; background: rgba(46, 212, 167, .85); }
.overview-card .dominance { display: flex; gap: 18px; font-size: 11px; }
.overview-card .dominance b { color: var(--text); }

/* 排序榜 */
.sort-bar { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.sort-bar::-webkit-scrollbar { display: none; }
.sort-chip {
    flex: none; border: 1px solid var(--hairline); background: rgba(10,16,34,.9); color: var(--text2);
    border-radius: 999px; padding: 7px 13px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.sort-chip.active { background: var(--gradient); color: #fff; border-color: transparent; }

/* 横向滑动分页 */
.pager {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    gap: 12px; margin: 0 -16px; padding: 0 16px;
}
.pager::-webkit-scrollbar { display: none; }
.pager-page {
    flex: 0 0 100%; max-width: 100%; scroll-snap-align: start;
    display: flex; flex-direction: column; gap: 10px;
}
.pager-loading { text-align: center; color: var(--text2); font-size: 13px; padding: 40px 0; }

.dots { display: flex; gap: 6px; justify-content: center; align-items: center; }
.dots .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--inset); transition: all .2s ease; cursor: pointer; }
.dots .dot.active { width: 18px; background: var(--cyan); }

.ticker-row {
    display: flex; align-items: center; gap: 10px;
    background: rgba(10,16,34,.9); border: 1px solid var(--hairline);
    border-radius: var(--radius); padding: 12px; cursor: pointer;
}
.ticker-row .rank { font-size: 11px; color: var(--text3); width: 18px; text-align: right; flex: none; }
.coin-icon {
    position: relative; width: 38px; height: 38px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 16px; color: #fff; overflow: hidden;
}
.coin-icon img { position: absolute; inset: 0; margin: auto; width: 100%; height: 100%; object-fit: contain; }
.ticker-row .price { text-align: right; white-space: nowrap; flex: none; }
.ticker-row > svg { flex: none; }
.ticker-row .chg { display: inline-block; margin-top: 3px; font-size: 11px; padding: 2px 7px; border-radius: 999px; }

.list-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--text2); padding: 0 4px; }

.trend-svg { display: block; }

.seg { display: flex; background: var(--inset); border-radius: 10px; padding: 3px; }
.seg button { flex: 1; border: none; background: none; color: var(--text2); padding: 7px; font-size: 13px; border-radius: 8px; cursor: pointer; }
.seg button.active { background: var(--gradient); color: #fff; font-weight: 600; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats-grid .cell { background: rgba(10,16,34,.9); border: 1px solid var(--hairline); border-radius: 14px; padding: 12px; }
.stats-grid .t { font-size: 11px; color: var(--text2); }
.stats-grid .v { font-size: 14px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ---------- 挖矿 ---------- */

.sync-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 38px 0; color: var(--text2); font-size: 13px; }
.spinner {
    width: 26px; height: 26px; border-radius: 50%;
    border: 3px solid rgba(34, 211, 238, .18); border-top-color: var(--cyan);
    animation: spin 1s linear infinite;
}

.hashrate-card {
    background:
        radial-gradient(120% 90% at 85% 0%, rgba(34, 211, 238, .12), transparent 55%),
        rgba(10, 16, 34, 0.90);
}
.hashrate-value { font-size: 36px; font-weight: 800; color: var(--cyan); line-height: 1.2; margin: 4px 0 8px; }

.progress { height: 6px; background: var(--inset); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.progress > div { height: 100%; background: var(--gradient); border-radius: 3px; }

.fee-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.fee-chip { background: var(--inset); border: 1px solid var(--hairline); border-radius: 12px; padding: 10px 4px; text-align: center; }
.fee-chip .t { font-size: 10px; color: var(--text2); }
.fee-chip .v { font-size: 13px; font-weight: 700; color: var(--cyan); margin-top: 3px; font-variant-numeric: tabular-nums; }
.fee-chip .fee-unit { font-size: 9px; font-weight: 400; color: var(--text2); }

.pool-line { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.pool-rank {
    width: 22px; height: 22px; border-radius: 7px; flex: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; background: var(--inset); color: var(--text2);
}
.pool-rank.rank-1 { background: rgba(242, 204, 46, .16); color: #F2CC2E; border: 1px solid rgba(242, 204, 46, .4); }
.pool-rank.rank-2 { background: rgba(192, 199, 209, .12); color: #C0C7D1; border: 1px solid rgba(192, 199, 209, .32); }
.pool-rank.rank-3 { background: rgba(224, 138, 76, .14); color: #E08A4C; border: 1px solid rgba(224, 138, 76, .38); }
.pool-name { display: block; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-blocks { flex: none; font-size: 11px; }
.pool-bar { height: 6px; background: var(--inset); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.pool-bar > div { height: 100%; background: var(--gradient); border-radius: 3px; }

.binding-row, .holding-row { display: flex; align-items: center; gap: 10px; background: rgba(19,28,54,.7); border-radius: 12px; padding: 10px; margin-top: 8px; }
.binding-row .del, .holding-row .del { border: none; background: none; font-size: 16px; cursor: pointer; }

/* ---------- 持仓 ---------- */

.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut { width: 132px; height: 132px; flex: none; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.legend { flex: 1; display: flex; flex-direction: column; gap: 7px; font-size: 12px; }
.legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 7px; }

.coin-picker { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; -webkit-overflow-scrolling: touch; }
.coin-picker .coin-chip {
    flex: none; display: flex; align-items: center; gap: 5px;
    border: 1px solid var(--hairline); background: var(--inset); color: var(--text2);
    border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.coin-picker .coin-chip.active { background: var(--gradient); color: #fff; border-color: transparent; }

/* ---------- 资讯 ---------- */

/* 分类 Tab 栏（横滑 chip，选中渐变底白字） */
.news-tabs {
    display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none;
}
.news-tabs::-webkit-scrollbar { display: none; }
.news-tab {
    flex: none; display: inline-flex; align-items: center; gap: 5px;
    border: 1px solid var(--hairline); background: rgba(10,16,34,.9); color: var(--text2);
    border-radius: 999px; padding: 7px 14px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.news-tab .cnt { font-size: 10px; color: var(--text3); font-weight: 500; }
.news-tab.active {
    background: var(--gradient); color: #fff; border-color: transparent;
    box-shadow: 0 4px 14px rgba(59, 130, 246, .35);
}
.news-tab.active .cnt { color: rgba(255, 255, 255, .75); }

/* Hero 头条卡 */
.news-hero {
    position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
    border: 1px solid var(--hairline); min-height: 190px;
    display: flex; flex-direction: column; justify-content: flex-end;
}
.news-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-hero-mask {
    position: relative; padding: 44px 14px 14px; display: flex; flex-direction: column; gap: 8px;
    background: linear-gradient(180deg, transparent, rgba(4,7,18,.55) 45%, rgba(4,7,18,.93));
}
.news-hero-pill {
    align-self: flex-start; font-size: 11px; color: #fff;
    background: rgba(19,28,54,.72); border: 1px solid var(--hairline);
    padding: 3px 10px; border-radius: 999px; backdrop-filter: blur(6px);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.news-hero h2 { font-size: 18px; font-weight: 700; line-height: 1.35; }
/* 无图退化：渐变文字卡 */
.news-hero.no-img {
    min-height: 0; padding: 16px 14px; gap: 9px;
    background:
        linear-gradient(135deg, rgba(34,211,238,.14), rgba(59,130,246,.10) 50%, rgba(139,92,246,.14)),
        rgba(10,16,34,.9);
}
.news-hero.no-img .news-hero-pill { background: rgba(4,7,18,.5); }
.news-hero.no-img p {
    font-size: 13px; color: var(--text2); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 列表行：左缩略图 + 右文字 */
.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-row {
    background: rgba(10,16,34,.9); border: 1px solid var(--hairline);
    border-radius: var(--radius); padding: 12px; cursor: pointer;
    display: flex; flex-direction: row; align-items: center; gap: 12px;
}
.news-thumb {
    position: relative; width: 64px; height: 64px; border-radius: 12px;
    overflow: hidden; flex: none;
    display: flex; align-items: center; justify-content: center;
}
.news-thumb span { font-weight: 800; font-size: 22px; }
.news-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-row-main { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.news-row-main h3 {
    font-size: 14px; font-weight: 600; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-row-meta { display: flex; gap: 8px; align-items: center; font-size: 11px; min-width: 0; }
.news-row-meta .src { color: var(--cyan); font-weight: 600; flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-row-meta .muted { flex: none; }

/* 无限滚动哨兵 / 底部状态 */
.news-sentinel { height: 1px; }
.news-footer { text-align: center; color: var(--text3); font-size: 12px; padding: 4px 0 8px; }

/* 骨架屏 shimmer */
.news-skeleton { display: flex; flex-direction: column; gap: 10px; }
.sk-row {
    display: flex; gap: 12px; align-items: center;
    background: rgba(10,16,34,.9); border: 1px solid var(--hairline);
    border-radius: var(--radius); padding: 12px;
}
.sk-thumb { width: 64px; height: 64px; border-radius: 12px; flex: none; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.sk-line { height: 13px; border-radius: 6px; }
.sk-thumb, .sk-line {
    background: linear-gradient(90deg, rgba(19,28,54,.85) 25%, rgba(34,211,238,.14) 50%, rgba(19,28,54,.85) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* 资讯详情 */
.news-detail-img { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--hairline); }
.news-detail-img img { display: block; width: 100%; max-height: 240px; object-fit: cover; }
.news-detail-title { font-size: 19px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.news-detail-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; margin-bottom: 14px; }
.news-detail-meta .src { color: var(--cyan); font-weight: 600; }
.news-source-btn { text-decoration: none; text-align: center; }

.news-body { font-size: 15px; line-height: 1.8; color: rgba(255,255,255,.92); white-space: pre-wrap; }

/* ---------- 我的 ---------- */

.profile { display: flex; align-items: center; gap: 14px; }
.avatar {
    width: 56px; height: 56px; border-radius: 50%; flex: none;
    border: 2px solid; border-image: linear-gradient(90deg, var(--cyan), var(--violet)) 1;
    display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800;
    background: var(--inset);
}
.menu-list .menu-item {
    display: flex; align-items: center; gap: 12px; width: 100%;
    background: none; border: none; color: var(--text); cursor: pointer;
    padding: 14px 2px; font-size: 15px; text-align: left;
}
.menu-list .menu-item + .menu-item { border-top: 1px solid var(--hairline); }
.menu-list .arrow { margin-left: auto; color: var(--text3); }
.menu-list .m-icon { width: 26px; text-align: center; }

.footer-note { text-align: center; color: var(--text3); font-size: 11px; line-height: 1.7; }

/* ---------- 弹窗 / Toast ---------- */

#overlay-root:empty { display: none; }
.overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(2, 4, 10, 0.78); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px; animation: page-in .2s ease;
}
.sheet {
    width: 100%; max-width: 420px; max-height: 86%;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    background: var(--card); border: 1px solid var(--hairline);
    border-radius: 20px; padding: 22px;
    animation: sheet-in .25s ease;
}
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h2 { font-size: 19px; margin-bottom: 14px; }
.sheet .close-x {
    float: right; border: none; background: none; color: var(--text2);
    font-size: 22px; cursor: pointer; margin: -6px -8px 0 0;
}
.sheet .switch-link { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text2); }
.sheet .switch-link a { color: var(--cyan); font-weight: 600; cursor: pointer; }

.brand { text-align: center; padding: 18px 0 20px; }
.brand .logo {
    width: 76px; height: 76px; margin: 0 auto 12px; border-radius: 50%;
    border: 3px solid transparent;
    background: linear-gradient(var(--card), var(--card)) padding-box, var(--gradient) border-box;
    display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.brand h1 { font-size: 30px; font-weight: 900; letter-spacing: .5px; }
.brand p { color: var(--text2); font-size: 13px; margin-top: 4px; }

.toast {
    position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 24px); transform: translateX(-50%) translateY(20px);
    background: rgba(19, 28, 54, 0.95); border: 1px solid var(--hairline);
    color: var(--text); font-size: 13px; padding: 11px 20px; border-radius: 999px;
    opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 200;
    max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.center-full { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 100%; min-height: 300px; }

/* ---------- 我的：个人中心 / 账号安全 ---------- */

.profile { cursor: pointer; }
.avatar {
    position: relative;
    border: 2px solid transparent;
    /* 真圆环：border-image 不支持圆角，改用 gradient padding-box/border-box 叠加 */
    border-image: none;
    background: linear-gradient(var(--inset), var(--inset)) padding-box,
                linear-gradient(90deg, var(--cyan), var(--violet)) border-box;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profile-name { font-size: 16px; font-weight: 700; }
.profile-meta { font-size: 11px; margin-top: 3px; }
.profile-chips { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.chip-btn { border: none; cursor: pointer; }
.chip.ok { background: rgba(46, 212, 167, .16); color: var(--mint); }
.chip.danger { background: rgba(246, 70, 93, .16); color: var(--down); }

.asset-value { font-size: 30px; font-weight: 800; margin: 10px 0; }
.asset-grid { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.asset-sub { font-size: 15px; font-weight: 600; }
.link-btn { border: none; background: none; color: var(--cyan); font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 0; flex: none; }

.sec-level { display: flex; flex-direction: column; gap: 7px; margin: 12px 0 4px; }

.menu-list .menu-item.static { cursor: default; }
.menu-list .menu-value { margin-left: auto; font-size: 12px; color: var(--text2); text-align: right; }
.menu-list .menu-value.warn { color: var(--warn); }
.menu-list .menu-value.multi { line-height: 1.5; }
.menu-list a.menu-item { text-decoration: none; }

/* 自绘开关（敏感操作二次验证 / 隐藏金额 / 消息通知） */
.switch {
    position: relative; flex: none; margin-left: auto; cursor: pointer;
    width: 46px; height: 26px; border-radius: 999px; padding: 0;
    background: var(--inset); border: 1px solid var(--hairline);
    transition: background .2s ease;
}
.switch > i {
    position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
    background: rgba(255, 255, 255, .8); transition: transform .2s ease;
}
.switch.on { background: var(--gradient); border-color: transparent; }
.switch.on > i { transform: translateX(20px); background: #fff; }
.switch:disabled { opacity: .5; }

.seg-mini { flex: none; margin-left: auto; }
.seg-mini button { padding: 5px 12px; font-size: 12px; }

.field textarea {
    background: var(--inset); border: 1px solid var(--hairline); border-radius: 12px;
    padding: 13px 14px; font-size: 15px; color: var(--text); outline: none; width: 100%;
    resize: none; font-family: inherit; line-height: 1.6;
}
.field textarea:focus { border-color: rgba(34, 211, 238, 0.5); }

/* 6 位数字安全密码输入（真实 input，字符间距居中，可正常输入/删除/粘贴） */
.pin-input { text-align: center; letter-spacing: .5em; text-indent: .5em; font-size: 20px; font-weight: 700; }
.pin-input::placeholder { letter-spacing: normal; text-indent: 0; font-size: 14px; font-weight: 400; }

.inline-warn {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    background: rgba(240, 185, 11, .12); color: var(--warn);
    border-radius: 10px; padding: 9px 11px; font-size: 12px; margin-top: 10px;
}
.danger-note {
    background: rgba(246, 70, 93, .1); border: 1px solid rgba(246, 70, 93, .28);
    border-radius: 12px; padding: 12px 13px; margin-bottom: 14px;
    font-size: 13px; font-weight: 600; color: var(--down);
}
.danger-note ul { margin: 8px 0 0 16px; font-weight: 400; font-size: 12px; line-height: 1.8; color: var(--text2); }

/* 安全日志 / 我的反馈 */
.log-list { display: flex; flex-direction: column; }
.log-row { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--hairline); }
.log-row:first-child { border-top: none; }
.log-icon {
    flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--inset);
    display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.log-title { font-size: 14px; font-weight: 600; }
.log-detail { margin-top: 3px; white-space: pre-line; }
.log-meta { margin-top: 3px; font-size: 11px; color: var(--text3); }
.feedback-row { padding: 11px 0; border-top: 1px solid var(--hairline); }
.feedback-row:first-child { border-top: none; }

/* 用户协议 / 隐私政策正文 */
.doc { font-size: 13px; line-height: 1.85; color: rgba(255, 255, 255, .88); }
.doc h3 { font-size: 14px; color: var(--cyan); margin: 14px 0 6px; }
.doc h3:first-child { margin-top: 0; }
.doc p { white-space: pre-line; }

@media (min-width: 768px) {
    .page-header h1 { font-size: 34px; }
}
