:root {
    --futures-border: var(--calm-line, rgba(255, 255, 255, .07));
    --futures-border-strong: var(--calm-line-strong, rgba(255, 255, 255, .13));
    --futures-panel: var(--calm-panel, #11141a);
    --futures-panel-soft: var(--calm-bg, #0b0e13);
    --futures-field: var(--calm-field, #1f2229);
    --futures-hover: var(--calm-hover, rgba(255, 255, 255, .045));
    --futures-red: var(--calm-danger, #f1595a);
    --futures-red-soft: var(--calm-danger-soft, rgba(241, 89, 90, .12));
    --futures-yellow: #f2bd4b;
    --futures-blue: #5e9bff;
}

.futures-body {
    min-width: 320px;
    overflow-x: hidden;
    background: var(--background);
}

.futures-body.futures-scroll-locked {
    overflow: hidden;
    touch-action: none;
}

.futures-page,
.futures-page button,
.futures-page input,
.futures-modal,
.futures-modal button,
.futures-modal input {
    font-family: inherit;
}

.futures-page {
    width: 100%;
    min-height: calc(100vh - var(--header-h));
    color: var(--words);
    font-size: 13px;
    background: var(--background);
    border-bottom: 1px solid var(--futures-border);
}

.futures-page button,
.futures-modal button {
    color: inherit;
}

.futures-page button:focus-visible,
.futures-page a:focus-visible,
.futures-page input:focus-visible,
.futures-modal button:focus-visible,
.futures-modal input:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.futures-page button:active,
.futures-modal button:active {
    transform: translateY(1px);
}

.futures-market-bar {
    position: relative;
    z-index: 24;
    display: grid;
    grid-template-columns: minmax(185px, auto) minmax(115px, auto) repeat(8, minmax(90px, 1fr)) minmax(84px, auto);
    align-items: center;
    min-height: 64px;
    padding: 6px 12px;
    overflow: visible;
    background: var(--futures-panel);
    border-bottom: 1px solid var(--futures-border);
}

.futures-contract-trigger {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto 16px;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 46px;
    padding: 4px 10px 4px 4px;
    text-align: left;
    cursor: pointer;
    background: transparent;
    border: 0;
    border-radius: 6px;
    transition: background .16s ease;
}

.futures-contract-trigger:hover { background: var(--futures-hover); }
.futures-contract-trigger svg,
.futures-control-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.futures-contract-icon { width: 32px; height: 32px; object-fit: contain; border-radius: 50%; background: rgba(255,255,255,.06); }
.futures-contract-name { overflow: hidden; font-size: 15px; font-weight: 900; text-overflow: ellipsis; }
.futures-contract-badge { padding: 3px 5px; color: var(--green); font-size: 10px; font-weight: 800; background: var(--greenA); border-radius: 3px; }

.futures-market-price,
.futures-market-stat {
    min-width: 0;
    padding: 0 12px;
    border-left: 1px solid var(--futures-border);
}

.futures-market-price { display: flex; flex-direction: column; gap: 1px; }
.futures-market-price strong { color: var(--green); font-size: 18px; font-variant-numeric: tabular-nums; }
.futures-market-price[data-price-direction="down"] strong { color: var(--futures-red); }
.futures-market-price span,
.futures-market-stat span { display: block; overflow: hidden; color: var(--muteds); font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.futures-market-stat strong { display: block; margin-top: 3px; overflow: hidden; color: var(--words); font-size: 12px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }

.futures-connection {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 88px;
    color: var(--muteds);
    font-size: 11px;
    font-weight: 700;
}

.futures-connection-dot { width: 7px; height: 7px; flex: 0 0 auto; background: var(--futures-yellow); border-radius: 50%; box-shadow: 0 0 0 3px rgba(242,189,75,.1); }
.futures-connection[data-connection-state="live"] .futures-connection-dot { background: var(--green); box-shadow: 0 0 0 3px var(--greenA); }
.futures-connection[data-connection-state="error"] .futures-connection-dot { background: var(--futures-red); box-shadow: 0 0 0 3px var(--futures-red-soft); }

.futures-mobile-market-tabs { display: none; }

.futures-workspace {
    display: grid;
    grid-template-columns: minmax(560px, 1fr) 320px 330px;
    align-items: stretch;
    height: max(610px, calc(100svh - var(--header-h) - 64px));
    min-height: 610px;
    overflow: hidden;
    background: var(--background);
    border-bottom: 1px solid var(--futures-border);
}

.futures-panel { min-width: 0; background: var(--futures-panel); }
.futures-chart-panel,
.futures-depth-panel { border-right: 1px solid var(--futures-border); }

.futures-chart-panel {
    display: grid;
    grid-template-rows: 48px minmax(0, 1fr);
    min-height: 0;
}

.futures-chart-header,
.futures-panel-header,
.futures-order-header,
.futures-terminal-header {
    display: flex;
    align-items: center;
    min-width: 0;
    border-bottom: 1px solid var(--futures-border);
}

.futures-chart-header { position: relative; z-index: 18; gap: 4px; min-height: 48px; padding: 7px 9px; }
.futures-chart-select { position: relative; }
.futures-control-button,
.futures-chart-tools button,
.futures-depth-controls button,
.futures-icon-command,
.futures-mobile-order-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 9px;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.futures-control-button { gap: 5px; color: var(--muteds); font-size: 12px; font-weight: 800; }
.futures-control-button:hover,
.futures-control-button.is-active,
.futures-chart-tools button:hover,
.futures-depth-controls button:hover,
.futures-icon-command:hover { color: var(--words); background: var(--futures-hover); border-color: var(--futures-border); }

.futures-popover-menu {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    z-index: 60;
    display: none;
    min-width: 154px;
    padding: 5px;
    background: var(--futures-panel);
    border: 1px solid var(--futures-border-strong);
    border-radius: 6px;
    box-shadow: 0 16px 36px rgba(0,0,0,.45);
    transform-origin: top left;
}

.futures-chart-select.is-open .futures-popover-menu { display: grid; animation: futures-popover-in .14s ease both; }
.futures-popover-menu button { min-height: 36px; padding: 0 10px; color: var(--muteds); font-size: 12px; font-weight: 800; text-align: left; cursor: pointer; background: transparent; border: 0; border-radius: 4px; }
.futures-popover-menu button:hover { color: var(--words); background: var(--futures-hover); }
.futures-popover-menu button.is-active { color: var(--green); background: var(--greenA); }
.futures-interval-menu { grid-template-columns: repeat(2, 1fr); min-width: 168px; }
.futures-indicator-menu { grid-template-columns: repeat(2, 1fr); }

.futures-chart-tools { display: flex; align-items: center; gap: 1px; margin-left: auto; }
.futures-chart-tools button { width: 32px; padding: 0; color: var(--muteds); }
.futures-chart-tools svg,
.futures-icon-command svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.futures-chart-stage { position: relative; min-height: 0; height: 100%; overflow: hidden; background: var(--futures-panel-soft); }
#futures-chart { position: absolute; inset: 0; z-index: 2; }
.futures-chart-stage:fullscreen { width: 100vw; height: 100vh; background: var(--futures-panel-soft); }
.futures-chart-stage:fullscreen #futures-chart { inset: 0; }
.futures-chart-watermark { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 12px; pointer-events: none; opacity: .045; }
.futures-chart-watermark img { width: 78px; height: 78px; object-fit: contain; }
.futures-chart-watermark span { max-width: 42%; overflow: hidden; color: #fff; font-size: 36px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.futures-chart-state { position: absolute; inset: 0; z-index: 7; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muteds); font-size: 12px; background: var(--futures-panel-soft); }
.futures-chart-state[hidden] { display: none; }
.futures-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.16); border-top-color: var(--green); border-radius: 50%; animation: futures-spin .8s linear infinite; }

.futures-chart-price-lines { position: absolute; inset: 0 56px 28px 0; z-index: 5; pointer-events: none; }
.futures-chart-price-line { position: absolute; right: 0; left: 0; height: 0; border-top: 1px dashed currentColor; opacity: .78; }
.futures-chart-price-line span { position: absolute; top: -10px; right: 3px; padding: 2px 5px; color: #09110d; font-size: 10px; font-weight: 900; background: currentColor; border-radius: 3px; }
.futures-chart-price-line.is-mark { color: var(--futures-yellow); }
.futures-chart-price-line.is-index { color: var(--futures-blue); }
.futures-chart-price-line.is-entry { color: var(--green); }
.futures-chart-price-line.is-liquidation { color: var(--futures-red); }

.futures-depth-panel { display: grid; grid-template-rows: 84px minmax(0, 1fr); min-height: 0; }
.futures-panel-header { align-items: stretch; flex-direction: column; }
.futures-panel-tabs { display: flex; min-width: 0; height: 43px; padding: 0 9px; border-bottom: 1px solid var(--futures-border); }
.futures-panel-tabs button,
.futures-terminal-tabs button,
.futures-order-types button,
.futures-mobile-market-tabs button {
    position: relative;
    min-width: 0;
    padding: 0 9px;
    color: var(--muteds);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    border: 0;
}
.futures-panel-tabs button.is-active,
.futures-terminal-tabs button.is-active,
.futures-order-types button.is-active,
.futures-mobile-market-tabs button.is-active { color: var(--words); }
.futures-panel-tabs button.is-active::after,
.futures-terminal-tabs button.is-active::after,
.futures-order-types button.is-active::after,
.futures-mobile-market-tabs button.is-active::after { content: ""; position: absolute; right: 9px; bottom: 0; left: 9px; height: 2px; background: var(--green); border-radius: 2px 2px 0 0; }

.futures-depth-controls { display: flex; align-items: center; gap: 4px; height: 41px; padding: 5px 9px; }
.futures-depth-controls button { width: 29px; height: 28px; padding: 0; color: var(--muteds); }
.futures-depth-controls button.is-active { color: var(--words); background: var(--futures-hover); border-color: var(--futures-border); }
.futures-depth-controls .futures-depth-precision { width: auto; min-width: 52px; margin-left: auto; padding: 0 7px; font-size: 11px; font-variant-numeric: tabular-nums; }
.futures-book-mode-icon { display: block; width: 14px; height: 14px; background: repeating-linear-gradient(to bottom, var(--green) 0 2px, transparent 2px 4px); }
.futures-book-mode-icon.asks { background: repeating-linear-gradient(to bottom, var(--futures-red) 0 2px, transparent 2px 4px); }
.futures-book-mode-icon.both { background: linear-gradient(to bottom, var(--futures-red) 0 43%, transparent 43% 57%, var(--green) 57% 100%); }

.futures-depth-view { display: none; min-height: 0; overflow: hidden; }
.futures-depth-view.is-active { display: grid; grid-template-rows: 27px minmax(0, 1fr) 42px minmax(0, 1fr); }
.futures-depth-view[data-depth-view="trades"].is-active { grid-template-rows: 27px minmax(0, 1fr); }
.futures-table-head { color: var(--muteds); font-size: 10px; font-weight: 700; }
.futures-book-grid,
.futures-trades-grid,
.futures-book-row,
.futures-trade-row { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 4px; padding: 0 10px; }
.futures-book-grid span:not(:first-child), .futures-trades-grid span:not(:first-child) { text-align: right; }
.futures-book-list,
.futures-recent-list { min-height: 0; overflow: hidden; }
.futures-book-row,
.futures-trade-row { position: relative; height: 22px; color: var(--words); font-size: 11px; font-variant-numeric: tabular-nums; }
.futures-book-row { width: 100%; cursor: pointer; background: transparent; border: 0; }
.futures-book-row::before { content: ""; position: absolute; top: 1px; right: 0; bottom: 1px; z-index: 0; width: var(--depth, 0%); pointer-events: none; background: var(--greenA); }
.futures-book-asks .futures-book-row::before { background: var(--futures-red-soft); }
.futures-book-row span, .futures-trade-row span { position: relative; z-index: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.futures-book-row span:not(:first-child), .futures-trade-row span:not(:first-child) { text-align: right; }
.futures-book-asks .futures-book-row span:first-child, .futures-trade-row.is-sell span:first-child { color: var(--futures-red); }
.futures-book-bids .futures-book-row span:first-child, .futures-trade-row.is-buy span:first-child { color: var(--green); }
.futures-book-mid { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; border-top: 1px solid var(--futures-border); border-bottom: 1px solid var(--futures-border); }
.futures-book-mid strong { color: var(--green); font-size: 14px; font-variant-numeric: tabular-nums; }
.futures-book-mid span { color: var(--muteds); font-size: 10px; }

.futures-order-panel { display: grid; grid-template-rows: 50px 42px minmax(0, 1fr); min-height: 0; overflow: hidden; }
.futures-order-header { justify-content: space-between; height: 50px; padding: 0 10px; }
.futures-order-header > div { display: flex; align-items: center; gap: 7px; }
.futures-order-header span { color: var(--muteds); font-size: 11px; }
.futures-order-header strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.futures-mobile-order-close { display: none; width: 32px; padding: 0; color: var(--muteds); font-size: 22px; }
.futures-order-settings { display: flex; align-items: center; gap: 4px; min-height: 0; margin-left: auto; padding: 0; border-bottom: 0; }
.futures-setting-chip { min-height: 30px; padding: 0 10px; color: var(--muteds); font-size: 11px; font-weight: 800; cursor: pointer; background: var(--futures-panel-soft); border: 1px solid var(--futures-border); border-radius: 4px; }
.futures-order-settings .futures-icon-command { width: 29px; height: 29px; margin-left: auto; padding: 0; color: var(--muteds); }
.futures-order-settings .futures-icon-command + .futures-icon-command { margin-left: 0; }
.futures-order-types { display: flex; gap: 1px; min-height: 46px; padding: 0 8px; overflow-x: auto; border-bottom: 1px solid var(--futures-border); scrollbar-width: none; }
.futures-order-types button { min-width: max-content; flex: 0 0 auto; padding: 0 10px; }
.futures-order-types::-webkit-scrollbar { display: none; }
.futures-order-form { display: grid; align-content: start; gap: 12px; min-height: 0; padding: 14px 12px 18px; overflow-y: auto; max-height: none; scrollbar-width: thin; scrollbar-color: var(--futures-border-strong) transparent; }
.futures-field { display: grid; gap: 6px; color: var(--muteds); font-size: 11px; font-weight: 700; }
.futures-field[hidden] { display: none; }
.futures-input-wrap,
.futures-leverage-input { display: flex; align-items: center; min-height: 42px; overflow: hidden; background: var(--futures-panel-soft); border: 1px solid var(--futures-border); border-radius: 5px; transition: border-color .16s ease, box-shadow .16s ease; }
.futures-input-wrap:focus-within,
.futures-leverage-input:focus-within { border-color: rgba(52,232,143,.55); box-shadow: 0 0 0 3px var(--greenA); }
.futures-input-wrap input,
.futures-leverage-input input { width: 100%; min-width: 0; height: 40px; padding: 0 10px; color: var(--words); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; background: transparent; border: 0; outline: 0; }
.futures-input-wrap b,
.futures-leverage-input b { padding: 0 10px; color: var(--muteds); font-size: 11px; }
.futures-unit-toggle { align-self: stretch; min-width: 56px; padding: 0 10px; color: var(--green); font-size: 11px; font-weight: 900; cursor: pointer; background: var(--greenA); border: 0; }

.futures-range-wrap,
.futures-percent-control { display: grid; gap: 7px; }
.futures-range-wrap input,
.futures-percent-control > input,
.futures-dialog-range { width: 100%; height: 4px; accent-color: var(--green); cursor: pointer; }
.futures-range-presets,
.futures-percent-presets,
.futures-leverage-presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.futures-range-presets button,
.futures-percent-presets button,
.futures-leverage-presets button { min-height: 28px; padding: 0 4px; color: var(--muteds); font-size: 10px; font-weight: 800; cursor: pointer; background: transparent; border: 1px solid var(--futures-border); border-radius: 4px; }
.futures-range-presets button:hover,
.futures-range-presets button.is-active,
.futures-percent-presets button:hover,
.futures-percent-presets button.is-active,
.futures-leverage-presets button:hover,
.futures-leverage-presets button.is-active { color: var(--green); border-color: rgba(52,232,143,.45); background: var(--greenA); }
.futures-checkbox,
.futures-check-row { display: flex; align-items: center; gap: 8px; min-height: 26px; color: var(--muteds); font-size: 11px; font-weight: 700; cursor: pointer; }
.futures-checkbox input,
.futures-check-row input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.futures-check-row .futures-checkmark { display: none; }
.futures-order-tif { display: grid; gap: 6px; color: var(--muteds); font-size: 11px; font-weight: 700; }
.futures-order-tif[hidden], .futures-attached-tpsl[hidden] { display: none; }
.futures-attached-tpsl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.futures-order-preview { display: grid; gap: 5px; padding: 9px; background: rgba(255,255,255,.018); border: 1px solid var(--futures-border); border-radius: 5px; }
.futures-order-preview div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.futures-order-preview dt { color: var(--muteds); font-size: 10px; }
.futures-order-preview dd { margin: 0; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.futures-order-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.futures-long-button,
.futures-short-button { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 0 10px; color: #07130d !important; font-size: 12px; font-weight: 900; cursor: pointer; border: 0; border-radius: 5px; transition: filter .16s ease, box-shadow .16s ease; }
.futures-long-button { background: var(--green); box-shadow: 0 7px 20px rgba(52,232,143,.12); }
.futures-short-button { color: #fff !important; background: var(--futures-red); box-shadow: 0 7px 20px rgba(255,92,108,.12); }
.futures-long-button:hover, .futures-short-button:hover { filter: brightness(1.07); }
.futures-long-button small, .futures-short-button small { font-size: 10px; opacity: .65; }
.futures-long-button:disabled, .futures-short-button:disabled, .futures-primary-button:disabled { cursor: not-allowed; filter: grayscale(.5); opacity: .55; }

.futures-account-strip { min-height: 90px; background: var(--futures-panel); border-bottom: 1px solid var(--futures-border); }
.futures-account-guest { display: flex; align-items: center; justify-content: center; gap: 22px; min-height: 90px; padding: 12px 18px; }
.futures-account-guest > div { display: grid; gap: 3px; }
.futures-account-guest strong { font-size: 14px; }
.futures-account-guest span { color: var(--muteds); font-size: 11px; }
.futures-account-guest button,
.futures-transfer-button { min-height: 36px; padding: 0 16px; color: #07130d; font-size: 11px; font-weight: 900; cursor: pointer; background: var(--green); border: 0; border-radius: 5px; }
.futures-account-content { display: grid; grid-template-columns: 132px repeat(7, minmax(105px, 1fr)) minmax(160px, 1.2fr) auto; align-items: center; gap: 0; min-height: 90px; padding: 10px 14px; }
.futures-account-heading,
.futures-account-metric,
.futures-margin-meter { min-width: 0; padding: 0 12px; border-right: 1px solid var(--futures-border); }
.futures-account-heading { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 900; }
.futures-account-heading .futures-icon-command { width: 28px; height: 28px; padding: 0; }
.futures-account-metric { display: grid; gap: 4px; }
.futures-account-metric span,
.futures-margin-meter span { overflow: hidden; color: var(--muteds); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.futures-account-metric strong { overflow: hidden; font-size: 12px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.futures-account-metric b { font-weight: inherit; }
.futures-margin-meter { display: grid; gap: 7px; }
.futures-margin-meter > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
.futures-margin-meter strong { font-size: 10px; }
.futures-margin-track { height: 4px; overflow: hidden; background: rgba(255,255,255,.08); border-radius: 4px; }
.futures-margin-track span { display: block; width: 0; height: 100%; background: var(--green); transition: width .25s ease, background .25s ease; }
.futures-transfer-button { margin-left: 12px; }
.futures-account-content.is-private .futures-account-metric strong,
.futures-account-content.is-private .futures-margin-meter strong { color: transparent; text-shadow: 0 0 7px rgba(255,255,255,.8); user-select: none; }

.futures-terminal { min-height: 280px; }
.futures-terminal-header { justify-content: space-between; min-height: 47px; padding: 0 10px; }
.futures-terminal-tabs { display: flex; align-self: stretch; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.futures-terminal-tabs::-webkit-scrollbar { display: none; }
.futures-terminal-tabs button { height: 100%; padding: 0 12px; }
.futures-terminal-actions { display: flex; gap: 5px; flex: 0 0 auto; margin-left: 8px; }
.futures-terminal-actions button { min-height: 30px; padding: 0 9px; color: var(--muteds); font-size: 10px; font-weight: 800; cursor: pointer; background: transparent; border: 1px solid var(--futures-border); border-radius: 4px; }
.futures-terminal-actions button:hover { color: var(--futures-red); border-color: rgba(255,92,108,.35); }
.futures-terminal-view { display: none; min-height: 230px; overflow-x: auto; }
.futures-terminal-view.is-active { display: block; }
.futures-data-table { min-width: 860px; }
.futures-data-head,
.futures-data-row { display: grid; align-items: center; gap: 10px; min-height: 38px; padding: 0 14px; }
.futures-data-head { color: var(--muteds); font-size: 10px; font-weight: 700; border-bottom: 1px solid var(--futures-border); }
.futures-data-row { font-size: 11px; font-variant-numeric: tabular-nums; border-bottom: 1px solid rgba(255,255,255,.045); }
.futures-data-row:hover { background: rgba(255,255,255,.018); }
.futures-data-row > span,
.futures-data-head > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.futures-positions-table .futures-data-head, .futures-positions-table .futures-data-row { grid-template-columns: 1.1fr 1fr 1fr 1fr 1fr 1fr 1.2fr 1.7fr; }
.futures-orders-table .futures-data-head, .futures-orders-table .futures-data-row { grid-template-columns: 1fr .75fr 1.1fr 1fr 1fr 1fr .85fr 1.2fr .75fr; }
.futures-history-table .futures-data-head, .futures-history-table .futures-data-row { grid-template-columns: 1fr .7fr 1.1fr .85fr 1fr 1fr 1fr .85fr 1.25fr; }
.futures-trade-history-table .futures-data-head, .futures-trade-history-table .futures-data-row { grid-template-columns: 1fr .75fr 1fr 1fr 1fr .85fr .85fr 1.25fr; }
.futures-transactions-table .futures-data-head, .futures-transactions-table .futures-data-row { grid-template-columns: 1.2fr 1fr 1fr 1fr 1.2fr; }
.futures-row-actions { display: flex; gap: 5px; overflow: visible !important; }
.futures-row-actions button { min-height: 27px; padding: 0 7px; color: var(--green); font-size: 10px; font-weight: 800; cursor: pointer; background: transparent; border: 1px solid rgba(52,232,143,.28); border-radius: 4px; }
.futures-row-actions button:hover { background: var(--greenA); }
.futures-row-actions button.is-danger { color: var(--futures-red); border-color: rgba(255,92,108,.3); }
.futures-row-actions button.is-danger:hover { background: var(--futures-red-soft); }
.futures-positive { color: var(--green) !important; }
.futures-negative { color: var(--futures-red) !important; }
.futures-muted { color: var(--muteds) !important; }
.futures-empty-state { display: flex; align-items: center; justify-content: center; min-height: 190px; padding: 24px; color: var(--muteds); font-size: 12px; }
.futures-empty-state[hidden] { display: none; }

.futures-mobile-order-bar { display: none; }

.futures-modal[hidden] { display: none; }
.futures-modal { position: fixed; inset: 0; z-index: 2200; display: grid; place-items: center; padding: 18px; }
.futures-modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; cursor: default; background: rgba(2,5,8,.72); border: 0; backdrop-filter: blur(4px); animation: futures-fade-in .16s ease both; }
.futures-dialog { position: relative; z-index: 1; width: min(430px, 100%); max-height: min(680px, calc(var(--futures-visual-height, 100svh) - 36px)); overflow: hidden; background: var(--futures-panel); border: 1px solid var(--futures-border-strong); border-radius: 7px; box-shadow: 0 22px 70px rgba(0,0,0,.6); animation: futures-dialog-in .18s ease both; }
.futures-dialog-wide { width: min(640px, 100%); }
.futures-small-dialog { width: min(390px, 100%); }
.futures-dialog header { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 9px 14px; border-bottom: 1px solid var(--futures-border); }
.futures-dialog header > div { display: grid; gap: 2px; min-width: 0; }
.futures-dialog header strong { font-size: 14px; }
.futures-dialog header span { overflow: hidden; color: var(--muteds); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.futures-dialog header > button { width: 34px; height: 34px; flex: 0 0 auto; padding: 0; color: var(--muteds); font-size: 22px; cursor: pointer; background: transparent; border: 0; border-radius: 5px; }
.futures-dialog header > button:hover { color: var(--words); background: var(--futures-hover); }
.futures-dialog-body { display: grid; gap: 14px; max-height: calc(100svh - 96px); padding: 15px; overflow-y: auto; overscroll-behavior: contain; }
.futures-dialog-body > p { margin: 0; color: var(--muteds); font-size: 11px; line-height: 1.6; }
.futures-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.futures-primary-button,
.futures-secondary-button,
.futures-danger-button { min-height: 40px; padding: 0 14px; font-size: 11px; font-weight: 900; cursor: pointer; border-radius: 5px; }
.futures-primary-button { color: #07130d !important; background: var(--green); border: 0; }
.futures-secondary-button { color: var(--words); background: transparent; border: 1px solid var(--futures-border-strong); }
.futures-danger-button { color: #fff; background: var(--futures-red); border: 0; }
.futures-segmented { display: flex; min-height: 36px; padding: 3px; overflow-x: auto; background: var(--futures-panel-soft); border: 1px solid var(--futures-border); border-radius: 5px; scrollbar-width: none; }
.futures-segmented::-webkit-scrollbar { display: none; }
.futures-segmented button { min-width: max-content; flex: 1; padding: 0 10px; color: var(--muteds); font-size: 10px; font-weight: 800; cursor: pointer; background: transparent; border: 0; border-radius: 3px; }
.futures-segmented button.is-active { color: var(--words); background: rgba(255,255,255,.07); }
.futures-contract-search,
.futures-search-field { display: flex; align-items: center; height: 40px; padding: 0 11px; background: var(--futures-panel-soft); border: 1px solid var(--futures-border); border-radius: 5px; }
.futures-contract-search svg,
.futures-search-field svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: var(--muteds); stroke-width: 2; }
.futures-contract-search input,
.futures-search-field input { width: 100%; min-width: 0; height: 38px; padding: 0 9px; color: var(--words); font-size: 11px; background: transparent; border: 0; outline: 0; }
.futures-contract-list-head { display: grid; grid-template-columns: minmax(0, 1fr) 110px 90px; gap: 8px; padding: 0 10px 7px 48px; color: var(--muteds); font-size: 9px; font-weight: 700; border-bottom: 1px solid var(--futures-border); }
.futures-contract-list-head span:not(:first-child) { text-align: right; }
.futures-contract-list { display: grid; max-height: 410px; overflow-y: auto; }
.futures-contract-row { display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: center; min-height: 54px; padding: 0 7px; border-bottom: 1px solid rgba(255,255,255,.045); }
.futures-contract-row:hover { background: var(--futures-hover); }
.futures-contract-favorite { width: 30px; height: 34px; padding: 0; color: var(--muteds); font-size: 17px; cursor: pointer; background: transparent; border: 0; }
.futures-contract-favorite.is-active { color: var(--futures-yellow); }
.futures-contract-select { display: grid; grid-template-columns: 34px minmax(0,1fr) 110px 90px; align-items: center; gap: 8px; min-width: 0; min-height: 53px; padding: 0 3px; text-align: left; cursor: pointer; background: transparent; border: 0; }
.futures-contract-select img { width: 30px; height: 30px; object-fit: contain; border-radius: 50%; }
.futures-contract-select strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; }
.futures-contract-select small { display: block; margin-top: 2px; overflow: hidden; color: var(--muteds); font-size: 9px; text-overflow: ellipsis; }
.futures-contract-select b,
.futures-contract-select em { overflow: hidden; font-size: 10px; font-style: normal; font-variant-numeric: tabular-nums; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.futures-leverage-input { width: 130px; margin: 0 auto; }
.futures-leverage-input input { font-size: 24px; font-weight: 900; text-align: center; }
.futures-leverage-presets { grid-template-columns: repeat(7, 1fr); }
.futures-calculator-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.futures-calculator-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 12px; background: var(--greenA); border: 1px solid rgba(52,232,143,.22); border-radius: 5px; }
.futures-calculator-result span { color: var(--muteds); font-size: 10px; }
.futures-calculator-result strong { color: var(--green); font-size: 14px; font-variant-numeric: tabular-nums; }
.futures-confirm-list { display: grid; gap: 9px; margin: 0; }
.futures-confirm-list div { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.futures-confirm-list dt { color: var(--muteds); font-size: 10px; }
.futures-confirm-list dd { margin: 0; font-size: 11px; font-weight: 800; text-align: right; }
.futures-position-action-view { display: none; gap: 12px; }
.futures-position-action-view.is-active { display: grid; }
.futures-auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.futures-auth-actions a { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 12px; color: #07130d; font-size: 11px; font-weight: 900; text-decoration: none; background: var(--green); border-radius: 5px; }
.futures-auth-actions a + a { color: var(--words); background: transparent; border: 1px solid var(--futures-border-strong); }

.futures-toast-region { position: fixed; right: 16px; bottom: 16px; z-index: 2600; display: grid; width: min(360px, calc(100vw - 32px)); gap: 8px; pointer-events: none; }
.futures-toast { display: grid; grid-template-columns: 4px 1fr auto; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px 8px 0; overflow: hidden; color: var(--words); font-size: 11px; background: var(--futures-panel-soft); border: 1px solid var(--futures-border-strong); border-radius: 6px; box-shadow: 0 12px 35px rgba(0,0,0,.45); pointer-events: auto; animation: futures-toast-in .2s ease both; }
.futures-toast::before { content: ""; align-self: stretch; background: var(--green); }
.futures-toast.is-error::before { background: var(--futures-red); }
.futures-toast button { width: 28px; height: 28px; padding: 0; color: var(--muteds); font-size: 18px; cursor: pointer; background: transparent; border: 0; }

@keyframes futures-spin { to { transform: rotate(360deg); } }
@keyframes futures-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes futures-popover-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes futures-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes futures-toast-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 1500px) {
    .futures-market-bar { grid-template-columns: minmax(175px, auto) minmax(110px, auto) repeat(6, minmax(86px, 1fr)) minmax(82px, auto); }
    .futures-market-stat-tertiary { display: none; }
    .futures-workspace { grid-template-columns: minmax(500px, 1fr) 290px 330px; }
    .futures-account-content { grid-template-columns: 120px repeat(4, minmax(100px,1fr)) minmax(150px,1.2fr) auto; }
    .futures-account-metric:nth-of-type(6), .futures-account-metric:nth-of-type(7), .futures-account-metric:nth-of-type(8) { display: none; }
}

@media (max-width: 1120px) {
    .futures-market-bar { grid-template-columns: minmax(165px, auto) minmax(108px, auto) repeat(3, minmax(88px, 1fr)) minmax(82px, auto); }
    .futures-market-stat-secondary { display: none; }
    .futures-workspace { grid-template-columns: minmax(460px, 1fr) 280px 320px; }
    .futures-chart-tools button:nth-child(-n+3) { display: none; }
}

@media (max-width: 920px) {
    .futures-workspace { grid-template-columns: minmax(430px, 1fr) 300px; }
    .futures-order-panel { position: fixed; top: var(--header-h); right: 0; bottom: 0; z-index: 1800; width: min(390px, 100vw); visibility: hidden; box-shadow: -16px 0 50px rgba(0,0,0,.5); transform: translateX(100%); transition: transform .2s ease, visibility .2s; }
    .futures-order-panel.is-mobile-open { visibility: visible; transform: translateX(0); }
    .futures-mobile-order-close { display: inline-flex; }
    .futures-mobile-order-bar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 1200; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: rgba(11,13,16,.94); border-top: 1px solid var(--futures-border); backdrop-filter: blur(12px); }
    .futures-page { padding-bottom: 65px; }
}

@media (max-width: 760px) {
    .futures-body { padding-top: 62px; }
    .futures-page { padding-bottom: calc(124px + env(safe-area-inset-bottom)); }
    .futures-mobile-order-bar { bottom: calc(56px + env(safe-area-inset-bottom)); }
    .futures-market-bar { grid-template-columns: minmax(0, 1fr) auto; min-height: 74px; padding: 7px 10px; }
    .futures-contract-trigger { grid-template-columns: 30px minmax(0,1fr) 15px; min-height: 40px; padding-left: 0; }
    .futures-contract-icon { width: 30px; height: 30px; }
    .futures-contract-name { font-size: 13px; }
    .futures-contract-badge { display: none; }
    .futures-market-price { padding: 0 9px; }
    .futures-market-price strong { font-size: 15px; }
    .futures-market-stat, .futures-connection { display: none; }

    .futures-mobile-market-tabs { display: grid; grid-template-columns: repeat(3, 1fr); height: 43px; background: var(--futures-panel); border-bottom: 1px solid var(--futures-border); }
    .futures-mobile-market-tabs button { height: 100%; padding: 0 6px; font-size: 10px; }
    .futures-workspace { display: block; height: auto; min-height: 520px; overflow: visible; }
    .futures-workspace [data-mobile-market-panel] { display: none; border-right: 0; }
    .futures-workspace [data-mobile-market-panel].is-mobile-active { display: grid; }
    .futures-chart-panel { grid-template-rows: 43px 500px; }
    .futures-chart-stage { min-height: 500px; }
    .futures-chart-header { gap: 1px; min-height: 43px; padding: 5px 6px; }
    .futures-control-button { height: 31px; padding: 0 7px; font-size: 11px; }
    .futures-chart-tools { min-width: 0; }
    .futures-chart-tools button { width: 30px; height: 31px; }
    .futures-chart-tools button:nth-child(-n+4) { display: none; }
    .futures-popover-menu { position: fixed; top: auto; right: 10px; bottom: calc(124px + env(safe-area-inset-bottom)); left: 10px; grid-template-columns: repeat(2, 1fr); max-height: min(50svh, 360px); overflow-y: auto; transform-origin: bottom center; }
    .futures-chart-select.is-open .futures-popover-menu { animation-name: futures-dialog-in; }
    .futures-chart-watermark img { width: 56px; height: 56px; }
    .futures-chart-watermark span { max-width: 55%; font-size: 24px; }
    .futures-depth-panel { grid-template-rows: 82px 461px; min-height: 543px; }
    .futures-depth-view.is-active { min-height: 461px; }
    .futures-depth-panel[data-mobile-market-panel="trades"],
    .futures-depth-panel.is-trades-mobile { display: grid; }

    .futures-order-panel { top: 0; width: 100%; height: var(--futures-visual-height, 100svh); max-height: var(--futures-visual-height, 100svh); padding-top: env(safe-area-inset-top); overflow: hidden; }
    .futures-order-form { max-height: calc(var(--futures-visual-height, 100svh) - 92px - env(safe-area-inset-top)); padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
    .futures-account-strip { min-height: 0; }
    .futures-account-guest { justify-content: space-between; min-height: 82px; }
    .futures-account-content { grid-template-columns: repeat(2, 1fr); gap: 0; padding: 0; }
    .futures-account-heading { grid-column: 1 / -1; min-height: 44px; padding: 0 12px; border-right: 0; border-bottom: 1px solid var(--futures-border); }
    .futures-account-metric { min-height: 60px; padding: 10px 12px; border-right: 1px solid var(--futures-border); border-bottom: 1px solid var(--futures-border); }
    .futures-account-metric:nth-of-type(6), .futures-account-metric:nth-of-type(7), .futures-account-metric:nth-of-type(8) { display: grid; }
    .futures-margin-meter { grid-column: 1 / -1; min-height: 54px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--futures-border); }
    .futures-transfer-button { grid-column: 1 / -1; min-height: 42px; margin: 10px 12px; }

    .futures-terminal { min-height: 320px; }
    .futures-terminal-header { display: block; min-height: 45px; padding: 0; }
    .futures-terminal-tabs { height: 45px; padding: 0 3px; }
    .futures-terminal-tabs button { padding: 0 10px; font-size: 10px; }
    .futures-terminal-actions { position: absolute; right: 8px; margin-top: 7px; }
    .futures-terminal-view { min-height: 270px; }
    .futures-data-table { min-width: 0; }
    .futures-data-head { display: none; }
    .futures-data-row,
    .futures-positions-table .futures-data-row,
    .futures-orders-table .futures-data-row,
    .futures-history-table .futures-data-row,
    .futures-trade-history-table .futures-data-row,
    .futures-transactions-table .futures-data-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-height: 0; margin: 8px 10px; padding: 11px; background: rgba(255,255,255,.018); border: 1px solid var(--futures-border); border-radius: 6px; }
    .futures-data-row > span { display: grid; gap: 3px; white-space: normal; }
    .futures-data-row > span::before { content: attr(data-label); color: var(--muteds); font-size: 8px; font-weight: 700; }
    .futures-data-row .futures-row-actions { grid-column: 1 / -1; display: flex; }
    .futures-data-row .futures-row-actions button { flex: 1; min-height: 36px; }

    .futures-modal { align-items: end; padding: 0; }
    .futures-dialog,
    .futures-dialog-wide { width: 100%; max-height: min(calc(var(--futures-visual-height, 100svh) * .88), 720px); border-right: 0; border-bottom: 0; border-left: 0; border-radius: 8px 8px 0 0; }
    .futures-dialog::before { content: ""; position: absolute; top: 6px; left: 50%; z-index: 2; width: 34px; height: 4px; background: rgba(255,255,255,.18); border-radius: 4px; transform: translateX(-50%); }
    .futures-dialog header { padding-top: 14px; }
    .futures-dialog-body { max-height: calc(var(--futures-visual-height, 100svh) * .88 - 58px); padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
    .futures-calculator-grid { grid-template-columns: 1fr; }
    .futures-leverage-presets { grid-template-columns: repeat(4, 1fr); }
    .futures-toast-region { right: 10px; bottom: calc(126px + env(safe-area-inset-bottom)); left: 10px; width: auto; }
}

@media (max-width: 430px) {
    .futures-chart-header .futures-chart-select:nth-child(3) { display: none; }
    .futures-chart-panel { grid-template-rows: 43px 450px; }
    .futures-chart-stage { min-height: 450px; }
    .futures-depth-panel { grid-template-rows: 82px 411px; min-height: 493px; }
    .futures-depth-view.is-active { min-height: 411px; }
    .futures-account-guest { align-items: flex-start; flex-direction: column; gap: 10px; }
    .futures-account-guest button { width: 100%; }
    .futures-auth-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .futures-page *, .futures-modal *, .futures-toast-region * { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== Futures visual restraint ===== */
:root {
    --futures-border: var(--calm-line, rgba(255, 255, 255, .055));
    --futures-border-strong: var(--calm-line-strong, rgba(255, 255, 255, .11));
}

.futures-page,
.futures-page *,
.futures-modal,
.futures-modal * {
    letter-spacing: 0;
}

.futures-page {
    border-bottom: 0;
}

.futures-setting-chip,
.futures-leverage-presets button,
.futures-terminal-actions button,
.futures-row-actions button,
.futures-order-preview {
    border-color: transparent;
    box-shadow: none;
}

.futures-setting-chip,
.futures-leverage-presets button,
.futures-terminal-actions button {
    background: var(--futures-panel-soft);
}

.futures-setting-chip:hover,
.futures-leverage-presets button:hover,
.futures-terminal-actions button:hover,
.futures-row-actions button:hover {
    border-color: transparent;
    box-shadow: none;
}

.futures-leverage-presets button.is-active {
    border-color: transparent;
}

.futures-long-button,
.futures-short-button,
.futures-long-button:hover,
.futures-short-button:hover {
    box-shadow: none;
}

.futures-dialog {
    border-color: var(--futures-border);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .45);
}

.futures-toast {
    border-color: var(--futures-border);
}

/* ===== Compact trading workspace ===== */
.futures-contract-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.futures-contract-badge {
    width: max-content;
    padding: 0;
    color: var(--muteds);
    line-height: 1;
    background: transparent;
}

.futures-market-primary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(98px, auto) 14px;
    align-items: center;
    min-width: 0;
}

.futures-market-primary .futures-contract-trigger {
    grid-template-columns: 32px minmax(0, 1fr) 14px;
    gap: 7px;
    min-height: 44px;
    padding-right: 5px;
}

.futures-market-primary .futures-connection {
    min-width: 0;
    justify-content: center;
}

.futures-market-primary .futures-connection [data-connection-label] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.futures-order-type-more {
    position: relative;
    display: flex;
    min-width: 0;
    flex: 1 1 0;
}

.futures-order-type-more[hidden] {
    display: none;
}

.futures-order-types > button,
.futures-order-type-trigger {
    min-width: 0;
    flex: 1 1 0;
}

.futures-order-types .futures-order-type-trigger {
    min-width: 0;
    flex: 1 1 0;
}

.futures-order-type-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
}

.futures-order-type-trigger svg {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.futures-order-type-trigger span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.futures-order-type-menu {
    top: calc(100% + 4px);
    right: 0;
    left: auto;
    min-width: 188px;
}

.futures-order-type-more.is-open .futures-order-type-menu {
    display: grid;
    animation: futures-popover-in .14s ease both;
}

.futures-order-type-menu button {
    width: 100%;
    min-width: 0;
    flex: none;
    padding: 0 10px;
}

.futures-order-type-menu button.is-active::after {
    display: none;
}

.futures-order-type-trigger.is-active {
    color: var(--words);
}

.futures-order-type-trigger.is-active::after {
    content: "";
    position: absolute;
    right: 9px;
    bottom: 0;
    left: 9px;
    height: 2px;
    background: var(--green);
    border-radius: 2px 2px 0 0;
}

.futures-order-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 10px;
}

.futures-confirmation-option {
    grid-column: 1 / -1;
}

.futures-input-wrap,
.futures-leverage-input,
.futures-contract-search,
.futures-search-field {
    background: var(--futures-field);
}

.futures-input-wrap:focus-within,
.futures-leverage-input:focus-within {
    border-color: var(--futures-border-strong);
    box-shadow: none;
}

.futures-order-preview {
    gap: 6px;
    padding: 9px 0 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--futures-border);
    border-radius: 0;
}

.futures-long-button small,
.futures-short-button small {
    display: none;
}

.futures-chart-watermark span {
    color: var(--words);
}

@media (min-width: 921px) {
    .futures-workspace {
        grid-template-columns: minmax(0, 1fr) 306px 320px;
        grid-template-rows: 60px minmax(0, 1fr);
        height: max(610px, calc(100svh - var(--header-h)));
        min-height: 610px;
    }

    .futures-market-bar {
        display: flex;
        grid-column: 1;
        grid-row: 1;
        min-height: 60px;
        padding: 4px 8px;
        overflow: hidden;
        border-right: 1px solid var(--futures-border);
    }

    .futures-market-primary {
        flex: 1.6 1 260px;
    }

    .futures-market-stat {
        flex: 1 1 70px;
    }

    .futures-market-price,
    .futures-market-stat {
        padding: 0 8px;
        border-left: 0;
    }

    .futures-market-price strong {
        font-size: 19px;
        line-height: 1.15;
    }

    .futures-market-price span,
    .futures-market-stat span {
        font-size: 10px;
    }

    .futures-market-stat strong {
        margin-top: 2px;
        font-size: 11.5px;
    }

    .futures-chart-panel {
        grid-column: 1;
        grid-row: 2;
        grid-template-rows: 40px minmax(0, 1fr);
    }

    .futures-chart-header {
        min-height: 40px;
        padding: 4px 7px;
    }

    .futures-control-button,
    .futures-chart-tools button {
        height: 30px;
    }

    .futures-control-button {
        padding: 0 7px;
        font-size: 11px;
    }

    .futures-chart-tools button {
        width: 30px;
    }

    .futures-depth-panel {
        grid-column: 2;
        grid-row: 1 / 3;
        grid-template-rows: 76px minmax(0, 1fr);
    }

    .futures-panel-tabs {
        height: 39px;
        padding: 0 7px;
    }

    .futures-panel-tabs button {
        padding: 0 7px;
        font-size: 12px;
    }

    .futures-depth-controls {
        height: 37px;
        padding: 4px 8px;
    }

    .futures-depth-controls button {
        height: 27px;
    }

    .futures-depth-view.is-active {
        grid-template-rows: 25px minmax(0, 1fr) 38px minmax(0, 1fr);
    }

    .futures-depth-view[data-depth-view="trades"].is-active {
        grid-template-rows: 25px minmax(0, 1fr);
    }

    .futures-book-grid,
    .futures-trades-grid,
    .futures-book-row,
    .futures-trade-row {
        padding: 0 8px;
    }

    .futures-table-head {
        font-size: 10.5px;
    }

    .futures-book-row,
    .futures-trade-row {
        height: 20px;
        font-size: 11.5px;
        font-weight: 600;
    }

    .futures-book-mid {
        padding: 0 8px;
    }

    .futures-book-mid strong {
        font-size: 15px;
    }

    .futures-order-panel {
        grid-column: 3;
        grid-row: 1 / 3;
        grid-template-rows: 50px 40px minmax(0, 1fr);
    }

    .futures-order-header {
        gap: 6px;
        height: 50px;
        padding: 0 9px;
    }

    .futures-order-header .futures-order-settings {
        gap: 4px;
    }

    .futures-order-available {
        display: grid !important;
        gap: 2px !important;
    }

    .futures-order-header span,
    .futures-order-header strong {
        font-size: 11px;
    }

    .futures-setting-chip {
        min-height: 28px;
        padding: 0 7px;
        font-size: 10px;
    }

    .futures-order-settings .futures-icon-command {
        width: 27px;
        height: 27px;
    }

    .futures-order-types {
        min-height: 40px;
        padding: 0 5px;
        overflow: visible;
    }

    .futures-order-types > button,
    .futures-order-type-trigger {
        padding: 0 6px;
        font-size: 11px;
    }

    .futures-order-form {
        gap: 9px;
        padding: 10px 10px 14px;
    }

    .futures-field {
        gap: 5px;
        font-size: 11px;
    }

    .futures-input-wrap,
    .futures-leverage-input {
        min-height: 40px;
    }

    .futures-input-wrap input,
    .futures-leverage-input input {
        height: 38px;
        font-size: 12px;
    }

    .futures-percent-control {
        gap: 3px;
    }

    .futures-percent-presets {
        gap: 0;
    }

    .futures-percent-presets button {
        min-height: 22px;
        color: var(--muteds);
        background: transparent;
        border: 0;
        border-radius: 3px;
    }

    .futures-percent-presets button:hover,
    .futures-percent-presets button.is-active {
        color: var(--words);
        background: var(--futures-hover);
        border-color: transparent;
    }

    .futures-check-row {
        min-height: 24px;
        font-size: 10.5px;
    }

    .futures-order-preview dt {
        font-size: 10.5px;
    }

    .futures-order-preview dd {
        font-size: 11px;
    }

    .futures-order-actions {
        gap: 6px;
    }

    .futures-long-button,
    .futures-short-button {
        min-height: 43px;
        font-size: 11.5px;
        box-shadow: none;
    }
}

@media (min-width: 1280px) and (max-width: 1500px) {
    .futures-workspace {
        grid-template-columns: minmax(0, 1fr) 290px 310px;
    }

    .futures-market-bar {
        padding-right: 6px;
    }
}

@media (min-width: 921px) and (max-width: 1279px) {
    .futures-workspace {
        grid-template-columns: minmax(0, 1fr) 280px 300px;
    }

    .futures-market-bar {
        padding-right: 5px;
    }

    .futures-market-stat-secondary {
        display: none;
    }

    .futures-chart-tools button:nth-child(-n + 3) {
        display: none;
    }
}

@media (max-width: 920px) {
    .futures-body.futures-scroll-locked .futures-page {
        position: relative;
        z-index: 10020;
    }
}

@media (max-width: 760px) {
    .futures-market-primary {
        grid-column: 1 / -1;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .futures-market-primary .futures-connection {
        display: none;
    }

    .futures-order-header {
        gap: 4px;
        padding: 0 7px;
    }

    .futures-order-available {
        display: grid !important;
        gap: 1px !important;
    }

    .futures-order-settings {
        gap: 2px;
    }

    .futures-order-settings .futures-icon-command {
        width: 27px;
        height: 27px;
    }

    .futures-setting-chip {
        min-height: 28px;
        padding: 0 6px;
        font-size: 10px;
    }

    .futures-order-types {
        overflow: visible;
    }

    .futures-order-type-menu {
        top: calc(94px + env(safe-area-inset-top));
        right: 10px;
        bottom: auto;
        left: 10px;
        max-height: min(60svh, 360px);
    }
}
