:root {
  color-scheme: dark;
  --bg: #0b1519;
  --surface: #0f1a1f;
  --surface-raised: #1b2429;
  --surface-hover: #1b2c31;
  --line: #273035;
  --line-soft: #1d2a2f;
  --text: #f6fefd;
  --text-secondary: #d2dad7;
  --muted: #949e9c;
  --mint: #50d2c1;
  --mint-hover: #76e2d3;
  --mint-dim: #17453f;
  --positive: #1fa67d;
  --negative: #ed7088;
  --amber: #d7b67a;
  --radius: 6px;
  font-family: 'Segoe UI', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, input, select { color: inherit; }
button { border: 0; background: none; }
button:disabled { cursor: not-allowed; opacity: .42; }
button, a, input, select { transition: color .15s, background .15s, border-color .15s; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
input { min-width: 0; }
a { color: var(--mint); text-decoration: none; }
a:hover { color: var(--mint-hover); }
svg { display: block; flex-shrink: 0; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 550; }
h1 { font-size: 23px; letter-spacing: -.6px; }
h2 { font-size: 15px; letter-spacing: -.15px; }
h3 { font-size: 13px; }
strong { font-weight: 550; }
[hidden], .view[hidden], .toast[hidden] { display: none !important; }
.muted { color: var(--muted); }
.positive { color: var(--positive); }
.negative { color: var(--negative); }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: -.25px; }
.small, small { font-size: 11px; line-height: 1.5; }
.eyebrow { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; }
.badge, .tag, .pill { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line); padding: 3px 7px; border-radius: 4px; color: var(--text-secondary); font-size: 10px; line-height: 1.3; white-space: nowrap; }
.badge.positive, .tag.positive, .pill.positive { color: var(--mint); background: rgb(80 210 193 / 7%); border-color: rgb(80 210 193 / 18%); }
.text-button { padding: 4px 0; color: var(--mint); font-size: 12px; }
.text-button:hover { color: var(--mint-hover); }
.primary-button, .secondary-button, .danger-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 40px; padding: 10px 16px; border-radius: var(--radius); font-weight: 550; line-height: 1.3; }
.primary-button { background: var(--mint); color: #082a25; border: 1px solid var(--mint); }
.primary-button:hover:not(:disabled) { background: var(--mint-hover); border-color: var(--mint-hover); }
.secondary-button { background: var(--surface-raised); color: var(--text-secondary); border: 1px solid var(--line); }
.secondary-button:hover:not(:disabled) { background: var(--surface-hover); border-color: #40514f; }
.danger-button { background: rgb(237 112 136 / 10%); color: var(--negative); border: 1px solid rgb(237 112 136 / 20%); }
.danger-button:hover:not(:disabled) { background: rgb(237 112 136 / 18%); }

.app-header { position: relative; z-index: 20; min-height: 56px; display: flex; align-items: center; gap: 28px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; min-width: 115px; color: var(--text); white-space: nowrap; }
.brand-mark { display: inline-flex; color: var(--mint); }
.brand > svg.brand-mark { width: 27px; height: 27px; }
.brand-mark svg { width: 27px; height: 27px; }
.brand > span:not(.brand-mark) { display: flex; align-items: baseline; gap: 6px; }
.brand strong { font-size: 20px; font-weight: 650; letter-spacing: -1px; }
.brand small { font-size: 9px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.desktop-nav { display: flex; align-items: stretch; align-self: stretch; gap: 28px; min-width: 0; }
.desktop-nav button { position: relative; padding: 0 1px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.desktop-nav button:hover, .desktop-nav button.active { color: var(--mint); }
.desktop-nav button.active::after { content: ''; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--mint); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; white-space: nowrap; }
.network-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.network-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }
.demo-badge { padding: 4px 7px; border-radius: 4px; background: rgb(215 182 122 / 8%); color: var(--amber); border: 1px solid rgb(215 182 122 / 14%); font-size: 10px; }
.language-button { min-width: 33px; height: 32px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-secondary); font-size: 11px; }
.language-button { display: inline-flex; align-items: center; justify-content: center; }
.language-button:hover { background: var(--surface-raised); }
.wallet-button { min-height: 33px; padding: 8px 13px; border-radius: 6px; background: var(--mint); color: #082a25; font-size: 12px; font-weight: 550; }
.wallet-button:hover { background: var(--mint-hover); }
.wallet-button.connected { background: var(--mint-dim); color: var(--mint); }

.context-bar { display: flex; align-items: center; gap: 34px; min-height: 67px; margin: 3px 3px 0; padding: 13px 20px; background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.market-name { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 500; white-space: nowrap; }
.token-icon { display: inline-flex; align-items: center; justify-content: center; width: 29px; height: 29px; border: 1px solid rgb(80 210 193 / 30%); border-radius: 50%; background: rgb(80 210 193 / 8%); color: var(--mint); font-size: 11px; font-weight: 650; }
.market-price { display: flex; flex-direction: column; gap: 3px; min-width: 85px; }
.market-price strong { font-size: 19px; line-height: 1.2; }
.market-price small { color: var(--mint); font-size: 10px; }
.market-name > div { display: flex; flex-direction: column; gap: 4px; }
.market-name > div > strong { font-size: 16px; font-weight: 500; }
.market-name > div > small { font-size: 9px; font-weight: 400; color: var(--mint); }
.market-chevron { margin-left: 6px; color: var(--muted); font-size: 16px; }
.context-link { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.context-link:hover { color: var(--mint); }
.context-metric { display: flex; flex-direction: column; gap: 5px; white-space: nowrap; }
.context-metric > span, .context-metric > label, .context-metric > small { color: var(--muted); font-size: 11px; }
.context-metric > strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.app-main { min-height: calc(100vh - 162px); }
.view { min-width: 0; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 348px; gap: 3px; padding: 3px; align-items: start; }
.workspace-main, .action-rail { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 4px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 46px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.panel-head > h1, .panel-head > h2, .panel-head > h3 { font-size: 13px; font-weight: 500; }
.panel-head > span { font-size: 11px; color: var(--muted); }
.panel-head .tabs { min-height: 45px; }
.panel-body { padding: 20px; }
.tabs { display: flex; align-items: stretch; gap: 24px; min-width: 0; }
.tabs button { position: relative; flex-shrink: 0; padding: 0; color: var(--muted); font-size: 12px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); }
.tabs button.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 1px; background: var(--mint); }
.overview-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 22px 0; }
.metric { min-width: 0; padding: 0 22px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric > label, .metric > span:first-child { display: block; color: var(--muted); font-size: 11px; margin-bottom: 9px; }
.metric > strong { display: block; font-size: clamp(19px, 1.8vw, 28px); letter-spacing: -.8px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.metric > small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.metric > small.positive { color: var(--positive); }
.metric > small.negative { color: var(--negative); }
.chart-container { position: relative; padding: 20px 20px 12px; min-width: 0; }
.chart-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px 0; margin-bottom: 0; }
.chart-toolbar { display: flex; align-items: center; gap: 7px; }
.chart-toolbar button { padding: 5px 9px; color: var(--muted); border: 1px solid transparent; border-radius: 4px; font-size: 10px; }
.chart-toolbar button:hover { color: var(--text); background: var(--surface-raised); }
.chart-toolbar button.active { color: var(--mint); background: rgb(80 210 193 / 7%); border-color: rgb(80 210 193 / 14%); }
.chart-legend { display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 10px; }
.chart-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 5px; height: 5px; background: var(--mint); border-radius: 50%; }
.chart-tooltip { position: absolute; top: 70px; left: 18px; padding: 7px 10px; background: var(--surface-raised); border: 1px solid var(--line); color: var(--text-secondary); font-size: 10px; border-radius: 4px; pointer-events: none; z-index: 2; }
.chart-value { color: var(--text); font-size: 27px; line-height: 1.25; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.chart-subtitle { color: var(--muted); font-size: 11px; margin-top: 6px; }
.chart-svg { display: block; width: 100%; height: 290px; overflow: visible; }
.chart-svg text { font-family: 'IBM Plex Mono', monospace; font-size: 10px; fill: var(--muted); }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; padding: 0 3px; }
.allocation-row { display: flex; align-items: center; gap: 24px; padding: 16px 20px; border-top: 1px solid var(--line-soft); }
.allocation-bar { display: flex; flex: 1; min-width: 80px; height: 5px; overflow: hidden; background: var(--surface-raised); border-radius: 2px; }
.allocation-bar > * { height: 100%; background: var(--mint); }
.allocation-bar > :nth-child(2) { background: #668ca4; }
.allocation-bar > :nth-child(3) { background: var(--amber); }
.allocation-panel .allocation-legend { margin-top: 14px; }
.allocation-legend { display: flex; flex-wrap: wrap; gap: 15px; color: var(--muted); font-size: 10px; }
.allocation-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.allocation-legend i { width: 5px; height: 5px; border-radius: 1px; background: var(--mint); }
.allocation-legend > span:nth-child(2) i { background: #668ca4; }
.allocation-legend > span:nth-child(3) i { background: #d7b67a; }

.records-panel { min-height: 205px; }
.mobile-records { display: none; }
.records-tabs { display: flex; gap: 24px; min-height: 45px; }
.records-tabs button { position: relative; padding: 0; color: var(--muted); font-size: 12px; white-space: nowrap; }
.records-tabs button.active { color: var(--text); }
.records-tabs button.active::after { content: ''; position: absolute; bottom: -1px; right: 0; left: 0; height: 1px; background: var(--mint); }
.records-tabs button:hover { color: var(--text); }
.records-panel .panel-head { padding-right: 16px; }
.table-wrap { max-width: 100%; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #36464a transparent; }
table, .data-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { padding: 13px 18px; font-size: 10px; font-weight: 400; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
td { padding: 14px 18px; font-size: 11px; color: var(--text-secondary); border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgb(148 158 156 / 3%); }
td strong { color: var(--text); font-weight: 500; }
td small { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.empty-state { min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 28px 16px; text-align: center; color: var(--muted); font-size: 12px; }
.empty-state svg { color: #4e6768; width: 27px; height: 27px; margin-bottom: 3px; }
.position-card { display: block; padding: 17px 18px; border-bottom: 1px solid var(--line-soft); }
.position-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.position-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 20px; }
.position-grid strong { font-size: 12px; font-weight: 500; }
.position-grid dt { color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.position-grid dd { margin: 0; font-size: 12px; }
.position-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 17px; }
.position-actions > span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.position-actions button { flex: 1; min-height: 32px; font-size: 11px; }
.position-card label { display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.position-card .switch { display: inline-flex; margin: 0; }

.trade-form { padding: 19px 18px 17px; }
.trade-form > h2 { margin-bottom: 18px; }
.field-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 9px; color: var(--muted); font-size: 11px; }
.field-label strong { color: var(--text-secondary); font-weight: 400; }
.amount-field { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 45px; padding: 0 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.amount-field:focus-within { border-color: var(--mint); }
.amount-field input { flex: 1; width: 100%; min-width: 0; border: 0; outline: none; background: transparent; padding: 13px 0; color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; }
.amount-field input:focus-visible { outline: 0; }
.amount-field input::placeholder { color: #566668; }
.amount-field > span { color: var(--text-secondary); font-size: 11px; }
.amount-field > button { color: var(--mint); font-size: 10px; padding: 6px 0 6px 7px; border-left: 1px solid var(--line); }
.range-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 9px 0 23px; }
.range-row button { padding: 6px 4px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 10px; }
.range-row button:hover, .range-row button.selected { border-color: #39766e; background: rgb(80 210 193 / 6%); color: var(--mint); }
.cycle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0 0 17px; }
.cycle-grid button { min-width: 0; padding: 12px 4px 10px; border: 1px solid var(--line); background: var(--bg); border-radius: 5px; color: var(--text-secondary); }
.cycle-grid button strong { display: block; font-size: 13px; font-weight: 500; }
.cycle-grid button small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.cycle-grid button:hover:not(:disabled) { border-color: #39766e; }
.cycle-grid button.selected { border-color: var(--mint); background: rgb(80 210 193 / 6%); color: var(--mint); }
.cycle-grid button.selected small { color: #8bc2ba; }
.estimate-list, .definition-list { display: grid; gap: 13px; margin: 17px 0; }
.estimate-list > div, .definition-list > div { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.estimate-list dt, .definition-list dt { color: var(--muted); font-size: 11px; line-height: 1.5; }
.estimate-list dd, .definition-list dd { margin: 0; text-align: right; color: var(--text-secondary); font-size: 11px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.estimate-list dd.positive, .definition-list dd.positive { color: var(--mint); }
.form-hint, .form-note { color: var(--muted); font-size: 10px; line-height: 1.65; }
.form-hint { margin: 11px 0 16px; }
.form-note { margin-top: 11px; text-align: center; }
.form-error { min-height: 0; margin: 10px 0; color: var(--negative); font-size: 11px; line-height: 1.5; }
.form-error:empty { display: none; }
.form-warning { padding: 10px 12px; margin: 13px 0; border: 1px solid rgb(215 182 122 / 16%); border-radius: 4px; background: rgb(215 182 122 / 4%); color: #bca77c; font-size: 10px; line-height: 1.7; }
.auto-toggle { display: flex; align-items: center; gap: 9px; min-height: 37px; margin: 14px 0; padding-top: 10px; border-top: 1px solid var(--line-soft); color: var(--text-secondary); font-size: 11px; cursor: pointer; }
.auto-toggle input { accent-color: var(--mint); width: 14px; height: 14px; margin: 0 0 0 auto; cursor: pointer; }
.auto-toggle > span { display: grid; gap: 3px; }
.auto-toggle > span:last-child { margin-left: auto; color: var(--muted); font-size: 10px; }
.switch { position: relative; display: inline-flex; width: 29px; height: 17px; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch > span { width: 100%; height: 100%; border-radius: 12px; background: #344348; pointer-events: none; }
.switch > span::before { content: ''; position: absolute; left: 3px; top: 3px; width: 11px; height: 11px; border-radius: 50%; background: #95a3a0; transition: transform .15s; }
.switch input:checked + span { background: var(--mint-dim); }
.switch input:checked + span::before { background: var(--mint); transform: translateX(12px); }
.switch input:focus-visible + span { outline: 2px solid var(--mint); outline-offset: 3px; }
.trade-form > .primary-button, .trade-form > .secondary-button, .form-footer .primary-button { width: 100%; }
.form-footer { margin-top: 0; padding: 12px 18px; border-top: 1px solid var(--line-soft); font-size: 10px; line-height: 1.7; }
.account-list { padding: 2px 0 7px; }
.asset-row { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.asset-row:last-child { border-bottom: 0; }
.asset-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; color: var(--mint); background: rgb(80 210 193 / 4%); font-size: 10px; font-weight: 550; }
.asset-row > div { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.asset-row > div > strong { font-size: 11px; }
.asset-row > div > small { color: var(--muted); font-size: 10px; }
.asset-row > strong { margin-left: auto; text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
.asset-detail { display: flex; flex: 1; flex-direction: column; gap: 4px; }
.asset-symbol { font-size: 11px; }
.asset-balance { margin-left: auto; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.account-total { display: flex; flex-direction: column; gap: 10px; padding: 0 0 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.account-total > strong { font-size: 23px; font-variant-numeric: tabular-nums; }
.account-list + .secondary-button { width: 100%; }
.definition-list > li { display: grid; gap: 6px; }
.definition-list > li > small { color: var(--muted); font-size: 10px; }
.account-total strong { color: var(--text); }
.mobile-workspace-tabs, .bottom-nav { display: none; }
.status-footer, .app-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 32px; padding: 7px 18px; color: #718482; font-size: 10px; border-top: 1px solid var(--line); background: var(--surface); }
.status-footer > div, .app-footer > div { display: flex; align-items: center; gap: 16px; }
.status-footer a, .app-footer a { color: var(--muted); }
.status-footer .positive { color: var(--mint); }
.status-footer > span:first-child { display: flex; align-items: center; gap: 6px; color: var(--mint); }
.status-footer > span:first-child i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }
.status-footer .footer-right { margin-left: auto; }

.view-shell { width: 100%; max-width: 1180px; margin: 0 auto; padding: 30px 24px 36px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-title h1 { margin-bottom: 7px; }
.page-title p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.page-title .eyebrow { margin-bottom: 9px; }
.summary-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; padding: 21px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.summary-strip > div { padding: 0 22px; min-width: 0; border-right: 1px solid var(--line); }
.summary-strip > div:last-child { border-right: 0; }
.summary-strip label, .summary-strip > div > span:first-child { display: block; margin-bottom: 9px; color: var(--muted); font-size: 11px; }
.summary-strip strong { display: block; font-size: 23px; font-weight: 500; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.summary-strip small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.split-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .6fr); gap: 16px; align-items: start; }
.split-layout > * { min-width: 0; }
.split-layout > .panel, .split-layout > div > .panel { margin-bottom: 16px; }
.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.asset-card { min-width: 0; padding: 21px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.asset-card .asset-icon { margin-bottom: 18px; width: 33px; height: 33px; }
.asset-card h3 { color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.asset-card > strong { display: block; font-size: 24px; letter-spacing: -.7px; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.asset-card > p, .asset-card > small { color: var(--muted); font-size: 11px; line-height: 1.65; }
.asset-card .secondary-button { margin-top: 17px; width: 100%; min-height: 34px; font-size: 11px; }
.asset-card > .panel-head { min-height: 25px; margin-bottom: 19px; padding: 0; border: 0; }
.asset-card > span.small { display: block; margin-top: 7px; }
.swap-panel { width: 100%; max-width: 450px; margin: 12px auto 26px; }
.swap-panel .panel-body { padding: 22px; }
.swap-panel .field-label { margin-top: 5px; }
.swap-panel .panel-body > .panel-head { padding: 0; min-height: 46px; margin-top: 9px; border: 0; }
.amount-field output { flex: 1; min-width: 0; padding-block: 13px; font-size: 16px; word-break: break-all; }
.swap-panel .primary-button { width: 100%; margin-top: 7px; }
.swap-arrow { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 12px auto; border: 1px solid var(--line); border-radius: 5px; color: var(--mint); background: var(--surface-raised); }
.swap-arrow:hover { background: var(--surface-hover); }
.select-field { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text-secondary); font-size: 12px; }
.team-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.team-stats > div { padding: 18px 0; }
.team-stats label, .team-stats small { display: block; color: var(--muted); font-size: 11px; }
.team-stats strong { display: block; margin: 9px 0; font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.summary-strip.team-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.summary-strip.team-stats > div { padding-block: 0; }
.summary-strip strong > small { display: inline; font-size: 10px; letter-spacing: 0; }
.invite-row { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.invite-row code, .invite-row input { flex: 1; min-width: 0; width: 100%; background: none; border: 0; color: var(--text-secondary); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.invite-row button { flex-shrink: 0; color: var(--mint); font-size: 11px; }
.panel > .panel-body.invite-row { margin: 0; border: 0; background: transparent; padding: 19px 20px; }
.invite-row h2 { margin-bottom: 6px; font-size: 13px; }
.invite-row > div { min-width: 0; flex: 1; }
.progress-track { height: 5px; background: #243237; border-radius: 2px; overflow: hidden; margin: 15px 0 9px; }
.progress-track > * { display: block; height: 100%; background: var(--mint); }
.burn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; padding: 20px; }
.burn-item { position: relative; min-width: 0; padding: 20px 17px; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; }
.burn-item h3 { font-size: 12px; margin: 14px 0 10px; }
.burn-item > strong { display: block; font-size: 24px; letter-spacing: -.7px; margin-bottom: 8px; }
.burn-item > p, .burn-item > small { color: var(--muted); font-size: 11px; line-height: 1.7; }
.burn-grid > .burn-item { padding: 0; }
.burn-item .panel-body h2 { margin: 14px 0 12px; font-size: 13px; }
.burn-item .panel-body > strong { display: block; margin-bottom: 10px; font-size: 23px; letter-spacing: -.7px; }
.burn-item .panel-body > strong small { color: var(--muted); font-size: 10px; }
.burn-item .panel-body > p { min-height: 37px; }
.burn-item .panel-body > .badge { margin-top: 14px; }
.burn-marker { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: rgb(80 210 193 / 8%); border: 1px solid rgb(80 210 193 / 15%); color: var(--mint); border-radius: 6px; }
.burn-marker svg { width: 17px; height: 17px; }
.nft-card { min-width: 0; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.nft-art { position: relative; display: flex; align-items: center; justify-content: center; min-height: 285px; background: #102724; border-right: 1px solid var(--line); overflow: hidden; }
.nft-art::before, .nft-art::after { content: ''; position: absolute; width: 210px; height: 210px; border: 1px solid rgb(80 210 193 / 13%); transform: rotate(45deg); }
.nft-art::after { width: 150px; height: 150px; border-color: rgb(80 210 193 / 23%); }
.nft-art svg { position: relative; z-index: 1; width: 210px; height: 250px; color: var(--mint); padding: 10px; }
.nft-art:has(svg)::before, .nft-art:has(svg)::after { display: none; }
.nft-art > span { position: relative; z-index: 1; color: var(--mint); font-size: 42px; font-weight: 650; letter-spacing: -2px; }
.nft-info { min-width: 0; padding: 28px; }
.nft-info .eyebrow { color: var(--mint); margin-bottom: 14px; }
.nft-info h2 { font-size: 23px; line-height: 1.3; margin-bottom: 10px; }
.nft-info p { font-size: 12px; line-height: 1.8; color: var(--muted); }
.nft-info .primary-button { margin-top: 17px; }
.nft-info > .badge { margin-bottom: 15px; }
.panel > .panel-body.nft-card { border: 0; border-radius: 0; padding: 0; }
.rules-note { padding: 15px 18px; margin-top: 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--muted); font-size: 11px; line-height: 1.8; }
.rules-note strong { color: var(--text-secondary); }
.rules-note p + p { margin-top: 6px; }

dialog { position: fixed; width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 1px solid #3c4c4e; border-radius: 10px; background: var(--surface); color: var(--text); box-shadow: 0 20px 80px rgb(0 0 0 / 40%); }
dialog::backdrop { background: rgb(3 11 14 / 76%); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 16px; }
.dialog-close { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; color: var(--muted); font-size: 20px; border-radius: 4px; }
.dialog-close:hover { background: var(--surface-raised); color: var(--text); }
.dialog-body { padding: 20px; }
.dialog-body > p { color: var(--muted); font-size: 12px; line-height: 1.7; margin-bottom: 18px; }
.wallet-option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 57px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 9px; text-align: left; background: var(--bg); }
.wallet-option:hover { background: var(--surface-raised); border-color: #39766e; }
.wallet-option svg { width: 25px; height: 25px; color: var(--mint); }
.wallet-option > span { display: flex; flex-direction: column; gap: 4px; }
.wallet-option > span.token-icon { flex-direction: row; width: 29px; height: 29px; }
.wallet-option > b:last-child, .wallet-option > .badge:last-child { margin-left: auto; }
.wallet-option > span.badge { flex-direction: row; }
.wallet-option small { color: var(--muted); font-size: 10px; }
.toast { position: fixed; z-index: 100; right: 22px; bottom: 50px; max-width: min(380px, calc(100vw - 32px)); padding: 13px 17px; border: 1px solid #39766e; border-radius: 7px; background: #142c2b; color: var(--text); font-size: 12px; line-height: 1.6; box-shadow: 0 7px 30px rgb(0 0 0 / 20%); }

@media (min-width: 1920px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 370px; }
  .chart-svg { height: 355px; }
  .overview-stats { padding: 26px 0; }
  .metric { padding-left: 28px; }
  .chart-container { padding: 24px 28px 16px; }
  .records-panel { min-height: 235px; }
  .view-shell { max-width: 1320px; }
}
@media (min-width: 2400px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 400px; }
  .chart-svg { height: 420px; }
  .records-panel { min-height: 270px; }
  .metric > strong { font-size: 32px; }
  .trade-form { padding: 22px; }
  .view-shell { max-width: 1480px; }
}
@media (max-width: 1160px) {
  .app-header { gap: 20px; padding-inline: 15px; }
  .desktop-nav { gap: 20px; }
  .network-badge { display: none; }
  .context-bar { gap: 25px; padding-inline: 17px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .metric { padding-inline: 16px; }
  .metric > strong { font-size: 22px; }
  .overview-stats { padding-block: 20px; }
  .allocation-row { flex-wrap: wrap; gap: 12px; }
  .allocation-bar { flex-basis: 100%; }
  .tabs { gap: 18px; }
  .panel-head { padding-inline: 15px; }
}
@media (max-width: 960px) and (min-width: 761px) {
  .app-header { gap: 15px; }
  .brand { min-width: auto; }
  .brand small, .demo-badge { display: none; }
  .desktop-nav { gap: 14px; }
  .desktop-nav button { font-size: 11px; }
  .header-actions { gap: 6px; }
  .context-bar { gap: 20px; }
  .context-metric:last-child { display: none; }
  .overview-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px 0; }
  .metric:nth-child(2) { border-right: 0; }
  .chart-container { padding-inline: 14px; }
  .chart-value { font-size: 23px; }
  .split-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  html, body { min-width: 320px; }
  .app-header { min-height: 55px; padding: 0 13px; gap: 10px; }
  .brand { min-width: 0; gap: 7px; }
  .brand-mark svg { width: 24px; height: 24px; }
  .brand > svg.brand-mark { width: 24px; height: 24px; }
  .brand strong { font-size: 19px; }
  .brand small, .desktop-nav, .network-badge, .demo-badge { display: none; }
  .header-actions { gap: 7px; }
  .language-button { width: 29px; min-width: 29px; height: 30px; font-size: 10px; }
  .wallet-button { min-height: 31px; padding: 7px 10px; font-size: 11px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
  .context-bar { min-height: 67px; padding: 12px 14px; gap: 14px; margin-inline: 0; margin-top: 0; border-bottom: 1px solid var(--line); }
  .market-name { gap: 7px; font-size: 15px; }
  .token-icon { width: 25px; height: 25px; font-size: 9px; }
  .market-price { margin-left: auto; min-width: 0; text-align: right; gap: 4px; }
  .market-price strong { font-size: 18px; }
  .market-price small { font-size: 9px; }
  .context-metric { display: none; }
  .context-link { display: none; }
  .market-name > div > strong { font-size: 14px; }
  .app-main { min-height: calc(100dvh - 178px); padding-bottom: 67px; }
  .workspace-grid { display: block; padding: 0; }
  .workspace-main, .action-rail { gap: 3px; }
  .workspace-grid[data-mobile-panel='overview'] .action-rail { display: none; }
  .workspace-grid[data-mobile-panel='participate'] .workspace-main { display: none; }
  .workspace-grid:not([data-mobile-panel]) .action-rail { display: none; }
  .mobile-workspace-tabs { display: flex; min-height: 43px; padding: 0 14px; gap: 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .mobile-workspace-tabs button { position: relative; min-height: 43px; padding: 0 1px; color: var(--muted); font-size: 12px; }
  .mobile-workspace-tabs button.active { color: var(--text); }
  .mobile-workspace-tabs button.active::after { content: ''; position: absolute; height: 1px; right: 0; bottom: -1px; left: 0; background: var(--mint); }
  .panel { border-radius: 0; border-left: 0; border-right: 0; }
  .panel-head { min-height: 45px; padding-inline: 14px; gap: 10px; }
  .panel-head > span { font-size: 10px; }
  .panel-body { padding: 17px 15px; }
  .overview-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px 0; padding: 20px 0; }
  .metric { padding-inline: 15px; }
  .metric:nth-child(2) { border-right: 0; }
  .metric > label, .metric > span:first-child { font-size: 10px; margin-bottom: 7px; }
  .metric > strong { font-size: 24px; letter-spacing: -.7px; }
  .metric > small { margin-top: 4px; font-size: 9px; }
  .chart-container { padding: 17px 14px 12px; }
  .chart-meta { align-items: flex-start; gap: 10px; }
  .chart-value { font-size: 24px; }
  .chart-subtitle { font-size: 10px; }
  .chart-svg { height: auto; }
  .chart-svg text { font-size: 11px; }
  .chart-axis { font-size: 9px; }
  .chart-meta .tabs { gap: 13px; }
  .chart-meta .tabs button { font-size: 10px; }
  .chart-toolbar { gap: 2px; }
  .chart-toolbar button { padding: 4px 7px; font-size: 9px; }
  .chart-legend { font-size: 9px; gap: 10px; }
  .allocation-row { padding: 14px; gap: 12px; }
  .allocation-legend { width: 100%; justify-content: space-between; gap: 8px; font-size: 9px; }
  .records-panel { min-height: 190px; }
  .records-panel .panel-head { overflow-x: auto; scrollbar-width: none; }
  .records-panel .panel-head::-webkit-scrollbar { display: none; }
  .records-panel .tabs { gap: 23px; }
  .records-panel .tabs button { font-size: 11px; }
  .desktop-records { display: none; }
  .mobile-records { display: block; }
  .records-tabs { gap: 24px; }
  .records-tabs button { font-size: 11px; }
  th { padding: 12px 14px; }
  td { padding: 14px; }
  .empty-state { min-height: 135px; font-size: 11px; }
  .trade-form { padding: 21px 17px 23px; }
  .field-label { font-size: 12px; }
  .amount-field { min-height: 48px; }
  .amount-field input { padding-block: 14px; font-size: 17px; }
  .range-row button { min-height: 30px; font-size: 11px; }
  .cycle-grid { gap: 9px; }
  .cycle-grid button { min-height: 63px; }
  .cycle-grid button strong { font-size: 14px; }
  .cycle-grid button small { font-size: 10px; }
  .estimate-list { gap: 14px; }
  .estimate-list dt, .estimate-list dd { font-size: 12px; }
  .auto-toggle { font-size: 12px; min-height: 42px; }
  .trade-form > .primary-button, .form-footer .primary-button { min-height: 45px; font-size: 13px; }
  .form-note, .form-hint { font-size: 11px; }
  .account-list { padding-inline: 17px; }
  .asset-row { padding-block: 16px; }
  .asset-row > div > strong, .asset-row > strong { font-size: 12px; }
  .bottom-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: stretch; min-height: 61px; padding: 7px 5px max(7px, env(safe-area-inset-bottom)); background: #0f1a1f; border-top: 1px solid var(--line); }
  .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 1px 2px; min-width: 0; color: var(--muted); font-size: 9px; }
  .bottom-nav button.active { color: var(--mint); }
  .bottom-nav button > span { display: flex; align-items: center; justify-content: center; }
  .bottom-nav button > span { font-size: 22px; line-height: 23px; height: 23px; }
  .bottom-nav button svg { width: 19px; height: 19px; stroke-width: 1.5; }
  .status-footer, .app-footer { padding: 10px 14px; margin-bottom: 64px; font-size: 9px; align-items: flex-start; }
  .status-footer > div, .app-footer > div { gap: 10px; flex-wrap: wrap; }
  .status-footer > span:last-child, .app-footer > span:last-child { max-width: 58%; text-align: right; line-height: 1.6; }
  .status-footer > span:nth-child(2) { font-size: 8px; margin-left: auto; }
  .status-footer .footer-right { display: none; }
  .view-shell { padding: 23px 14px 24px; }
  .page-title { margin-bottom: 20px; gap: 12px; align-items: flex-start; }
  .page-title h1 { font-size: 22px; }
  .page-title p { font-size: 11px; }
  .page-title > .badge { margin-top: 5px; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px 0; row-gap: 20px; }
  .summary-strip > div { padding-inline: 14px; }
  .summary-strip > div:nth-child(even) { border-right: 0; }
  .summary-strip > div:last-child:nth-child(odd) { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid var(--line-soft); }
  .summary-strip.team-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 23px; }
  .summary-strip strong > small { display: inline; font-size: 9px; }
  .summary-strip strong { font-size: 22px; }
  .summary-strip label, .summary-strip > div > span:first-child { font-size: 10px; }
  .split-layout { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .view-shell .panel { border: 1px solid var(--line); border-radius: 5px; }
  .asset-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .asset-card { display: block; padding: 17px; }
  .asset-card > .panel-head { margin-bottom: 15px; }
  .asset-card .asset-icon { grid-row: 1 / 4; margin: 0; }
  .asset-card > h3, .asset-card > strong, .asset-card > p, .asset-card > small { grid-column: 2; }
  .asset-card > strong { font-size: 22px; }
  .asset-card .secondary-button { grid-column: 1 / -1; margin-top: 14px; }
  .swap-panel { max-width: none; margin-top: 0; }
  .swap-panel .panel-body { padding: 20px 16px; }
  .swap-panel .primary-button { min-height: 44px; }
  .team-stats { gap: 10px; }
  .team-stats strong { font-size: 23px; }
  .team-stats label, .team-stats small { font-size: 10px; }
  .invite-row { gap: 7px; padding-inline: 10px; }
  .invite-row code { font-size: 10px; }
  .panel > .panel-body.invite-row { flex-wrap: wrap; padding: 17px; gap: 16px; }
  .panel > .panel-body.invite-row > div { flex-basis: 100%; }
  .panel > .panel-body.invite-row button { width: 100%; }
  .burn-grid { grid-template-columns: minmax(0, 1fr); padding: 15px; gap: 11px; }
  .burn-item { padding: 18px; }
  .burn-item > strong { font-size: 23px; }
  .nft-card { grid-template-columns: minmax(0, 1fr); }
  .nft-art { min-height: 215px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nft-art svg { width: 185px; height: 220px; }
  .nft-info { padding: 23px 20px; }
  .nft-info h2 { font-size: 22px; }
  .nft-info .primary-button { width: 100%; }
  .rules-note { padding: 14px; font-size: 10px; }
  .toast { right: 16px; bottom: 81px; left: 16px; max-width: none; padding: 12px 14px; font-size: 11px; }
}
@media (max-width: 374px) {
  .app-header { padding-inline: 11px; }
  .brand strong { font-size: 17px; }
  .brand-mark svg { width: 22px; height: 22px; }
  .wallet-button { padding-inline: 8px; font-size: 10px; max-width: 135px; }
  .header-actions { gap: 5px; }
  .metric > strong { font-size: 22px; }
  .allocation-legend { font-size: 8px; gap: 5px; }
  .market-name { font-size: 14px; }
  .market-price strong { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
