/* Zero Pulse terminal */
@font-face { font-family: 'Sequel'; src: url('/_ext/fonts/SequelSans-Roman.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Sequel'; src: url('/_ext/fonts/SequelSans-HeadlineMedium.woff') format('woff'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'ZMono'; src: url('/_ext/fonts/ABCMonumentGroteskMono-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'ZMono'; src: url('/_ext/fonts/ABCMonumentGroteskMono-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --ink: #06080c;
  --bg: #090c12;
  --panel: #0c1017;
  --panel-2: #10151e;
  --raise: #141a25;
  --line: #161c27;
  --line-2: #212a39;
  --line-3: #2c3749;
  --text: #e3e9f3;
  --muted: #7c879a;
  --dim: #4c5668;
  --steel: #4f78bd;
  --steel-2: #6c92d4;
  --hi: #9dbcf0;
  --up: #3ccf91;
  --down: #f0626e;
  --warn: #e8b949;
  --mono: 'ZMono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Sequel', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--ink); color: var(--text); font: 13px/1.4 var(--sans); -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.pos { color: var(--up); } .neg { color: var(--down); }
code, .mono { font-family: var(--mono); }
.i { width: 14px; height: 14px; flex: none; display: block; }
:focus-visible { outline: 1px solid var(--steel-2); outline-offset: 1px; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; gap: 16px; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 5; flex: none; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: 4px; }
.brand-mark { width: 24px; height: 18px; }
.brand-word { height: 13px; opacity: .95; }
.tabs { display: flex; gap: 2px; }
.tab { background: none; border: 0; height: 30px; padding: 0 11px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 13px; display: inline-flex; align-items: center; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--raise); }
.search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 32px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--panel); color: var(--dim); }
.search:focus-within { border-color: var(--steel); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 12.5px; color: var(--text); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 10.5px var(--mono); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; color: var(--dim); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.chip { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 7px; font: 12px var(--mono); color: var(--muted); }
.sol-dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, #9945ff, #14f195); }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 7px; background: var(--panel); color: var(--muted); }
.icon-btn:hover { color: var(--text); border-color: var(--line-3); }
.icon-btn svg { width: 16px; height: 16px; }

.btn { height: 32px; padding: 0 13px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: background .12s, border-color .12s; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.btn:hover { background: var(--raise); border-color: var(--line-3); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.steel { background: var(--steel); border-color: var(--steel); color: #fff; }
.btn.steel:hover { background: var(--steel-2); border-color: var(--steel-2); }
.btn.ghost { background: transparent; }
.btn.wallet { font-family: var(--mono); font-weight: 500; }
.wdot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.btn.wallet.on .wdot { background: var(--up); }
.link { background: none; border: 0; padding: 0; color: var(--hi); font-size: 12px; }
.link:hover { text-decoration: underline; }
a.ext { display: inline-flex; align-items: center; gap: 4px; }
a.ext .i { width: 11px; height: 11px; }

/* ---------- sub bar ---------- */
.subbar { display: flex; align-items: center; gap: 16px; padding: 12px 16px 10px; flex-wrap: wrap; flex: none; }
.subbar-left { display: flex; align-items: center; gap: 12px; }
.subbar h1 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.live { display: inline-flex; align-items: center; gap: 6px; font: 10.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.live.ok .pulse-dot { background: var(--up); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(60,207,145,.45); } 100% { box-shadow: 0 0 0 6px rgba(60,207,145,0); } }
.quickbuy { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.qb-label { display: inline-flex; align-items: center; gap: 5px; font: 10.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.qb-input { display: flex; align-items: center; height: 30px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--panel); padding: 0 8px; gap: 4px; }
.qb-input:focus-within { border-color: var(--steel); }
.qb-input input { width: 58px; background: none; border: 0; outline: 0; font: 12.5px var(--mono); text-align: right; }
.qb-input span { font: 10.5px var(--mono); color: var(--dim); }
.qb-presets { display: flex; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; }
.qb-presets button { height: 28px; padding: 0 10px; border: 0; border-left: 1px solid var(--line-2); background: var(--panel); font: 12px var(--mono); color: var(--muted); }
.qb-presets button:first-child { border-left: 0; }
.qb-presets button:hover { color: var(--text); background: var(--panel-2); }
.qb-presets button.on { color: var(--text); background: var(--raise); box-shadow: inset 0 -2px 0 var(--steel); }
.presets button { height: 30px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line-2); background: transparent; font: 12px var(--mono); color: var(--muted); }
.presets button:hover { color: var(--text); border-color: var(--line-3); }
.presets button.on { color: var(--text); border-color: var(--steel); background: rgba(79,120,189,.12); }
.mobile-tabs { display: none; }

/* ---------- pulse columns ---------- */
.pulse { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0 16px 16px; }
.col { position: relative; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden; }
.col-head { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--line); flex: none; }
.col-head h2 { margin: 0; font-size: 13.5px; font-weight: 600; }
.count { font: 10.5px var(--mono); color: var(--muted); background: var(--raise); border-radius: 4px; padding: 1px 5px; }
.col-sub { margin-left: auto; font: 10.5px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.rows { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rows::-webkit-scrollbar { width: 6px; } .rows::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.skeleton { height: 84px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.025) 50%, transparent 100%); background-size: 200% 100%; animation: sk 1.4s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { padding: 32px 16px; text-align: center; color: var(--dim); font-size: 12.5px; }

.row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.row:hover { background: var(--panel); }
.row.flash { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: rgba(79,120,189,.14); } to { background: transparent; } }

/* avatar with bonding ring */
.av { --p: 0; --ring: var(--steel-2); position: relative; width: 64px; height: 64px; border-radius: 9px; padding: 2px; flex: none;
  background: conic-gradient(from -90deg, var(--ring) calc(var(--p) * 1%), var(--line-2) 0); }
.av.hot { --ring: var(--up); }
.av.full { --ring: var(--up); --p: 100; }
.av img, .av .gen { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); border-radius: 7px; object-fit: cover; display: block; background: var(--ink); }
.av img { z-index: 1; }
.gen { --h: 215; display: grid !important; place-items: center; font: 600 22px var(--sans); color: hsl(var(--h) 70% 78%);
  background: linear-gradient(145deg, hsl(var(--h) 40% 22%), hsl(var(--h) 45% 12%)) !important; }

.meta { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.l1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sym { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.nm { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cp { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 4px; background: none; color: var(--dim); padding: 0; }
.cp:hover { color: var(--text); background: var(--raise); }
.cp .i { width: 12px; height: 12px; }
.l2 { display: flex; align-items: center; gap: 8px; font: 11.5px var(--mono); color: var(--muted); min-width: 0; }
.age { color: var(--up); }
.soc { display: inline-flex; align-items: center; gap: 7px; }
.soc a { color: var(--dim); text-decoration: none; display: inline-grid; place-items: center; }
.soc a:hover { color: var(--text); }
.soc .i { width: 13px; height: 13px; }
.tag { font: 9.5px var(--mono); padding: 1px 5px; border-radius: 3px; border: 1px solid rgba(60,207,145,.3); color: var(--up); text-transform: uppercase; letter-spacing: .04em; }
.l3 { display: flex; align-items: center; gap: 12px; font: 11.5px var(--mono); color: var(--muted); min-width: 0; overflow: hidden; white-space: nowrap; }
.st { display: inline-flex; align-items: center; gap: 4px; }
.st .i { width: 12px; height: 12px; color: var(--dim); }
.st b { font-weight: 500; color: var(--text); }
.st.bond.hot b { color: var(--up); }
.st.chg { font-weight: 500; }
.bs { display: inline-block; width: 22px; height: 3px; border-radius: 2px; background: var(--down); overflow: hidden; margin-left: 2px; }
.bs i { display: block; height: 100%; background: var(--up); }

.right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mc { display: inline-flex; align-items: baseline; gap: 5px; font: 500 14px var(--mono); transition: color .6s; }
.mc small { color: var(--dim); font-size: 10px; font-weight: 400; letter-spacing: .04em; }
.row.up .mc b { color: var(--up); } .row.down .mc b { color: var(--down); }
.mc b { font-weight: 500; transition: color .6s; }
.qb { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border-radius: 6px; border: 1px solid var(--line-3); background: var(--panel-2); font: 500 12px var(--mono); color: var(--text); white-space: nowrap; transition: background .12s, border-color .12s; }
.qb .i { width: 12px; height: 12px; color: var(--hi); }
.qb:hover { background: var(--steel); border-color: var(--steel); }
.qb:hover .i { color: #fff; }
.qb:disabled { opacity: .5; }

/* ---------- column filters ---------- */
.fbtn { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); }
.fbtn .i { width: 13px; height: 13px; }
.fbtn:hover, .fbtn[aria-expanded="true"] { color: var(--text); border-color: var(--line-3); }
.fbtn.on { color: var(--hi); border-color: var(--steel); background: rgba(79,120,189,.12); }
.fcount { font: 10.5px var(--mono); }
.fcount:empty { display: none; }
.fpanel { position: absolute; top: 48px; left: 6px; right: 6px; z-index: 6; max-height: calc(100% - 54px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 16px 40px rgba(0,0,0,.6); animation: tin .16s ease-out; }
.fp-head { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px 8px; position: relative; }
.fp-head b { font-size: 13.5px; }
.fp-head span { font: 10.5px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.fp-body { overflow-y: auto; padding: 4px 14px 6px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.ff { display: block; margin-bottom: 11px; }
.ff > span { display: block; font: 10.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.ff > span i { font-style: normal; color: var(--dim); text-transform: none; letter-spacing: 0; margin-left: 4px; }
.ff input:not([type=checkbox]), .ff select { width: 100%; height: 32px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--ink); padding: 0 10px; outline: 0; font: 12px var(--mono); color: var(--text); min-width: 0; }
.ff input:focus, .ff select:focus { border-color: var(--steel); }
.ff input.bad { border-color: var(--down); }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { cursor: pointer; position: relative; }
.fchip input { position: absolute; opacity: 0; pointer-events: none; }
.fchip span { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); font: 12px var(--mono); color: var(--muted); }
.fchip:hover span { color: var(--text); }
.fchip input:checked + span { color: var(--text); border-color: var(--steel); background: rgba(79,120,189,.14); }
.fchip input:focus-visible + span { outline: 1px solid var(--steel-2); outline-offset: 1px; }
.fp-foot { display: flex; gap: 6px; padding: 10px 14px 12px; border-top: 1px solid var(--line); }
.fp-foot .btn { height: 30px; padding: 0 11px; font-size: 12px; }
.fp-foot .btn.steel { margin-left: auto; }
.empty .link { margin-top: 8px; font-size: 12px; }

/* ---------- positions ---------- */
.positions { flex: 1; overflow: auto; padding: 0 16px 16px; }
.pos-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 14px 0 12px; }
.pos-head h2 { margin: 0 0 4px; font-size: 17px; }
.pos-head p { margin: 0; font-size: 12.5px; }
.pos-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.pos-row { display: grid; grid-template-columns: 2fr 1.2fr 1.2fr 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.pos-row.head { font: 10.5px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.pos-row:last-child { border-bottom: 0; }
.pos-tk { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.pos-tk .av { width: 36px; height: 36px; border-radius: 7px; --p: 100; --ring: var(--line-2); }
.pos-tk .gen { font-size: 14px; }
.pos-actions { display: flex; gap: 6px; }
.pos-actions button { height: 26px; padding: 0 9px; border-radius: 6px; border: 1px solid rgba(240,98,110,.35); background: transparent; color: var(--down); font: 12px var(--mono); }
.pos-actions button:hover { background: rgba(240,98,110,.1); }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(2,3,6,.6); opacity: 0; transition: opacity .2s; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--bg); border-left: 1px solid var(--line-2); transform: translateX(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1); overflow-y: auto; padding: 18px 18px 28px; }
.drawer.open { pointer-events: auto; }
.drawer.open .drawer-scrim { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.x { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); display: grid; place-items: center; padding: 0; }
.x:hover { color: var(--text); border-color: var(--line-3); }
.x .i { width: 14px; height: 14px; }
.x.sm { top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 6px; }
.x.sm .i { width: 12px; height: 12px; }
.tk-head { display: flex; gap: 14px; align-items: center; padding-right: 40px; }
.tk-head img { width: 68px; height: 68px; border-radius: 10px; object-fit: cover; background: var(--panel); border: 1px solid var(--line-2); flex: none; }
.tk-head img.ph { object-fit: contain; padding: 16px; }
.tk-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 18px; font-weight: 600; }
.tk-sym { color: var(--muted); font-size: 13px; font-weight: 400; font-family: var(--mono); }
.badge { font: 10px var(--mono); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line-3); color: var(--hi); text-transform: uppercase; letter-spacing: .04em; }
.badge.mig { border-color: rgba(60,207,145,.35); color: var(--up); }
.tk-mint { display: flex; align-items: center; gap: 8px; margin-top: 7px; font: 12px var(--mono); color: var(--muted); flex-wrap: wrap; }
.tk-mint code { font-size: 11.5px; }
.tk-age { display: inline-flex; align-items: center; gap: 4px; color: var(--up); }
.tk-age .i { width: 12px; height: 12px; }
#tkLinks { margin-left: 4px; }
.tk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 16px 0 12px; background: var(--line); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.tk-stats div { background: var(--panel); padding: 9px 11px; }
.tk-stats div > span { display: block; font: 10px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.tk-stats b { font: 500 13px var(--mono); white-space: nowrap; }
.tk-stats sub { font-size: 9.5px; vertical-align: -2px; color: var(--muted); margin: 0 1px; }
.tk-curve { margin-bottom: 14px; }
.curve-label { display: flex; justify-content: space-between; font: 11px var(--mono); color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.curve-label b { color: var(--text); letter-spacing: 0; }
.bar { height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--steel-2); transition: width .4s; }
.bar.big { height: 6px; }
.tk-chart { height: 300px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--panel); margin-bottom: 14px; }
.tk-chart iframe { width: 100%; height: 100%; border: 0; display: block; }
.trade { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; background: var(--panel); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 3px; margin-bottom: 12px; }
.seg button { height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.seg button.on[data-side="buy"] { background: rgba(60,207,145,.12); color: var(--up); }
.seg button.on[data-side="sell"] { background: rgba(240,98,110,.12); color: var(--down); }
.presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 10px; }
.amount { display: flex; align-items: center; height: 40px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 12px; margin-bottom: 10px; background: var(--ink); }
.amount:focus-within { border-color: var(--steel); }
.amount input { flex: 1; background: none; border: 0; outline: 0; font: 500 15px var(--mono); }
.amount span { font: 11.5px var(--mono); color: var(--dim); }
.holding { font: 12px var(--mono); margin-bottom: 10px; }
.buy-btn, .sell-btn { width: 100%; height: 40px; font-size: 13.5px; border: 0; }
.buy-btn { background: var(--up); color: #04140c; }
.buy-btn:hover { background: #55dca2; }
.sell-btn { background: var(--down); color: #1a0306; }
.sell-btn:hover { background: #f47b85; }
.trade-meta { display: flex; justify-content: space-between; margin-top: 10px; font: 11px var(--mono); }
.tk-trades h3 { font-size: 12.5px; margin: 18px 0 8px; }
.trades { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.trades p { padding: 12px; margin: 0; font-size: 12.5px; }
.tr { display: grid; grid-template-columns: 44px 1fr 1fr 70px; gap: 8px; padding: 7px 12px; font: 12px var(--mono); border-bottom: 1px solid var(--line); }
.tr:last-child { border-bottom: 0; }
.tr .b { color: var(--up); } .tr .s { color: var(--down); }
.tr a { color: var(--muted); text-decoration: none; justify-content: flex-end; }
.tk-desc { font-size: 12.5px; margin-top: 16px; white-space: pre-wrap; word-break: break-word; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; pointer-events: none; padding: 16px; }
.modal-scrim { position: absolute; inset: 0; background: rgba(2,3,6,.7); opacity: 0; transition: opacity .18s; }
.modal-card { position: relative; width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 22px; opacity: 0; transform: translateY(8px); transition: .18s; }
.modal.open { pointer-events: auto; }
.modal.open .modal-scrim { opacity: 1; }
.modal.open .modal-card { opacity: 1; transform: none; }
.modal h3 { margin: 0 0 6px; font-size: 17px; }
.modal p { margin: 0 0 14px; color: var(--muted); font-size: 12.5px; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font: 10.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; height: 38px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--ink); padding: 0 12px; outline: 0; font: 12.5px var(--mono); color: var(--text); }
.field textarea { height: 80px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--steel); }
.addr { display: flex; align-items: center; gap: 8px; background: var(--ink); border: 1px solid var(--line-2); border-radius: 7px; padding: 10px 12px; font: 12px var(--mono); word-break: break-all; }
.addr button { flex: none; }
.qr { width: 196px; height: 196px; margin: 6px auto 14px; background: #fff; border-radius: 10px; padding: 10px; }
.qr img, .qr svg { width: 100%; height: 100%; display: block; }
.stack { display: grid; gap: 8px; }
.stack .btn { height: 40px; width: 100%; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.warnbox { border: 1px solid rgba(232,185,73,.3); background: rgba(232,185,73,.06); color: #ecd08a; border-radius: 7px; padding: 10px 12px; font-size: 12.5px; margin: 0 0 14px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.wallet-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel); text-align: left; }
.wallet-opt:hover { border-color: var(--steel); }
.wallet-opt b { display: block; font-size: 13.5px; }
.wallet-opt small { color: var(--muted); font-size: 12px; }
.wallet-opt .ico { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--ink); border: 1px solid var(--line); flex: none; }
.wallet-opt .ico img { width: 20px; }
.bal { font: 500 26px var(--mono); margin: 2px 0; }
.kv { display: flex; justify-content: space-between; font: 12px var(--mono); color: var(--muted); padding: 6px 0; border-bottom: 1px solid var(--line); }
.kv b { color: var(--text); font-weight: 500; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: grid; gap: 8px; width: min(340px, calc(100% - 32px)); }
.toast { background: var(--panel-2); border: 1px solid var(--line-2); border-left: 2px solid var(--steel); border-radius: 8px; padding: 11px 13px; font-size: 12.5px; box-shadow: 0 10px 30px rgba(0,0,0,.45); animation: tin .2s ease-out; }
.toast b { display: flex; align-items: center; margin-bottom: 2px; font-size: 13px; }
.toast span { color: var(--muted); }
.toast a { color: var(--hi); }
.toast.ok { border-left-color: var(--up); } .toast.err { border-left-color: var(--down); }
.toast.pending b::after { content: ''; display: inline-block; width: 9px; height: 9px; margin-left: 8px; border: 1.5px solid var(--hi); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes tin { from { opacity: 0; transform: translateY(6px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .row { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; }
  .av { width: 52px; height: 52px; }
  .gen { font-size: 18px; }
  .l3 .st.chg { display: none; }
}
@media (max-width: 1100px) {
  .tab:not(.active) { display: none; }
  .tabs .tab[data-view="positions"] { display: inline-flex; }
}
@media (max-width: 860px) {
  body { overflow: auto; }
  .top { flex-wrap: wrap; gap: 10px; height: auto; padding: 10px 16px; }
  .search { order: 5; max-width: none; flex-basis: 100%; }
  .chip.sol-price, .brand-word, .search kbd { display: none; }
  .tabs { display: none; }
  .subbar { padding: 12px 16px 8px; gap: 10px; }
  .quickbuy { margin-left: 0; width: 100%; }
  .qb-label { display: none; }
  .mobile-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; width: 100%; background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; padding: 3px; }
  .mtab { height: 30px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 12.5px; }
  .mtab.active { background: var(--raise); color: var(--text); }
  .pulse { grid-template-columns: 1fr; padding: 0 16px 16px; min-height: 70vh; }
  .col { display: none; }
  .col.active { display: flex; min-height: 70vh; }
  .l3 .st.chg { display: inline-flex; }
  .positions { padding: 0 16px 16px; }
  .pos-row { grid-template-columns: 1.6fr 1fr auto; }
  .pos-row > :nth-child(3), .pos-row > :nth-child(4) { display: none; }
  .tk-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .qb-presets button:nth-child(n+4) { display: none; }
  .l3 { gap: 9px; }
  .l3 .st.chg { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
