@font-face { font-family: Inter; src: url("assets/Inter-Regular.woff") format("woff"); font-display: swap; }
:root {
  --bg: #071316;
  --panel: #0a191d;
  --panel-2: #0d1d21;
  --line: #172a2f;
  --line-soft: #122429;
  --text: #f0f5f5;
  --muted: #89979a;
  --teal: #50d2c1;
  --teal-dim: rgba(80, 210, 193, .14);
  --red: #ef5b64;
  --red-dim: rgba(239, 91, 100, .14);
  --gold: #ffb648;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; padding-bottom: 28px; min-width: 320px; overflow-x: hidden; color: var(--text); background: var(--bg); font-family: Inter, Arial, sans-serif; font-size: 12px; }
button, input { color: inherit; font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.site-notice { margin-left: 8px; padding-left: 10px; color: #6f9b97; border-left: 1px solid #244044; font-size: 8px; letter-spacing: .025em; white-space: nowrap; }
.topbar { position: sticky; z-index: 40; top: 0; height: 58px; padding: 0 14px; display: flex; align-items: center; gap: 18px; background: #081519; border-bottom: 1px solid var(--line); }
.restricted-banner { min-height: 32px; padding: 7px 12px; display: flex; align-items: center; color: #fff; background: #b40732; border-bottom: 1px solid #d21947; font-size: 11px; line-height: 1.35; }
.mobile-menu-button, .mobile-market-button, .mobile-market-tabs, .mobile-date-range, .mobile-account-filters, .mobile-bottom-nav { display: none; }
.brand { min-width: max-content; display: flex; align-items: center; gap: 7px; color: white; text-decoration: none; font-size: 18px; }
.brand svg { width: 22px; height: 20px; overflow: visible; fill: white; }
.brand-italic { font-style: italic; font-weight: 300; }
.brand em { margin-left: 3px; padding: 2px 4px; color: var(--teal); border: 1px solid rgba(80,210,193,.35); border-radius: 3px; font-size: 7px; font-style: normal; letter-spacing: .08em; }
.main-nav { min-width: 0; display: flex; align-self: stretch; align-items: center; gap: 6px; }
.nav-item { position: relative; height: 100%; padding: 0 12px; color: #d5dddd; background: transparent; white-space: nowrap; }
.nav-item::after { content: ""; position: absolute; right: 11px; bottom: 0; left: 11px; height: 2px; background: var(--teal); transform: scaleX(0); }
.nav-item.active { color: var(--teal); }
.nav-item.active::after { transform: scaleX(1); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.connect-button, .order-connect { color: #071716; background: var(--teal); border-radius: 7px; font-weight: 600; }
.connect-button { min-width: 82px; height: 34px; }
.icon-button { width: 34px; height: 34px; color: #d9e2e2; background: transparent; border: 1px solid var(--line); border-radius: 7px; font-size: 17px; }
.more-wrap { position: relative; height: 100%; }
.more-menu { position: absolute; z-index: 30; top: 48px; right: 0; width: 190px; padding: 7px; background: #102126; border: 1px solid #253a3f; border-radius: 8px; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.more-menu button { width: 100%; padding: 10px; color: #dce5e5; background: transparent; border-radius: 5px; text-align: left; }
.more-menu button:hover { color: var(--teal); background: rgba(80,210,193,.08); }
main { min-height: calc(100vh - 118px); }
.workspace { height: calc(100vh - 118px); min-height: 560px; display: grid; grid-template-columns: minmax(720px, 1fr) 350px; gap: 2px; padding: 2px; }
.market-area { min-width: 0; min-height: 0; display: grid; grid-template-rows: 38px 66px minmax(0, 1fr); gap: 2px; }
.panel { background: var(--panel); border: 1px solid var(--line-soft); }
.watchbar { padding: 0 11px; display: flex; align-items: center; }
.watchbar button { width: 25px; height: 25px; padding: 0; color: var(--gold); background: transparent; font-size: 15px; text-align: left; }
.market-summary { min-height: 62px; padding: 7px 12px; display: flex; align-items: center; gap: 22px; }
.pair-title { min-width: 220px; display: flex; align-items: center; gap: 8px; font-size: 20px; }
.pair-title strong { white-space: nowrap; }
.pair-title img { width: 22px; height: 22px; }
.chevron { color: var(--muted); font-size: 18px; }
.leverage-pill { margin-left: 4px; padding: 5px 7px; color: var(--teal); background: var(--teal-dim); border-radius: 5px; font-size: 10px; }
.market-summary dl { flex: 1; margin: 0; display: grid; grid-template-columns: 62px 62px 112px 126px 132px 118px; gap: 7px; }
.market-summary dl div { min-width: 0; }
dt { color: var(--muted); }
.market-summary dd { margin: 5px 0 0; overflow: hidden; color: #dde5e5; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.positive { color: var(--teal) !important; }
.negative { color: var(--red) !important; }
.tabs { min-height: 42px; padding: 0 13px; display: flex; align-items: center; gap: 21px; border-bottom: 1px solid var(--line); }
.tab { position: relative; align-self: stretch; padding: 0 4px; color: var(--muted); background: transparent; }
.tab.active { color: var(--text); }
.tab.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 1px; background: var(--teal); }
.data-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: #778789; font-size: 7px; letter-spacing: .1em; }
.data-badge i { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }
.data-badge.live { color: #6fb8ae; }
.data-badge.live i { background: var(--teal); box-shadow: 0 0 0 3px rgba(80,210,193,.1); }
.data-badge.error { color: #d47a80; }
.data-badge.error i { background: var(--red); }
.chart-toolbar { position: relative; height: 40px; padding: 0 9px; display: flex; align-items: center; gap: 3px; border-bottom: 1px solid var(--line-soft); }
.chart-panel { min-height: 0; overflow: hidden; }
.chart-toolbar button { min-width: 28px; height: 30px; padding: 0 6px; color: #c6d0d0; background: transparent; border-radius: 4px; }
.chart-toolbar button.active { color: var(--teal); background: rgba(80,210,193,.09); }
@media (hover: hover) { .chart-toolbar button:hover:not(.active) { color: #e8eeee; background: rgba(80,210,193,.04); } }
.interval-menu-wrap { position: relative; height: 30px; flex: 0 0 auto; }
.interval-menu { position: absolute; z-index: 20; top: 34px; left: 0; width: 58px; padding: 4px; display: grid; gap: 2px; background: #102126; border: 1px solid #294047; border-radius: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.interval-menu[hidden] { display: none; }
.chart-toolbar .interval-menu button { width: 100%; min-width: 0; height: 27px; text-align: left; }
.divider { width: 1px; height: 22px; margin: 0 5px; background: var(--line); }
.toolbar-spacer { flex: 1; }
.chart-wrap { position: relative; height: calc(100% - 116px); overflow: hidden; }
.drawing-tools { position: absolute; z-index: 3; top: 0; bottom: 0; left: 0; width: 48px; padding: 7px 0; display: flex; flex-direction: column; align-items: center; background: rgba(8,21,25,.74); border-right: 1px solid var(--line-soft); }
.drawing-tools button { width: 32px; height: 34px; color: #93a0a2; background: transparent; font-size: 17px; }
.chart-head { position: absolute; z-index: 2; top: 10px; left: 66px; display: flex; align-items: center; gap: 11px; color: #b9c4c4; }
.chart-head i { width: 7px; height: 7px; background: var(--teal); border-radius: 50%; box-shadow: 0 0 0 5px rgba(80,210,193,.1); }
.chart-head .ohlc { color: #6d8a8a; }
.chart-head b { color: var(--teal); font-weight: 400; }
.price-chart { position: absolute; inset: 0; width: 100%; height: 100%; }
.tv-mark { position: absolute; z-index: 3; bottom: 12px; left: 61px; width: 31px; height: 31px; display: grid; place-items: center; color: #0a191d; background: #d7dede; border-radius: 50%; font-size: 10px; font-weight: 800; letter-spacing: -.08em; opacity: .9; }
.chart-axis-toggle, .chart-zoom, .chart-axis-settings { display: none; }
.market-lower { display: grid; grid-template-columns: 1.35fr 1fr; gap: 3px; }
.book-panel { display: none; min-width: 0; height: 100%; overflow: hidden; }
.recent-panel { min-width: 0; overflow: hidden; }
.tab-spacer { flex: 1; }
.compact-select { padding: 5px 8px; color: #c5d0d0; background: #102126; border-radius: 4px; }
.book-content, .trade-list { padding: 6px 12px 10px; }
.market-loading { margin: 24px 0; color: var(--muted); text-align: center; }
.book-head, .book-row, .trade-row { display: grid; grid-template-columns: repeat(3, 1fr); min-height: 18px; align-items: center; font-variant-numeric: tabular-nums; }
.mobile-book-head, .mobile-book-row { display: none; }
.book-head { color: var(--muted); font-size: 10px; }
.book-row span:nth-child(n+2), .book-head span:nth-child(n+2), .trade-row span:nth-child(n+2) { text-align: right; }
.book-row.ask span:first-child, .trade-row.sell span:first-child { color: var(--red); }
.book-row.bid span:first-child, .trade-row.buy span:first-child { color: var(--teal); }
.spread-row { margin: 3px 0; padding: 5px 0; display: flex; justify-content: space-between; color: #ccd5d5; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.order-panel { position: relative; top: auto; min-width: 0; height: 100%; padding: 10px; overflow: auto; align-self: start; }
.order-top-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.order-top-buttons button { height: 34px; color: #dce3e3; background: #243136; border-radius: 7px; }
.order-type-tabs { margin: 7px -2px 0; padding: 0 2px; justify-content: space-around; }
.side-switch { margin: 12px 0; padding: 2px; display: grid; grid-template-columns: 1fr 1fr; background: #263338; border-radius: 6px; }
.side-switch button { height: 31px; color: #d7dddd; background: transparent; border-radius: 5px; }
.side-switch button.active.long { color: #06201d; background: var(--teal); }
.side-switch button.active.short { color: #fff; background: var(--red); }
.order-stats { display: grid; grid-template-columns: 1fr auto; gap: 12px 10px; color: var(--muted); }
.order-stats strong { color: #dbe3e3; font-weight: 400; }
.input-row { height: 39px; margin-top: 10px; padding: 0 10px; display: flex; align-items: center; gap: 8px; background: #101f23; border: 1px solid var(--line); border-radius: 6px; }
.input-row span { color: var(--muted); }
.input-row input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; text-align: right; }
.input-row b { font-weight: 400; }
.range-row { margin: 11px 0; display: flex; align-items: center; gap: 10px; }
.range-row > input { min-width: 0; flex: 1; accent-color: var(--teal); }
.range-row label { width: 60px; height: 36px; padding: 0 7px; display: flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 6px; }
.range-row label input { width: 34px; border: 0; outline: 0; background: transparent; text-align: right; }
input[type="number"] { appearance: textfield; }
.check-row { margin: 9px 0; display: flex; align-items: center; gap: 8px; color: #b9c4c4; }
.check-row input { accent-color: var(--teal); }
.order-connect { width: 100%; height: 38px; margin-top: 10px; }
.order-details { margin: 16px 0 0; padding-top: 4px; border-top: 1px solid var(--line-soft); }
.order-details div { padding: 5px 0; display: flex; justify-content: space-between; }
.order-details dd { margin: 0; color: #c9d2d2; }
.announcements { position: relative; right: auto; bottom: auto; left: auto; max-height: 190px; margin-top: 10px; padding: 14px; overflow: hidden; background: #0d1a1e; border: 1px solid #24363a; border-radius: 9px; box-shadow: 0 14px 34px rgba(0,0,0,.4); }
.announcements h3 { margin: 0 0 14px; font-size: 13px; font-weight: 500; }
.announcements p { margin: 0 0 13px; color: #d9e0e0; }
.announcements small { color: var(--muted); }
.announcement-close { position: absolute; top: 10px; right: 10px; color: var(--muted); background: transparent; font-size: 18px; }
.account-panel { min-height: 320px; margin: 0 3px 3px; display: grid; grid-template-columns: minmax(0, 1fr) 356px; }
.account-main { min-width: 0; overflow: hidden; }
.account-tabs { overflow-x: auto; }
.account-tabs button { white-space: nowrap; }
.account-tab-spacer { flex: 1; }
.account-content { min-height: 160px; display: grid; grid-template-columns: 1fr 340px; }
.empty-table { min-width: 0; overflow-x: auto; }
.table-head { min-width: 760px; height: 40px; padding: 0 14px; display: grid; grid-template-columns: repeat(9, minmax(80px, 1fr)); align-items: center; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.empty-table p { margin: 16px 14px; color: #cbd4d4; text-align: left; }
.account-summary { padding: 13px; border-left: 3px solid var(--bg); }
.account-summary h3 { margin: 8px 0 12px; font-size: 12px; font-weight: 500; }
.account-actions { margin: -2px 0 12px; padding-bottom: 12px; display: grid !important; grid-template-columns: 1fr 1fr; gap: 9px; border-bottom: 1px solid var(--line); }
.account-actions button { height: 35px; color: #06201d; background: #15554f; border-radius: 6px; }
.account-actions button:last-child { color: #387b75; background: transparent; border: 1px solid #1c5d58; }
.account-summary div { padding: 6px 0; display: flex; justify-content: space-between; }
.account-summary span { color: var(--muted); }
.auth-view { min-height: calc(100vh - 86px); margin: 3px; display: grid; place-items: center; padding: 42px 18px; background: radial-gradient(circle at 50% 8%, rgba(80,210,193,.075), transparent 32%), var(--bg); }
.auth-view[hidden] { display: none; }
.auth-shell { position: relative; width: min(430px, 100%); padding: 34px; background: #0b1a1e; border: 1px solid #20353a; border-radius: 12px; box-shadow: 0 28px 70px rgba(0,0,0,.36); }
.auth-back { position: absolute; top: 15px; left: 18px; padding: 4px; color: var(--muted); background: transparent; }
.auth-back:hover, .text-button:hover { color: var(--teal); }
.auth-brand { width: 54px; height: 54px; margin: 10px auto 15px; display: grid; place-items: center; background: var(--teal); border-radius: 50%; }
.auth-brand svg { width: 30px; height: 26px; overflow: visible; fill: #06201d; }
.auth-kicker { margin: 0 0 8px; color: var(--teal); font-size: 9px; letter-spacing: .17em; text-align: center; }
.auth-shell h1 { margin: 0; font-size: 27px; text-align: center; }
.auth-intro { margin: 9px 0 24px; color: var(--muted); line-height: 1.55; text-align: center; }
.auth-tabs { margin-bottom: 20px; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.auth-tabs button { position: relative; height: 42px; color: var(--muted); background: transparent; }
.auth-tabs button.active { color: var(--text); }
.auth-tabs button.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--teal); }
.auth-form { display: grid; gap: 16px; }
.auth-form[hidden] { display: none; }
.auth-form > label { display: grid; gap: 8px; color: #d8e0e0; }
.auth-form input:not([type="checkbox"]) { width: 100%; height: 44px; padding: 0 12px; color: var(--text); background: #0e2024; border: 1px solid #24383d; border-radius: 6px; outline: 0; }
.auth-form input:not([type="checkbox"]):focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(80,210,193,.08); }
.auth-form input::placeholder { color: #607174; }
.auth-row { display: flex; align-items: center; justify-content: space-between; }
.remember { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.remember input { accent-color: var(--teal); }
.text-button { padding: 0; color: #8da5a5; background: transparent; }
.auth-submit { height: 44px; color: #061918; background: var(--teal); border-radius: 6px; font-weight: 600; }
.auth-safety { margin: 20px 0 0; padding: 11px 12px; color: #8fc9c1; background: rgba(80,210,193,.07); border: 1px solid rgba(80,210,193,.18); border-radius: 6px; font-size: 10px; line-height: 1.55; text-align: center; }
footer { position: fixed; z-index: 35; right: 0; bottom: 0; left: 0; min-height: 28px; padding: 0 10px; display: flex; align-items: center; gap: 7px; color: var(--muted); background: #081519; border-top: 1px solid var(--line); font-size: 10px; }
.online-dot { width: 7px; height: 7px; background: var(--teal); border-radius: 50%; }
footer nav { margin-left: auto; display: flex; gap: 22px; }
footer a { color: #c2cccc; text-decoration: none; }
.modal { width: min(430px, calc(100vw - 28px)); padding: 0; color: var(--text); background: #0c1b1f; border: 1px solid #284047; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.65); }
.modal::backdrop { background: rgba(0,8,10,.82); backdrop-filter: blur(3px); }
.modal form { position: relative; padding: 28px; text-align: center; }
.modal-close { position: absolute; top: 10px; right: 12px; color: var(--muted); background: transparent; font-size: 21px; }
.modal-logo { width: 48px; height: 48px; margin: 0 auto 14px; display: grid; place-items: center; color: #061918; background: var(--teal); border-radius: 50%; font-size: 25px; }
.modal h2 { margin: 0 0 12px; font-size: 21px; }
.modal p { color: #aebabb; line-height: 1.6; }
.safe-callout { margin: 18px 0; padding: 13px; color: #9ce8dd; background: #0e292a; border: 1px solid rgba(80,210,193,.22); border-radius: 7px; line-height: 1.55; text-align: left; }
.modal-primary { width: 100%; min-height: 40px; color: #06201d; background: var(--teal); border-radius: 6px; font-weight: 600; }
.small-modal form { text-align: left; }
.setting-row { padding: 14px 0; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.setting-row input { accent-color: var(--teal); }
.small-modal .modal-primary { margin-top: 20px; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 46px; max-width: calc(100vw - 30px); padding: 10px 15px; color: #061918; background: var(--teal); border-radius: 6px; box-shadow: 0 12px 28px rgba(0,0,0,.4); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.compact .market-area { grid-template-rows: 34px auto minmax(0, 1fr); }
body.compact .market-summary { min-height: 82px; }
.chart-bottom-toolbar { height: 34px; padding: 0 10px 0 58px; display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line-soft); }
.chart-bottom-toolbar button { min-width: 28px; height: 26px; padding: 0 6px; color: #aab5b6; background: transparent; }
.chart-bottom-toolbar button.active { color: var(--teal); }
.chart-bottom-toolbar span { flex: 1; }
.book-tabs { padding: 0 10px; justify-content: space-around; }
.book-tabs .tab { min-width: 110px; }
.book-menu { margin-left: auto; color: var(--muted); background: transparent; font-size: 18px; }
.book-controls { height: 38px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
.book-content { padding: 5px 10px; }
.book-panel .book-row { position: relative; min-height: 23px; padding: 0 2px; isolation: isolate; }
.book-panel .book-row::before { content: ""; position: absolute; z-index: -1; top: 1px; right: 0; bottom: 1px; width: var(--depth, 0%); opacity: .18; }
.book-panel .book-row.ask::before { background: var(--red); }
.book-panel .book-row.bid::before { background: var(--teal); }
.book-panel .book-head { min-height: 25px; }
.book-panel .spread-row { min-height: 28px; margin: 2px -10px; padding: 0 12px; align-items: center; background: #253136; }
@media (min-width: 1380px) {
  .workspace { height: min(748px, calc(100vh - 86px)); grid-template-columns: minmax(650px, 1fr) 350px 350px; }
  .book-panel { display: block; }
  .market-summary { gap: 15px; }
  .pair-title { min-width: 220px; }
  .market-summary dl { grid-template-columns: 62px 62px 112px 126px 132px 118px; }
  .account-panel { grid-template-columns: minmax(0, 1fr) 350px; }
}
@media (max-width: 1080px) {
  .main-nav { overflow-x: auto; }
  .main-nav .nav-item { padding: 0 9px; }
  .workspace { grid-template-columns: minmax(620px, 1fr) 330px; }
  .market-summary { gap: 18px; }
  .market-summary dl { grid-template-columns: repeat(3, 1fr); row-gap: 9px; }
}
@media (max-width: 820px) {
  .site-notice { padding: 0 8px; font-size: 9px; }
  .topbar { height: auto; min-height: 58px; flex-wrap: wrap; gap: 8px; padding: 9px 10px; }
  .brand { order: 1; }
  .header-actions { order: 2; }
  .main-nav { width: 100%; height: 40px; order: 3; overflow-x: auto; border-top: 1px solid var(--line-soft); }
  .workspace { height: auto; min-height: 0; grid-template-columns: 1fr; }
  .market-area { grid-template-rows: 36px auto 470px; }
  .market-summary { align-items: flex-start; flex-direction: column; gap: 13px; }
  .market-summary dl { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .order-panel { position: relative; top: auto; height: auto; min-height: 620px; overflow: visible; }
  .announcements { position: relative; right: auto; bottom: auto; left: auto; margin-top: 18px; }
  .account-content { grid-template-columns: 1fr; overflow-x: auto; }
  .account-summary { border-top: 1px solid var(--line); border-left: 0; }
  .account-panel { grid-template-columns: 1fr; }
}
@media (max-width: 1300px), (orientation: portrait) {
  .trade-view,
  .workspace,
  .market-area,
  .chart-panel,
  .order-panel,
  .account-panel,
  .account-main { width: 100%; max-width: 100%; min-width: 0; }
  .workspace { height: auto; min-height: 0; grid-template-columns: minmax(0, 1fr) !important; }
  .market-area { grid-column: 1 / -1; grid-template-rows: 36px auto 470px; }
  .book-panel { display: none !important; }
  .order-panel { grid-column: 1 / -1; height: auto; min-height: 620px; overflow: visible; }
  .account-panel { grid-template-columns: minmax(0, 1fr) !important; }
  .account-summary { border-top: 1px solid var(--line); border-left: 0; }
}
@media (max-width: 560px) {
  html, body { width: 100%; min-width: 0; max-width: 100%; }
  body { padding-bottom: 48px; overflow-x: clip; }
  .topbar { height: 52px; min-height: 52px; padding: 0 8px; flex-wrap: nowrap; gap: 8px; }
  .restricted-banner { min-height: 57px; padding: 8px; align-items: flex-start; font-size: 11px; line-height: 1.5; }
  .mobile-menu-button { width: 30px; height: 30px; display: grid; place-items: center; color: #cdd7d7; background: #0d1d21; border: 1px solid #203238; border-radius: 6px; font-size: 16px; }
  .brand { min-width: 28px; order: initial; font-size: 16px; }
  .brand > span { display: none; }
  .brand svg { width: 24px; height: 22px; }
  .brand em { display: none; }
  .header-actions { order: initial; gap: 6px; }
  .icon-button { width: 30px; height: 30px; display: grid; place-items: center; }
  .connect-button { min-width: 74px; height: 30px; }
  .main-nav { position: fixed; z-index: 80; top: 52px; left: 8px; width: 230px; height: auto; max-height: calc(100vh - 64px); padding: 7px; display: none; flex-direction: column; align-items: stretch; gap: 2px; overflow: auto; background: #0c1b1f; border: 1px solid #294047; border-radius: 8px; box-shadow: 0 22px 60px rgba(0,0,0,.6); }
  .main-nav.mobile-open { display: flex; }
  .main-nav .nav-item, .more-wrap { width: 100%; min-height: 38px; height: 38px; text-align: left; }
  .nav-item::after { right: auto; left: 7px; width: 2px; height: 22px; bottom: 8px; transform: scaleY(0); }
  .nav-item.active::after { transform: scaleY(1); }
  .more-menu { position: static; width: 100%; margin-top: 2px; box-shadow: none; }
  .watchbar { display: none; }
  .workspace { padding: 0; gap: 0; }
  .market-area { display: block; }
  .market-summary { position: relative; height: 58px; min-height: 58px; padding: 6px 50px 6px 10px; align-items: center; flex-direction: row; gap: 8px; border-right: 0; border-left: 0; }
  .pair-title { min-width: 0; flex: 1; gap: 6px; font-size: 18px; }
  .pair-title img { width: 22px; height: 22px; }
  .pair-title .chevron { display: none; }
  .leverage-pill { position: absolute; top: 36px; left: 37px; margin: 0; padding: 0; background: transparent; font-size: 9px; }
  .market-summary dl { width: 126px; flex: 0 0 126px; display: grid; grid-template-columns: 1fr; gap: 0; }
  .market-summary dl div { display: none; }
  .market-summary dl div:nth-child(1), .market-summary dl div:nth-child(3) { display: block; }
  .market-summary dt { display: none; }
  .market-summary dd { margin: 0; overflow: visible; font-size: 10px; }
  .market-summary dl div:nth-child(1) dd { color: #e6eded; font-size: 19px; line-height: 23px; }
  .market-summary dl div:nth-child(3) dd { font-size: 10px; line-height: 18px; }
  .mobile-market-button { position: absolute; top: 13px; right: 9px; width: 32px; height: 32px; display: grid; place-items: center; color: #c3cece; background: #0d1d21; border: 1px solid #24373c; border-radius: 7px; font-size: 16px; }
  .mobile-market-tabs { height: 32px; display: grid; grid-template-columns: repeat(4, 1fr); border-right: 0; border-left: 0; }
  .mobile-market-tabs button { position: relative; color: var(--muted); background: transparent; }
  .mobile-market-tabs button.active { color: var(--text); }
  .mobile-market-tabs button.active::after { content: ""; position: absolute; right: 12px; bottom: 0; left: 12px; height: 1px; background: var(--teal); }
  .chart-panel { height: 392px; border-right: 0; border-left: 0; }
  .chart-panel .chart-tabs { display: none; }
  .chart-toolbar { height: 40px; }
  .chart-wrap { height: 310px; }
  .market-lower { grid-template-columns: 1fr; }
  .recent-panel { display: none; }
  .chart-head .ohlc { flex-basis: 100%; display: block; color: var(--teal); font-size: 9px; }
  .drawing-tools { width: 48px; }
  .drawing-tools { padding: 3px 0; }
  .drawing-tools button { width: 32px; height: 29px; }
  .chart-head { top: 8px; right: 8px; left: 58px; flex-wrap: wrap; gap: 3px 7px; line-height: 14px; }
  .chart-bottom-toolbar { height: 42px; padding: 0 9px 0 58px; gap: 3px; }
  .chart-bottom-toolbar button { min-width: 25px; padding: 0 4px; font-size: 10px; }
  .mobile-date-range { display: block; min-width: 82px !important; text-align: left; }
  .chart-bottom-toolbar > button:nth-of-type(n+2):nth-of-type(-n+9),
  #chart-clock + button { display: none; }
  .tv-mark { bottom: 17px; left: 59px; }
  .chart-axis-toggle { position: absolute; z-index: 4; right: 4px; display: flex; gap: 4px; }
  .chart-axis-toggle span { width: 18px; height: 22px; display: grid; place-items: center; color: #aebabb; background: #111c29; border: 1px solid #3a4250; border-radius: 4px; font-size: 10px; }
  .chart-axis-toggle span:first-child { color: white; background: #2a58ef; border-color: #2a58ef; }
  .chart-axis-toggle-price { top: 153px; }
  .chart-axis-toggle-volume { top: 243px; }
  .chart-zoom { position: absolute; z-index: 4; bottom: 17px; left: 50%; display: flex; gap: 5px; transform: translateX(-50%); }
  .chart-zoom span { width: 28px; height: 28px; display: grid; place-items: center; color: #d5dcdc; background: #26303d; border-radius: 4px; box-shadow: 0 2px 7px rgba(0,0,0,.45); font-size: 20px; }
  .chart-axis-settings { position: absolute; z-index: 4; right: 13px; bottom: 2px; display: block; color: #aebabb; font-size: 23px; }
  .order-panel { display: none; }
  .book-panel { display: none !important; width: 100%; height: 438px; border-right: 0; border-left: 0; overflow: hidden; }
  body[data-mobile-panel="book"] .book-panel,
  body[data-mobile-panel="trades"] .book-panel,
  body[data-mobile-panel="funding"] .book-panel { display: block !important; }
  body[data-mobile-panel="book"] .chart-panel,
  body[data-mobile-panel="trades"] .chart-panel,
  body[data-mobile-panel="funding"] .chart-panel { display: none; }
  .book-panel .book-tabs { display: none; }
  .book-controls { height: 38px; }
  body[data-mobile-panel="funding"] .book-controls { display: none; }
  .book-content { height: 400px; padding: 0 8px 8px; overflow: hidden; }
  body[data-mobile-panel="funding"] .book-content { height: 438px; padding: 24px 18px; }
  .mobile-book-head, .mobile-book-row { display: grid; grid-template-columns: 1fr .82fr .82fr 1fr; align-items: center; font-variant-numeric: tabular-nums; }
  .mobile-book-head { height: 28px; color: var(--muted); font-size: 9px; }
  .mobile-book-row { position: relative; min-height: 25px; isolation: isolate; }
  .mobile-book-head span:nth-child(n+2), .mobile-book-row span:nth-child(n+2) { text-align: right; }
  .mobile-book-row span:nth-child(2) { color: var(--teal); }
  .mobile-book-row span:nth-child(3) { color: var(--red); }
  .mobile-book-row::before, .mobile-book-row::after { content: ""; position: absolute; z-index: -1; top: 1px; bottom: 1px; opacity: .18; }
  .mobile-book-row::before { right: 50%; width: calc(var(--bid-depth) * .5); background: var(--teal); }
  .mobile-book-row::after { left: 50%; width: calc(var(--ask-depth) * .5); background: var(--red); }
  .mobile-funding-overview { color: #dbe4e4; }
  .funding-hero { padding: 24px 18px; display: grid; gap: 7px; text-align: center; background: linear-gradient(145deg, rgba(80,210,193,.09), rgba(80,210,193,.025)); border: 1px solid #21383d; border-radius: 9px; }
  .funding-hero span, .funding-hero small, .funding-grid span { color: var(--muted); }
  .funding-hero strong { font-size: 28px; font-weight: 500; }
  .funding-grid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
  .funding-grid div { min-height: 66px; padding: 12px; display: grid; gap: 5px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
  .funding-grid div:nth-child(2n) { border-right: 0; }
  .funding-grid div:nth-last-child(-n+2) { border-bottom: 0; }
  .funding-grid span { font-size: 9px; }
  .funding-grid strong { font-size: 12px; font-weight: 500; }
  .mobile-funding-overview > p { margin: 15px 0 0; color: #708184; font-size: 10px; text-align: center; }
  .account-panel { min-height: 70px; height: 70px; margin: 2px 0 0; border-right: 0; border-left: 0; }
  .account-main { height: 70px; }
  .account-tabs { min-height: 35px; height: 35px; padding: 0 8px; gap: 20px; scrollbar-width: none; }
  .account-tabs::-webkit-scrollbar { display: none; }
  .account-tabs .tab:nth-child(3), .account-tabs .tab:nth-child(6), .account-tabs .tab:nth-child(8), .account-tabs .tab:nth-child(9) { display: none; }
  .account-tabs .compact-select, .account-tab-spacer { display: none; }
  .mobile-account-filters { height: 34px; padding: 0 10px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; overflow: hidden; color: #6da99f; border-bottom: 1px solid var(--line-soft); }
  .mobile-account-filters button { flex: 0 0 auto; padding: 0; color: inherit; background: transparent; font-size: 10px; white-space: nowrap; }
  .mobile-account-filters button:first-child { margin-right: auto; color: var(--teal); font-size: 16px; }
  .empty-table { display: none; }
  .account-summary { display: none; }
  .auth-view { padding: 22px 10px; }
  .auth-shell { padding: 32px 20px 24px; }
  .auth-back { top: 11px; left: 13px; }
  footer { display: none; }
  .mobile-bottom-nav { position: fixed; z-index: 35; right: 0; bottom: 0; left: 0; height: 48px; padding: 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; background: #081519; border-top: 1px solid var(--line); }
  .mobile-bottom-nav button { height: 100%; padding: 0; display: flex; align-items: center; justify-content: center; gap: 7px; color: #eef4f4; background: transparent; font-size: 11px; }
  .mobile-bottom-nav button span { font-size: 18px; }
  .mobile-bottom-nav button.active { color: var(--teal); }
  .site-notice { display: none; }
  footer nav a:nth-child(-n+2) { display: none; }
}
@media (max-width: 360px) {
  .topbar { padding: 0 6px; gap: 5px; }
  .mobile-menu-button { flex: 0 0 30px; }
  .brand { min-width: 24px; width: 24px; flex: 0 0 24px; }
  .brand svg { width: 22px; }
  .header-actions { min-width: 0; flex: 1; justify-content: flex-end; gap: 4px; }
  .connect-button { min-width: 64px; height: 30px; padding: 0 9px; flex: 0 0 auto; }
  .icon-button { width: 28px; flex: 0 0 28px; }

  .market-summary { padding-right: 42px; padding-left: 8px; gap: 4px; }
  .pair-title { min-width: 0; gap: 4px; font-size: 15px; white-space: nowrap; }
  .pair-title img { width: 20px; height: 20px; flex: 0 0 20px; }
  .pair-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .leverage-pill { left: 32px; }
  .market-summary dl { width: 100px; flex-basis: 100px; overflow: hidden; }
  .market-summary dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .market-summary dl div:nth-child(1) dd { font-size: 17px; line-height: 21px; }
  .market-summary dl div:nth-child(3) dd { font-size: 9px; line-height: 17px; }
  .mobile-market-button { right: 6px; width: 30px; }
  .mobile-market-tabs button { min-width: 0; padding: 0 2px; font-size: 10px; }
  .mobile-market-tabs button.active::after { right: 7px; left: 7px; }

  .chart-toolbar { padding: 0 3px; gap: 0; overflow: hidden; }
  .chart-toolbar button { min-width: 24px; padding: 0 4px; font-size: 10px; }
  .chart-toolbar > button:nth-last-child(2) { display: none; }
  .chart-toolbar .divider { margin: 0 3px; }
  .chart-toolbar .toolbar-spacer { min-width: 0; }
  .chart-head { right: 4px; left: 52px; max-width: calc(100% - 56px); overflow: hidden; gap: 2px 5px; }
  .chart-head > span:first-child { max-width: calc(100% - 18px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
  .chart-head .ohlc { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
  .drawing-tools { width: 44px; }
  .drawing-tools button { width: 28px; }
  .chart-bottom-toolbar { padding-right: 3px; padding-left: 48px; gap: 1px; overflow: hidden; }
  .mobile-date-range { min-width: 68px !important; width: 68px; padding: 0 2px !important; font-size: 9px !important; }
  .chart-bottom-toolbar > span { min-width: 0; }
  #chart-clock { min-width: 0; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
  #chart-clock ~ button { min-width: 20px; padding: 0 2px; font-size: 9px; }
  .chart-axis-toggle { right: 2px; gap: 2px; }
  .chart-axis-toggle span { width: 16px; }

  .account-tabs { padding: 0 6px; gap: 12px; }
  .account-tabs button { padding-right: 2px; padding-left: 2px; font-size: 10px; }
  .mobile-account-filters { padding: 0 7px; gap: 6px; }
  .mobile-account-filters button { font-size: 9px; }
  .mobile-account-filters button:first-child { font-size: 15px; }
  .mobile-bottom-nav { width: 100%; max-width: 100%; padding: 0 8px; }
  .mobile-bottom-nav button { min-width: 0; gap: 4px; font-size: 10px; }
  .mobile-bottom-nav button span { font-size: 16px; }
}
@media (max-width: 300px) {
  .account-tabs { padding: 0 4px; gap: 6px; }
  .account-tabs button { padding-right: 1px; padding-left: 1px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
