/* Onggi workspace — pearl on graphite. Shared tokens and responsive layouts. */
:root {
  --bg: #262524;
  --surface: #2D2C2B;
  --surface-2: #1E1E1C;
  --surface-3: #262524;
  --text: #F3F3F1;
  --muted: #A2A2A0;
  --subtle: #8B8B89;
  --line: #21211F;
  --line-strong: #2E2E2C;
  --accent: #F2F1EF;
  --accent-ink: #2A2928;
  --positive: #8DB49A;
  --negative: #C0786C;
  --radius: 12px;
  --control: 8px;
  --sidebar: 216px;
}
::selection { background: #61615E; }
button, input, a { touch-action: manipulation; }
#app-main:focus { outline: none; }
button { transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease); }
button svg { flex: none; }
.button svg, .back-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.sidebar { padding: 27px 14px 12px; background: #1D1D1B; }
.brand { font-size: 22px; gap: 12px; padding: 0 12px; }
.brand img { width: 29px; height: 29px; }
.side-nav { margin-top: 43px; gap: 6px; }
.nav-link { position: relative; min-height: 44px; font-size: 13px; padding: 0 13px; gap: 13px; }
.nav-link svg { width: 18px; height: 18px; }
.nav-link.active { color: var(--text); background: #21201F; }
.nav-link.active::before { position: absolute; top: 12px; bottom: 12px; left: 0; width: 2px; border-radius: 2px; background: var(--accent); content: ''; }
.nav-link.active svg { color: var(--accent); }
.nav-link[data-view="rewards"] { margin-top: 20px; }
.nav-meta { font: 10px var(--font); border: 1px solid var(--line-strong); padding: 1px 5px; border-radius: 4px; }
.sidebar-account { padding: 14px 12px 10px; border-color: var(--line); background: #1A1918; }
.account-mark { width: 30px; height: 30px; border: 0; }
.account-mark img { width: 28px; height: 28px; }
.account-identity strong { font-size: 12px; }
.account-identity div span { font-size: 11px; }
.account-equity { margin-top: 20px; }
.account-equity > span { font-size: 11px; }
.account-equity > strong { font: 500 23px var(--font); letter-spacing: -.04em; }
.account-metrics { grid-template-columns: 1fr; gap: 8px; margin: 12px 0 16px; }
.account-metric { display: flex; justify-content: space-between; align-items: center; }
.account-metric > span, .account-metric > strong { font-size: 10px; }
.account-preview { font-size: 9px; gap: 2px; }
.account-preview button { font-size: 9px; }
.sidebar-account .deposit-trigger { width: 100%; min-height: 36px; justify-content: space-between; font-size: 12px; }
.api-link { font-size: 11px; padding: 0 12px; min-height: 40px; }
.topbar { height: 72px; padding: 0 32px; background: #161616f2; gap: 24px; }
.workspace-location { color: var(--muted); font-size: 13px; white-space: nowrap; }
.workspace-search { width: 300px; height: 36px; margin-left: auto; border-color: transparent; background: #1B1B19; font-size: 12px; }
.workspace-search kbd { font-size: 10px; }
.workspace-search span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-search kbd { flex: none; white-space: nowrap; }
.top-actions { margin-left: 0; gap: 20px; }
.network { font: 11px var(--font); }
.network i { background: var(--positive); }
.button { min-height: 42px; font-size: 13px; gap: 10px; font-weight: 600; }
.button.primary { background: var(--accent); color: var(--accent-ink); }
.button.primary:hover { background: #D8D8D5; }
.button.secondary { background: #1D1D1C; border-color: var(--line-strong); }
.button.compact { font-size: 12px; min-height: 36px; }
.account-avatar { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #3D3D3A; color: #DEDEDB; font-size: 10px; }
#app-main { max-width: 1750px; margin: auto; padding: 34px 32px 64px; }
.view-heading { align-items: center; margin-bottom: 28px; gap: 20px; }
.view-heading h1 { font-size: clamp(27px, 2.4vw, 36px); letter-spacing: -.045em; font-weight: 500; line-height: 1.2; }
.view-heading p { font-size: 13px; margin-top: 9px; line-height: 1.6; }
.heading-actions { align-items: center; gap: 16px; }
.demo-label { font: 11px var(--font); min-height: 26px; padding: 0 8px; color: var(--muted); background: transparent; border-color: var(--line-strong); white-space: nowrap; }
.panel { background: var(--surface); border-color: var(--line); }
.panel-header { min-height: 66px; padding: 0 22px; }
.panel-header h2, .panel-header h3 { font-size: 14px; font-weight: 600; letter-spacing: -.015em; }
.panel-header > span { font-size: 11px; }
.panel-subtitle { display: block; margin-top: 3px; font-size: 11px; color: var(--subtle); }
.panel-body { padding: 22px; }
.overview-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
.performance-panel { overflow: hidden; }
.performance-top { display: flex; align-items: flex-start; justify-content: space-between; padding: 25px 26px 0; gap: 12px; }
.balance-label { font-size: 13px; color: var(--muted); }
.hero-equity { font-size: clamp(36px, 3.1vw, 46px); font-weight: 500; letter-spacing: -.055em; line-height: 1.35; margin-top: 7px; font-variant-numeric: tabular-nums; }
.performance-change { font-size: 12px; margin-top: 5px; font-variant-numeric: tabular-nums; }
.performance-change > span:last-child { color: var(--muted); margin-left: 4px; }
.segmented { padding: 3px; border-color: var(--line); background: #20201E; }
.segmented button { font: 11px var(--font); min-width: 33px; min-height: 30px; }
.segmented button.active { background: #2A2A28; color: var(--accent); }
.performance-top .segmented { margin-top: 3px; }
.chart-wrap { height: 250px; padding: 22px 24px 8px; color: var(--accent); }
.line-chart .grid-line { stroke: var(--line); stroke-dasharray: 3 5; }
.line-chart .line { stroke-width: 2; }
.line-chart .point { r: 3px; }
.line-chart { width: calc(100% - 72px); }
.chart-scale { position: absolute; top: 30px; right: 18px; bottom: 20px; display: flex; flex-direction: column; justify-content: space-between; width: 72px; color: var(--subtle); text-align: right; font: 10px var(--font); font-variant-numeric: tabular-nums; pointer-events: none; }
.chart-crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.chart-hover-point { fill: var(--accent); stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-readout { position: absolute; top: 5px; left: 24px; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface-2); color: var(--text); font-size: 11px; pointer-events: none; opacity: 0; }
.chart-readout.visible { opacity: 1; }
.line-chart:focus-visible { outline: 1px solid var(--accent); outline-offset: 6px; border-radius: 4px; }
.chart-axis { padding: 0 26px 20px; font: 10px var(--font); }
.performance-metrics { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin: 0 26px; padding: 20px 0 24px; border-top: 1px solid var(--line); }
.performance-metrics > div { display: grid; gap: 8px; }
.performance-metrics > div > span { font-size: 11px; color: var(--muted); }
.performance-metrics strong { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.metric-suffix { font-size: 11px; color: var(--subtle); font-weight: 400; }
.overview-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.allocation-panel { flex: 1; }
.allocation-panel .panel-header { min-height: 55px; }
.allocation-panel .panel-body { padding: 18px 20px; }
.allocation-list { gap: 12px; }
.allocation-meta { font-size: 11px; gap: 8px; }
.allocation-meta strong { font: 11px var(--font); font-variant-numeric: tabular-nums; }
.allocation-track { height: 3px; background: #252523; }
.allocation-track i { background: #ACACA9; }
.allocation-row:nth-child(2) .allocation-track i { background: #8E8E8B; }
.allocation-row:nth-child(3) .allocation-track i { background: #727270; }
.allocation-row:nth-child(n+4) .allocation-track i { background: #595956; }
.allocation-total { display: none; }
.discovery-banner { position: relative; display: flex; justify-content: space-between; flex-direction: column; gap: 18px; min-height: 145px; overflow: hidden; padding: 22px; border: 1px solid #383836; border-radius: var(--radius); background: #232321 url('/img/hero-transit.jpg') center 64% / cover; text-align: left; isolation: isolate; }
.discovery-banner::before { position: absolute; inset: 0; z-index: -1; background: #10141ba6; content: ''; }
.discovery-banner > span:first-child { font-size: 21px; letter-spacing: -.04em; font-weight: 500; line-height: 1.3; }
.banner-link { display: flex; align-items: center; gap: 12px; color: #DDDDDA; font-size: 11px; }
.banner-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.discovery-banner:hover { border-color: var(--accent); }
.opportunity-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0 28px; }
.opportunity-actions button { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 88px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #1A1918; text-align: left; }
.opportunity-actions button:hover { background: var(--surface-2); border-color: var(--line-strong); }
.opportunity-actions button > span:nth-child(2) { display: grid; gap: 4px; }
.opportunity-actions strong { font-size: 12px; font-weight: 500; }
.opportunity-actions small { color: var(--subtle); font-size: 11px; }
.action-symbol { display: grid; place-items: center; flex: none; width: 32px; height: 36px; color: var(--accent); font-size: 23px; }
.opportunity-actions svg { margin-left: auto; width: 15px; height: 15px; fill: none; stroke: var(--subtle); stroke-width: 1.5; }
.section-block { margin-top: 20px; }
.market-summary { gap: 28px; margin: -4px 0 24px; font-size: 12px; }
.market-summary strong { color: var(--text); font: 12px var(--font); font-variant-numeric: tabular-nums; }
.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.featured-market { display: block; min-width: 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; }
.featured-market:hover { background: var(--surface-2); border-color: #5C5C59; }
.featured-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.featured-top img { width: 28px; height: 28px; object-fit: contain; border-radius: 50%; }
.featured-top img, .asset-choices img { background: white; }
.featured-top > span { color: var(--muted); font-size: 11px; }
.featured-top svg { margin-left: auto; width: 17px; height: 17px; fill: none; stroke: var(--subtle); stroke-width: 1.5; transform: rotate(-45deg); }
.featured-market > strong { font-size: 14px; font-weight: 500; }
.featured-price { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; margin-top: 8px; font-size: 25px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.featured-price > span { font-size: 12px; letter-spacing: 0; }
.featured-caption { display: block; margin-top: 8px; font-size: 11px; color: var(--subtle); }
.table-toolbar { padding: 14px 18px; gap: 10px; flex-wrap: wrap; }
.filter-pills { gap: 2px; }
.filter-pills button { min-height: 36px; font-size: 12px; padding: 0 12px; }
.filter-pills button.active { background: #2A2A28; color: var(--text); }
.search-field { width: 180px; height: 36px; background: #20201E; }
.search-field input { font-size: 12px; }
.dropdown-menu button { font-size: 12px; }
.market-table th, .portfolio-table th { height: 43px; color: var(--subtle); font-size: 11px; background: #262524; }
.market-table td, .portfolio-table td { height: 69px; font-size: 12px; font-weight: 400; }
.market-table td:first-child, .portfolio-table td:first-child, .market-table th:first-child, .portfolio-table th:first-child { padding-left: 22px; }
.asset-cell { min-width: 170px; }
.asset-copy strong { font-size: 13px; font-weight: 500; }
.asset-copy span { font-size: 11px; color: var(--subtle); }
.token-icon { width: 30px; height: 30px; }
.category-badge { font-size: 10px; min-height: 24px; border-color: transparent; background: #21211F; color: #B9B9B6; }
.row-action { min-height: 34px; min-width: 54px; font-size: 11px; border-color: transparent; color: var(--accent); }
.statusbar { background: #262524; color: var(--subtle); font: 10px var(--font); height: 29px; }
.statusbar button { font: 10px var(--font); }
.stat-grid { background: var(--surface); margin-bottom: 24px; }
.stat-card { padding: 22px; }
.stat-label { font-size: 12px; }
.stat-value { font: 500 clamp(22px, 2.1vw, 30px) var(--font); letter-spacing: -.04em; }
.stat-detail { font-size: 11px; margin-top: 9px; }
.balance-number { font-family: var(--font); font-weight: 500; }
.table-tabs { gap: 26px; min-height: 54px; }
.table-tabs button { font-size: 13px; }
.table-tabs button.active::after { height: 2px; }
.defi-tabs-bar { margin-bottom: 20px; }
.defi-layout, .portfolio-grid, .agent-layout { gap: 20px; }
.risk-note, .empty-state p { font-size: 12px; }
.swap-layout { grid-template-columns: minmax(360px, 500px) minmax(260px, 340px); justify-content: center; gap: 24px; align-items: start; padding: 24px 0; }
.swap-card { box-shadow: 0 16px 60px #00000025; }
.swap-form { padding: 24px; }
.swap-field { padding: 19px 16px; background: #1F1E1D; border-color: var(--line); border-radius: 10px; }
.swap-field .ticket-label { margin: 0; font-size: 11px; }
.swap-input-row { margin-top: 12px; }
.swap-input-row input, .swap-input-row output { font: 500 32px var(--font); letter-spacing: -.04em; }
.swap-asset { padding: 8px; background: #222120; }
.swap-asset strong { font-size: 12px; }
.swap-flip { position: relative; width: 38px; height: 38px; margin: -7px auto; border: 4px solid var(--surface); background: #2B2B29; color: var(--accent); }
.asset-choices { margin-top: 18px; }
.asset-choices button { font-size: 11px; min-height: 36px; }
.asset-choices button.active { border-color: #686866; background: #333331; color: var(--accent); }
.route-line { font-size: 12px; }
.route-facts div { font-size: 12px; }
.route-panel .panel-header { min-height: 60px; }
.ticket-summary { margin-top: 22px; }
.ticket-summary > div { font-size: 12px; }
.ticket-summary strong { font-size: 11px; }
.demo-disclaimer { font-size: 11px; color: var(--subtle); line-height: 1.7; }
/* Market is a page within the workspace; small transactional dialogs remain focused. */
.market-navigation { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -10px 0 20px; }
.mobile-order-jump { display: none; }
.back-link { min-height: 40px; padding: 0; background: transparent; color: var(--muted); font-size: 12px; }
.back-link:hover { color: var(--text); }
.market-workspace { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.market-modal-header { padding: 22px 24px; min-height: 88px; gap: 18px; }
.market-modal-header .asset-copy strong { font-size: 20px; letter-spacing: -.025em; }
.market-modal-header .asset-copy span { font-size: 12px; margin-top: 2px; }
.market-price strong { font: 500 28px var(--font); letter-spacing: -.04em; }
.market-price span { font: 12px var(--font); }
.market-stats { grid-template-columns: repeat(4, 1fr); background: #292827; }
.market-stats div { padding: 18px 24px; gap: 7px; }
.market-stats span { font-size: 11px; }
.market-stats strong { font-size: 12px; }
.market-detail-grid { grid-template-columns: minmax(0, 1fr) 310px; }
.market-chart-side { display: flex; flex-direction: column; }
.market-chart-side .chart-wrap.large { height: 330px; margin-top: auto; margin-bottom: auto; }
.market-chart-side .chart-axis { padding-bottom: 24px; }
.trade-ticket { padding: 24px; background: #222220; }
.trade-ticket h3 { font-size: 15px; font-weight: 500; }
.ticket-subtitle { color: var(--subtle); font-size: 11px; margin-top: 4px; }
.trade-sides { margin-top: 22px; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: var(--control); background: #201F1E; }
.trade-sides button { min-height: 37px; font-size: 12px; }
.trade-sides button.active.long { border-color: transparent; background: #274030; color: #8DB49A; }
.trade-sides button.active.short { border-color: transparent; background: #492B26; color: #C0786C; }
.ticket-label { font-size: 12px; margin-top: 24px; }
.ticket-label button { font-size: 10px; color: var(--accent); }
.ticket-input { min-height: 56px; background: #1F1E1D; border-color: var(--line-strong); }
.ticket-input input { font-size: 24px; font-family: var(--font); }
.ticket-input > span { font-size: 11px; }
.ticket-error { font-size: 12px; min-height: 18px; }
.trade-ticket > .button.full { min-height: 46px; }
.market-position-panel .table-scroll { max-height: 300px; overflow: auto; }
/* Dialogs: consistent spacing, readable amounts, calm contrast. */
.modal { border-radius: 16px; border-color: #4C4C4A; background: #2B2A29; box-shadow: 0 32px 100px #0009; }
.modal::backdrop { background: #05080eb8; backdrop-filter: blur(8px); }
.small-modal { max-width: 460px; }
.modal-header { padding: 25px 26px 20px; align-items: center; }
.modal-header h2 { font-size: 23px; letter-spacing: -.04em; }
.modal-header .eyebrow { display: none; }
.modal-copy { padding: 20px 26px 0; font-size: 13px; line-height: 1.7; }
.dialog-tabs { margin: 22px 26px 0; padding: 4px; background: #201F1E; }
.dialog-tabs button { font-size: 12px; min-height: 36px; }
.dialog-tabs button.active { background: #2D2D2B; }
.field-label { margin: 22px 26px 10px; font-size: 12px; }
.amount-field { margin: 0 26px; padding: 0 16px; height: 76px; background: #1D1C1B; border-color: var(--line-strong); }
.amount-field input { font: 500 30px var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.amount-field > span { font-size: 12px; }
.quick-amounts { margin: 10px 26px 20px; gap: 8px; }
.quick-amounts button { flex: 1; min-height: 36px; font: 11px var(--font); border-color: var(--line-strong); }
.form-row { margin: 0 26px; font-size: 12px; padding: 13px 0; }
.small-modal form > .button, .small-modal > .button { width: calc(100% - 52px); margin: 24px 26px 4px; min-height: 46px; }
.connection-detail { padding: 16px 26px; font-size: 12px; }
.chain-options { margin: 0 26px; }
.chain-options button { font-size: 11px; min-height: 38px; }
.chain-options button.active { color: var(--accent); border-color: #686866; background: #333331; }
#defi-dialog-content #defi-submit { width: calc(100% - 52px); margin: 18px 26px 0; min-height: 46px; }
#defi-dialog-content .demo-disclaimer { padding: 0 26px; }
.inline-max { color: var(--accent); font-size: 11px; }
.field-label .inline-max { float: right; min-height: 24px; margin-top: -4px; padding: 0 5px; }
.search-modal { max-width: 600px; }
.search-box { padding: 20px; }
.search-box input { font-size: 15px; }
.search-result { min-height: 70px; }
.search-result > span { font-size: 13px; }
.message.user .message-bubble { background: #2F2F2D; border-color: #4E4E4C; }
.toggle.on { background: #494946; }
.campaign-status { color: var(--accent); }
.campaign-status::before { background: var(--accent); }
@media (min-width: 1700px) {
  #app-main { padding: 44px 48px 80px; }
  .overview-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
  .chart-wrap { height: 300px; }
  .hero-equity { font-size: 52px; }
  .market-detail-grid { grid-template-columns: minmax(0, 1fr) 360px; }
  .market-chart-side .chart-wrap.large { height: 400px; }
  .performance-metrics strong { font-size: 19px; }
}
@media (max-width: 1250px) {
  .topbar { padding: 0 24px; gap: 16px; }
  .workspace-search { width: 240px; }
  .network { display: none; }
  #app-main { padding: 28px 24px 60px; }
  .overview-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; }
  .performance-top { flex-wrap: wrap; padding: 22px 22px 0; }
  .performance-top .segmented { margin-left: auto; }
  .hero-equity { font-size: 36px; }
  .metric-suffix { display: none; }
  .opportunity-actions button { padding: 14px 12px; gap: 8px; }
  .opportunity-actions svg { display: none; }
  .opportunity-actions small { font-size: 10px; }
  .table-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-right { width: 100%; margin-left: 0; }
  .search-field { width: 100%; }
}
@media (max-width: 1050px) and (min-width: 901px) {
  :root { --sidebar: 188px; }
  .sidebar { padding-inline: 10px; }
  .account-equity > strong { font-size: 21px; }
  .overview-grid { grid-template-columns: 1fr; }
  .overview-aside { display: none; }
  .view-heading .demo-label { display: none; }
  .performance-top { flex-wrap: nowrap; }
}
@media (max-width: 900px) {
  :root { --sidebar: 0px; }
  .workspace-location { display: none; }
  .topbar { height: 64px; padding: 0 24px; gap: 20px; }
  .mobile-brand { font-size: 20px; }
  .workspace-search { width: min(300px, 36vw); }
  .mobile-account { padding: 0 24px; min-height: 44px; font-size: 12px; background: #1A1918; }
  .mobile-account strong { font-size: 13px; }
  .overview-grid { grid-template-columns: minmax(0, 1fr) 250px; gap: 16px; }
  .mobile-nav { height: 72px; background: #13161bf5; }
  .mobile-nav button { font-size: 10px; gap: 6px; }
  .mobile-nav button[data-view="overview"] { order: -1; }
  .mobile-nav button.active { color: var(--accent); background: #f2f2f208; }
  .statusbar { bottom: 72px; height: 26px; padding-inline: 16px; }
  #app-main { padding-bottom: 126px; }
  .view-heading h1 { font-size: 29px; }
  .view-heading p { max-width: 430px; }
  .heading-actions > .demo-label { display: none; }
  .market-detail-grid { grid-template-columns: minmax(0, 1fr) 280px; }
  .market-stats div { padding: 16px 20px; }
}
@media (max-width: 700px) {
  .topbar { padding: 0 16px; height: 62px; gap: 14px; }
  .mobile-brand { font-size: 20px; gap: 8px; }
  .mobile-brand img { width: 26px; height: 26px; }
  .workspace-search { width: 36px; background: transparent; margin-left: auto; border: 1px solid var(--line); }
  .top-actions { gap: 0; }
  .top-actions .button { font-size: 11px; padding: 0 10px; gap: 7px; }
  .account-avatar { width: 18px; height: 18px; font-size: 9px; }
  .mobile-account { padding: 0 16px; font-size: 11px; min-height: 43px; }
  #app-main { padding: 25px 16px 132px; }
  .view-heading { align-items: flex-start; gap: 10px; margin-bottom: 22px; }
  .view-heading h1 { font-size: 28px; line-height: 1.22; }
  .view-heading p { font-size: 12px; line-height: 1.65; }
  .overview-view .view-heading { flex-wrap: wrap; }
  .overview-view .heading-actions { margin-top: 4px; }
  .overview-view .heading-actions .button { min-height: 38px; }
  .overview-grid { grid-template-columns: 1fr; }
  .overview-aside { display: none; }
  .performance-top { padding: 20px 18px 0; flex-wrap: wrap; gap: 18px; }
  .performance-top .segmented { margin: 0; }
  .hero-equity { font-size: 39px; }
  .performance-change { font-size: 11px; }
  .performance-change > span:last-child { margin-left: 1px; }
  .chart-wrap { height: 200px; padding: 22px 12px 8px; }
  .chart-axis { padding: 0 18px 16px; font-size: 10px; }
  .performance-metrics { grid-template-columns: 1fr 1fr; margin: 0 18px; padding: 18px 0; gap: 20px 12px; }
  .performance-metrics > div:last-child { display: none; }
  .performance-metrics strong { font-size: 16px; }
  .performance-metrics > div > span { font-size: 11px; }
  .opportunity-actions { grid-template-columns: 1fr; gap: 8px; margin: 16px 0 24px; }
  .opportunity-actions button { min-height: 70px; padding: 14px 16px; gap: 14px; }
  .opportunity-actions strong { font-size: 13px; }
  .opportunity-actions small { font-size: 11px; }
  .opportunity-actions svg { display: block; }
  .panel-header { padding: 0 16px; min-height: 62px; }
  .panel-header h2, .panel-header h3 { font-size: 13px; }
  .panel-subtitle { font-size: 10px; max-width: 190px; }
  .panel-header .button { font-size: 10px; padding: 0 8px; }
  .market-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; font-size: 11px; margin: 0 0 22px; }
  .market-summary strong { font-size: 11px; margin-left: 4px; }
  .featured-grid { display: flex; gap: 10px; overflow: auto; margin: 0 -16px 22px; padding: 0 16px 8px; scroll-snap-type: x mandatory; }
  .featured-market { flex: 0 0 225px; padding: 17px; scroll-snap-align: center; }
  .featured-top { margin-bottom: 12px; }
  .featured-price { font-size: 23px; }
  .table-toolbar { padding: 10px; gap: 10px; }
  .filter-pills button { font-size: 11px; min-height: 40px; padding: 0 12px; }
  .toolbar-right { gap: 6px; }
  #sort-trigger { font-size: 10px; padding: 0 6px; }
  .search-field input { font-size: 16px; }
  .market-table th, .portfolio-table th { font-size: 10px; height: 38px; padding: 0 8px; }
  .market-table td, .portfolio-table td { font-size: 11px; padding: 0 8px; height: 70px; }
  .market-table td:first-child, .portfolio-table td:first-child, .market-table th:first-child, .portfolio-table th:first-child { padding-left: 14px; }
  .market-registry .row-action { display: none; }
  .market-registry th:last-child, .market-registry td:last-child { width: 8px; padding: 0; }
  .market-table .row-action { min-height: 40px; }
  .asset-cell { min-width: 122px; gap: 9px; }
  .asset-copy strong { font-size: 11px; }
  .asset-copy span { font-size: 10px; max-width: 116px; }
  .token-icon { width: 26px; height: 26px; }
  .stat-grid { margin-bottom: 18px; }
  .stat-card { padding: 16px; }
  .stat-label { font-size: 11px; margin-bottom: 10px; }
  .stat-value { font-size: 22px; }
  .stat-detail { font-size: 10px; line-height: 1.6; }
  .market-navigation { margin: -9px 0 12px; gap: 8px; }
  .market-navigation .demo-label { display: none; }
  .mobile-order-jump { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--control); background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600; }
  #trade-form { scroll-margin-top: 78px; }
  .back-link { min-height: 40px; font-size: 11px; }
  .market-modal-header { padding: 18px 16px; gap: 12px; }
  .market-modal-header .token-icon { width: 32px; height: 32px; }
  .market-modal-header .asset-copy strong { font-size: 16px; }
  .market-modal-header .asset-copy span { max-width: 150px; font-size: 10px; }
  .market-modal-header > .category-badge { display: none; }
  .market-price strong { font-size: 21px; }
  .market-price span { font-size: 11px; }
  .market-stats { grid-template-columns: 1fr 1fr; }
  .market-stats div { padding: 14px 16px; }
  .market-stats span { font-size: 10px; }
  .market-stats strong { font-size: 11px; }
  .market-detail-grid { grid-template-columns: 1fr; }
  .market-chart-side { border-right: 0; }
  .market-chart-side .chart-wrap.large { height: 210px; margin: 0; }
  .market-chart-side .chart-axis { display: flex; font-size: 10px; padding: 0 16px 18px; }
  .trade-ticket { padding: 22px 18px; border-top: 1px solid var(--line); }
  .trade-ticket > .button.full { position: static; min-height: 48px; border-radius: var(--control); }
  .ticket-summary > div { font-size: 12px; }
  .ticket-summary strong { font-size: 11px; }
  .market-position-panel { display: none; }
  .swap-layout { display: grid; grid-template-columns: minmax(0, 1fr); padding: 0; gap: 16px; }
  .swap-form { padding: 16px; }
  .swap-input-row input { font-size: 30px; }
  .route-panel .panel-header { min-height: 52px; }
  .route-panel .panel-body { padding: 18px; }
  .swap-field { padding: 18px 12px; }
  .swap-field .ticket-label { font-size: 10px; }
  .swap-asset { gap: 5px; min-width: 85px; padding: 8px 6px; }
  .small-modal { max-height: calc(100dvh - 30px); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .modal-header { padding: 22px 22px 18px; }
  .modal-copy { padding: 18px 22px 0; font-size: 12px; }
  .modal-header h2 { font-size: 22px; }
  .dialog-tabs { margin-inline: 22px; }
  .field-label { margin: 22px 22px 10px; }
  .amount-field { margin-inline: 22px; }
  .amount-field input { font-size: 28px; }
  .quick-amounts { margin-inline: 22px; }
  .form-row { margin-inline: 22px; font-size: 11px; }
  .small-modal form > .button, .small-modal > .button { width: calc(100% - 44px); margin: 22px 22px 4px; }
  .chain-options { margin-inline: 22px; }
  .search-box input { font-size: 16px; }
  .dialog-tabs button, .quick-amounts button, .chain-options button { min-height: 42px; }
  .statusbar { font-size: 9px; padding: 0 12px; }
  .statusbar button { font-size: 9px; }
  .mobile-nav { padding: 0 2px env(safe-area-inset-bottom); }
  .mobile-nav button { font-size: 9px; }
  .defi-actions { flex-wrap: wrap; }
  .balance-details strong { font-size: 11px; }
  .campaign-copy { background: #10141ba6; }
}
