/* Kairo Exchange app screens. Uses tokens from styles.css. */

.wrap-wide { max-width: 1520px; }
.brand span { display: flex; align-items: baseline; gap: 6px; }
.brand small { font: 500 13px var(--sans); color: var(--dim); letter-spacing: -.01em; }
.nav-links a.on { color: var(--text); }
.nav-links a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -21px; height: 2px; background: var(--lemon); }
.ticker-track a:hover b { color: var(--lemon); }
.muted { color: var(--muted); }
.full { width: 100%; }

/* Segmented controls + sliding indicator (indicator injected by motion-ui.js) */
.seg, .bs, .side-tabs, .market-tabs { position: relative; }
.ind { position: absolute; top: 0; left: 0; z-index: 0; border-radius: 99px; pointer-events: none; background: var(--lemon); }
.seg button, .bs button, .side-tabs button { position: relative; z-index: 1; }
.side-tabs .ind { background: var(--surface-3); border-radius: 8px; }
.bs .ind { background: var(--ind-c, var(--up)); border-radius: 99px; }
.bs .buy { --ind: var(--up); }
.bs .sell { --ind: var(--down); }

/* Wallet */
.wallet-slot { position: relative; }
.wallet-btn { font-family: var(--mono); font-weight: 500; background: var(--surface); border: 0; }
.wallet-btn:hover { background: var(--surface-2); }
.wallet-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lemon); }
.wallet-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .9); display: grid; z-index: 60; transform-origin: top right; }
.wallet-menu a, .wallet-menu button { text-align: left; padding: 11px 12px; border-radius: 10px; font-size: 14px; color: var(--muted); }
.wallet-menu a:hover, .wallet-menu button:hover { background: var(--surface-3); color: var(--text); }
.wallet-menu .danger:hover { color: var(--down); }

/* Modal */
.kx-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); opacity: 0; transition: opacity .18s; }
.kx-modal.show { opacity: 1; }
.kx-modal-card { position: relative; width: 100%; max-width: 420px; padding: 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.kx-modal-card h3 { font-size: 24px; letter-spacing: -.04em; margin-bottom: 8px; }
.kx-modal-card p { margin: 0 0 20px; font-size: 14px; }
.kx-modal-x { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 99px; font-size: 20px; color: var(--muted); background: var(--surface-2); }
.kx-modal-x:hover { color: var(--text); }
.wallet-list { display: grid; gap: 6px; margin-bottom: 14px; }
.wallet-opt { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); text-align: left; transition: background .15s; }
.wallet-opt:hover { background: var(--surface-3); }
.wallet-opt b { flex: 1; font-weight: 600; }
.wallet-opt small { color: var(--dim); font: 500 12px var(--mono); }
.wallet-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: #fff; }
.wallet-ic.phantom { background: #AB9FF2; color: #1C1C33; }
.wallet-ic.solflare { background: #FC7227; }
.wallet-ic.backpack { background: #E33E3F; }
.ack-list { margin: 8px 0 20px; padding-left: 18px; display: grid; gap: 10px; color: var(--muted); font-size: 13.5px; }
.ack-list b { color: var(--text); font-weight: 600; }
.ack-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-bottom: 16px; cursor: pointer; }
.ack-check input { margin-top: 3px; accent-color: var(--lemon); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* Toasts */
#kx-toasts { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 300; display: grid; gap: 8px; max-width: min(380px, calc(100% - 32px)); }
.kx-toast { padding: 14px 16px 14px 18px; border-radius: 14px; background: var(--surface-2); border-left: 3px solid var(--dim); font-size: 14px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .9); opacity: 0; transform: translateY(8px); transition: .2s; }
.kx-toast.show { opacity: 1; transform: none; }
.kx-toast.ok { border-left-color: var(--lemon); }
.kx-toast.err { border-left-color: var(--down); }
.kx-toast a { color: var(--lemon); }

/* Icons */
.mk-ic { position: relative; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); }
.mk-ic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.mk-ic i { font-weight: 700; font-size: 13px; font-style: normal; color: var(--muted); }

/* Page shell */
.page { padding-block: 48px 40px; min-height: calc(100vh - 260px); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.page-head h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -.055em; line-height: .95; }
.page-head p { color: var(--muted); margin: 12px 0 0; font-size: 16px; }
.live { display: inline-flex; align-items: center; gap: 7px; font: 500 11.5px var(--mono); color: var(--muted); letter-spacing: .04em; }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lemon); animation: pulse 2s infinite; }
.panel { border-radius: var(--radius); background: var(--surface); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 15px; letter-spacing: -.02em; }
.empty { padding: 48px 20px; text-align: center; color: var(--dim); font-size: 14px; }
.empty .btn { margin-top: 16px; }
.skel { display: inline-block; height: 12px; width: 70px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* Markets page */
.movers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 40px; }
.mover { padding: 20px 22px 8px; }
.mover h3 { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: -.01em; display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.mover-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.mover-row:first-of-type { border-top: 0; }
.mover-row b { flex: 1; font-weight: 600; letter-spacing: -.01em; }
.mover-row:hover b { color: var(--lemon); }
.mover-row > span { font: 500 14px var(--mono); }
.mover-row .chg { min-width: 76px; font-size: 12.5px; padding: 5px 8px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 99px; background: var(--surface); }
.seg button { padding: 8px 16px; border-radius: 99px; font-size: 14px; font-weight: 500; color: var(--muted); transition: color .15s; white-space: nowrap; }
.seg button.on, .market-tabs button.on { color: var(--lemon-ink); }
.seg:not(.has-ind) button.on, .market-tabs:not(.has-ind) button.on { background: var(--lemon); }
.search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 99px; background: var(--surface); min-width: 260px; border: 1px solid transparent; transition: border-color .15s; }
.search:focus-within { border-color: var(--line-2); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 14.5px; }
.search input::placeholder { color: var(--dim); }
.search svg { color: var(--dim); flex: none; }
.mk-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.mk-table th { text-align: left; font: 500 12px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .05em; padding: 16px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mk-table td { padding: 15px 20px; border-bottom: 1px solid var(--line); font: 500 14.5px var(--mono); white-space: nowrap; }
.mk-table tr:last-child td { border-bottom: 0; }
.mk-table tbody tr { cursor: pointer; transition: background .12s; }
.mk-table tbody tr:hover { background: var(--surface-2); }
.mk-table .r { text-align: right; }
.mk-name { display: flex; align-items: center; gap: 12px; font-family: var(--sans); }
.mk-name b { font-size: 15.5px; letter-spacing: -.01em; }
.mk-name em { font-style: normal; color: var(--dim); font-size: 13px; }
.mk-name small { display: block; color: var(--dim); font-size: 12.5px; font-weight: 400; }
.chip { display: inline-block; padding: 2px 7px; border-radius: 6px; font: 600 10px var(--mono); letter-spacing: .04em; background: var(--surface-3); color: var(--muted); vertical-align: middle; margin-left: 6px; }
.chip.etf { color: var(--lemon); background: var(--lemon-soft); }
.row-btns { display: inline-flex; gap: 6px; }
.row-btns a { padding: 8px 16px; border-radius: 99px; background: var(--surface-3); font: 600 13px var(--sans); transition: background .15s, color .15s; }
.row-btns a.primary:hover { background: var(--lemon); color: var(--lemon-ink); }
.row-btns a.soon { color: var(--dim); background: transparent; border: 1px solid var(--line); }
.row-btns a.soon:hover { color: var(--text); }

/* Trade layout */
.trade { display: grid; grid-template-columns: minmax(0, 1fr) 290px 360px; grid-template-rows: auto 1fr auto; gap: 8px; padding-block: 8px 0; }
.trade > * { min-width: 0; }
.trade + .footer { margin-top: 64px; }
.pairbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 32px; padding: 14px 20px; flex-wrap: wrap; }
.pair-pick { display: flex; align-items: center; gap: 12px; }
.pair-pick h2 { font-size: 20px; letter-spacing: -.03em; display: flex; align-items: center; gap: 6px; }
.pair-pick small { color: var(--dim); font-size: 12.5px; }
.pair-price-big { font: 500 28px var(--mono); letter-spacing: -.03em; }
.stat small { display: block; color: var(--dim); font-size: 11.5px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.stat b { font: 500 14px var(--mono); }
.chart-panel { display: flex; flex-direction: column; min-height: 580px; overflow: hidden; }
.chart-panel .panel-head small { color: var(--dim); font-size: 12px; font-family: var(--mono); }
#tvChart { flex: 1; min-height: 520px; }
.side-panel { display: flex; flex-direction: column; overflow: hidden; }
.side-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); }
.side-tabs button { flex: 1; padding: 8px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--dim); transition: color .15s; }
.side-tabs button.on { color: var(--text); }
.side-tabs:not(.has-ind) button.on { background: var(--surface-3); }
.pair-list { overflow-y: auto; max-height: 540px; }
.pair-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 14px; transition: background .12s; }
.pair-row:hover { background: var(--surface-2); }
.pair-row.on { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--lemon); }
.pair-row b { flex: 1; font-weight: 600; }
.pair-row .px { font-family: var(--mono); text-align: right; font-size: 13.5px; }
.pair-row .px small { display: block; font-size: 11.5px; }
.info-list { padding: 4px 16px; }
.info-list div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.info-list div:last-child { border-bottom: 0; }
.info-list span { color: var(--dim); }
.info-list b { font: 500 13.5px var(--mono); text-align: right; }
.info-list a { color: var(--lemon); }

/* Order panel */
.order-panel { padding: 14px; display: flex; flex-direction: column; gap: 12px; align-self: start; }
.bs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 99px; background: var(--bg-2); }
.bs button { height: 42px; border-radius: 99px; font-weight: 700; font-size: 15px; color: var(--dim); transition: color .15s; }
.bs button.on { color: var(--lemon-ink); }
.bs button.on.sell { color: #160500; }
.bs:not(.has-ind) button.on.buy { background: var(--up); }
.bs:not(.has-ind) button.on.sell { background: var(--down); }
.otype { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.otype .seg { padding: 3px; background: var(--bg-2); }
.otype .seg button { padding: 5px 12px; font-size: 13px; }
.field { padding: 14px 16px; border-radius: 16px; background: var(--bg-2); border: 1px solid transparent; transition: border-color .15s; }
.field:focus-within { border-color: var(--line-2); }
.field-top { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--dim); margin-bottom: 8px; }
.field-top b { color: var(--muted); font-weight: 500; }
.field-main { display: flex; align-items: center; gap: 10px; }
.field-main input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: 500 28px var(--mono); letter-spacing: -.03em; }
.field-main input::placeholder { color: var(--surface-3); }
.token-sel { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px; background: var(--surface-2); font-weight: 600; font-size: 14px; }
.token-sel select { appearance: none; background: none; border: 0; color: var(--text); font: inherit; outline: none; cursor: pointer; padding-right: 2px; }
.token-sel select option { background: var(--surface); }
.field-sub { font: 400 12.5px var(--mono); color: var(--dim); margin-top: 6px; }
.pcts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pcts button { padding: 8px 0; border-radius: 99px; background: var(--surface-2); font: 500 12.5px var(--mono); color: var(--muted); transition: background .15s, color .15s; }
.pcts button:hover { background: var(--surface-3); color: var(--text); }
.quote-box { display: grid; gap: 9px; font-size: 13px; padding: 4px 2px; }
.quote-box div { display: flex; justify-content: space-between; }
.quote-box span { color: var(--dim); }
.quote-box b { font: 500 13px var(--mono); }
.submit { height: 54px; width: 100%; border-radius: 99px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; transition: filter .15s, opacity .15s, transform .12s; }
.submit:active:not(:disabled) { transform: scale(.98); }
.submit.buy { background: var(--up); color: var(--lemon-ink); }
.submit.sell { background: var(--down); color: #160500; }
.submit:hover:not(:disabled) { filter: brightness(1.06); }
.submit:disabled { opacity: .35; cursor: not-allowed; }
.order-note { font-size: 12px; color: var(--dim); text-align: center; margin: -2px 0 0; }
.bottom-panel { grid-column: 1 / 3; }
.bottom-panel .side-tabs { border-bottom: 1px solid var(--line); }
.bottom-panel .mk-table { min-width: 560px; }
.bottom-panel .mk-table tbody tr { cursor: default; }
.status { font: 600 12px var(--sans); padding: 4px 9px; border-radius: 99px; }
.status.Filled { color: var(--up); background: var(--lemon-soft); }
.status.Failed { color: var(--down); background: var(--down-soft); }
a.tx { color: var(--lemon); }

/* Perp lock */
.locked { position: relative; }
.locked > *:not(.lock-veil) { opacity: .18; pointer-events: none; }
.lock-veil { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; text-align: center; gap: 12px; padding: 24px; }
.lock-veil b { font-size: 26px; letter-spacing: -.04em; font-weight: 600; }
.lock-veil p { margin: 0 auto; color: var(--muted); font-size: 14px; max-width: 260px; }
.lev-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.lev-row input { flex: 1; accent-color: var(--lemon); }
.lev-row b { font-family: var(--mono); color: var(--text); }
.badge { display: inline-flex; padding: 6px 12px; border-radius: 99px; font: 600 11.5px var(--mono); letter-spacing: .06em; }
.badge.dark { background: var(--lemon); color: var(--lemon-ink); }
.badge.line { border: 1px solid var(--line-2); color: var(--muted); }

/* Assets */
.assets-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; margin-bottom: 8px; }
.balance-card { padding: 28px; }
.balance-card small { color: var(--dim); font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.balance-card .big { font-size: clamp(44px, 6vw, 72px); font-weight: 600; letter-spacing: -.055em; line-height: 1; margin: 14px 0 12px; }
.balance-card .addr { display: flex; align-items: center; gap: 10px; color: var(--muted); font: 500 13px var(--mono); flex-wrap: wrap; }
.balance-card .actions { display: flex; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.alloc-card { padding: 24px; }
.alloc-card h3 { font-size: 15px; color: var(--muted); font-weight: 500; }
.alloc-bar { display: flex; gap: 3px; height: 40px; margin: 16px 0 18px; }
.alloc-bar i { height: 100%; border-radius: 6px; min-width: 3px; transform-origin: left; }
.alloc-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; font-size: 13.5px; }
.alloc-legend div { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.alloc-legend i { width: 9px; height: 9px; border-radius: 3px; }
.alloc-legend b { margin-left: auto; font: 500 12.5px var(--mono); color: var(--text); }
.connect-cta { padding: 72px 24px; text-align: center; }
.connect-cta h2 { font-size: 36px; letter-spacing: -.045em; margin-bottom: 10px; }
.connect-cta p { color: var(--muted); margin: 0 auto 26px; max-width: 420px; }

/* Earn */
.earn-hero { padding: 56px; border-radius: 28px; background: var(--lemon); color: var(--lemon-ink); display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; overflow: hidden; }
.earn-hero h1 { font-size: clamp(48px, 7.5vw, 104px); line-height: .88; letter-spacing: -.06em; margin: 22px 0; }
.earn-hero .grad { color: inherit; opacity: .45; }
.earn-hero p { font-size: 17px; max-width: 520px; opacity: .75; margin: 0; }
.earn-hero .badge.dark { background: var(--lemon-ink); color: var(--lemon); }
.earn-hero .badge.line { border-color: rgba(0, 0, 0, .25); color: var(--lemon-ink); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.pills span { padding: 9px 15px; border-radius: 99px; background: rgba(0, 0, 0, .08); font-size: 13.5px; font-weight: 500; }
.badges { display: flex; gap: 8px; }
.coin { width: min(300px, 64vw); aspect-ratio: 1; margin: 0 auto; }
.coin img { width: 100%; height: 100%; border-radius: 28%; box-shadow: 0 0 0 10px rgba(0, 0, 0, .08), 0 40px 80px -20px rgba(0, 0, 0, .45); }
.earn-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.earn-steps .panel { padding: 28px; }
.earn-steps span { font: 500 13px var(--mono); color: var(--lemon); }
.earn-steps h3 { font-size: 24px; letter-spacing: -.04em; margin: 28px 0 8px; }
.earn-steps p { color: var(--muted); margin: 0; font-size: 14.5px; }

/* Earn: staking console */
.stake-console { margin-top: 8px; padding: 20px; }
.sc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.preview-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--surface-2); font: 500 13px var(--sans); color: var(--muted); }
.preview-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #F2C14E; }
.sc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 8px; }
.sc-card { min-width: 0; padding: 24px; border-radius: var(--radius); background: var(--bg-2); display: flex; flex-direction: column; gap: 14px; }
.sc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.sc-head small { display: block; font: 500 12px var(--mono); color: var(--lemon); text-transform: uppercase; letter-spacing: .06em; }
.sc-head h2 { font-size: 30px; line-height: 1.05; letter-spacing: -.045em; margin-top: 8px; }
.sc-head .badge { white-space: nowrap; flex: none; }
.sc-card .field { background: var(--surface); }
.sc-card .field-main input:disabled { cursor: not-allowed; }
.sc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sc-stats div { padding: 14px 16px; border-radius: 14px; background: var(--surface); }
.sc-stats small { display: block; color: var(--dim); font-size: 12.5px; }
.sc-stats b { display: block; margin-top: 6px; font: 600 18px var(--mono); }
.sc-reward { display: flex; justify-content: space-between; gap: 12px; padding: 4px 2px; font-size: 13.5px; }
.sc-reward span { color: var(--dim); }
.sc-reward b { font: 500 13.5px var(--mono); color: var(--lemon); text-align: right; }
.sc-card .submit:disabled { opacity: 1; background: var(--surface-3); color: var(--muted); }
.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 8px; max-height: 470px; overflow-y: auto; padding-right: 2px; }
.reward { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface); text-align: left; border: 1.5px solid transparent; transition: border-color .15s, background .15s; }
.reward:hover { background: var(--surface-2); }
.reward.on { border-color: var(--lemon); background: var(--lemon-soft); }
.rw-name { flex: 1; min-width: 0; }
.rw-name b, .rw-meta b { display: block; font-size: 14.5px; font-weight: 600; }
.rw-name small, .rw-meta small { display: block; color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-meta { text-align: right; }
.rw-meta b { font: 500 13px var(--mono); }
.reward.on .rw-meta small { color: var(--lemon); }
.sc-terms { margin-top: 8px; padding: 24px 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: center; }
.sc-terms small { font: 500 12px var(--mono); color: var(--lemon); text-transform: uppercase; letter-spacing: .06em; }
.sc-terms h3 { font-size: 22px; letter-spacing: -.035em; margin-top: 6px; }
.sc-terms p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* Responsive */
@media (max-width: 1200px) {
  .trade { grid-template-columns: minmax(0, 1fr) 360px; }
  .side-panel { grid-column: 1; grid-row: 3; }
  .order-panel { grid-column: 2; grid-row: 2 / span 2; }
  .bottom-panel { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .nav-links a.on { color: var(--lemon); }
  .nav-links a.on::after { display: none; }
  .movers, .earn-steps { grid-template-columns: 1fr; }
  .trade { grid-template-columns: minmax(0, 1fr); }
  .chart-panel, .side-panel, .order-panel, .bottom-panel, .pairbar { grid-column: 1; grid-row: auto; }
  .order-panel { order: 2; }
  .chart-panel { order: 3; min-height: 420px; }
  .side-panel { order: 4; }
  .bottom-panel { order: 5; }
  #tvChart { min-height: 380px; }
  .assets-top, .earn-hero { grid-template-columns: 1fr; }
  .sc-grid, .sc-terms { grid-template-columns: minmax(0, 1fr); }
  .stake-console { padding: 12px; }
  .sc-card { padding: 18px; }
  .reward-grid { max-height: none; overflow: visible; }
  .earn-hero { padding: 36px 24px; }
}
@media (max-width: 600px) {
  .pairbar { gap: 14px 22px; }
  .pair-pick { width: 100%; }
  .search { min-width: 0; flex: 1; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .seg { overflow-x: auto; max-width: 100%; }
  .page { padding-top: 32px; }
  .alloc-legend { grid-template-columns: 1fr; }
}
