/* =====================================================================
   HyperDesk Mini App — Hyperliquid-inspired dark teal theme.
   Palette: deep teal background, mint accent, coral for losses.
   ===================================================================== */
:root {
  --bg: #0f1a1f;
  --bg-2: #0a1317;
  --card: #15232a;
  --card-2: #1b2c34;
  --line: #22363f;
  --line-2: #2c4550;
  --text: #f6fefd;
  --muted: #94a8a8;
  --dim: #5f7779;
  --mint: #50d2c1;
  --mint-2: #97fce4;
  --mint-bg: rgba(80, 210, 193, .12);
  --up: #50d2c1;
  --down: #ed7088;
  --down-bg: rgba(237, 112, 136, .12);
  --warn: #f5c56b;
  --radius: 16px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* glow behind the top of the screen, like HL's hero */
body::before {
  content: ""; position: fixed; inset: -20vh -20vw auto; height: 55vh; z-index: -1;
  background: radial-gradient(60% 60% at 50% 0%, rgba(80,210,193,.16), transparent 70%);
  pointer-events: none;
}

.app { max-width: 520px; margin: 0 auto; padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 24px); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; margin: 0 -16px; padding-inline: 16px;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 17px; letter-spacing: -.01em; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  background: var(--mint-bg); color: var(--mint); text-transform: uppercase;
}
.pill.warn { background: rgba(245,197,107,.12); color: var(--warn); }
.topbar .spacer { flex: 1; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: none;
  display: grid; place-items: center; font-weight: 650; font-size: 14px;
  background: linear-gradient(135deg, #2a4a52, #1b2c34); color: var(--mint-2);
  border: 1px solid var(--line-2);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- headings ---------- */
.h1 { font-size: 24px; font-weight: 650; letter-spacing: -.02em; margin: 6px 0 4px; }
.sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--muted); font-weight: 550; margin: 22px 2px 10px;
  text-transform: uppercase; letter-spacing: .06em;
}
.section-title a, .section-title button { color: var(--mint); text-transform: none; letter-spacing: 0; font-size: 13px; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px;
}
.card + .card { margin-top: 12px; }
.card.glow {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(151,252,228,.10), transparent 60%),
    linear-gradient(180deg, #172a31, #132228);
  border-color: var(--line-2);
}
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.label { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.big { font-size: 34px; font-weight: 650; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; }
.mid { font-size: 18px; font-weight: 620; letter-spacing: -.01em; margin-top: 3px; }
.chg { font-size: 13.5px; font-weight: 550; margin-top: 6px; display: inline-flex; gap: 6px; align-items: center; }
.chg .badge { padding: 2px 7px; border-radius: 6px; font-size: 12px; }
.chg.up .badge { background: var(--mint-bg); }
.chg.down .badge { background: var(--down-bg); }

/* "?" glossary trigger */
.q {
  width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 10.5px; font-weight: 700; color: var(--dim); border: 1px solid var(--line-2);
  line-height: 1;
}
.q:active { color: var(--mint); border-color: var(--mint); }

/* demo banner */
.demo-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: 12px; margin-bottom: 14px;
  background: rgba(245,197,107,.07); border: 1px dashed rgba(245,197,107,.35);
  color: #e9d6ac; font-size: 12.5px;
}
.demo-note svg { flex: none; margin-top: 1px; }

/* ---------- chart ---------- */
.chart { margin: 14px -4px 0; height: 120px; position: relative; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { padding: 5px 11px; border-radius: 7px; font-size: 12.5px; color: var(--muted); font-weight: 550; }
.seg button.on { background: var(--card-2); color: var(--text); }

/* ---------- bot status ---------- */
.bot-card { display: flex; align-items: center; gap: 14px; }
.bot-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); flex: none; position: relative; }
.bot-dot.on { background: var(--mint); }
.bot-dot.on::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--mint); opacity: 0; animation: ping 1.6s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.4); opacity: 0; } }
.bot-text { flex: 1; min-width: 0; }
.bot-text b { display: block; font-size: 15.5px; }
.bot-text span { font-size: 12.5px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 12px; font-weight: 620; font-size: 15px;
  background: var(--mint); color: #04211c; transition: transform .08s, filter .15s;
}
.btn:active { transform: scale(.97); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--card-2); color: var(--text); border: 1px solid var(--line-2); }
.btn.danger { background: var(--down-bg); color: var(--down); border: 1px solid rgba(237,112,136,.3); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- lists ---------- */
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; width: 100%; text-align: left; }
.item + .item { border-top: 1px solid var(--line); }
.item:active { background: var(--card-2); }
.coin {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 700; font-size: 12px; color: #04211c;
}
.item .main { flex: 1; min-width: 0; }
.item .main b { font-weight: 600; font-size: 15px; }
.item .main small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.item .end { text-align: right; }
.item .end b { font-weight: 600; font-size: 15px; display: block; }
.item .end small { font-size: 12.5px; }
.tag { font-size: 11px; font-weight: 650; padding: 2px 6px; border-radius: 5px; margin-left: 6px; vertical-align: 1px; }
.tag.long { background: var(--mint-bg); color: var(--up); }
.tag.short { background: var(--down-bg); color: var(--down); }
.chev { color: var(--dim); flex: none; }

/* stat tiles */
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.stat .label { font-size: 11.5px; }
.stat .v { font-size: 17px; font-weight: 650; margin-top: 3px; letter-spacing: -.01em; }

/* filter chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 550; white-space: nowrap;
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
}
.chip.on { background: var(--mint-bg); border-color: rgba(80,210,193,.4); color: var(--mint); }

.day { font-size: 12.5px; color: var(--dim); margin: 18px 4px 8px; font-weight: 550; }

/* ---------- boost ---------- */
.modes { display: grid; gap: 10px; }
.mode {
  text-align: left; width: 100%;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px;
  display: flex; gap: 14px; align-items: center; transition: border-color .15s, background .15s;
}
.mode.on { border-color: var(--mint); background: linear-gradient(180deg, rgba(80,210,193,.08), rgba(80,210,193,.02)); }
.mode .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--card-2); font-size: 22px; }
.mode .txt { flex: 1; }
.mode .txt b { font-size: 16px; display: block; }
.mode .txt small { color: var(--muted); font-size: 13px; display: block; margin-top: 2px; }
.meter { display: flex; gap: 3px; margin-top: 8px; }
.meter i { height: 5px; flex: 1; border-radius: 3px; background: var(--line-2); }
.meter i.f1 { background: var(--mint); }
.meter i.f2 { background: var(--warn); }
.meter i.f3 { background: var(--down); }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; }
.mode.on .radio { border-color: var(--mint); }
.mode.on .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); }

.slider-row { padding: 14px 0; }
.slider-row + .slider-row { border-top: 1px solid var(--line); }
.slider-row .between b { font-size: 15px; }
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin-top: 6px;
}
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--mint) var(--p, 50%), var(--line-2) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line-2); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--mint); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--text); margin-top: -8px; box-shadow: 0 0 0 4px rgba(80,210,193,.25); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 4px rgba(80,210,193,.25); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.toggle { width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background .2s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle.on { background: var(--mint); }
.toggle.on::after { transform: translateX(18px); }

.preview { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 12px; }
.preview div small { display: block; font-size: 12px; color: var(--muted); }
.preview div b { font-size: 16px; }

/* ---------- referral ---------- */
.ref-hero { text-align: center; padding: 22px 16px; }
.ref-hero .gift { font-size: 40px; }
.ref-hero h2 { margin: 6px 0 4px; font-size: 21px; letter-spacing: -.02em; }
.linkbox {
  display: flex; align-items: center; gap: 8px; margin-top: 16px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 12px;
}
.linkbox code { flex: 1; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--mint-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.steps { display: grid; gap: 0; }
.step { display: flex; gap: 14px; padding: 12px 0; }
.step + .step { border-top: 1px solid var(--line); }
.step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--mint-bg); color: var(--mint); font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }
.step b { display: block; font-size: 14.5px; }
.step small { color: var(--muted); font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 22px 12px; font-size: 13.5px; }

/* ---------- profile ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head .avatar { width: 56px; height: 56px; font-size: 20px; }
.profile-head b { font-size: 18px; display: block; }
.status-line { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 3px; }
.status-line i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary { list-style: none; padding: 14px; font-weight: 560; display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 20px; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: -4px 14px 14px; color: var(--muted); font-size: 13.5px; }

/* ---------- bottom nav ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(10, 19, 23, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.nav-inner { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--nav-h); }
.nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 550; color: var(--dim); position: relative; }
.nav button svg { width: 23px; height: 23px; }
.nav button.on { color: var(--mint); }
.nav button.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 2px; border-radius: 0 0 2px 2px; background: var(--mint); }

/* ---------- sheet & overlays ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(3,8,10,.6); opacity: 0; transition: opacity .2s; }
.backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-width: 520px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: 20px 20px 0 0; padding: 10px 18px calc(22px + var(--safe-b));
  transform: translateY(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1);
  max-height: 86vh; overflow-y: auto;
}
.sheet.show { transform: none; }
.sheet .grab { width: 38px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.01em; }
.sheet p { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.kv { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv span:first-child { color: var(--muted); }

.toast {
  position: fixed; left: 50%; top: 14px; z-index: 80; transform: translate(-50%, calc(-100% - 30px));
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--text);
  padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 550;
  transition: transform .25s; box-shadow: 0 10px 30px rgba(0,0,0,.35);
  display: flex; gap: 8px; align-items: center; white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); }

/* onboarding */
.onb { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; flex-direction: column; padding: 24px 22px calc(24px + var(--safe-b)); }
.onb::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 45% at 50% 25%, rgba(80,210,193,.22), transparent 70%); pointer-events: none; }
.onb .art { flex: 1; display: grid; place-items: center; position: relative; }
.onb .art .orb { width: 150px; height: 150px; border-radius: 40px; display: grid; place-items: center; font-size: 64px; background: linear-gradient(145deg, #1d3a40, #12232a); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(80,210,193,.18); }
.onb h2 { font-size: 27px; letter-spacing: -.025em; margin: 0 0 8px; position: relative; }
.onb p { color: var(--muted); margin: 0 0 22px; font-size: 15px; position: relative; }
.dots { display: flex; gap: 6px; margin-bottom: 18px; position: relative; }
.dots i { width: 7px; height: 7px; border-radius: 4px; background: var(--line-2); transition: width .2s, background .2s; }
.dots i.on { width: 22px; background: var(--mint); }
.onb .actions { display: flex; gap: 10px; position: relative; }

.fade-in { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.skeleton { background: linear-gradient(90deg, var(--card-2), #223740, var(--card-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; color: transparent !important; }
@keyframes sk { to { background-position: -200% 0; } }
.flash-up { animation: fu .6s; } .flash-down { animation: fd .6s; }

/* =====================================================================
   v0.2 layout — header card, page heads, dashboard blocks, center FAB nav
   ===================================================================== */
:root { --radius: 22px; }
.topbar { padding: 10px 16px 8px; background: linear-gradient(var(--bg) 80%, transparent); }
.head-card {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: rgba(21, 35, 42, .9); border: 1px solid var(--line); border-radius: 22px;
  padding: 8px 8px 8px 14px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.head-card .brand { font-size: 17px; }
.head-card .pill { margin-left: 2px; }
.vsep { width: 1px; height: 22px; background: var(--line-2); margin: 0 2px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--mint-2);
}
.icon-btn:active { transform: scale(.94); }
.icon-btn.sm { width: 32px; height: 32px; color: var(--muted); }

.welcome { display: flex; align-items: center; justify-content: space-between; margin: 8px 2px 14px; }
.welcome .hello { font-size: 22px; font-weight: 680; letter-spacing: -.02em; }

.page-head { display: flex; align-items: center; gap: 12px; margin: 8px 0 16px; }
.page-head h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.how-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
  border-radius: 999px; background: var(--mint-bg); border: 1px solid rgba(80,210,193,.35); color: var(--mint);
  font-weight: 600; font-size: 13.5px; white-space: nowrap;
}

.big-card { padding: 18px; }
.card + .card, section + section { margin-top: 12px; }
.split3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.split3 > div + div { border-left: 1px solid var(--line); padding-left: 10px; }
.split3 b { font-size: 17px; font-weight: 650; display: block; margin-top: 2px; }

/* action buttons */
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 14px 8px; }
.actions button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 560; color: var(--muted); }
.actions button:active .a-ic { transform: scale(.93); }
.a-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line-2); color: var(--text); transition: transform .1s; }
.a-ic.primary { background: var(--mint); color: #04211c; border-color: transparent; }
.a-ic.mint { background: var(--mint-bg); color: var(--mint); border-color: rgba(80,210,193,.35); box-shadow: 0 0 22px rgba(80,210,193,.18); }
.actions button:first-child { color: var(--text); }

/* getting started */
.progress { height: 6px; border-radius: 3px; background: var(--line-2); margin: 10px 0 6px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--mint); border-radius: 3px; transition: width .4s; }
.checklist { margin-top: 6px; }
.ck { display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; padding: 9px 0; position: relative; }
.ck + .ck::before { content: ""; position: absolute; left: 13px; top: -12px; height: 22px; width: 2px; background: var(--line-2); }
.ck.done + .ck::before { background: var(--mint); }
.ck-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; position: relative; z-index: 1; background: var(--card); }
.ck.done .ck-dot { background: var(--mint); border-color: var(--mint); }
.ck.cur .ck-dot { border-color: var(--mint); }
.ck.cur .ck-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); }
.ck b { display: block; font-size: 15px; font-weight: 600; color: var(--muted); }
.ck small { display: block; font-size: 13px; color: var(--dim); }
.ck.cur b { color: var(--text); }
.ck.cur small { color: var(--muted); }
.ck.done b { text-decoration: line-through; color: var(--dim); }

/* trading status */
.status-bar { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 18px; margin-top: 12px; }
.status-bar.off { background: rgba(237,112,136,.08); border: 1px solid rgba(237,112,136,.35); }
.status-bar.on { background: rgba(80,210,193,.08); border: 1px solid rgba(80,210,193,.4); }
.status-bar .st-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.status-bar.off .st-ic { background: rgba(237,112,136,.15); color: var(--down); }
.status-bar.on .st-ic { background: rgba(80,210,193,.15); }
.status-bar.off .bot-text b { color: var(--down); }
.status-bar.on .bot-text b { color: var(--mint); }
.pill-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; font-weight: 640; font-size: 13.5px; background: var(--mint); color: #04211c; white-space: nowrap; flex: none; }
.status-bar.on .pill-btn { background: var(--down-bg); color: var(--down); border: 1px solid rgba(237,112,136,.35); }

/* segmented full width */
.seg.full { display: flex; width: 100%; border-radius: 16px; padding: 4px; }
.seg.full button { flex: 1; padding: 10px 6px; border-radius: 12px; font-size: 14px; }
.chip-sm { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 600; background: var(--mint-bg); }
.chip-sm.down { background: var(--down-bg); }
.chip-sm.muted { background: var(--card-2); }

/* stats 2x2 */
.stats4 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; padding: 18px; }
.stats4 small { font-size: 13px; font-weight: 500; opacity: .85; }
.bar { height: 5px; border-radius: 3px; background: var(--line-2); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--mint); }

/* trade rows */
.pair { position: relative; width: 40px; height: 38px; flex: none; }
.pair .coin { width: 34px; height: 34px; font-size: 10.5px; position: absolute; top: 0; left: 0; }
.pair .coin.usd { width: 19px; height: 19px; left: 22px; top: 19px; font-size: 11px; background: #2775ca; color: #fff; border: 2px solid var(--card); }
.item .main small + small { margin-top: 0; }
.list-head { display: flex; justify-content: space-between; padding: 12px 14px 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--dim); }
.list-head + .item { border-top: 0; }
.tag.cur { background: var(--mint-bg); color: var(--mint); }
.tag.pending { background: var(--card-2); color: var(--muted); margin-left: 0; }

/* trades page */
.lock-card { text-align: center; }
.lock-ring { width: 104px; height: 104px; margin: 4px auto 0; border-radius: 50%; border: 1px dashed var(--line-2); display: grid; place-items: center; }
.lock-ring svg { padding: 14px; width: 60px; height: 60px; border-radius: 50%; background: var(--card-2); color: var(--muted); box-sizing: content-box; }
.lock-title { margin-top: 14px; font-size: 14px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: left; }
.tile b { display: block; font-size: 16px; margin-top: 2px; }
.inset { margin-top: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.btn .chev, .btn svg { color: inherit; }

/* referral */
.tier-card { background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--tc) 18%, transparent), transparent 60%), var(--card); border-color: color-mix(in srgb, var(--tc) 30%, var(--line)); }
.tier-name { font-size: 26px; font-weight: 700; color: var(--tc); letter-spacing: -.02em; }
.tier-chip { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; background: var(--tc); color: #0b1418; }
.tier-medal { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--tc) 16%, transparent); color: var(--tc); }
.stat.c { text-align: center; }
.stat.c .label { justify-content: center; display: flex; }
.s-ic { color: var(--mint); display: inline-grid; }
.field { flex: 1; min-width: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 12px 16px; }
.field code { display: block; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #04211c; flex: none; }
.code { font: 600 13.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--mint-2); background: var(--mint-bg); padding: 3px 8px; border-radius: 6px; }
.btn.ghost-mint { background: var(--mint-bg); color: var(--mint); border: 1px solid rgba(80,210,193,.35); }
.how-list { display: grid; gap: 12px; margin-top: 12px; }
.how-list > div { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.h-ic { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--mint-bg); color: var(--mint); font-size: 15px; font-weight: 700; }
.cur-tier { background: rgba(80,210,193,.05); }

/* profile */
.copy-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.copy-line svg { width: 14px; height: 14px; }
.conn { display: flex; align-items: center; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.conn .main { flex: 1; min-width: 0; }
.conn .main b { display: block; font-size: 15px; }
.conn .main small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conn .tag { margin-left: 0; }
.link-btn { height: 32px; padding: 0 12px; border-radius: 999px; background: var(--mint-bg); color: var(--mint); font-weight: 600; font-size: 13px; }
.menu .item { padding-block: 14px; }
.m-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); color: var(--muted); flex: none; }

/* calculator */
.amount { display: flex; align-items: center; gap: 8px; margin-top: 8px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 14px 16px; font-size: 22px; font-weight: 650; }
.amount input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 22px; font-weight: 650; }
.amount .dim { font-size: 14px; font-weight: 600; }

/* bottom nav with center FAB */
.nav-inner { height: 68px; }
.nav button.fab { position: relative; }
.nav button.fab .fab-ic {
  width: 62px; height: 62px; border-radius: 50%; margin-top: -30px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--mint-2), var(--mint)); color: #04211c;
  box-shadow: 0 8px 26px rgba(80,210,193,.35), 0 0 0 5px var(--bg-2);
}
.nav button.fab.on::before { display: none; }
.nav button.fab span:last-child { margin-top: -2px; }
@keyframes fu { 0% { color: var(--mint-2); } } @keyframes fd { 0% { color: var(--down); } }
