/* 产品页面样式。颜色、按钮、卡片沿用 design/components.html 已确认的组件。
   顺序：基础 → 顶栏/底栏 → 首页 → 详情 → 资产 → 探索 → 我的 → 登录与引导 → 弹层与提示。 */

/* ---------- 基础 ---------- */
body { min-height: 100vh; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.app { width: min(440px, 100%); min-height: 100vh; margin: 0 auto; padding: 14px 20px 40px; }
.app.with-tabs { padding-bottom: 116px; }
h1 { margin: 0; font-size: 32px; letter-spacing: -0.04em; }
h2 { margin: 0; letter-spacing: -0.03em; }
.icon { width: 22px; height: 22px; flex: 0 0 auto; }
.icon.tiny { width: 16px; height: 16px; }
.muted { color: var(--text-secondary); font-size: 14px; line-height: 1.45; }
.muted.center, .center { text-align: center; }
.muted.small { font-size: 12px; }
.muted a { color: var(--ocean); font-weight: 600; }
.up { color: var(--up); }
.down { color: var(--down); }
.eyebrow { display: block; color: var(--ocean); font-size: 12px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.pill { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; background: var(--bg-muted); color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.link { border: 0; background: none; padding: 0; color: var(--ocean); font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.section-title { margin: 28px 0 10px; font-size: 19px; letter-spacing: -0.02em; }
.section-title small { margin-left: 6px; color: var(--text-secondary); font-size: 13px; font-weight: 500; }
.section-sub { margin: -4px 0 12px; }
.footnote { margin: 18px 0 0; color: var(--text-secondary); font-size: 12px; text-align: center; }
.footnote a { color: var(--ocean); font-weight: 600; }
.pad { padding: 12px 16px; margin: 0; display: flex; gap: 6px; align-items: center; }
.mono { font-family: ui-monospace, SFMono-Regular, monospace; word-break: break-all; }
.card { box-shadow: 0 6px 24px rgba(20, 108, 255, .06); }
.btn { gap: 8px; text-decoration: none; }
.btn.wide { display: flex; width: 100%; }
.btn.soft { background: #e6efff; color: var(--ocean); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--text-secondary); box-shadow: none; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.round {
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text); cursor: pointer;
}
.round:active { background: var(--bg-muted); }
.round.small { width: 28px; height: 28px; }
.banner { display: flex; gap: 8px; align-items: center; margin: 10px 0; padding: 11px 14px; border-radius: 14px; font-size: 13px; line-height: 1.4; }
.banner.warn { background: #fff6df; color: #8a5a00; }
.banner.ok { background: #e3fbf3; color: #00845f; }
.flow-head + .banner { margin: -6px 0 16px; }
.skel { display: block; height: 14px; }
.skel-circle { background: var(--bg-muted); }

/* ---------- 顶栏 / 底栏 ---------- */
.topbar, .backbar, .page-head { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.topbar-actions { display: flex; gap: 2px; }
.page-head { margin-bottom: 12px; }
.page-head.end { justify-content: flex-end; }
.backbar { margin: 0 -8px; }
.backbar > div { display: flex; gap: 8px; }
.avatar {
  display: grid; place-items: center; width: var(--size); height: var(--size); border-radius: 50%;
  background: linear-gradient(135deg, var(--ocean), var(--teal)); color: #fff;
  font-weight: 750; font-size: calc(var(--size) * .36); letter-spacing: -.02em;
  box-shadow: 0 0 0 3px #fff, 0 6px 18px rgba(20, 108, 255, .22);
}
.avatar.guest { background: var(--bg-muted); color: var(--ocean); box-shadow: none; }
.avatar.guest .icon { width: 58%; height: 58%; }
.tabs {
  position: fixed; left: 50%; bottom: 0; z-index: 20; transform: translateX(-50%);
  display: flex; width: min(440px, 100%); padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94); border-top: 1px solid var(--line); backdrop-filter: blur(18px);
}
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: #9aa9bf; font-size: 11px; font-weight: 600; }
.tabs a .icon { width: 25px; height: 25px; }
.tabs a.on { color: var(--ocean); }

/* ---------- 首页 ---------- */
.account-hero {
  position: relative; overflow: hidden; margin-top: 6px; padding: 22px 22px 20px; border-radius: 26px; color: #fff;
  background: radial-gradient(circle at 88% 8%, rgba(184, 243, 74, .32), transparent 32%), linear-gradient(135deg, #061a3a 0%, #146cff 62%, #00cfa8 130%);
  box-shadow: 0 22px 50px rgba(20, 108, 255, .24);
}
.account-hero.restricted { background: linear-gradient(135deg, #061a3a, #2b3d63); }
.account-hero h2 { position: relative; z-index: 1; font-size: 27px; line-height: 1.08; margin: 6px 0 8px; }
.account-hero .label { margin: 0; color: #b8f34a; font-size: 12px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.account-hero .sub-line { position: relative; z-index: 1; margin: 0 0 18px; color: #d9faff; font-size: 14px; }
.hero-shark { position: absolute; right: -18px; bottom: -10px; width: 170px; opacity: .95; }
.hero-shark.small { width: 120px; }
.hero-btn {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 22px;
  border: 0; border-radius: 15px; background: #fff; color: var(--ocean); font-weight: 700; font-size: 15px; cursor: pointer;
}
.big-number { margin: 4px 0 4px; font-size: 46px; font-weight: 750; letter-spacing: -0.045em; line-height: 1; }
.big-number .cents { font-size: .55em; opacity: .62; letter-spacing: -0.02em; }
.big-number.dark { color: var(--text); }
.label.dark { margin: 0; color: var(--text-secondary); font-size: 13px; }
.sub-line.dark { margin: 4px 0 0; color: var(--text-secondary); font-size: 14px; }

.brief-card {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; padding: 14px 16px;
  border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(20, 108, 255, .06);
}
.brief-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: #e9fff9; color: var(--teal); flex: 0 0 auto; }
.brief-text { flex: 1; min-width: 0; }
.brief-text strong { display: block; margin-top: 2px; font-size: 15px; line-height: 1.3; }
.muted-icon { color: #9aa9bf; }

.list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 8px; }
.list-head .segments { overflow-x: auto; scrollbar-width: none; gap: 18px; }
.list-head .segments::-webkit-scrollbar { display: none; }
.segments button { white-space: nowrap; }
.segments button small { color: var(--text-secondary); font-size: 12px; }
.sort { position: relative; display: flex; align-items: center; flex: 0 0 auto; }
.sort select {
  appearance: none; height: 32px; padding: 0 28px 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--text); font: 600 13px var(--font); cursor: pointer;
}
.sort .icon { position: absolute; right: 9px; transform: rotate(90deg); pointer-events: none; color: var(--text-secondary); width: 13px; height: 13px; }
.list-card { padding: 4px 0; overflow: hidden; }
.market-row { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 0 16px; border-bottom: 1px solid #edf3fb; }
.market-row:last-child { border-bottom: 0; }
.market-row:active { background: #f4f8ff; }
.mark {
  display: grid; place-items: center; width: var(--size, 44px); height: var(--size, 44px); flex: 0 0 auto; border-radius: 50%;
  font-weight: 800; font-size: calc(var(--size, 44px) * .36); letter-spacing: -.03em; box-shadow: inset 0 0 0 1px rgba(6, 26, 58, .06);
}
.market-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.market-name strong { font-size: 17px; letter-spacing: -0.01em; }
.market-name small, .market-price small { margin-top: 2px; color: var(--text-secondary); font-size: 13px; }
.market-price { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.market-price strong { font-size: 16px; border-radius: 6px; padding: 0 3px; margin-right: -3px; }
.market-price small.up { color: var(--up); }
.market-price small.down { color: var(--down); }
.flash-up { animation: flash-up .6s ease-out; }
.flash-down { animation: flash-down .6s ease-out; }
@keyframes flash-up { from { background: rgba(0, 207, 168, .28); } }
@keyframes flash-down { from { background: rgba(255, 91, 95, .25); } }
.empty-state { padding: 28px 18px 26px; text-align: center; }
.empty-state img { width: 132px; height: 92px; object-fit: contain; }
.empty-state strong { display: block; margin-top: 8px; font-size: 17px; }
.empty-state p { margin: 6px 0 16px; color: var(--text-secondary); font-size: 14px; line-height: 1.45; }

/* ---------- 详情 ---------- */
.asset-head { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.asset-title { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.asset-title h1 { font-size: 30px; }
.asset-name { margin: 6px 0 12px; color: var(--text-secondary); }
.change-line { display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; font-weight: 650; font-size: 15px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(0, 207, 168, .18); animation: pulse 1.6s ease-in-out infinite; }
.live-dot.off { background: var(--warning); box-shadow: none; animation: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(0, 207, 168, 0); } }
.chart { position: relative; height: 240px; margin: 0 -4px; }
.chart-svg, .chart-labels { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart-svg .baseline { stroke: #b9c7da; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.chart-labels text { fill: var(--text-secondary); font: 600 11px var(--font); }
.chart-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -6px; border-radius: 50%; box-shadow: 0 0 0 4px #fff, 0 0 0 7px rgba(20, 108, 255, .12); }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--text-secondary); font-size: 14px; border-radius: 18px; background: var(--bg-muted); }
.periods { display: flex; justify-content: space-between; margin: 10px 0 4px; }
.periods button { display: inline-flex; align-items: center; gap: 5px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--text-secondary); font-weight: 650; font-size: 14px; cursor: pointer; }
.periods button.on { background: var(--navy); color: #fff; }
.periods .live-dot { width: 6px; height: 6px; box-shadow: none; }
.perp-note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 12px 12px 14px; border-radius: 16px; background: #eef5ff; color: #1b3d73; }
.perp-note p { flex: 1; margin: 0; font-size: 13px; line-height: 1.45; }
.perp-note .icon { margin-top: 2px; color: var(--ocean); }
.stats { padding: 4px 16px; }
.stat-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 50px; border-bottom: 1px solid #edf3fb; font-size: 15px; }
.stat-row:last-child { border-bottom: 0; }
.stat-row span { display: flex; align-items: center; gap: 4px; color: var(--text-secondary); }
.stat-row strong { display: flex; flex-direction: column; align-items: flex-end; font-weight: 650; text-align: right; }
.stat-row strong small { color: var(--text-secondary); font-size: 12px; font-weight: 500; }
.info { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; background: none; color: #9aa9bf; cursor: pointer; }
.bottom-space { height: 96px; }
.trade-bar {
  position: fixed; left: 50%; bottom: 0; z-index: 20; transform: translateX(-50%);
  width: min(440px, 100%); padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(247, 251, 255, 0), var(--bg) 26%);
}
.trade-bar .btn { height: 56px; }
.trade-blocked { display: flex; justify-content: center; align-items: center; gap: 8px; height: 56px; border-radius: 16px; background: #fff0f1; color: #9d2430; font-weight: 650; }
.starred { color: #f5b83d; }

/* ---------- 资产 ---------- */
.balance-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.balance-actions { display: flex; flex-direction: column; gap: 8px; width: 132px; }
.balance-actions .btn { height: 46px; padding: 0; }
.curve { position: relative; height: 70px; margin: 18px 0 2px; }
.curve svg { width: 100%; height: 100%; }
.curve.loading { opacity: .4; transition: opacity .2s; }
/* 曲线上方的小字：这段时间的盈亏。 */
.curve-note { margin: 16px 0 -8px; color: var(--text-secondary); font-size: 13px; }
.curve-note b { font-weight: 650; }
.position { margin-bottom: 10px; }
.position-head { display: flex; align-items: center; gap: 10px; }
.position-head strong { flex: 1; }
.position .liq { margin: 10px 0 6px; }

/* ---------- 探索 ---------- */
.search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 15px; background: #fff; border: 1px solid var(--line); color: var(--text-secondary); }
.search input { flex: 1; border: 0; outline: 0; background: none; font: 16px var(--font); color: var(--text); }
#results { margin-top: 12px; }
.brief-full { margin-top: 18px; padding: 18px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(20, 108, 255, .06); }
.brief-author { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.brief-author img { width: 40px; height: 40px; }
.brief-author strong, .brief-author small { display: block; }
.brief-author small { color: var(--text-secondary); font-size: 12px; }
.brief-full h2 { font-size: 20px; line-height: 1.25; margin-bottom: 8px; }
.brief-full p { margin: 6px 0; color: #34475f; line-height: 1.5; font-size: 15px; }
.tag-row { display: flex; gap: 8px; margin-top: 12px; }
.tag-row .pill { color: var(--ocean); background: #e6efff; }
.h-scroll { display: flex; gap: 10px; overflow-x: auto; margin: -10px -20px -14px; padding: 10px 20px 24px; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.collection { flex: 0 0 168px; display: flex; flex-direction: column; min-height: 132px; padding: 14px; border-radius: 22px; color: #fff; box-shadow: 0 8px 18px rgba(20, 108, 255, .16); }
.collection-marks { display: flex; margin-bottom: auto; }
.collection-marks .mark { margin-right: -8px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.collection strong { margin-top: 18px; font-size: 16px; }
.collection small { margin-top: 2px; opacity: .85; font-size: 12px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compact .market-row { min-height: 58px; padding: 0 10px; gap: 8px; }
.compact .mark { --size: 32px !important; width: 32px; height: 32px; font-size: 12px; }
.compact .market-name strong { font-size: 14px; }
.compact .market-name small { display: none; }
.compact .market-price strong { font-size: 13px; }
.compact .market-price small { font-size: 12px; }
.col-title { margin: 8px 12px 0; font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.lessons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lesson { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: #fff; text-align: left; cursor: pointer; }
.lesson-index { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 6px; border-radius: 9px; background: var(--navy); color: var(--lime); font-weight: 800; font-size: 13px; }
.lesson small { color: var(--text-secondary); font-size: 13px; }

/* ---------- 我的 ---------- */
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: -8px; }
.profile h1 { margin-top: 14px; font-size: 28px; }
.handle { margin: 4px 0 10px; color: var(--text-secondary); }
.profile-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.state-pill { padding: 6px 11px; border-radius: 999px; background: #e6efff; color: var(--ocean); font-size: 12px; font-weight: 700; }
.state-pill.ok { background: #e3fbf3; color: #00845f; }
.state-pill.warn { background: #fff4dc; color: #8a5a00; }
.wallet-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 650; cursor: pointer; }
.next-step { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 14px 16px; border-radius: 20px; background: #fff; border: 1.5px solid var(--ocean); }
.next-step.warn { border-color: #f5b83d; }
.next-step > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: #e6efff; color: var(--ocean); }
.next-step div { flex: 1; }
.next-step strong, .next-step small { display: block; }
.next-step small { margin-top: 2px; color: var(--text-secondary); font-size: 13px; }
.plan-card { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding: 16px 18px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.plan-card strong { display: block; margin-top: 2px; font-size: 20px; }
.plan-card small { color: var(--text-secondary); font-size: 13px; }
.upgrade { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 0; border-radius: 12px; background: #f1edff; color: #7657ff; font-weight: 700; cursor: pointer; }
.promo { position: relative; display: flex; align-items: center; gap: 14px; overflow: hidden; margin-top: 12px; padding: 16px 18px; border-radius: 22px; color: #fff; cursor: pointer; background: radial-gradient(circle at 85% 0, rgba(118, 87, 255, .5), transparent 45%), linear-gradient(135deg, #061a3a, #102a5c); }
.promo img { width: 74px; height: 50px; object-fit: contain; }
.promo div { flex: 1; }
.promo strong { display: block; font-size: 19px; }
.promo small { color: #b9c9e6; font-size: 13px; }
.invite { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 14px 18px; }
.invite small { color: var(--text-secondary); font-size: 12px; }
.invite strong { display: block; margin-top: 2px; font-size: 28px; letter-spacing: .04em; }
.settings { margin-top: 22px; padding: 4px 0; overflow: hidden; }
.setting { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 0 16px; border: 0; border-bottom: 1px solid #edf3fb; background: none; text-align: left; cursor: pointer; }
.setting:last-child { border-bottom: 0; }
.setting > .icon:first-child { color: var(--ocean); }
.setting span { flex: 1; font-size: 15px; }
.setting small { color: var(--text-secondary); font-size: 13px; }
.setting > .icon.tiny { color: #b2bfd2; }
.setting.danger, .setting.danger > .icon:first-child { color: var(--down); }

/* ---------- 登录与引导 ---------- */
.login { display: flex; flex-direction: column; min-height: calc(100vh - 60px); }
.login-hero {
  position: relative; overflow: hidden; margin: -14px -20px 0; padding: 26px 24px 120px; color: #fff; border-radius: 0 0 34px 34px;
  background: radial-gradient(circle at 85% 12%, rgba(184, 243, 74, .35), transparent 30%), linear-gradient(150deg, #061a3a 8%, #146cff 62%, #00cfa8 128%);
}
.login-hero { padding-bottom: 150px; }
.login-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 750; letter-spacing: -.03em; }
.login-brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .3); }
.login-shark { position: absolute; right: -24px; bottom: -18px; width: 220px; }
.login-hero h1 { position: relative; z-index: 1; margin-top: 46px; font-size: 38px; line-height: 1.04; letter-spacing: -0.05em; }
.login-hero p { position: relative; z-index: 1; margin: 12px 0 0; color: #d9faff; font-size: 17px; }
.login-chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.login-chips span { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); font-size: 12px; backdrop-filter: blur(8px); }
.login-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.btn.telegram { background: linear-gradient(135deg, #229ed9, #146cff); }
.fineprint { margin: 6px 4px 0; color: var(--text-secondary); font-size: 12px; line-height: 1.45; text-align: center; }
.center-link { justify-content: center; margin-top: 4px; }
.center-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 80vh; text-align: center; }
.center-screen h2 { font-size: 26px; }
.center-screen .btn { margin-top: 10px; }
.loader-fin { width: 150px; animation: swim 1.1s ease-in-out infinite; }
@keyframes swim { 50% { transform: translateX(22px) rotate(-2deg); } }
.state-shark { width: 180px; height: 130px; object-fit: contain; }
.flow-head { display: flex; align-items: center; gap: 12px; margin: 0 -8px 18px; }
.progress { flex: 1; height: 6px; border-radius: 6px; background: var(--bg-muted); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--ocean), var(--teal)); transition: width var(--ease); }
.flow h1 { margin: 8px 0 8px; font-size: 28px; line-height: 1.15; }
.flow > .muted { margin: 0 0 18px; }
.choices { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.choice-row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 18px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; font-size: 16px; font-weight: 600; text-align: left; cursor: pointer; }
.choice-row.on { border-color: var(--ocean); background: #f1f6ff; color: var(--ocean); }
.choice-row:active { background: #f1f6ff; }
.terms { padding: 6px 16px; margin-bottom: 14px; }
.terms p { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.terms .icon { margin-top: 2px; color: var(--ocean); }
.check-row { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 15px; }
.check-row input { width: 20px; height: 20px; accent-color: var(--ocean); }
.btn.sticky { margin-top: 18px; }
.connect { display: flex; flex-direction: column; }
.connect-icon { display: grid; place-items: center; width: 60px; height: 60px; margin: 8px 0 16px; border-radius: 20px; background: linear-gradient(135deg, var(--ocean), var(--teal)); color: #fff; }
.connect-icon .icon { width: 30px; height: 30px; }
.connect h1 { font-size: 28px; }
.connect > .muted { margin: 8px 0 0; }
.promise { margin: 18px 0; padding: 0; list-style: none; }
.promise li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; }
.promise .icon { color: var(--teal); }
.wallet-options { padding: 4px 0; overflow: hidden; }
.wallet-option { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 0 16px; border: 0; border-bottom: 1px solid #edf3fb; background: none; text-align: left; cursor: pointer; }
.wallet-option:last-child { border-bottom: 0; }
.wallet-option[disabled] { opacity: .45; cursor: default; }
.wallet-option > span:nth-child(2) { flex: 1; }
.wallet-option strong, .wallet-option small { display: block; }
.wallet-option small { margin-top: 2px; color: var(--text-secondary); font-size: 13px; }
.wallet-badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #fff; }
.wallet-badge.fox { background: linear-gradient(135deg, #ff9900, #ff5b5f); }
.wallet-badge.scan { background: linear-gradient(135deg, #146cff, #7657ff); }
.message-preview { margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: var(--bg-muted); }
.message-preview small { color: var(--text-secondary); font-size: 12px; }
.message-preview p { margin: 4px 0 0; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 13px; line-height: 1.5; }

/* ---------- 弹层与提示 ---------- */
.sheet-layer { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(6, 26, 58, 0); transition: background var(--ease); }
.sheet-layer.open { background: rgba(6, 26, 58, .32); }
.sheet-panel { width: min(440px, 100%); padding: 12px 22px calc(24px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #fff; transform: translateY(100%); transition: transform var(--ease); }
.sheet-layer.open .sheet-panel { transform: none; }
.sheet-panel .handle { width: 38px; height: 5px; margin: 0 auto 18px; border-radius: 5px; background: var(--line); }
.sheet-title { margin: 6px 0 10px; font-size: 24px; }
.sheet-text { margin: 0 0 12px; color: #34475f; font-size: 16px; line-height: 1.55; }
.sheet-panel .btn { margin-top: 12px; }
.toast-float {
  position: fixed; left: 50%; bottom: 104px; z-index: 60; transform: translateX(-50%); max-width: calc(100% - 40px);
  padding: 12px 16px; border-radius: 14px; background: var(--navy); color: #fff; font-size: 14px; text-align: center;
  box-shadow: 0 14px 30px rgba(6, 26, 58, .28); animation: toast-in .2s ease-out;
}
.toast-float.out { opacity: 0; transition: opacity .35s; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- 下单 ---------- */
.banner:not(.warn):not(.ok) { background: var(--bg-muted); color: #34475f; }
.trade-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 6px; }
.trade-head h1 { margin: 0 0 4px; font-size: 28px; }
.seg-toggle { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-muted); }
.seg-toggle button { flex: 1; height: 40px; border: 0; border-radius: 11px; background: none; color: var(--text-secondary); font-size: 15px; font-weight: 650; cursor: pointer; }
.seg-toggle button.on { background: #fff; color: var(--text); box-shadow: 0 2px 8px rgba(6, 26, 58, .08); }
.seg-toggle button[disabled] { opacity: .35; cursor: default; }
.seg-toggle.side { margin: 14px 0 6px; }
.seg-toggle.side button.on.long { background: var(--up); color: #fff; }
.seg-toggle.side button.on.short { background: var(--down); color: #fff; }
.order-type { margin: 6px 0 2px; }
.field { display: block; margin-top: 16px; }
.field > span { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.input-wrap { display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; }
.input-wrap:focus-within { border-color: var(--ocean); }
.input-wrap b { color: var(--text-secondary); font-weight: 600; }
.input-wrap input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 17px; font-weight: 650; }
.input-wrap em { color: var(--text-secondary); font-size: 13px; font-style: normal; font-weight: 600; }
.input-wrap.big { height: 64px; }
.input-wrap.big input { font-size: 28px; }
.quick { display: flex; gap: 8px; margin: 10px 0 6px; }
.quick button { flex: 1; height: 36px; border: 0; border-radius: 12px; background: var(--bg-muted); color: var(--ocean); font-weight: 650; cursor: pointer; }
.size-line { min-height: 20px; margin: 16px 0 8px; font-size: 14px; font-weight: 600; }
.mini-seg { display: inline-flex; gap: 4px; }
.mini-seg button { height: 28px; padding: 0 9px; border: 0; border-radius: 9px; background: var(--bg-muted); color: var(--text-secondary); font-size: 12px; font-weight: 650; cursor: pointer; }
.mini-seg button.on { background: var(--ocean); color: #fff; }
.form-error { min-height: 20px; margin: 10px 2px 0; color: var(--down); font-size: 14px; line-height: 1.4; }
.review-line { margin: 14px 0 16px; font-size: 18px; line-height: 1.5; }
.enable-note { display: flex; gap: 12px; margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: #f1f6ff; }
.enable-note .icon { flex: none; margin-top: 2px; color: var(--ocean); }
.enable-note strong, .enable-note small { display: block; }
.enable-note small { margin-top: 3px; color: #34475f; font-size: 13px; line-height: 1.45; }
.result .wide-card { width: 100%; margin-top: 8px; padding: 0 16px; text-align: left; }
.swim-in { animation: swim-in .8s ease-out; }
@keyframes swim-in { from { opacity: 0; transform: translateX(-60px); } }
.position-actions { display: flex; gap: 8px; margin-top: 12px; }
.position-actions .btn { flex: 1; height: 42px; font-size: 14px; }
.fills { padding: 0 16px; }
.stat-row.fill span { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 0; }
.stat-row.fill b { color: var(--text); font-size: 14px; }
.stat-row.fill small { font-size: 12px; }
.stat-row.fill em { font-style: normal; }
/* 资金流水：整行可点开区块浏览器；在路上 / 失败的金额用灰色。 */
a.stat-row { color: inherit; text-decoration: none; }
.stat-row.fill em.wait { color: var(--text-secondary); }
/* 价格提醒页：绑定 Telegram 的卡片、市场下拉、提醒行。 */
.link-card { display: grid; grid-template-columns: 56px 1fr; gap: 12px 14px; align-items: center; margin-top: 16px; padding: 16px; }
.link-card img { width: 56px; height: 56px; }
.link-card strong { display: block; font-size: 16px; }
.link-card small { display: block; margin-top: 2px; color: var(--text-secondary); font-size: 13px; line-height: 1.4; }
.link-card .btn { grid-column: 1 / -1; }
.select-wrap { gap: 10px; }
.select-wrap select { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 16px; font-weight: 650; appearance: none; -webkit-appearance: none; }
.select-wrap .icon { transform: rotate(90deg); color: var(--text-secondary); }
.alert-row { gap: 12px; justify-content: flex-start; }
.alert-row > span { flex: 1; }
.history-switch { margin: 12px 0; }
.history-switch button { font-size: 14px; }
#close-est { margin-top: 14px; }

/* ---------- 入金 / 提现 ---------- */
.page-intro { margin: 4px 0 16px; }
.page-intro h1 { margin: 0 0 6px; font-size: 28px; }
.page-intro .muted { margin: 0; }
.wallet-badge.arb { background: linear-gradient(135deg, #28a0f0, #146cff); font-weight: 750; }
.wallet-badge.tron { background: linear-gradient(135deg, #ff4b4b, #c4001f); font-weight: 750; }
.wallet-badge.ton { background: linear-gradient(135deg, #2ac3ff, #0088cc); font-weight: 750; }
.promise.compact { margin: 14px 0 0; }
.promise.compact li { align-items: flex-start; padding: 4px 0; color: var(--text-secondary); font-size: 13px; line-height: 1.45; }
.promise.compact .icon { flex: none; margin-top: 2px; color: var(--text-secondary); }
.stages { margin: 4px 0 14px; padding: 6px 16px; }
.stage { position: relative; display: flex; gap: 14px; padding: 12px 0; }
.stage:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 38px; bottom: -10px; width: 2px; background: var(--line); }
.stage.done:not(:last-child)::after { background: var(--teal); }
.stage-dot { display: grid; flex: none; place-items: center; width: 24px; height: 24px; border: 2px solid var(--line); border-radius: 50%; background: #fff; color: #fff; }
.stage.done .stage-dot { border-color: var(--teal); background: var(--teal); }
.stage.now .stage-dot { border-color: var(--ocean); animation: stage-pulse 1.4s ease-in-out infinite; }
.stage strong, .stage small { display: block; }
.stage small { margin-top: 2px; color: var(--text-secondary); font-size: 13px; }
.stage:not(.done):not(.now) strong { color: var(--text-secondary); }
@keyframes stage-pulse { 50% { box-shadow: 0 0 0 6px rgba(20, 108, 255, .14); } }
.deposit-address { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 6px; padding: 16px; }
.deposit-address small { color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.deposit-address code { font: 600 16px/1.4 ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all; color: var(--text); }
.deposit-address .btn { height: 44px; }

/* ---------- Me → Notifications 开关（iOS 风格） ---------- */
.pref-list { margin: 4px 0 16px; border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; cursor: pointer; }
.pref-row + .pref-row { border-top: 1px solid var(--line); }
.pref-row strong { display: block; font-size: 16px; font-weight: 600; }
.pref-row small { display: block; margin-top: 2px; color: var(--text-secondary); font-size: 13px; line-height: 1.4; }
.ios-switch { appearance: none; flex: none; position: relative; width: 51px; height: 31px; margin: 0; border-radius: 31px; background: #E3E8F0; cursor: pointer; transition: background .2s; }
.ios-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(6, 26, 58, .2); transition: transform .2s; }
.ios-switch:checked { background: var(--up); }
.ios-switch:checked::after { transform: translateX(20px); }

/* ---------- Premium（#/premium） ---------- */
.premium-hero { text-align: center; padding: 8px 0 18px; }
.premium-hero img { width: 120px; height: 120px; }
.premium-hero .eyebrow { display: inline-flex; align-items: center; gap: 6px; color: #B7791F; }
.premium-hero h1 { margin: 8px 0 6px; font-size: 26px; line-height: 1.2; }
.compare { padding: 6px 16px; }
.compare-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 8px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.compare-row:last-child { border-bottom: 0; }
.compare-row small { color: var(--text-secondary); font-size: 13px; text-align: center; }
.compare-row strong { font-size: 13px; text-align: center; }
.compare-row.head b { text-align: center; font-size: 13px; }
.compare-row .gold, .seg-toggle .save { color: #B7791F; }
.seg-toggle .save { font-size: 11px; font-weight: 700; margin-left: 4px; }
.price-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: 18px 0 10px; }
.price-line strong { font-size: 34px; letter-spacing: -.02em; }
.price-line small { flex-basis: 100%; }

/* ---------- 邀请（#/invite） ---------- */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.row-2 .btn { margin: 0; }
.reward-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px; }
.reward-grid div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.reward-grid small { color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.reward-grid strong { font-size: 19px; }
.avatar-dot { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--bg-muted); color: var(--ocean); font-weight: 700; }
.stat-row .right { margin-left: auto; text-align: right; }
.rules { padding: 14px 16px; }
.rules p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.rules p:last-child { margin: 0; }
.poster { display: block; width: 100%; border-radius: 16px; margin: 6px 0 10px; background: var(--bg-muted); aspect-ratio: 1200 / 630; }
.block-link { display: flex; align-items: center; justify-content: center; gap: 4px; }

/* ---------- 交易员（排行榜、主页、跟单、公开资料） ---------- */
.trader-avatar { display: inline-grid; place-items: center; width: var(--size); height: var(--size); flex: none; border-radius: 50%; font-size: calc(var(--size) * .42); font-weight: 750; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.trader-row { display: grid; grid-template-columns: 22px 40px 1fr 64px auto; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid #edf3fb; color: var(--text); }
.trader-row:last-child { border-bottom: 0; }
.trader-rank { color: var(--text-secondary); font-weight: 700; font-size: 13px; text-align: center; }
.trader-name { display: flex; flex-direction: column; min-width: 0; }
.trader-name strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trader-name small { color: var(--text-secondary); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trader-curve .spark { width: 64px; height: 26px; display: block; }
.trader-return { display: flex; flex-direction: column; align-items: flex-end; }
.trader-return strong { font-size: 15px; }
.trader-return small { color: var(--text-secondary); font-size: 11px; }
.seed { padding: 1px 6px; border-radius: 6px; background: var(--lime); color: #163300; font-size: 10px; font-weight: 800; vertical-align: middle; }
.avatar-strip { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.avatar-strip::-webkit-scrollbar { display: none; }
.avatar-strip a { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; color: var(--text); }
.avatar-strip strong { max-width: 72px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar-strip small { font-size: 12px; font-weight: 700; }
.trader-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0 14px; }
.trader-hero h1 { margin: 10px 0 4px; font-size: 24px; }
.trader-hero p { margin: 2px 0; }
.trader-chart { padding: 14px 16px; margin-bottom: 12px; }
.trader-chart .value-curve { position: relative; height: 120px; margin-top: 10px; }
.trader-chart .value-curve svg { width: 100%; height: 100%; display: block; }
.return-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.return-tabs small { display: block; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.return-tabs strong { font-size: 20px; }
.copy-head { display: flex; gap: 14px; align-items: center; margin: 4px 0 12px; }
.copy-head h1 { margin: 2px 0; font-size: 24px; }
.copy-head p { margin: 0; }
.copy-compare { margin: 12px 0 16px; }
.copy-compare em { font-style: normal; font-size: 12px; }
.profile-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 6px 0 12px; }
.avatar-pick { display: flex; justify-content: center; gap: 12px; margin-bottom: 16px; }
.avatar-pick button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.avatar-pick button.on { box-shadow: 0 0 0 2px var(--ocean); }
.icon.up { color: var(--up); }
