/* Flowmark. Markets-terminal layout: a slim icon rail, a Markets list beside one big live panel, near-black
   surfaces, one soft green accent, mono numbers. Green and red only for buying and selling. View only. */
:root, :root[data-theme="dark"] {
  --brand: #6fdc8c; --brand-ink: #0b0c0c; --brand-soft: rgba(111, 220, 140, .12);
  --page: #0b0c0c; --paper: #0b0c0c; --list: #111312; --rail: #131514; --card-2: #1a1c1b; --card-3: #232624; --sel: #1c1e1d;
  --ink: #f4f6f5; --ink-2: #d5d9d7; --ink-3: #9aa19d; --ink-4: #7a817d; --ink-5: #4a504c;
  --line: #1f2221; --line-2: #2a2e2c; --line-3: #363b38;
  --up: #3fc47a; --up-t: #6fdc8c; --down: #e5555f; --down-t: #f07079;
  --up-soft: rgba(63, 196, 122, .13); --down-soft: rgba(229, 85, 95, .13);
  --pos-bg: rgba(63, 196, 122, .12); --neg-bg: rgba(229, 85, 95, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .45);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --display: 'Outfit', 'Inter', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  /* chart canvas reads these */
  --panel: #0b0c0c; --muted: #8a918d; --faint: #4f5652; --grid: #161918; --vol: #262a28;
  --buy: #3fc47a; --sell: #e5555f; --accent: #5d6460; --violet: #9b8cff; --spike: #f5a524; --vwap: #e87ba4; --tag-ink: #0b0c0c;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --brand: #10893e; --brand-ink: #ffffff; --brand-soft: rgba(16, 137, 62, .1);
  --page: #ffffff; --paper: #ffffff; --list: #f6f7f6; --rail: #f1f3f2; --card-2: #f1f3f2; --card-3: #e7eae8; --sel: #e9ecea;
  --ink: #0b0c0c; --ink-2: #2e3330; --ink-3: #5b625e; --ink-4: #868d89; --ink-5: #c3c8c5;
  --line: #eceeed; --line-2: #e1e4e2; --line-3: #d3d7d5;
  --up: #10893e; --up-t: #10893e; --down: #cf2533; --down-t: #cf2533;
  --up-soft: #e5f4ea; --down-soft: #fcebec;
  --pos-bg: rgba(16, 137, 62, .1); --neg-bg: rgba(207, 37, 51, .09);
  --shadow: 0 1px 2px rgba(11, 12, 12, .05), 0 12px 32px rgba(11, 12, 12, .08);
  --panel: #ffffff; --muted: #5b625e; --faint: #a6ada9; --grid: #f1f3f2; --vol: #e2e6e4;
  --buy: #10893e; --sell: #cf2533; --accent: #a6ada9; --tag-ink: #ffffff;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--page); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: var(--page);
  font: 400 15px/1.4 var(--font); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; letter-spacing: inherit; text-align: inherit; }
input { font: inherit; color: inherit; }
svg, img { display: block; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 10px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.up { color: var(--up-t); } .down { color: var(--down-t); }
:root[data-theme="dark"] .i-sun, :root[data-theme="light"] .i-moon { display: none; }

/* ---------- frame ---------- */
.app { min-height: 100vh; }
.rail { display: none; }
.main { min-width: 0; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; height: calc(60px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0; background: var(--page); border-bottom: 1px solid var(--line); }
.logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); flex: none; }
.logo svg { width: 20px; height: 20px; }
.bar-h { margin: 0; font: 500 24px/1 var(--display); letter-spacing: -0.02em; }
.top-r { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.search-box { display: none; align-items: center; gap: 10px; width: 300px; height: 40px; padding: 0 12px 0 14px; border-radius: 12px; background: var(--card-2); color: var(--ink-4); font-size: 14.5px; transition: background .15s; }
.search-box svg { width: 17px; height: 17px; flex: none; }
.search-box span { flex: 1; text-align: left; }
.search-box kbd { font: 500 12px var(--mono); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-3); color: var(--ink-4); }
.sq { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-3); border: 1.5px solid var(--line-3); flex: none; transition: color .15s, border-color .15s; }
.sq svg { width: 20px; height: 20px; }
.sq[aria-expanded="true"] { color: var(--brand); border-color: var(--brand); }
.bell-wrap { position: relative; }
.badge { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--down); }

/* ---------- detail panel ---------- */
.d-head { padding: 22px 16px 14px; }
.asset-id { display: inline-flex; align-items: baseline; gap: 10px; max-width: 100%; border-radius: 10px; }
.a-name { font: 500 26px/1.15 var(--display); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-sub { font-size: 14px; color: var(--ink-4); white-space: nowrap; }
.chev { width: 16px; height: 16px; flex: none; color: var(--ink-4); align-self: center; }
.price-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.a-icon { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: #f7931a; color: #fff; font-weight: 700; font-size: 18px; }
.a-icon.img { background: none !important; font-size: 0; }
.a-icon svg { width: 100%; height: 100%; }
.a-icon.txt { font-size: 11px; }
.price { font: 500 46px/1 var(--display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price .dec { color: var(--ink-4); }
.chg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 22px; margin-top: 12px; font-size: 15px; }
.chg { font: 500 15.5px var(--font); color: var(--ink-3); }
.chg .tri { display: none; }
.chg .when { color: var(--ink-4); font-weight: 400; margin-left: 8px; }
.status { font-size: 13.5px; color: var(--ink-4); }
.status:empty { display: none; }

/* chart card: tabs with a green underline, timeframe and tools on the right */
.chart-card { display: flex; flex-direction: column; background: var(--paper); }
.cc-head { position: relative; flex: none; display: flex; align-items: stretch; gap: 8px; height: 50px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 24px; }
.tabs button { position: relative; font-size: 16px; font-weight: 500; color: var(--ink-3); transition: color .15s; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--brand); }
.tabs button[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); }
.cc-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--card-2); }
.seg button { height: 28px; min-width: 36px; padding: 0 8px; border-radius: 7px; font: 500 13px var(--mono); color: var(--ink-3); transition: background .15s, color .15s; text-align: center; }
.seg button[aria-pressed="true"] { background: var(--card-3); color: var(--ink); }
.tsep { display: none; width: 1px; height: 22px; margin: 0 6px; background: var(--line-2); }
.tool { width: 34px; height: 34px; border-radius: 9px; display: none; place-items: center; color: var(--ink-4); transition: background .15s, color .15s; }
.tool svg { width: 19px; height: 19px; }
.tool[aria-pressed="true"] { color: var(--brand); }
.cc-body { position: relative; height: clamp(320px, 52svh, 540px); }
.pane { position: absolute; inset: 0; }
.pane canvas { position: absolute; inset: 0; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; outline: none; }
.cc-panel { position: absolute; inset: 0; z-index: 3; background: var(--panel); overflow: auto; }
.legend { display: none; }
.pops { position: absolute; left: 16px; top: 14px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; z-index: 2; }
.pops b { align-self: flex-start; padding: 3px 9px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--line-2); font: 600 13px var(--mono); animation: popfade 9s var(--ease) forwards; }
.pops b.up { color: var(--up-t); } .pops b.down { color: var(--down-t); }
@keyframes popfade { 0% { opacity: 0; transform: translateY(-6px); } 3% { opacity: 1; transform: none; } 70% { opacity: .9; } 100% { opacity: 0; } }
.now-btn { position: absolute; right: 78px; bottom: 40px; z-index: 2; height: 32px; padding: 0 14px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-size: 13.5px; font-weight: 600; }
.chart-card:fullscreen { height: 100vh; }
.chart-card:fullscreen .cc-body { height: auto; flex: 1; }

/* order book */
.ob { min-height: 100%; display: flex; flex-direction: column; padding: 8px 0 10px; font-size: 14px; container-type: inline-size; }
.ob-msg { margin: auto; padding: 40px 20px; color: var(--ink-3); text-align: center; }
.ob-head, .ob-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; padding: 0 16px; }
.ob-head { font-size: 13px; color: var(--ink-3); padding-top: 6px; padding-bottom: 8px; }
.ob-head span, .ob-row span { text-align: right; }
.ob-head span:first-child, .ob-row span:first-child { text-align: left; }
.ob-row { position: relative; height: 26px; align-items: center; color: var(--ink-2); }
.ob-row i { position: absolute; right: 0; top: 2px; bottom: 2px; }
.ob-row.ask i { background: var(--neg-bg); } .ob-row.bid i { background: var(--pos-bg); }
.ob-row span { position: relative; }
.ob-row.ask .p { color: var(--down-t); font-weight: 600; } .ob-row.bid .p { color: var(--up-t); font-weight: 600; }
.ob-mid { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 16px; margin: 4px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ob-mid b { font: 600 18px var(--mono); }
.ob-mid span { font-size: 13px; color: var(--ink-3); }
.ob-src { margin-top: auto; padding: 12px 16px 0; font-size: 12.5px; color: var(--ink-4); }
@container (max-width: 420px) { .ob-head, .ob-row { grid-template-columns: 1fr 1fr; } .ob .t { display: none; } }

/* trades */
.tp-wrap { height: 100%; }
.tp { font-size: 14px; container-type: inline-size; }
.tp-row { display: grid; grid-template-columns: 1fr .7fr 1.2fr 1fr 1fr 1.1fr; gap: 12px; align-items: center; height: 32px; padding: 0 16px; color: var(--ink-2); }
.tp-row span:nth-child(n+3):nth-child(-n+5) { text-align: right; }
.tp-row .ex { color: var(--ink-3); text-align: right; }
.tp-head { position: sticky; top: 0; z-index: 1; height: 40px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.tp-head span:last-child { text-align: right; }
.tp-row.hot .v { color: var(--ink); font-weight: 600; }
.tp-empty { padding: 40px 16px; text-align: center; color: var(--ink-3); }
@container (max-width: 520px) {
  .tp-row { grid-template-columns: 1fr .8fr 1.3fr 1fr; gap: 8px; }
  .tp-row span:nth-child(5), .tp-row span:nth-child(6) { display: none; }
  .tp-row span:nth-child(4) { text-align: right; }
}


/* ---------- list rows (signal, order flow) ---------- */
.live-side { padding: 0 16px 8px; }
.sec { margin: 22px 0 2px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); }
.row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; column-gap: 14px; width: 100%; min-height: 66px; padding: 10px 0; text-align: left; border-bottom: 1px solid var(--line); }
.side-col > .row:last-child { border-bottom: 0; }
.ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--card-3); color: var(--ink); font-weight: 700; font-size: 17px; }
.ic svg { width: 20px; height: 20px; }
.ic.soft { background: var(--card-2); color: var(--ink-3); }
.ic.up-ic { background: var(--up-soft); color: var(--up-t); }
.ic.down-ic { background: var(--down-soft); color: var(--down-t); }
.ic.coin { color: #fff; background: var(--ink-5); }
.ic.txt { font-size: 11px; }
.r-t { display: flex; flex-direction: column; min-width: 0; }
.r-name { font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.r-sub { margin-top: 3px; font-size: 14px; color: var(--ink-4); }
.r-sub:empty { display: none; }
.r-v { display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; }
.r-v b { font-size: 16px; font-weight: 500; color: var(--ink); }
.r-v > span { margin-top: 3px; font-size: 14px; color: var(--ink-4); }

.dock { border-bottom: 1px solid var(--line); }
.dock .row { border-bottom: 0; }
.dock-top { grid-template-columns: 40px minmax(0, 1fr) 20px; }
.dock .ic { background: var(--card-3); color: var(--ink); }
.dock.up .ic { background: var(--up-soft); color: var(--up-t); }
.dock.down .ic { background: var(--down-soft); color: var(--down-t); }
.dock.up .sig { color: var(--up-t); } .dock.down .sig { color: var(--down-t); }
.dock .go { width: 18px; height: 18px; color: var(--ink-5); }
.tug { display: flex; align-items: center; gap: 10px; padding: 0 0 14px; }
.tug-k { font-size: 13.5px; color: var(--ink-4); white-space: nowrap; }
.tug-k b { font: 500 14px var(--mono); }
.tug-k.b b { color: var(--up-t); } .tug-k.s b { color: var(--down-t); }
.tug-bar { position: relative; flex: 1; height: 6px; border-radius: 3px; background: var(--down); overflow: hidden; }
.tug-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; background: var(--up); border-right: 2px solid var(--paper); transition: width .7s var(--ease); }

.verdict-v { font: 600 15px var(--mono); letter-spacing: .04em; padding: 6px 10px; border-radius: 8px; background: var(--card-2); transition: color .3s, background .3s; }
.verdict-v.buy { color: var(--up-t); background: var(--up-soft); } .verdict-v.sell { color: var(--down-t); background: var(--down-soft); } .verdict-v.wait { color: var(--ink-4); }

.meter .r-v .bar { position: relative; display: block; width: 72px; height: 4px; margin-top: 8px; border-radius: 2px; background: var(--card-3); overflow: hidden; }
.meter .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; transition: width .6s var(--ease); }
.meter.buy .bar i { background: var(--up); } .meter.sell .bar i { background: var(--down); }
.meter.buy b.hot { color: var(--up-t); } .meter.sell b.hot { color: var(--down-t); }

.candle .big small { font: 400 13px var(--font); color: var(--ink-4); margin-left: 5px; }
.split-k { display: flex; gap: 8px; font: 500 13px var(--mono) !important; }
.split-k .up { color: var(--up-t); } .split-k .down { color: var(--down-t); }
.split-k span:empty { display: none; }
.split { grid-column: 1 / -1; height: 4px; margin-top: 10px; border-radius: 2px; background: var(--down); overflow: hidden; }
.split i { display: block; height: 100%; width: 50%; background: var(--up); border-right: 2px solid var(--paper); transition: width .5s var(--ease); }

.notice { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--card-2); color: var(--ink-2); font-size: 14px; grid-column: 1 / -1; }
.rules { margin-top: 8px; grid-column: 1 / -1; border-top: 1px solid var(--line); }
.rules summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 54px; font-size: 15.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.rules summary::-webkit-details-marker { display: none; }
.rules summary svg { width: 18px; height: 18px; color: var(--ink-4); transition: transform .2s; }
.rules[open] summary svg { transform: rotate(180deg); }
.rules p { margin: 0 0 12px; font-size: 14px; line-height: 1.6; color: var(--ink-3); max-width: 80ch; }
.rules .fine { font-size: 13px; color: var(--ink-4); }

/* ---------- markets list ---------- */
.home { background: var(--list); }
.cats { display: flex; gap: 22px; height: 50px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.cat { position: relative; display: flex; align-items: center; font-size: 15px; font-weight: 500; color: var(--ink-3); }
.cat .ci { display: none; }
.cat[aria-pressed="true"] { color: var(--brand); }
.cat[aria-pressed="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); }
.home-body { padding: 0 0 8px; }
.home .sec { padding: 0 16px; }
.feat-wrap { padding: 0 16px; }
.feat-wrap .sec { padding: 0; }
.feat { display: block; width: 100%; padding: 2px 16px 14px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--paper); }
.feat .row { min-height: 62px; border-bottom: 0; }
.feat-sp { width: 100%; height: 64px; margin: 2px 0 10px; overflow: visible; }
.feat-f { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--ink-4); }
.feat-f b { font-weight: 600; color: var(--ink); }
.feat-f b.up { color: var(--up-t); } .feat-f b.down { color: var(--down-t); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.tile { grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 16px; min-height: 76px; padding: 12px 16px; transition: background .12s; }
.tile .r-name { font-size: 16px; font-weight: 600; letter-spacing: .005em; }
.tile .r-sub { font-size: 14px; }
.tile .r-v b { font: 500 15.5px var(--mono); }
.tile .pct { font: 500 14px var(--mono); }
.tile .pct.up { color: var(--up-t); } .tile .pct.down { color: var(--down-t); }
.tile .spark { display: none; }
.tile[aria-current="true"] { background: var(--sel); }
.foot { display: flex; flex-direction: column; gap: 4px; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); font-size: 12.5px; color: var(--ink-4); border-top: 1px solid var(--line); }

/* ---------- popovers ---------- */
.pop { position: absolute; z-index: 80; width: 280px; padding: 12px; border-radius: 16px; background: var(--rail); color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--shadow); text-align: left; }
.alerts-pop { right: 0; top: 50px; width: min(300px, calc(100vw - 32px)); }
.settings-pop { position: fixed; right: 12px; }
.pop-h { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); margin: 2px 4px 10px; }
.pop-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 0 12px; border-radius: 12px; background: var(--card-2); font-size: 15px; font-weight: 500; text-align: left; }
.pop-row + .pop-row { margin-top: 6px; }
.pop-row b { font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.pop-fine { margin: 10px 4px 2px; font-size: 12.5px; line-height: 1.5; color: var(--ink-4); }
.alert-list { margin-top: 8px; max-height: 260px; overflow: auto; }
.alert-i { display: flex; justify-content: space-between; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.alert-i:last-child { border-bottom: 0; }
.alert-i b.up { color: var(--up-t); } .alert-i b.down { color: var(--down-t); }
.alert-i span { color: var(--ink-3); }

/* ---------- bottom tab bar (phones and tablets) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--rail); border-top: 1px solid var(--line); --tab-cut: var(--rail); }
.tabbar button { position: relative; flex: 1; display: grid; place-items: center; color: var(--ink-5); transition: color .15s; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button[aria-current="page"], .tabbar button[aria-expanded="true"] { color: var(--brand); }

/* ---------- search sheet and modal ---------- */
.sheet, .modal { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding: 80px 16px 16px; }
.modal { align-items: center; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(10, 11, 13, .45); animation: fade .2s; }
.sheet-panel { position: relative; width: 100%; max-width: 600px; max-height: min(720px, calc(100dvh - 110px)); display: flex; flex-direction: column; background: var(--paper); border-radius: 20px; box-shadow: 0 24px 80px rgba(10, 11, 13, .25); overflow: hidden; animation: rise .28s var(--ease); }
.modal-panel { position: relative; width: 340px; max-width: 100%; padding: 24px; border-radius: 20px; background: var(--paper); box-shadow: 0 24px 80px rgba(10, 11, 13, .25); animation: rise .28s var(--ease); }
.modal-panel h2 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.modal-panel p { margin: 0 0 18px; font-size: 15px; line-height: 1.5; color: var(--ink-3); }
.btn { width: 100%; height: 48px; border-radius: 12px; background: var(--brand); color: #fff; font-size: 16px; font-weight: 600; text-align: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.99); } }
.sheet-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sheet-top .link { flex: none; font-weight: 600; color: var(--brand); }
.field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 12px; background: var(--card-2); color: var(--ink-4); }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--brand); }
.field svg { width: 19px; height: 19px; flex: none; }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); }
.field input::-webkit-search-cancel-button { display: none; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 8px 16px; overscroll-behavior: contain; }
.sec-h { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-4); padding: 16px 12px 6px; display: flex; justify-content: space-between; gap: 10px; }
.sec-h small { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-4); font-size: 12.5px; }
.res { display: flex; align-items: center; border-radius: 12px; }
.res.sel { background: var(--card-2); }
.res-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 10px 12px; text-align: left; }
.res-txt { min-width: 0; flex: 1; }
.res-sym { font-weight: 600; font-size: 16px; }
.res-name { font-size: 14px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-icon { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--card-3); color: #fff; font-weight: 700; font-size: 12.5px; overflow: hidden; }
.tag { font-size: 13px; font-weight: 500; color: var(--ink-4); white-space: nowrap; }
.res-opt, .opt-head, .exps, .seg2, .strike { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 12px 6px; }
.chips .chip { height: 38px; padding: 0 16px; border-radius: 12px; background: var(--card-2); font: 600 14px var(--font); color: var(--ink); display: inline-flex; align-items: center; }
.empty { padding: 28px 12px; text-align: center; color: var(--ink-3); font-size: 14.5px; }


@media (hover: hover) {
  .search-box:hover { background: var(--card-3); }
  .sq:hover { color: var(--ink); border-color: var(--ink-4); }
  .asset-id:hover .chev, .asset-id:hover .a-sub { color: var(--ink-2); }
  .seg button:not([aria-pressed="true"]):hover { color: var(--ink); }
  .tabs button:not([aria-selected="true"]):hover, .cat:not([aria-pressed="true"]):hover { color: var(--ink); }
  .tool:hover { color: var(--ink); background: var(--card-2); }
  .res:hover { background: var(--card-2); }
  .tile:hover { background: var(--sel); }
  .feat:hover { border-color: var(--line-3); }
  .dock-top:hover .go { color: var(--ink-3); }
  .rail-i:hover { color: var(--ink); border-color: var(--ink-4); }
}

/* ---------- phones ---------- */
@media (max-width: 899px) {
  body.v-live .home, body.v-home .live { display: none; }
  .settings-pop { bottom: calc(74px + env(safe-area-inset-bottom)); }
  .pane canvas { touch-action: pan-y; }
  .cc-head { padding: 0 12px 0 16px; }
  .sheet { padding: 0; align-items: stretch; }
  .sheet-panel { max-width: none; max-height: none; height: 100dvh; border-radius: 0; padding-top: env(safe-area-inset-top); }
  .sheet-top { padding: 10px 14px; }
  .sheet-body { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .home { min-height: calc(100vh - 60px); }
}
@media (max-width: 420px) {
  .tabs { gap: 18px; }
  .tabs button { font-size: 15px; }
  .seg button { min-width: 30px; padding: 0 5px; font-size: 12px; }
  .price { font-size: 40px; }
  .a-icon { width: 34px; height: 34px; }
}
@media (max-width: 360px) { .price { font-size: 34px; } .a-sub { display: none; } }

/* ---------- desktop: rail + Markets list + one big panel ---------- */
@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 76px minmax(0, 1fr); }
  .rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 0; background: var(--rail); border-right: 1px solid var(--line); }
  .rail-logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); margin-bottom: 26px; }
  .rail-logo svg { width: 22px; height: 22px; }
  .rail-i { position: relative; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; border: 2px solid var(--line-3); color: var(--ink-4); transition: color .15s, border-color .15s; }
  .rail-i svg { width: 17px; height: 17px; }
  .rail-i[aria-current="page"], .rail-i[aria-expanded="true"] { border-color: var(--brand); color: var(--brand); }
  .rail-i[aria-current="page"]::before { content: ''; position: absolute; left: -10px; top: 50%; width: 4px; height: 4px; margin-top: -2px; background: var(--brand); }
  .rail-i[data-nav="settings"] { margin-top: auto; }
  .bar { height: 84px; padding: 0 28px 0 40px; }
  .bar .logo { display: none; }
  .bar-h { font-size: 30px; }
  .search-box { display: flex; }
  .tabbar { display: none; }
  .cols { display: grid; grid-template-columns: 420px minmax(0, 1fr); align-items: start; }
  .home { position: sticky; top: 84px; height: calc(100vh - 84px); overflow-y: auto; border-right: 1px solid var(--line); scrollbar-width: thin; }
  .home .feat-wrap, .home #gridTitle { display: none; }
  .cats { padding: 0 24px 0 40px; }
  .tile { padding: 14px 28px 14px 40px; min-height: 92px; border-bottom: 1px solid var(--line); }
  .tile .ic { width: 42px; height: 42px; }
  .d-head { padding: 34px 40px 22px; }
  .a-name { font-size: 30px; }
  .price { font-size: 64px; }
  .a-icon { width: 52px; height: 52px; font-size: 22px; }
  .price-row { gap: 16px; margin-top: 22px; }
  .chg-row { margin-top: 16px; font-size: 16px; }
  .cc-head { padding: 0 24px 0 40px; height: 54px; }
  .tabs { gap: 32px; }
  .tabs button { font-size: 17px; }
  .tool, .tsep { display: grid; }
  .tsep { display: block; }
  .cc-body { height: clamp(420px, calc(100vh - 380px), 680px); }
  .live-side { padding: 6px 40px 16px; border-top: 1px solid var(--line); }
  .ob-head, .ob-row, .ob-mid, .ob-src, .tp-row, .tp-empty { padding-left: 40px; padding-right: 28px; }
  .foot { flex-direction: row; justify-content: space-between; gap: 24px; padding: 18px 40px 28px; }
  .now-btn { right: 86px; }
}
@media (min-width: 1280px) {
  .live-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
}
@media (min-width: 1440px) {
  .cols { grid-template-columns: 480px minmax(0, 1fr); }
}
