/* Cooked / FedoraTrade Mini App — flat navy surfaces, light-blue outlines and accents, after the logo.
   Colours come from CSS variables; web/js/theme.js rewrites them for the theme the user picked. */
:root {
  /* set by Theme.apply(); these defaults equal the brand theme */
  --grad: linear-gradient(180deg, #121F4D 0%, #06122F 100%);
  --bg0: #121F4D; --bg1: #06122F; --bg: #0C193E;
  --ink: #FFFFFF; --ink-rgb: 255, 255, 255;
  --accent: #76ABF7; --accent-rgb: 118, 171, 247; --accent-ink: #06122F;
  --sheet: #0E1B45; --tabbg: rgba(5, 13, 36, .92); --toastbg: rgba(14, 27, 69, .97);
  --up: #4CE0A4; --down: #FF6B7A; --warn: #FFC56B;
  /* derived */
  --tx: var(--ink);
  --tx2: rgba(var(--ink-rgb), .66);
  --tx3: rgba(var(--ink-rgb), .42);
  --card: rgba(var(--accent-rgb), .07);
  --card2: rgba(var(--accent-rgb), .13);
  --line: rgba(var(--accent-rgb), .26);
  --line2: rgba(var(--accent-rgb), .48);
  --s1: var(--card);
  --s2: rgba(var(--ink-rgb), .09);
  --s3: rgba(var(--ink-rgb), .16);
  --amber: var(--accent); --amber-hi: var(--accent); --amber-ink: var(--accent-ink);
  --f: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  --fr: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --st: var(--tg-content-safe-area-inset-top, 0px);
  --sb: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --tabh: 60px;
  --r: 12px; --r-sm: 9px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body {
  height: 100%; margin: 0; overflow: hidden;
  background: var(--bg1); color: var(--tx);
  font-family: var(--f); font-size: 16px; line-height: 1.3;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body { overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; touch-action: manipulation; text-align: inherit; }
button:disabled { cursor: default; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.ic { width: 22px; height: 22px; flex: none; display: block; }
.up { color: var(--up); }
.down { color: var(--down); }
.warn { color: var(--warn); }
.muted { color: var(--tx2); }
.center { text-align: center; }

/* ---------- shell ---------- */
#app { position: fixed; inset: 0; max-width: 520px; margin: 0 auto; overflow: hidden; background: var(--grad); }
#main { position: absolute; inset: 0; transition: transform .36s var(--ease), filter .36s var(--ease); }
body.has-page #main { transform: translateX(-18%); filter: brightness(.55); }
.screen {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
  padding: calc(var(--st) + 6px) 16px calc(var(--tabh) + var(--sb) + 28px);
  opacity: 0; transition: opacity .3s;
}
body.ready .screen { opacity: 1; }
#tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 10;
  height: calc(var(--tabh) + var(--sb)); padding-bottom: var(--sb);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--tabbg); border-top: 1px solid var(--line);
}
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--tx3); font-size: 10.5px; font-weight: 650; letter-spacing: .02em; transition: color .2s; }
.tab .ic { width: 24px; height: 24px; }
.tab.on { color: var(--accent); }
.tab.on::before { content: ''; position: absolute; top: -1px; left: 50%; width: 28px; height: 2px; margin-left: -14px; border-radius: 0 0 2px 2px; background: var(--accent); }
.tab:active .ic { transform: scale(.9); }

@media (min-width: 560px) {
  html, body { background: var(--bg1); }
  #app { box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0, 0, 0, .5); }
}

/* ---------- header bars ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 54px; margin-bottom: 8px; }
.h1 { font-family: var(--f); font-size: 26px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.bar-r { display: flex; align-items: center; gap: 8px; }
.avatar {
  position: relative; overflow: hidden; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--card2); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--line2);
  font-family: var(--fr); font-weight: 800; font-size: calc(var(--s) * .42);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ibtn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--tx2); flex: none; }
.ibtn.ghost { background: none; box-shadow: none; }
.ibtn:active { background: var(--card2); }
.mode { position: relative; padding: 5px 10px 5px 20px; border-radius: 7px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--tx2); font-size: 12px; font-weight: 650; white-space: nowrap; }
.mode::before { content: ''; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--tx3); }
.mode.live::before { background: var(--up); animation: pulse 2.2s infinite; }
.mode.offline::before { background: var(--down); }
.mode.connecting::before { background: var(--tx2); animation: blink 1s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(76, 224, 164, .55); } 70% { box-shadow: 0 0 0 6px rgba(76, 224, 164, 0); } 100% { box-shadow: 0 0 0 0 rgba(76, 224, 164, 0); } }
@keyframes blink { 50% { opacity: .2; } }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-t { display: flex; flex-direction: column; }
.brand-t b { font-size: 17px; font-weight: 700; color: var(--ink); }
.brand-t small { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.brand .mascot { width: 46px; height: 35px; }
.mascot { display: block; object-fit: contain; }

.lbl { margin: 22px 2px 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--tx2); }
.sec { display: flex; align-items: center; gap: 8px; margin: 24px 2px 10px; font-family: var(--fr); font-size: 19px; font-weight: 700; }
.sec-n { padding: 2px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; }

/* ---------- cards: flat navy with a light outline ---------- */
.card, .list, .group, .pcard, .fcard, .band, .mover, .empty, .sw-card, .pmk, .cf-pair, .cf-perp, .kv.card, .lb-me, .prof { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r); }

/* ---------- list rows ---------- */
.list { overflow: hidden; }
.row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 66px; padding: 12px 14px; text-align: left; transition: background .12s; }
.row + .row::before { content: ''; position: absolute; top: 0; left: 66px; right: 0; height: 1px; background: var(--line); opacity: .7; }
.row:active { background: var(--card2); }
.row.cur { background: var(--card2); }
.row-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-m b { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-m small { font-size: 13.5px; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-e { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; flex: none; }
.row-e b { font-size: 16px; font-weight: 650; white-space: nowrap; }
.row-e small { font-size: 13.5px; white-space: nowrap; }
.row-e small:not(.up):not(.down) { color: var(--tx2); }
.list:not(.plain) .row-m b { font-size: 15.5px; }
.list.plain { background: none; box-shadow: none; border-radius: 0; }
.list.plain .row { padding: 12px 2px; min-height: 72px; }
.list.plain .row + .row::before { left: 0; }
.list.plain .row:active { background: var(--card); border-radius: var(--r-sm); }
.list.plain .row-m b { font-size: 17.5px; font-weight: 700; }
.list.plain .row-e b { font-size: 17px; font-weight: 700; }
.list.plain .row-m small .num { margin-left: 4px; }

.tok {
  width: var(--s); height: var(--s); border-radius: 30%; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--c1), var(--c2)); color: #fff;
  font-family: var(--fr); font-weight: 800; line-height: 1;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22), 0 0 0 1.5px var(--bg1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.tok span { transform: translateY(.03em); }
.ico-wrap { position: relative; display: inline-grid; flex: none; }
.ico-wrap.big .tok { --s: 58px !important; font-size: 27px !important; }
.badge { position: absolute; right: -4px; bottom: -4px; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); border: 2px solid var(--bg1); color: var(--accent-ink); }
.badge .ic { width: 11px; height: 11px; stroke-width: 2.8; }
.dual { position: relative; display: inline-block; width: 40px; height: 40px; }
.dual .tok { position: absolute; }
.dual .tok:first-child { left: 0; top: 0; }
.dual .tok:last-child { right: 0; bottom: 0; }

.spark { flex: none; opacity: 0; transition: opacity .35s; overflow: visible; }
.spark.ready { opacity: 1; }
.spark path { stroke: var(--up); }
.spark.down path { stroke: var(--down); }
.foot-note { margin: 28px 10px 0; text-align: center; font-size: 12.5px; line-height: 1.45; color: var(--tx3); }

/* ---------- search / chips / segmented ---------- */
.search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; margin-bottom: 12px; border-radius: var(--r-sm); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--tx3); }
.search:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
.search .ic { width: 19px; height: 19px; }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--tx); font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--tx3); }
input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration { -webkit-appearance: none; }

.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 2px; padding: 0 16px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 32px; padding: 0 12px; border-radius: 8px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--tx2); font-size: 14px; font-weight: 650; transition: background .15s, color .15s, transform .1s, box-shadow .15s; }
.chip.on { background: var(--accent); box-shadow: none; color: var(--accent-ink); }
.chip:active { opacity: .8; }
.chip.xs { height: 28px; padding: 0 10px; font-size: 12.5px; }

.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 14px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { position: relative; z-index: 1; height: 38px; text-align: center; font-size: 15px; font-weight: 650; color: var(--tx2); transition: color .2s; }
.seg-ind { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--accent); transition: transform .3s var(--ease); }
.seg[data-on="1"] .seg-ind { transform: translateX(100%); }
.seg[data-on="0"] button:nth-of-type(1), .seg[data-on="1"] button:nth-of-type(2) { color: var(--accent-ink); }
.seg.three { grid-template-columns: 1fr 1fr 1fr; }
.seg.three .seg-ind { width: calc(33.333% - 2.7px); }
.seg.three[data-on="1"] .seg-ind { transform: translateX(100%); }
.seg.three[data-on="2"] .seg-ind { transform: translateX(200%); }
.seg.three[data-on="2"] button:nth-of-type(3) { color: var(--accent-ink); }
.seg.three[data-on="2"] button:nth-of-type(2) { color: var(--tx2); }

.mini-seg { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); flex: none; }
.mini-seg button { height: 28px; padding: 0 11px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--tx2); }
.mini-seg button.on { background: var(--accent); color: var(--accent-ink); }

/* ---------- markets ---------- */
.movers { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.movers::-webkit-scrollbar { display: none; }
.mover { flex: 0 0 144px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; text-align: left; scroll-snap-align: start; }
.mover:active { background: var(--card2); }
.mover-h { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.mover .spark { width: 100%; height: 34px; }
.mover-p { font-size: 15px; font-weight: 700; }
.mover-c { font-size: 13px; font-weight: 650; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 24px; color: var(--tx2); text-align: center; font-size: 15px; line-height: 1.45; }
.empty .ic { width: 34px; height: 34px; color: var(--accent); }
.empty b { color: var(--tx); font-size: 17px; }
.empty .btn { margin-top: 8px; }
.empty.sm { padding: 22px 20px; font-size: 14px; }

/* ---------- swap ---------- */
.swap { position: relative; display: flex; flex-direction: column; gap: 6px; }
.sw-card { padding: 14px 16px; border-radius: 18px; }
.sw-card.recv { background: transparent; }
.sw-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 13.5px; color: var(--tx2); }
.sw-lbl { font-weight: 650; }
.sw-bal { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tchip { flex: none; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 10px 0 8px; border-radius: 10px; background: var(--card2); box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; font-weight: 700; }
.tchip .ic { width: 17px; height: 17px; color: var(--tx2); }
.tchip:active { background: var(--s3); }
.sw-amt { min-width: 0; font-family: var(--f); font-size: 32px; font-weight: 600; letter-spacing: -.02em; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-amt.ph { color: var(--tx3); }
.sw-amt.err { color: var(--down); }
#sw-amt::after { content: ''; display: inline-block; width: 2px; height: .82em; margin-left: 3px; vertical-align: -.06em; background: var(--accent); animation: blink 1.05s steps(1) infinite; }
.sw-sub { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 28px; margin-top: 10px; font-size: 13.5px; color: var(--tx2); }
.pcts { display: flex; gap: 6px; }
.sw-flip { position: absolute; left: 50%; top: 50%; z-index: 2; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 14px; border: 3px solid var(--bg1); background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; transition: transform .3s var(--ease); }
.sw-flip:active { transform: rotate(180deg); }
.sw-flip .ic { width: 19px; height: 19px; stroke-width: 2.2; }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 10px 0 12px; }
.key { height: 50px; border-radius: var(--r-sm); display: grid; place-items: center; font-family: var(--f); font-size: 23px; font-weight: 500; transition: background .1s; }
.key.down { background: var(--card2); }
.key .ic { width: 26px; height: 26px; color: var(--tx2); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; padding: 0 18px; border-radius: 10px; font-size: 15px; font-weight: 600; letter-spacing: .01em; text-align: center; transition: opacity .2s, background .2s; }
.btn:active { opacity: .85; }
.btn:disabled:active { transform: none; }
.btn.big { height: 52px; border-radius: 10px; font-size: 16px; }
.btn.sm { width: auto; height: 34px; padding: 0 14px; border-radius: 8px; font-size: 13.5px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.secondary { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line2); color: var(--accent); }
.btn.secondary:active { background: var(--card); }
.btn.long { background: var(--up); color: #06261A; }
.btn.short { background: var(--down); color: #33090F; }
.btn.danger { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 107, 122, .5); color: var(--down); }
.btn:disabled { opacity: .45; }
.btn.primary:disabled, .btn.long:disabled, .btn.short:disabled { background: var(--card2); color: var(--tx3); box-shadow: inset 0 0 0 1px var(--line); opacity: 1; }
.btn .ic { width: 20px; height: 20px; }

/* ---------- perps / forecasts ---------- */
.pmk { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; }
.pmk:active { background: var(--card2); }
.pmk-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pmk-m b { display: flex; align-items: center; gap: 4px; font-size: 17px; font-weight: 750; }
.pmk-m b .ic { width: 17px; height: 17px; color: var(--accent); }
.pmk-m small { font-size: 13px; color: var(--tx2); }
.pmk-e { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pmk-e b { font-size: 17px; font-weight: 750; }
.pmk-e small { font-size: 13px; }
.pchart { height: 116px; margin: 6px -16px 10px; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.ls { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 16px; border-radius: var(--r); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.ls button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; font-size: 16px; font-weight: 750; color: var(--tx2); transition: color .2s; }
.ls button .ic { width: 17px; height: 17px; stroke-width: 2.3; }
.ls-ind { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 12px; background: var(--up); transition: transform .3s var(--ease), background .3s; }
.ls[data-on="1"] .ls-ind { transform: translateX(100%); background: var(--down); }
.ls[data-on="0"] button:nth-of-type(1) { color: #06261A; }
.ls[data-on="1"] button:nth-of-type(2) { color: #33090F; }

.field { margin-bottom: 16px; }
.field-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 2px 8px; font-size: 14px; font-weight: 650; color: var(--tx2); }
.field-sub { font-size: 13px; font-weight: 500; }
.field .pcts { margin-top: 10px; }
.inp { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border-radius: 10px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.inp:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
.inp input { flex: 1; min-width: 0; width: 100%; height: 100%; background: none; border: 0; outline: 0; color: var(--tx); font-family: var(--fr); font-size: 22px; font-weight: 700; -webkit-appearance: none; appearance: none; }
.inp input::placeholder { color: var(--tx3); }
.inp span { color: var(--tx2); font-size: 14px; font-weight: 700; }
.inp.sm { height: 48px; padding: 0 14px; }
.inp.sm input { font-size: 17px; }
.inp .tchip { flex: none; margin-left: -8px; }
.tchip.sm { height: 36px; padding: 0 8px 0 6px; font-size: 14px; }
.lev-v { font-family: var(--fr); font-size: 20px; color: var(--accent); }

input[type=range] { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 30px; margin: 0; background: transparent; touch-action: pan-y; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p, 0%), var(--card2) var(--p, 0%)); box-shadow: inset 0 0 0 1px var(--line); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 4px var(--bg1), 0 0 0 1.5px var(--accent); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p, 0%), var(--card2) var(--p, 0%)); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 4px var(--bg1), 0 0 0 1.5px var(--accent); }
.lev-ticks { display: flex; justify-content: space-between; margin-top: 6px; }
.lev-ticks button { padding: 6px 9px; border-radius: 9px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--tx2); font-size: 12.5px; font-weight: 650; }
.lev-ticks button:active { background: var(--card2); }

.tpsl-t { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 2px 12px; color: var(--tx2); font-size: 14.5px; font-weight: 650; }
.tpsl-t span { flex: 1; text-align: left; }
.tpsl-t .ic { width: 18px; height: 18px; }
.tpsl-t > .ic:last-child { transition: transform .25s var(--ease); }
.tpsl-t.on { color: var(--accent); }
.tpsl-t.on > .ic:last-child { transform: rotate(180deg); }
.tpsl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-bottom: 12px; }

.kv { display: flex; flex-direction: column; margin: 4px 0 14px; }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--tx2); }
.kv dd { margin: 0; font-weight: 650; text-align: right; }
.kv.card { padding: 4px 16px; }

.plist { display: flex; flex-direction: column; gap: 10px; }
.pcard { padding: 14px; }
.pc-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.pc-h b { font-size: 17px; font-weight: 750; }
.pc-pnl { margin-left: auto; font-size: 17px; font-weight: 750; }
.pc-g { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0 0 14px; }
.pc-g dt { margin-bottom: 2px; font-size: 12.5px; color: var(--tx2); }
.pc-g dd { margin: 0; font-size: 15px; font-weight: 650; }
.tag { padding: 3px 7px; border-radius: 7px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.tag.long { background: rgba(76, 224, 164, .16); color: var(--up); }
.tag.short { background: rgba(255, 107, 122, .16); color: var(--down); }

.fc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 4px; }
.fc-btns .btn .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.chips.mins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; overflow: visible; margin: 0; padding: 0; }
.chips.mins .chip { display: grid; place-items: center; height: 40px; padding: 0; font-size: 15px; }
.fcard { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.fcard-h { display: flex; align-items: center; gap: 10px; }
.fcard-h b { font-size: 16px; font-weight: 750; }
.fcard-h .fc-st { margin-left: auto; font-size: 13px; font-weight: 700; }
.fcard-g { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 0; }
.fcard-g dt { font-size: 11.5px; color: var(--tx3); }
.fcard-g dd { margin: 2px 0 0; font-weight: 650; font-size: 14px; }
.fc-bar { height: 4px; border-radius: 2px; background: var(--card2); overflow: hidden; }
.fc-bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--accent); transition: width 1s linear; }
.fc-note { margin: 4px 0 0; min-height: 18px; font-size: 13px; }

/* ---------- pushed pages ---------- */
#pages { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.page { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--grad); transform: translateX(100%); transition: transform .36s var(--ease); pointer-events: auto; box-shadow: -1px 0 0 var(--line), -12px 0 30px rgba(0, 0, 0, .35); }
.page.on { transform: translateX(0); }
.page.drag { transition: none; }
.pbar { flex: none; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; padding: calc(var(--st) + 6px) 14px 6px; }
.pbar-t { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; font-size: 17px; font-weight: 750; }
.pbar-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ibtn.star.on { color: var(--warn); }
.page-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 16px calc(var(--sb) + 110px); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

.tp-head { padding: 6px 2px 2px; }
.tp-p { font-family: var(--f); font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.tp-c { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; min-height: 20px; margin-top: 4px; font-size: 15px; font-weight: 650; }
.tp-when { color: var(--tx3); font-size: 13.5px; font-weight: 500; }
.chart-wrap { position: relative; height: 250px; margin: 8px -16px 6px; }
.tfs { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 18px; }
.tfs button { flex: 1; height: 34px; border-radius: 10px; text-align: center; font-size: 14px; font-weight: 700; color: var(--tx2); }
.tfs button.on { background: var(--accent); color: var(--accent-ink); }
.tfs .tf-mode { flex: 0 0 40px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); }
.tf-mode .ic { width: 20px; height: 20px; }
.hold { padding: 16px; }
.hold-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; color: var(--tx2); font-size: 14px; font-weight: 650; }
.hold-h b { color: var(--tx); font-family: var(--fr); font-size: 22px; font-weight: 750; }
.hold .pc-g { margin: 0; }
.hold:only-child .hold-h, .card.hold:not(:has(.pc-g)) .hold-h { margin-bottom: 0; }
.about { max-width: 60ch; margin: 0 2px; color: var(--tx2); font-size: 15px; line-height: 1.55; }
.tp-cta { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; padding: 18px 16px calc(var(--sb) + 12px); background: linear-gradient(180deg, rgba(6, 18, 47, 0), var(--bg1) 40%); }
.tp-cta .btn { height: 54px; }
.btn.sq { flex: 0 0 54px; width: 54px; padding: 0; }
.tp-cta .btn.sq .ic { width: 20px; height: 20px; }

/* ---------- settings ---------- */
.prof { display: flex; align-items: center; gap: 14px; margin-top: 6px; padding: 16px; }
.prof-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.prof-t b { font-family: var(--fr); font-size: 21px; font-weight: 750; }
.prof-t small { color: var(--tx2); font-size: 13px; }
.group { overflow: hidden; }
.gi { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px; text-align: left; font-size: 16px; }
.gi + .gi::before { content: ''; position: absolute; top: 0; left: 58px; right: 0; height: 1px; background: var(--line); opacity: .7; }
button.gi:active { background: var(--card2); }
.gi-ic { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--card2); color: var(--accent); }
.gi-ic .ic { width: 18px; height: 18px; }
.gi-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gi-l small { color: var(--tx2); font-size: 12.5px; }
.gi > .ic { width: 18px; height: 18px; color: var(--tx3); }
.gi-v { color: var(--tx2); }
.gi.danger, .gi.danger .gi-ic { color: var(--down); }
.gi.danger .gi-ic { background: rgba(255, 107, 122, .14); }
.switch { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 51px; height: 31px; margin: 0; border-radius: 999px; background: var(--card2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background .22s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .24s var(--ease); }
.switch:checked { background: var(--accent); box-shadow: none; }
.switch:checked::after { transform: translateX(20px); }
.brand-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 32px 10px 0; color: var(--tx3); text-align: center; font-size: 12.5px; line-height: 1.5; }
.brand-foot b { color: var(--tx2); font-family: var(--fr); font-size: 15px; }
.brand-foot p { max-width: 36ch; margin: 0; }
.brand-foot .mascot { width: 80px; height: auto; }

/* ---------- appearance ---------- */
.theme-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--grad); box-shadow: inset 0 0 0 1.5px var(--line2); margin-right: 2px; flex: none; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 10px; padding: 2px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 11.5px; line-height: 1.2; color: var(--tx2); text-align: center; }
.swatch i { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 12px; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); transition: transform .15s, box-shadow .2s; }
.swatch i .ic { width: 22px; height: 22px; color: #fff; stroke-width: 2.6; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; }
.swatch.on i { box-shadow: 0 0 0 2.5px var(--accent), inset 0 0 0 1px rgba(255, 255, 255, .18); }
.swatch.on i .ic { opacity: 1; transform: scale(1); }
.swatch.on { color: var(--tx); }
.swatch:active i { transform: scale(.94); }
.custom-th { display: flex; flex-direction: column; gap: 14px; padding: 16px; transition: box-shadow .2s; }
.custom-th.on { box-shadow: inset 0 0 0 2px var(--accent); }
.th-sub { margin: 0; font-size: 13.5px; line-height: 1.4; }
.cpick { display: flex; align-items: center; gap: 12px; }
.cpick label { position: relative; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--c); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3); flex: none; }
.cpick input[type=color] { position: absolute; inset: -10px; width: 64px; height: 64px; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.cpick > span { flex: 1; font-weight: 650; }
.cpick code { font-family: var(--f); color: var(--tx2); font-size: 13px; letter-spacing: .02em; }
.angles { display: flex; gap: 8px; }
.angles button { width: 38px; height: 36px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); font-size: 17px; display: grid; place-items: center; }
.angles button.on { background: var(--accent); box-shadow: none; color: var(--accent-ink); }

/* ---------- sheets ---------- */
#overlay { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.sheet-back { position: absolute; inset: 0; background: rgba(2, 6, 20, .66); opacity: 0; transition: opacity .32s; pointer-events: auto; }
.sheet-back.on { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - var(--st) - 24px);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 8px 16px calc(var(--sb) + 18px); border-radius: 16px 16px 0 0;
  background: var(--sheet); box-shadow: 0 -1px 0 var(--line2), 0 -12px 40px rgba(0, 0, 0, .45);
  transform: translateY(105%); transition: transform .4s var(--ease); pointer-events: auto;
}
.sheet.on { transform: translateY(0); }
.sheet.drag { transition: none; }
.sheet.tall { height: calc(100% - var(--st) - 40px); }
.sheet-grab { width: 38px; height: 5px; margin: 0 auto 6px; border-radius: 3px; background: var(--line2); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0 12px; }
.sheet-head h3 { margin: 0; font-family: var(--f); font-size: 19px; font-weight: 700; }
.sheet-head .ibtn { width: 32px; height: 32px; }
.sheet-head .ibtn .ic { width: 15px; height: 15px; }
.sheet-p { margin: 0 0 16px; color: var(--tx2); font-size: 15px; line-height: 1.45; }
.sheet .list { background: transparent; box-shadow: none; border-radius: 0; }
.sheet .list .row { padding-left: 4px; padding-right: 4px; }
.sheet .list .row + .row::before { left: 56px; }
.sheet .pcard { padding: 0; background: none; box-shadow: none; }
.sheet .badge { border-color: var(--sheet); }
.sm-note { margin: 0; font-size: 12.5px; color: var(--tx3); }

.cf-pair { margin-bottom: 14px; padding: 4px 16px; }
.cf-side { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.cf-side:last-child { border-top: 1px solid var(--line); }
.cf-side > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cf-side small { color: var(--tx2); font-size: 13px; }
.cf-side b { font-family: var(--fr); font-size: 22px; font-weight: 750; }
.cf-arrow { position: relative; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; margin: -13px 0 -13px 8px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.cf-arrow .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.cf-perp { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 14px 16px; }
.cf-perp > div { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.cf-perp > div b { font-size: 17px; }
.cf-big { font-family: var(--fr); font-size: 22px; font-weight: 750; }
.cf-warn { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px rgba(255, 197, 107, .35); color: var(--tx2); font-size: 13.5px; line-height: 1.4; }
.cf-warn .ic { width: 18px; height: 18px; margin-top: 1px; color: var(--warn); }

.slide { position: relative; height: 56px; overflow: hidden; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); touch-action: none; }
.slide-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 56px; border-radius: 12px; background: linear-gradient(90deg, rgba(var(--accent-rgb), .1), rgba(var(--accent-rgb), .4)); transition: width .32s var(--ease); }
.slide-label {
  position: absolute; inset: 0; display: grid; place-items: center; padding-left: 44px; pointer-events: none;
  font-size: 15px; font-weight: 600; color: var(--tx2);
}
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.slide-knob { position: absolute; left: 4px; top: 4px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 9px; background: var(--accent); color: var(--accent-ink); transition: transform .32s var(--ease); touch-action: none; cursor: grab; }
.slide.drag .slide-knob, .slide.drag .slide-fill { transition: none; }
.slide.long .slide-knob { background: var(--up); color: #06261A; }
.slide.short .slide-knob { background: var(--down); color: #33090F; }
.slide.long .slide-fill { background: linear-gradient(90deg, rgba(76, 224, 164, .1), rgba(76, 224, 164, .42)); }
.slide.short .slide-fill { background: linear-gradient(90deg, rgba(255, 107, 122, .1), rgba(255, 107, 122, .42)); }
.slide.done .slide-label { opacity: 0 !important; }

.sheet.success { padding-top: 14px; text-align: center; }
.ok-mark { width: 84px; height: 84px; margin: 12px auto 14px; }
.ok-mark svg { width: 100%; height: 100%; }
.ok-mark circle { fill: rgba(76, 224, 164, .13); stroke: var(--up); stroke-width: 2.5; stroke-dasharray: 176; stroke-dashoffset: 176; animation: draw .6s .1s ease-out forwards; }
.ok-mark path { fill: none; stroke: var(--up); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s .55s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success h3 { margin: 0 0 8px; font-family: var(--fr); font-size: 23px; font-weight: 800; }
.ok-a { margin: 0; font-family: var(--fr); font-size: 30px; font-weight: 800; }
.success .muted { margin: 4px 0 22px; min-height: 1em; }
.ok-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.hd-top { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 18px; }
.hd-top b { font-family: var(--fr); font-size: 30px; font-weight: 800; }
.hd-top small { color: var(--tx2); }
.sig { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 650; }
.sig .ic { width: 15px; height: 15px; }
.ok-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--up); }

.amt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.amt-grid.three { grid-template-columns: repeat(3, 1fr); }
.amt { height: 50px; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); text-align: center; font-family: var(--fr); font-size: 16.5px; font-weight: 750; transition: box-shadow .15s, background .15s, color .15s; }
.amt.on { background: var(--accent); box-shadow: none; color: var(--accent-ink); }

.rcv { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 4px; text-align: center; }
.rcv .sheet-p { margin: 0; }
.rcv .mascot { width: 110px; height: auto; }
.addr { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line2); color: var(--accent); font-family: var(--fr); font-size: 19px; font-weight: 750; }
.addr .ic { width: 18px; height: 18px; }

/* ---------- leaderboard ---------- */
.lb { min-height: 64px; }
.lb.me { background: var(--card2); }
.lb-rank { width: 30px; text-align: center; font-size: 20px; flex: none; }
.lb-n { font-family: var(--fr); font-size: 15px; font-weight: 750; color: var(--tx2); }
.lb-me { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; padding: 14px 16px; font-weight: 650; }
.lb-me .ic { color: var(--warn); }

/* ---------- toasts ---------- */
#toasts { position: absolute; left: 12px; right: 12px; top: calc(var(--st) + 8px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 12px 16px; border-radius: 14px; background: var(--toastbg); box-shadow: inset 0 0 0 1px var(--line2), 0 10px 30px rgba(0, 0, 0, .4); font-size: 14.5px; font-weight: 650; line-height: 1.3; opacity: 0; transform: translateY(-18px) scale(.96); transition: transform .38s var(--ease), opacity .25s; }
.toast.on { opacity: 1; transform: none; }
.toast-ic { display: grid; color: var(--accent); }
.toast-ic .ic { width: 18px; height: 18px; }
.toast.ok .toast-ic { color: var(--up); }
.toast.err .toast-ic { color: var(--down); }

/* ---------- boot splash ---------- */
#boot { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; background: var(--grad); transition: opacity .45s; }
#boot.out { opacity: 0; pointer-events: none; }
#boot img { width: 46vw; max-width: 220px; height: auto; }
#boot .mascot { width: 140px; height: auto; }
.boot-msg { max-width: 30ch; margin: 0; color: var(--tx2); font-size: 15.5px; line-height: 1.45; }
#boot .btn { width: auto; padding: 0 28px; }

/* ---------- wallet ---------- */

/* ---------- motion ---------- */
.fl-up { animation: flUp .8s ease-out; }
.fl-dn { animation: flDn .8s ease-out; }
@keyframes flUp { 0% { color: var(--up); } }
@keyframes flDn { 0% { color: var(--down); } }
.spin:not(.sheet) { width: 18px; height: 18px; border: 2.5px solid rgba(0, 0, 0, .2); border-top-color: var(--accent-ink); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-height: 700px) {
  .key { height: 46px; }
  .sw-amt { font-size: 31px; }
  .hero-bal { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- floating pill navigation ---------- */
#tabbar { background: transparent; border-top: 0; display: flex; justify-content: center; align-items: flex-start; padding: 0 16px var(--sb); height: calc(var(--tabh) + var(--sb) + 8px); pointer-events: none; }
.pill { pointer-events: auto; display: flex; gap: 4px; width: 100%; max-width: 400px; padding: 5px; border-radius: 14px; background: var(--tabbg); box-shadow: 0 0 0 1px var(--line2), 0 12px 30px rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.pill .tab { flex: 1; flex-direction: row; gap: 7px; height: 46px; padding: 0 8px; border-radius: 10px; color: var(--tx2); font-size: 13.5px; font-weight: 600; letter-spacing: 0; transition: flex .3s var(--ease), background .25s, color .2s; }
.pill .tab::before { display: none; }
.pill .tab .ic { width: 22px; height: 22px; }
.pill .tab span { display: none; white-space: nowrap; }
.pill .tab.on { flex: 1.9; background: var(--accent); color: var(--accent-ink); }
.pill .tab.on span { display: inline; }
.screen { padding-bottom: calc(var(--tabh) + var(--sb) + 40px); }

/* ---------- wallet header ---------- */
.bar.top { gap: 8px; }
.idpill { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 10px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-align: left; }
.idpill small { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.idpill b { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idpill .ic { width: 16px; height: 16px; color: var(--tx3); }
.ibtn.accent { background: var(--accent); color: var(--accent-ink); box-shadow: none; }

/* ---------- bonuses ---------- */
.promo { display: flex; gap: 8px; }
.promo .inp { flex: 1; min-width: 0; }
.promo .inp input { font-family: var(--f); font-size: 16px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.promo .inp input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 500; }
.promo .btn { width: auto; padding: 0 16px; }
.ic-in { display: grid; color: var(--accent); }
.ic-in .ic { width: 20px; height: 20px; }
.bcards { display: flex; flex-direction: column; gap: 12px; }
.bcard { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 't i' 'a a'; align-items: center; gap: 10px 12px; padding: 14px 16px 16px; border-radius: var(--r); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.bcard-t { grid-area: t; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.bcard-t b { font-size: 17px; font-weight: 700; }
.bcard-t small { color: var(--tx2); font-size: 13px; line-height: 1.35; }
.bcard-a { grid-area: a; display: flex; gap: 8px; }
.bcard-a .btn { flex: 1; width: auto; white-space: nowrap; }
.bcard-a .btn:only-child { flex: 0 0 auto; }
.bstat { color: var(--tx3) !important; }
.bcard-ic { grid-area: i; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: var(--card2); box-shadow: inset 0 0 0 1px var(--line); color: var(--accent); }
.bcard-ic .ic { width: 30px; height: 30px; stroke-width: 1.8; }
.sheet.wheel-sheet { text-align: center; }
.wheel-wrap { position: relative; width: 250px; height: 250px; margin: 10px auto 16px; }
.wheel { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 6px var(--sheet), 0 0 0 8px var(--line2), 0 18px 40px rgba(0, 0, 0, .5); transform: rotate(0deg); }
.wheel .wl { position: absolute; left: 50%; top: 50%; width: 60px; margin: -10px 0 0 -30px; text-align: center; font-family: var(--fr); font-size: 14px; font-weight: 800; color: #0B1020; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
.wheel-pin { position: absolute; left: 50%; top: -14px; z-index: 2; width: 0; height: 0; margin-left: -12px; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 24px solid var(--ink); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); }
.wheel-hub { position: absolute; left: 50%; top: 50%; z-index: 2; width: 54px; height: 54px; margin: -27px 0 0 -27px; display: grid; place-items: center; border-radius: 50%; background: var(--sheet); box-shadow: 0 0 0 3px var(--line2); color: var(--accent); }
.wheel-hub .ic { width: 26px; height: 26px; }

/* ---------- activity ---------- */
.list.hist { padding: 0 0 4px; }
.list.hist .row + .row::before { display: none; }
.day-sep { display: flex; align-items: center; gap: 10px; padding: 10px 14px 2px; color: var(--tx3); font-size: 12px; font-weight: 600; }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); opacity: .7; }
.st { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.st.ok { background: rgba(76, 224, 164, .14); color: var(--up); }
.st.pend { background: rgba(255, 197, 107, .14); color: var(--warn); }
.pk .tok .ic { width: 18px; height: 18px; color: var(--accent-ink); }

/* strict typography: one family, restrained weights */
.cf-side b, .cf-big, .hold-h b, .hd-top b, .ok-a, .addr, .prof-t b, .lev-v, .success h3, .lb-n, .wheel .wl { font-family: var(--f) !important; }
.cf-side b, .cf-big, .hold-h b, .ok-a, .hd-top b { font-weight: 700 !important; }
.sw-flip { border-radius: 10px; }
.tab.on::before { display: none; }
.bcard-img { grid-area: i; width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); pointer-events: none; }
/* the price-mode pill only warns when prices are not live */
.mode.live { display: none; }
.mode.offline, .mode.connecting, .mode.stale { display: inline-block; }
/* top gainers: a fixed three-column grid, nothing cut off */
.movers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
.mover { flex: none; width: auto; min-width: 0; padding: 12px; gap: 6px; }
.mover-h { width: 100%; min-width: 0; font-size: 14px; }
.mover-h b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mover .spark { width: 100%; height: 30px; }
.mover-p { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mover-c { font-size: 12.5px; }
/* forecast status line: distance to the target and the countdown */
.fc-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; margin: 8px 2px 0; font-size: 14px; font-weight: 650; color: var(--tx2); }
.fc-status:empty { display: none; }
.fc-timer { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 7px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--tx); font-weight: 600; }
.fc-timer .ic { width: 15px; height: 15px; }

/* ---------- main account ---------- */
.banner { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-sm); background: rgba(255, 197, 107, .1); box-shadow: inset 0 0 0 1px rgba(255, 197, 107, .35); color: var(--tx2); font-size: 13px; line-height: 1.4; }
.banner .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--warn); }
.addr-box { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: var(--r-sm); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-align: left; }
.addr-box code { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; color: var(--tx); }
.addr-box .ic { flex: none; width: 18px; height: 18px; color: var(--accent); }
.addr-box.accent { box-shadow: inset 0 0 0 1.5px var(--accent); }
.addr-box.accent code { font-size: 17px; font-weight: 700; letter-spacing: .04em; }
.addr-inline { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
.field-note { margin: 8px 2px 10px; font-size: 12.5px; line-height: 1.4; color: var(--tx3); }
.field-note.warn { color: var(--warn); }
.st.rej { background: rgba(255, 107, 122, .14); color: var(--down); }
.sheet .chips { margin: 0; padding: 0 0 2px; }

/* ---------- pull to refresh ---------- */
.ptr { position: absolute; left: 50%; top: calc(var(--st) - 34px); z-index: 6; width: 36px; height: 36px; margin-left: -18px; display: grid; place-items: center; border-radius: 50%; background: var(--sheet); box-shadow: 0 0 0 1px var(--line2), 0 6px 16px rgba(0, 0, 0, .35); color: var(--tx2); opacity: 0; pointer-events: none; transition: opacity .15s; }
.ptr .ic { width: 18px; height: 18px; }
.ptr.ready { color: var(--accent); }
.ptr.busy .ic { animation: spin .8s linear infinite; color: var(--accent); }
.ptr.busy { transition: transform .2s var(--ease), opacity .15s; }

/* ---------- deposit QR ---------- */
.qr { width: 172px; height: 172px; margin: 4px auto 12px; padding: 8px; border-radius: 12px; background: #fff; }
.qr svg { display: block; width: 100%; height: 100%; }
.qr svg rect[fill="#ffffff"], .qr svg path[fill="#ffffff"] { fill: #fff; }
.qr:empty { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
#dp-check { margin-top: 14px; }
#rh-ex { margin-top: 6px; }

/* ---------- coin logos ---------- */
.tok.logo { border-radius: 50%; overflow: hidden; background: var(--c1); box-shadow: 0 0 0 1.5px var(--bg1); font-size: calc(var(--s) * .44); }
.tok.logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* chips with a coin / network logo; network logos next to multi-chain assets */
.chip .tok, .chip .tok.logo { box-shadow: none; }
.sheet .chips .chip { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 7px; }
.row-m small.nets { display: flex; align-items: center; gap: 4px; }
.row-m small.nets .tok { margin-left: 2px; box-shadow: 0 0 0 1px var(--bg1); }
.tok.logo { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 0 0 1.5px var(--bg1); }
/* small "demo" marker for futures and forecasts next to the real wallet */

/* Main-account contract funding */
.funding-select{width:100%;min-height:48px;border:1px solid var(--line,rgba(255,255,255,.18));border-radius:14px;padding:12px;color:var(--text,#fff);background:var(--bg1,#1b294b);font:inherit}
.funding-select option{background:#18223b;color:#fff}
.trading-note{margin:14px 0;color:var(--muted,#a9b4cf);line-height:1.5}

/* Trading charts: explicit range, readable axes and comfortable mobile controls. */
.trade-chart { margin: 14px 0 20px; padding: 12px 10px 4px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); overflow: hidden; }
.chart-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 2px 8px; color:var(--tx2); font-size:12px; }
.chart-refresh { min-height:32px; padding:4px 8px; border-radius:8px; color:var(--tx2); font:inherit; }
.trade-tfs { display:flex; flex-wrap:wrap; gap:4px; margin:0 0 10px; }
.trade-tfs button { flex:1 0 36px; min-width:36px; min-height:38px; padding:7px 4px; font-size:12px; border-radius:10px; }
.trade-tfs .tf-mode { flex:0 0 38px; margin-left:0; }
.chart-summary { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:4px 8px; min-height:34px; padding:0 2px; font-size:12px; color:var(--tx2); }
.chart-summary b { font-size:14px; font-weight:650; }
.chart-summary small { font-size:12px; }
.trade-chart .pchart.axes { position:relative; height:220px; margin:2px 0 0; }
.chart-message { position:absolute; left:8px; top:8px; right:8px; text-align:center; pointer-events:none; font-size:12px; color:var(--tx2); }
.chart-message:empty { display:none; }
.trade-chart canvas { width:100%; height:100%; }
.funding-select { color:var(--tx); background:var(--card); border-color:var(--line); }
@media (max-width:360px) { .trade-chart { padding:10px 6px 2px; } .trade-chart .pchart.axes { height:200px; } }
