/* Winchain Futures v2: isolated market terminal, no dependency on marketing CSS */
:root{color-scheme:dark;--bg:#070c13;--pane:#0c131d;--pane2:#0f1823;--edge:#1e2a37;--edge-soft:#17232d;--txt:#edf5f5;--mute:#7f93a5;--muted2:#617486;--green:#20d4a0;--green-dark:#0f433b;--red:#ff637c;--cyan:#6de6d0;--gold:#e9ba67;--font:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}html{font-family:var(--font);background:var(--bg);font-size:13px;scroll-behavior:smooth}body{margin:0;color:var(--txt);background:radial-gradient(ellipse 72% 29% at 62% -9%,#16403952,transparent),linear-gradient(#090f18,#080d14);min-height:100vh}button,input{font:inherit}button{color:inherit;cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--green);outline-offset:2px}button:disabled{opacity:.45;cursor:not-allowed}[hidden]{display:none!important}svg{flex-shrink:0}.ex-shell{min-width:320px;max-width:2100px;margin:0 auto;min-height:100vh;display:flex;flex-direction:column}.ex-topbar{height:70px;flex:0 0 70px;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:0 24px;border-bottom:1px solid #1b2a35;background:#090e17f5;position:relative;z-index:30}.ex-top-brand,.ex-top-tools,.ex-top-nav,.ex-product-name{display:flex;align-items:center}.ex-top-brand{gap:20px;min-width:0}.ex-wordmark{display:flex;align-items:center;width:139px;height:42px}.ex-wordmark img{width:139px;height:auto;max-height:42px;object-fit:contain}.ex-brand-divider{height:25px;width:1px;background:#2a3944}.ex-product-name{white-space:nowrap;gap:9px;font-size:12px;letter-spacing:.14em;font-weight:800}.ex-product-symbol{display:grid;place-items:center;width:32px;height:32px;border:1px solid #326154;border-radius:9px;color:#63e9c9;background:#133d33}.ex-product-beta{font-size:9px;letter-spacing:.08em;padding:5px 7px;color:#73eac7;border:1px solid #27584a;background:#102921;border-radius:5px}.ex-top-nav{height:100%;gap:30px;margin-left:30px;margin-right:auto}.ex-top-nav a{display:flex;gap:5px;align-items:center;height:100%;font-size:12px;color:#8795a5;font-weight:650;position:relative;transition:color .2s}.ex-top-nav a:hover,.ex-top-nav a.active{color:#f0f5f2}.ex-top-nav a.active:after{content:"";height:2px;background:var(--green);border-radius:4px;position:absolute;bottom:0;left:0;right:0;box-shadow:0 0 17px var(--green)}.ex-top-tools{gap:19px;white-space:nowrap}.ex-feed{display:flex;align-items:center;gap:8px;border:1px solid #244539;background:#10231e;padding:8px 10px;border-radius:7px;font-size:10px;font-weight:650;color:#81d9bb}.ex-pulse,.ex-mini-live{width:7px;height:7px;display:inline-block;background:#3ef1b0;border-radius:100%;box-shadow:0 0 0 4px #36dd9b12,0 0 13px #30e4a35a;animation:ex-pulse 2s infinite}.ex-feed[data-feed=offline],.ex-feed[data-feed=stale]{border-color:#5b433b;background:#35241f;color:#f3b47b}.ex-feed[data-feed=offline] .ex-pulse,.ex-feed[data-feed=stale] .ex-pulse{background:#e6a165;box-shadow:none;animation:none}.ex-clock{font-size:10px;font-variant-numeric:tabular-nums;letter-spacing:.04em;color:#8496a5}.ex-dashboard-link{background:#192530;border:1px solid #354451;border-radius:8px;padding:10px 12px;display:flex;align-items:center;gap:7px;font-size:11px;font-weight:700;transition:.2s}.ex-dashboard-link:hover{border-color:#509781;color:#85f2c8}.ex-strip{overflow:hidden;border-bottom:1px solid var(--edge);background:#0c141c}.ex-strip-inner{display:grid;grid-template-columns:repeat(10,minmax(112px,1fr));min-width:1180px}.ex-strip-item{position:relative;display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:5px;padding:13px 15px 12px;background:transparent;border:0;border-right:1px solid #1e2b35;transition:.2s}.ex-strip-item:hover,.ex-strip-item.active{background:#172923}.ex-strip-item.active:before{content:"";position:absolute;top:0;left:0;right:0;background:var(--green);height:2px;box-shadow:0 0 14px #21e5a288}.ex-strip-pair{font-size:11px;font-weight:750;color:#e5f0ee}.ex-strip-pair em{font-style:normal;font-size:9px;color:#788b96;font-weight:600;margin-left:3px}.ex-strip-price{font-size:15px;font-weight:750;letter-spacing:-.02em;font-variant-numeric:tabular-nums;line-height:1}.ex-strip-change{font-size:10px;color:#7892a1;font-weight:700}.pos{color:var(--green)!important}.neg{color:var(--red)!important}.ex-flash-up{animation:ex-flash-up .65s ease-out}.ex-flash-down{animation:ex-flash-down .65s ease-out}@keyframes ex-flash-up{0%{background:#17c58d40;color:#87ffe0}100%{background:transparent}}@keyframes ex-flash-down{0%{background:#ff66823a;color:#ff9eab}100%{background:transparent}}@keyframes ex-pulse{50%{box-shadow:0 0 0 7px #36dd9b00,0 0 16px #30e4a37b}}.ex-workspace{display:grid;grid-template-columns:240px minmax(0,1fr) 314px;align-items:stretch;flex:1;min-height:690px;gap:1px;background:var(--edge);border-bottom:1px solid var(--edge)}.ex-panel{background:var(--pane);min-width:0}.ex-watch{display:flex;flex-direction:column}.ex-watch-top{padding:24px 18px 18px;display:flex;align-items:center;justify-content:space-between}.ex-overline{display:block;color:#668c80;font-size:9px;letter-spacing:.17em;font-weight:850;margin-bottom:7px}.ex-watch-top h2,.ex-ticket-head h2{font-size:20px;line-height:1.1;margin:0;font-weight:780;letter-spacing:-.05em}.ex-count{font-size:10px;font-weight:700;border-radius:5px;padding:2px 6px;margin-left:6px;background:#22302f;color:#94bfb0;vertical-align:3px;letter-spacing:0}.ex-watch-top-icon{display:grid;place-items:center;color:#628b7c;width:30px;height:30px;background:#17251f;border:1px solid #294033;border-radius:7px}.ex-search{display:flex;align-items:center;gap:9px;margin:0 13px 18px;background:#101b26;border:1px solid #2b3a48;color:#7792a0;border-radius:8px;padding:0 10px;transition:border .2s}.ex-search:focus-within{border-color:#3ec2a0}.ex-search input{height:38px;background:transparent;border:0;outline:0;min-width:0;flex:1;color:#e8f3f2;font-size:11px}.ex-search input::placeholder{color:#667888}.ex-search kbd{font:10px var(--font);border:1px solid #33404c;padding:1px 4px;border-radius:3px}.ex-market-filters{display:flex;align-items:center;gap:5px;padding:0 13px 13px;border-bottom:1px solid var(--edge)}.ex-market-filters button{border:0;border-radius:6px;background:transparent;color:#8195a1;padding:7px 12px;font-size:11px;font-weight:700}.ex-market-filters button.active{background:#174339;color:#70e4c0}.ex-market-filters span{margin-left:auto;font-size:9px;font-weight:800;color:#516d72}.ex-watch-head{display:flex;justify-content:space-between;font-size:9px;letter-spacing:.07em;font-weight:750;color:#657a8b;padding:15px 16px 10px}.ex-watch-list{flex:1;overflow-y:auto;min-height:100px}.ex-watch-item{display:flex;width:100%;justify-content:space-between;align-items:center;gap:5px;border:0;border-left:2px solid transparent;padding:11px 14px;background:transparent;transition:background .15s;text-align:left}.ex-watch-item:hover{background:#17232c}.ex-watch-item.active{background:linear-gradient(90deg,#163b35,#102027);border-left-color:#2ce0ac}.ex-watch-identity{display:flex;align-items:center;gap:9px}.ex-coin{width:30px;height:30px;display:inline-grid;place-items:center;border-radius:50%;background:#273742;color:#cce6e8;font-weight:850;font-size:15px;flex:none;box-shadow:inset 0 0 0 1px #ffffff16}.ex-coin-btc{background:#442f1c;color:#ffb74d}.ex-coin-eth{background:#2d314e;color:#a8b8ff}.ex-coin-sol{background:linear-gradient(140deg,#432566,#0b4e4a);color:#aaf9c2}.ex-coin-xrp{background:#323b49;color:#e4e9f1}.ex-coin-doge{background:#41371f;color:#e8c671}.ex-coin-bnb{background:#3b321e;color:#f3c558}.ex-coin-ada{background:#222c4b;color:#91b8ff}.ex-coin-avax{background:#4d2937;color:#fc8a9b}.ex-coin-link{background:#263b63;color:#9bbfff}.ex-coin-sui{background:#173c4e;color:#8bdeff}.ex-watch-identity strong{display:block;font-size:11px;font-weight:750;letter-spacing:-.01em}.ex-watch-identity strong i{font-style:normal;color:#8495a1;font-weight:550;font-size:10px}.ex-watch-identity small{display:block;font-size:9px;color:#5e7782;margin-top:3px}.ex-watch-stats{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:5px;font-variant-numeric:tabular-nums}.ex-watch-stats strong{font-size:11px;letter-spacing:-.025em}.ex-watch-stats small{font-size:10px;font-weight:700}.ex-watch-foot{border-top:1px solid var(--edge);padding:14px;color:#719284;font-size:9px;font-weight:650;display:flex;align-items:center;gap:8px}.ex-watch-foot span:last-child{margin-left:auto;color:#5b7383}.ex-no-results{padding:18px;color:#7f92a0;text-align:center}.ex-trading{display:flex;flex-direction:column;min-width:0;gap:1px;background:var(--edge)}.ex-marketbar{min-height:92px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 21px}.ex-marketbar-left{display:flex;align-items:center;gap:13px;min-width:0}.ex-selected-coin .ex-coin{width:39px;height:39px;font-size:20px}.ex-pair-heading{min-width:0}.ex-market-dropdown{padding:0;border:0;background:transparent;display:flex;align-items:center;gap:9px;text-align:left}.ex-market-dropdown strong{font-size:21px;letter-spacing:-.045em;font-weight:850;white-space:nowrap}.ex-market-dropdown strong span{color:#8296a4;font-weight:580}.ex-market-dropdown svg{color:#6e9c89}.ex-market-dropdown:hover strong{color:var(--green)}.ex-market-secondary{display:block;margin-top:5px;font-size:10px;color:#7c8f9b;white-space:nowrap}.ex-market-secondary b{padding:0 5px;color:#486662}.ex-stat-divider{height:41px;width:1px;background:#293743;margin:0 7px}.ex-price-stack{min-width:115px}.ex-live-price{display:block;font-size:25px;line-height:1.1;letter-spacing:-.045em;font-weight:850;font-variant-numeric:tabular-nums}.ex-price-stack>span{display:block;font-size:10px;color:#7d96a0;margin-top:5px}.ex-change-pill{font-size:11px;font-weight:750;padding:6px 9px;border-radius:6px;background:#19382e;color:#5fe0ae;white-space:nowrap}.ex-change-pill.neg{background:#3e232d}.ex-marketbar-stats{display:flex;gap:24px;padding-right:5px}.ex-marketbar-stats div{display:flex;flex-direction:column;gap:7px}.ex-marketbar-stats label{color:#6f8290;font-size:10px;white-space:nowrap}.ex-marketbar-stats strong{font-size:12px;font-weight:770;font-variant-numeric:tabular-nums;white-space:nowrap}.ex-trading-middle{display:grid;grid-template-columns:minmax(0,1fr) 245px;align-items:stretch;gap:1px;background:var(--edge);min-height:510px}.ex-chart-panel{display:flex;flex-direction:column;min-width:0;min-height:510px}.ex-panel-heading,.ex-depth-heading{height:47px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 16px;border-bottom:1px solid var(--edge)}.ex-heading-title{display:flex;align-items:center;gap:9px;white-space:nowrap}.ex-heading-title svg{color:#61d4b4}.ex-heading-title strong{font-size:12px;font-weight:800}.ex-symbol-caption{border-left:1px solid #33424a;margin-left:2px;padding-left:11px;color:#8197a4;font-size:10px}.ex-chart-mode{background:#101d25;padding:5px;border:1px solid #25353f;border-radius:7px;display:flex}.ex-chart-mode button{border:0;background:transparent;color:#8093a0;font-size:10px;font-weight:800;padding:5px 9px;border-radius:5px}.ex-chart-mode button.active{color:#e4f5f1;background:#2a4640}.ex-chart-toolbar{min-height:43px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #182630;padding:0 14px;gap:8px}.ex-timeframes{display:flex;align-items:center;gap:2px}.ex-timeframes button{background:transparent;border:0;color:#7d92a0;font-size:10px;font-weight:750;padding:7px 9px;border-radius:5px}.ex-timeframes button:hover{color:#e6faf2}.ex-timeframes button.active{background:#1c4038;color:#64e9bb}.ex-chart-actions{display:flex;align-items:center;gap:10px}.ex-chart-source{font-size:9px;letter-spacing:.07em;font-weight:750;color:#75978a;display:flex;align-items:center;gap:4px;white-space:nowrap}.ex-chart-actions button{display:grid;place-items:center;border:1px solid transparent;border-radius:6px;background:transparent;color:#8aa7a1;width:28px;height:28px}.ex-chart-actions button:hover{border-color:#365346;color:#e7fff6}.ex-chart{flex:1;position:relative;min-height:380px;background:radial-gradient(ellipse 62% 74% at 45% 0%,#16382a1d,transparent),#0b141e;overflow:hidden}.ex-chart-widget{position:absolute;inset:0;z-index:2}.ex-chart-fallback{position:absolute;inset:0;width:100%;height:100%;z-index:2}.ex-chart-watermark{position:absolute;left:23%;top:46%;z-index:1;font-size:35px;font-weight:900;color:#a4c3b50b;letter-spacing:.1em;pointer-events:none;white-space:nowrap}.ex-chart-watermark span{font-size:12px;letter-spacing:.3em;color:#63b69c16}.ex-chart-loading{position:absolute;inset:0;z-index:4;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:9px;color:#758b95;font-size:11px;background:#0b141ef2}.ex-chart-loading strong{font-size:12px;color:#cddedb}.ex-loader{display:block;width:27px;height:27px;border:2px solid #315348;border-top-color:#48e2ae;border-radius:50%;animation:ex-spin .8s linear infinite}@keyframes ex-spin{to{transform:rotate(360deg)}}.ex-chart-foot{height:38px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 14px;border-top:1px solid var(--edge);background:#0d1720}.ex-ohlc{display:flex;align-items:center;gap:14px;color:#708d9a;font-size:10px}.ex-ohlc b{color:#b7d0c9;font-variant-numeric:tabular-nums;margin-left:3px}.ex-chart-updated{display:flex;align-items:center;gap:6px;color:#658a7e;font-size:9px;white-space:nowrap}.ex-depth{display:flex;flex-direction:column;min-width:0}.ex-depth-heading{padding:0 10px}.ex-depth-tabs{display:flex;align-items:center;gap:12px;height:100%}.ex-depth-tabs button{height:100%;padding:0 5px;border:0;border-bottom:2px solid transparent;color:#7d8f9b;font-size:11px;font-weight:750;background:transparent}.ex-depth-tabs button.active{border-bottom-color:#54d9aa;color:#e6f7f3}.ex-order-live{display:flex;gap:7px;align-items:center;color:#72bd9f;font-size:9px;font-weight:750}.ex-book-panel,.ex-trades-panel{display:flex;flex-direction:column;flex:1;min-height:0}.ex-depth-cols{display:flex;justify-content:space-between;align-items:center;color:#6a7f8f;font-size:9px;padding:16px 14px 11px;white-space:nowrap}.ex-depth-side{min-height:147px}.ex-book-row,.ex-trade-row{width:100%;border:0;background:transparent;display:flex;align-items:center;justify-content:space-between;gap:6px;height:28px;padding:0 14px;position:relative;text-align:right;font-size:10px;font-variant-numeric:tabular-nums;transition:background .12s;overflow:hidden}.ex-book-row:hover,.ex-trade-row:hover{background:#1a3035}.ex-book-row:before{content:"";position:absolute;right:0;top:0;bottom:0;width:var(--depth,0%);pointer-events:none;background:#d65c681b}.ex-book-row.bid:before{background:#23cd931d}.ex-book-row span,.ex-trade-row span{position:relative;z-index:1}.ex-book-row span:first-child{color:#ee778a}.ex-book-row.bid span:first-child{color:#48d8aa}.ex-depth-mid{margin:5px 10px;background:linear-gradient(100deg,#153c31,#132922);border:1px solid #214738;border-radius:0px;display:flex;justify-content:space-between;align-items:center;padding:10px 9px;gap:6px;min-height:48px}.ex-depth-mid strong{font-size:16px;letter-spacing:-.02em;color:#4fe1b6}.ex-depth-mid span{font-size:9px;color:#729e90}.ex-depth-footnote{margin:auto 10px 0;border-top:1px solid var(--edge);padding:15px 0;color:#586f7c;font-size:9px;text-align:center}.ex-book-skeleton{height:130px;margin:10px 13px;border-radius:6px;background:repeating-linear-gradient(0deg,#18252e,#18252e 6px,#0e1923 6px,#0e1923 27px);animation:ex-fade 1.2s infinite alternate}@keyframes ex-fade{to{opacity:.5}}.ex-trades-list{flex:1}.ex-trade-row{height:27px}.ex-trade-row strong{display:block;font-size:10px}.ex-trade-row small{display:block;color:#718b9b;font-size:9px}.ex-bottom{min-height:138px}.ex-bottom-tabs{height:44px;display:flex;align-items:center;gap:23px;border-top:1px solid var(--edge);border-bottom:1px solid var(--edge);padding:0 20px}.ex-bottom-tabs button{background:transparent;border:0;height:100%;border-bottom:2px solid transparent;color:#7b93a0;font-weight:760;font-size:11px}.ex-bottom-tabs button.active{border-bottom-color:#39d6a7;color:#e4f4f0}.ex-bottom-tabs i{font-style:normal;font-size:9px;background:#24313b;border-radius:4px;padding:2px 5px;margin-left:4px}.ex-bottom-empty{min-height:93px;display:flex;align-items:center;justify-content:center;gap:12px;color:#6c8695}.ex-bottom-empty>svg{color:#456458}.ex-bottom-empty strong{display:block;color:#afc6c4;font-size:11px;font-weight:750;margin-bottom:4px}.ex-bottom-empty small{display:block;font-size:10px}.ex-ticket{display:flex;flex-direction:column;position:relative}.ex-ticket-head{padding:22px 19px 19px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--edge);background:linear-gradient(#12201f,#0c141d)}.ex-ticket-tag{border:1px solid #335b48;color:#72e6b5;font-size:9px;letter-spacing:.09em;font-weight:850;border-radius:5px;padding:7px 9px;background:#123129}.ex-ticket-body{padding:20px 17px;flex:1}.ex-risk-row{display:flex;gap:7px;position:relative}.ex-margin-tabs{display:flex;flex:1;padding:3px;border:1px solid #2a3843;border-radius:7px;background:#101a25}.ex-margin-static{display:flex;flex:1;align-items:center;justify-content:center;color:#e0f1ed;background:#2b3f42;font-size:11px;font-weight:780;padding:9px 7px;border-radius:5px}.ex-leverage-open{width:83px;flex:none;background:#18262e;border:1px solid #34454b;border-radius:7px;display:flex;align-items:center;justify-content:center;gap:9px}.ex-leverage-open strong{font-size:13px}.ex-leverage-open svg{color:#8bb7a5}.ex-leverage-open:hover{border-color:#3cc69c}.ex-leverage-pop{background:#14242b;border:1px solid #355b52;box-shadow:0 18px 45px #0009;position:absolute;top:51px;right:0;left:0;border-radius:10px;padding:15px;z-index:20}.ex-leverage-header{display:flex;justify-content:space-between;font-size:12px;margin-bottom:14px}.ex-leverage-header span{font-size:17px;color:#67e4b7;font-weight:850}.ex-leverage-pop input{width:100%;accent-color:#49d7a5}.ex-lev-presets{display:grid;grid-template-columns:repeat(6,1fr);gap:3px;margin:9px 0}.ex-lev-presets button{padding:7px 0;background:#1b3337;color:#b7c8c6;border:1px solid #2e4850;border-radius:5px;font-size:10px}.ex-lev-presets button.active{background:#12634f;border-color:#36d6a1;color:#fff}.ex-leverage-pop p{font-size:10px;color:#8aa19a;margin:13px 0 0}.ex-direction{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin-top:24px;background:#142029;padding:4px;border-radius:9px}.ex-direction button{padding:13px 5px;border:0;background:transparent;border-radius:7px;color:#8498a3;font-size:12px;font-weight:830}.ex-direction button[data-direction=long].active{background:#10674e;color:#f0fff8;box-shadow:0 3px 20px #14aa7428}.ex-direction button[data-direction=short].active{background:#8b3143;color:#fff4f5;box-shadow:0 3px 20px #d94c6728}.ex-order-types{display:flex;align-items:center;gap:26px;margin:26px 0 21px;border-bottom:1px solid var(--edge)}.ex-order-types button{border:0;border-bottom:2px solid transparent;color:#81929e;background:transparent;padding:0 0 12px;font-size:11px;font-weight:750}.ex-order-types button.active{border-bottom-color:#49d9a6;color:#e6f4ee}.ex-form-field{margin:0 0 17px}.ex-form-field label{display:flex;justify-content:space-between;font-size:11px;color:#b5c3c9;font-weight:650;margin-bottom:9px}.ex-form-field label small{color:#617987;font-size:10px}.ex-control{display:flex;align-items:center;border:1px solid #2a3c48;border-radius:8px;background:#101e28;padding:0 13px;transition:border .2s}.ex-control:focus-within{border-color:#37b793}.ex-control input{border:0;outline:0;background:transparent;color:#e5f4ee;font-size:15px;font-weight:750;letter-spacing:-.025em;width:100%;min-width:0;height:47px}.ex-control input::placeholder{font-size:11px;color:#687f8c;font-weight:550;letter-spacing:0}.ex-control input::-webkit-inner-spin-button{-webkit-appearance:none}.ex-control span{font-size:11px;color:#879da9;font-weight:750}.ex-control input:disabled{cursor:not-allowed;color:#657b87}.ex-slider-value{display:flex;justify-content:space-between;margin:19px 0 9px;font-size:10px;color:#8098a1}.ex-slider-value strong{color:#5ae1ae}.ex-size-range{width:100%;height:5px;accent-color:#4cdaa7;cursor:pointer;display:block}.ex-size-labels{display:flex;justify-content:space-between;margin-top:12px;color:#6e8591;font-size:10px}.ex-ticket-summary{border-top:1px solid var(--edge);margin-top:5px;padding:17px 0 19px;display:grid;gap:13px}.ex-ticket-summary>div{display:flex;justify-content:space-between;align-items:center;gap:5px}.ex-ticket-summary span{display:flex;align-items:center;gap:5px;font-size:11px;color:#7a929f}.ex-ticket-summary strong{font-size:11px;color:#bfd1d0;font-weight:750;font-variant-numeric:tabular-nums;white-space:nowrap}.ex-primary-order{display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid #24956b;background:linear-gradient(135deg,#18b783,#147d64);color:#eefff8;border-radius:9px;width:100%;font-size:13px;font-weight:850;padding:15px;box-shadow:0 7px 24px #0a926b28;transition:transform .15s,filter .15s}.ex-primary-order:hover{filter:brightness(1.15);transform:translateY(-1px)}.ex-primary-order:active{transform:translateY(1px)}.ex-primary-order.short{border-color:#d85d75;background:linear-gradient(135deg,#d65372,#963951);box-shadow:0 8px 24px #df58721d}.ex-order-note{display:flex;gap:7px;align-items:center;justify-content:center;color:#65897c;margin-top:15px;font-size:10px}.ex-ticket-footer{padding:16px;border-top:1px solid var(--edge);display:flex;align-items:center;gap:8px;color:#7ca492;font-size:10px}.ex-ticket-footer>span:last-child{margin-left:auto;color:#5f7b7b;font-size:8px;letter-spacing:.07em;font-weight:800}.ex-statusline{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 23px;color:#607783;font-size:9px;background:#090f16}.ex-statusline>span:first-child{letter-spacing:.10em;font-weight:800}.ex-statusline i{font-style:normal;color:#29b487}.ex-statusline a{color:#7faea4;text-decoration:underline}.ex-chart-panel.is-expanded{position:fixed;z-index:200;inset:20px;border:1px solid #386659;border-radius:12px;box-shadow:0 0 0 200vmax #000e}.ex-chart-panel.is-expanded .ex-chart{min-height:calc(100vh - 160px)}body.ex-expanded{overflow:hidden}.ex-modal-backdrop{position:fixed;z-index:300;inset:0;background:#030709d9;display:flex;align-items:center;justify-content:center;padding:17px;backdrop-filter:blur(12px)}.ex-modal{width:min(100%,440px);border:1px solid #305348;background:linear-gradient(145deg,#172a2a,#101b26);border-radius:16px;padding:28px;box-shadow:0 25px 90px #000b}.ex-modal-top{display:flex;justify-content:space-between}.ex-modal-icon{display:grid;place-items:center;background:#1c5745;border:1px solid #378866;color:#64eab9;border-radius:12px;width:43px;height:43px}.ex-modal-close{border:1px solid #314a4a;background:#1a2930;border-radius:8px;padding:7px;display:grid;place-items:center;height:33px}.ex-modal-kicker{font-size:9px;font-weight:850;color:#e9ba67;letter-spacing:.16em;margin-top:22px}.ex-modal h2{font-size:24px;letter-spacing:-.04em;margin:9px 0}.ex-modal p{color:#98abae;font-size:12px;line-height:1.6;margin:0}.ex-modal-details{border:1px solid #2a4744;background:#132328;padding:10px 15px;border-radius:9px;margin:22px 0}.ex-modal-details>div{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #263c3c;font-size:11px;gap:15px}.ex-modal-details>div:last-child{border:0}.ex-modal-details span{color:#879e9f}.ex-modal-details strong{text-align:right}.ex-modal-confirm{background:#1ba67b;color:#fff;border:1px solid #3bd2a1;border-radius:8px;padding:13px;width:100%;font-weight:750}.ex-toast{position:fixed;z-index:500;bottom:20px;left:50%;transform:translate(-50%,120px);opacity:0;pointer-events:none;border:1px solid #427e71;background:#193b39;color:#dff7ef;box-shadow:0 8px 40px #0009;border-radius:9px;padding:13px 18px;min-width:200px;text-align:center;transition:transform .24s,opacity .24s;font-size:12px}.ex-toast.show{transform:translate(-50%,0);opacity:1}
@media(min-width:1800px){.ex-workspace{grid-template-columns:262px minmax(0,1fr) 336px}.ex-trading-middle{grid-template-columns:minmax(0,1fr) 275px}.ex-chart{min-height:460px}.ex-ticket-body{padding:24px}}
@media(max-width:1440px){.ex-workspace{grid-template-columns:216px minmax(0,1fr) 288px}.ex-trading-middle{grid-template-columns:minmax(0,1fr) 214px}.ex-marketbar{gap:12px}.ex-marketbar-stats{gap:12px}.ex-marketbar-stats div:last-child{display:none}.ex-marketbar-left{gap:8px}.ex-market-dropdown strong{font-size:19px}.ex-live-price{font-size:23px}.ex-ticket-body{padding:17px 13px}.ex-panel-heading{padding:0 10px}.ex-chart-source{display:none}.ex-depth-mid strong{font-size:13px}}
@media(max-width:1150px){.ex-workspace{grid-template-columns:204px minmax(0,1fr)}.ex-ticket{grid-column:2;grid-row:2}.ex-trading-middle{grid-template-columns:minmax(0,1fr) 225px}.ex-ticket-body{display:grid;grid-template-columns:1fr 1fr;column-gap:20px;align-items:start}.ex-risk-row,.ex-leverage-pop,.ex-direction,.ex-order-types,.ex-form-field,.ex-slider-value,.ex-size-range,.ex-size-labels,.ex-ticket-summary,.ex-primary-order,.ex-order-note{grid-column:auto}.ex-risk-row,.ex-direction,.ex-order-types{grid-column:1}.ex-ticket-summary,.ex-primary-order,.ex-order-note{grid-column:2}.ex-ticket-summary{grid-row:1/span 5;margin-top:5px}.ex-primary-order{grid-row:6}.ex-order-note{grid-row:7}.ex-leverage-pop{grid-column:1}.ex-size-range,.ex-size-labels,.ex-slider-value{grid-column:1}.ex-form-field{grid-column:1}.ex-top-nav{margin-left:5px;gap:16px}.ex-top-tools{gap:10px}.ex-clock{display:none}}
@media(max-width:850px){.ex-topbar{height:62px;flex-basis:62px;padding:0 15px}.ex-top-nav{display:none}.ex-dashboard-link{padding:9px}.ex-feed{font-size:9px}.ex-strip{overflow-x:auto;scrollbar-width:thin}.ex-strip-inner{min-width:1100px}.ex-workspace{display:flex;flex-direction:column}.ex-watch{order:2}.ex-trading{order:1}.ex-ticket{order:3}.ex-watch-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.ex-watch-top{padding:15px}.ex-watch-head{display:none}.ex-watch-item{border-bottom:1px solid #1d2b36}.ex-trading-middle{grid-template-columns:minmax(0,1fr) 230px}.ex-chart{min-height:375px}.ex-ticket-body{display:block;max-width:520px}.ex-marketbar-stats{gap:13px}.ex-marketbar-stats div:last-child{display:flex}.ex-ticket{grid-column:auto}.ex-statusline{flex-wrap:wrap;justify-content:center;text-align:center}.ex-product-name{font-size:10px}}
@media(max-width:630px){.ex-topbar{gap:8px}.ex-wordmark,.ex-wordmark img{width:105px}.ex-brand-divider{height:21px}.ex-top-brand{gap:9px}.ex-product-symbol{width:26px;height:26px}.ex-product-name{gap:5px;letter-spacing:.02em}.ex-product-beta{font-size:8px;padding:4px}.ex-feed{padding:6px;border:none;background:none;font-size:0}.ex-feed[data-feed=offline],.ex-feed[data-feed=stale]{background:none;border:0}.ex-dashboard-link{font-size:0;gap:0;padding:8px}.ex-dashboard-link svg{width:17px}.ex-marketbar{flex-wrap:wrap;padding:13px;gap:15px}.ex-marketbar-left{width:100%;gap:8px}.ex-marketbar-stats{justify-content:space-between;width:100%;padding-top:10px;border-top:1px solid #1c2b34}.ex-marketbar-stats div{gap:4px}.ex-marketbar-stats label{font-size:9px}.ex-marketbar-stats strong{font-size:10px}.ex-market-dropdown strong{font-size:19px}.ex-price-stack{min-width:0}.ex-live-price{font-size:19px}.ex-stat-divider{margin:0 2px;height:35px}.ex-selected-coin .ex-coin{width:33px;height:33px}.ex-change-pill{margin-left:auto;font-size:9px}.ex-trading-middle{display:flex;flex-direction:column}.ex-chart-panel{min-height:420px}.ex-chart{min-height:360px}.ex-chart-source{display:none}.ex-timeframes button{font-size:10px;padding:7px}.ex-chart-foot{padding:0 9px}.ex-ohlc{gap:7px;font-size:9px}.ex-chart-updated{font-size:8px}.ex-depth{min-height:340px}.ex-depth-side{min-height:140px}.ex-book-panel{min-height:370px}.ex-depth-mid{max-width:100%}.ex-watch-list{grid-template-columns:repeat(2,minmax(0,1fr))}.ex-watch-item{padding:12px 9px}.ex-watch-identity{gap:5px}.ex-coin{width:25px;height:25px;font-size:13px}.ex-watch-stats strong{font-size:10px}.ex-bottom-tabs{gap:12px;padding:0 10px}.ex-bottom-tabs button{font-size:10px}.ex-bottom-empty{padding:15px;text-align:center}.ex-bottom-empty>svg{display:none}.ex-ticket-body{padding:20px}.ex-bottom-empty small{line-height:1.4}.ex-chart-watermark{font-size:20px}.ex-statusline{padding:18px;line-height:1.5}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

.ex-watch-wrap{position:relative}.ex-watch-wrap .ex-watch-item{padding-right:25px}.ex-fav{position:absolute;top:17px;right:4px;border:0;background:transparent;color:#617987;font-size:15px;padding:2px;opacity:0;z-index:2}.ex-watch-wrap:hover .ex-fav,.ex-fav.active,.ex-fav:focus-visible{opacity:1}.ex-fav.active{color:#e9ba67}@media(max-width:850px){.ex-fav{opacity:1}.ex-watch-wrap .ex-watch-item{padding-right:20px}}

/* Exchange V3 — stable live terminal grid, no duplicate strip. */
.ex-workspace{min-height:0;grid-template-columns:236px minmax(0,1fr) 310px;align-items:stretch}
.ex-workspace>*{min-width:0}
.ex-trading{min-width:0}
.ex-marketbar{min-height:86px;gap:0;justify-content:initial;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:12px 17px;column-gap:14px}
.ex-marketbar-left{gap:10px;min-width:0;flex-wrap:nowrap}
.ex-marketbar-stats{padding:0;gap:14px;flex:none;justify-self:end}
.ex-marketbar-stats>div{min-width:74px;gap:5px;white-space:nowrap}
.ex-price-stack{min-width:115px;max-width:155px}
.ex-live-price{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:23px;letter-spacing:-.03em}
.ex-change-pill{flex:none;white-space:nowrap}
.ex-market-dropdown strong{font-variant-numeric:tabular-nums;white-space:nowrap}
.ex-marketbar strong,.ex-marketbar-stats strong,.ex-watch-stats strong,.ex-depth{font-variant-numeric:tabular-nums}
.ex-trading-middle{grid-template-columns:minmax(0,1fr) 256px;min-height:560px}
.ex-chart-panel{min-height:560px}
.ex-depth{min-height:600px;overflow:hidden}
.ex-depth-side{min-height:224px;height:224px;flex:0 0 224px;overflow:hidden}
.ex-book-row,.ex-trade-row{height:28px;min-height:28px;max-height:28px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;padding:0 12px;align-items:center;justify-content:initial;line-height:28px;white-space:nowrap;overflow:hidden;contain:layout paint style}
.ex-book-row span:first-child,.ex-trade-row span:first-child{text-align:left}
.ex-book-row span:last-child{text-align:right}
.ex-book-row::before{pointer-events:none;transition:width 140ms linear}
.ex-book-row:hover,.ex-trade-row:hover{background-color:#253b4438}
.ex-book-row.is-empty,.ex-trade-row.is-empty{opacity:.35}
.ex-depth-cols{height:36px;padding:0 12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:6px}
.ex-depth-cols span:last-child{text-align:right}
.ex-depth-mid{height:48px;min-height:48px;margin:5px 0px;padding:9px}
.ex-trade-cols,.ex-trade-row{grid-template-columns:1.3fr 1fr 1.05fr}
.ex-trade-cols span:nth-child(2),.ex-trade-row span:nth-child(2){text-align:right}
.ex-trade-cols span:last-child,.ex-trade-row time{text-align:right}
.ex-trade-row time{color:#7c919d;font-size:10px}
.ex-trades-panel{min-height:0;overflow:hidden}
.ex-trades-list{height:448px;max-height:448px;overflow:hidden;flex:0 0 auto}
.ex-bottom-empty{height:220px;min-height:220px;max-height:220px;flex:0 0 220px}
.ex-bottom{min-height:262px}
.ex-watch-list{overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.ex-watch-wrap{min-height:57px}
.ex-watch-item{min-height:57px}
.ex-coin{position:relative;overflow:hidden;background:#182b37!important;color:#b3e7d8!important;font-size:9px;line-height:1;font-weight:900;box-shadow:inset 0 0 0 1px #ffffff12}
.ex-coin-fallback{position:absolute;inset:0;display:grid;place-items:center}
.ex-coin img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;border-radius:50%;background:#101d29;display:block}
.ex-coin img.is-broken{display:none}
.ex-mobile-nav{display:none}
@media(min-width:1800px){.ex-workspace{grid-template-columns:250px minmax(0,1fr) 330px}.ex-trading-middle{grid-template-columns:minmax(0,1fr) 278px}}
@media(min-width:851px) and (max-width:1450px){.ex-workspace{grid-template-columns:210px minmax(0,1fr) 286px}.ex-trading-middle{grid-template-columns:minmax(0,1fr) 220px}.ex-marketbar{padding:10px;column-gap:8px}.ex-marketbar-stats{gap:9px}.ex-marketbar-stats>div{min-width:60px}.ex-price-stack{min-width:100px}.ex-live-price{font-size:20px}}
@media(min-width:851px) and (max-width:1150px){.ex-workspace{grid-template-columns:204px minmax(0,1fr)}.ex-ticket{grid-row:2;grid-column:2}.ex-marketbar{grid-template-columns:minmax(0,1fr) auto}}
@media(max-width:850px){
 html{scroll-behavior:auto}
 body.exchange-standalone{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
 .ex-shell{min-height:calc(100dvh - 75px)}
 .ex-workspace{display:flex;flex-direction:column;flex:1;gap:0;background:var(--bg);min-height:calc(100dvh - 150px)}
 .ex-workspace>.ex-watch,.ex-workspace>.ex-ticket{order:initial;display:none}
 .ex-workspace>.ex-trading{order:initial;display:flex;flex:1}
 .ex-trading-middle{display:grid;grid-template-columns:minmax(0,1fr);min-height:0}
 .ex-chart-panel{min-height:460px}
 .ex-chart{min-height:400px}
 .ex-marketbar{display:flex;flex-wrap:wrap;gap:10px;min-height:80px}
 .ex-marketbar-left{width:100%}
 .ex-marketbar-stats{display:flex;width:100%;justify-content:space-between;border-top:1px solid #1b2d36;padding:11px 0 0}
 .ex-bottom{display:none}
 .ex-statusline{display:none}
 .ex-mobile-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;z-index:150;background:#0a141d;border-top:1px solid #27463f;box-shadow:0 -10px 36px #020b1299;padding:7px 6px calc(8px + env(safe-area-inset-bottom,0px));height:calc(69px + env(safe-area-inset-bottom,0px));gap:4px}
 .ex-mobile-nav button{background:transparent;color:#8097a5;border:0;border-radius:10px;display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center;font-size:10px;font-weight:750;letter-spacing:.015em;min-width:0;transition:background .15s,color .15s}
 .ex-mobile-nav button.active{color:#52ddb0;background:#15352e}
 .ex-mobile-nav button.active svg{filter:drop-shadow(0 0 8px #2ee6b459)}
 [data-mobile-view='markets'] .ex-workspace>.ex-watch{display:flex;flex:1;min-height:calc(100dvh - 260px)}
 [data-mobile-view='markets'] .ex-workspace>.ex-trading{display:none}
 [data-mobile-view='markets'] .ex-workspace>.ex-ticket{display:none}
 [data-mobile-view='markets'] .ex-watch-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;flex:none;overflow:visible}
 [data-mobile-view='markets'] .ex-watch-foot{margin-top:auto}
 [data-mobile-view='trade'] .ex-workspace>.ex-ticket{display:flex;flex:1}
 [data-mobile-view='trade'] .ex-trading-middle,[data-mobile-view='trade'] .ex-bottom{display:none}
 [data-mobile-view='trade'] .ex-marketbar{border-bottom:1px solid var(--edge)}
 [data-mobile-view='trade'] .ex-ticket-body{display:block;max-width:100%}
 [data-mobile-view='orders'] .ex-trading-middle,[data-mobile-view='orders'] .ex-marketbar{display:none}
 [data-mobile-view='orders'] .ex-bottom{display:block;flex:1;min-height:calc(100dvh - 230px)}
 [data-mobile-view='orders'] .ex-bottom-empty{height:220px;min-height:220px;max-height:220px}
 .ex-topbar{position:relative}
 .ex-toast{bottom:calc(83px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:630px){
 .ex-marketbar{padding:12px;gap:10px}
 .ex-marketbar-stats{width:100%;gap:6px}
 .ex-marketbar-stats>div{min-width:0}
 .ex-marketbar-left{gap:8px}
 .ex-price-stack{min-width:0;max-width:none}
 .ex-live-price{font-size:19px}
 .ex-depth{min-height:600px}
 .ex-depth-side{height:224px;min-height:224px}
 .ex-watch{min-height:0}
 .ex-ticket-body{padding:18px}
 .ex-chart{min-height:380px}
 .ex-chart-panel{min-height:450px}
}

/* Extend the positions panel background without stretching the requested 220px empty-state. */
@media(min-width:851px){.ex-bottom{flex:1;background:var(--pane)}.ex-trading{background:var(--pane)}}

/* Real icons fade in only after loading; ticker fallback remains visible otherwise. */
.ex-coin img{opacity:0;transition:opacity 180ms ease}.ex-coin img.is-loaded{opacity:1}.ex-coin img.is-broken{display:none}


/* V4 market readability: fixed-height, independent watchlist scroll. */
@media (min-width: 851px) {
  .ex-watch { min-height: 0; }
  .ex-watch-list {
    flex: 0 1 auto;
    height: clamp(305px, calc(100dvh - 294px), 594px);
    min-height: 305px;
    max-height: 594px;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  .ex-watch-foot { margin-top: 0; }

  /* Distribute all three data blocks across the unused market-bar width. */
  .ex-marketbar {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(16px, 2.1vw, 32px);
    min-height: 91px;
    padding: 12px 18px;
  }
  .ex-marketbar-left { width: max-content; max-width: 100%; flex-wrap: nowrap; }
  .ex-marketbar-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    gap: 0;
    padding: 0;
  }
  .ex-marketbar-stats > div,
  .ex-marketbar-stats > div:last-child {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    padding: 6px clamp(8px, 1.2vw, 22px);
    border-left: 1px solid #263845;
    overflow: hidden;
  }
  .ex-marketbar-stats label,
  .ex-marketbar-stats strong {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .ex-marketbar-stats label { font-size: 10px; letter-spacing: .01em; }
  .ex-marketbar-stats strong { font-variant-numeric: tabular-nums; font-size: 12px; }
}
@media (min-width: 851px) and (max-width: 1030px) {
  .ex-marketbar { grid-template-columns: minmax(0,1fr); row-gap: 11px; min-height: 126px; }
  .ex-marketbar-stats { grid-column: 1; padding-top: 10px; border-top: 1px solid #263845; }
  .ex-marketbar-stats > div:first-child { border-left: none; }
}
/* Keep the market viewport scrollable also when opened from the mobile bottom nav. */
@media (max-width: 850px) {
  [data-mobile-view='markets'] .ex-watch { min-height: 0; }
  [data-mobile-view='markets'] .ex-watch-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: 0 1 auto;
    align-content: start;
    height: min(52dvh, 450px);
    max-height: min(52dvh, 450px);
    min-height: 220px;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  [data-mobile-view='markets'] .ex-watch-foot { margin-top: 0; }
  .ex-marketbar-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; gap: 0; }
  .ex-marketbar-stats > div { min-width: 0; padding: 0 8px; border-right: 1px solid #263845; }
  .ex-marketbar-stats > div:last-child { border-right: none; }
}
@media (max-width: 630px) {
  [data-mobile-view='markets'] .ex-watch-list { grid-template-columns: minmax(0,1fr); height: min(53dvh, 510px); max-height: min(53dvh, 510px); }
}
.ex-watch-list { scrollbar-color: #365d59 #0d1a24; scrollbar-width: thin; }
.ex-watch-list::-webkit-scrollbar { width: 7px; }
.ex-watch-list::-webkit-scrollbar-track { background: #0d1a24; border-radius: 9px; }
.ex-watch-list::-webkit-scrollbar-thumb { background: #365d59; border-radius: 9px; }
.ex-watch-list::-webkit-scrollbar-thumb:hover { background: #3f9a82; }


/* V4: non-shifting prices and three-column cumulative depth. */
@media (min-width: 851px) {
  .ex-marketbar { 
    grid-template-columns: minmax(0, min(400px, 43%)) minmax(0, 1fr);
    column-gap: 0;
    min-height: 91px;
  }
  .ex-marketbar-left { width: 100%; min-width: 0; overflow: hidden; gap: 9px; }
  .ex-selected-coin { flex: 0 0 37px; }
  .ex-pair-heading { flex: 0 1 116px; min-width: 0; width: 116px; overflow: hidden; }
  .ex-market-dropdown { max-width: 100%; }
  .ex-market-dropdown strong { font-size: 18px; overflow: hidden; text-overflow: ellipsis; }
  .ex-stat-divider { flex: 0 0 1px; margin: 0 3px; }
  .ex-price-stack { flex: 0 0 119px; width: 119px; min-width: 119px; max-width: 119px; overflow: hidden; }
  .ex-live-price { width: 119px; overflow: hidden; text-overflow: clip; }
  .ex-change-pill { width: 73px; min-width: 73px; flex: 0 0 73px; margin: 0; text-align: center; padding-left: 3px; padding-right: 3px; }
  .ex-marketbar-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ex-marketbar-stats > div { contain: layout paint; }
  .ex-marketbar-stats strong { display: block; min-height: 17px; font-feature-settings: 'tnum' 1, 'lnum' 1; }
}
@media (min-width: 851px) and (max-width: 1320px) {
  .ex-marketbar { grid-template-columns: minmax(0, 1fr); grid-template-rows: 43px 45px; min-height: 108px; row-gap: 0; }
  .ex-marketbar-left { width: 100%; }
  .ex-marketbar-stats { border-top: 1px solid #24363c; padding-top: 4px; width: 100%; }
  .ex-marketbar-stats > div:first-child { border-left: 0; }
  .ex-marketbar-stats > div { padding: 1px 15px; gap: 3px; }
}
/* Three fixed columns in each orderbook row. Total = price × base-asset quantity. */
.ex-depth-cols:not(.ex-trade-cols), .ex-book-row {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.88fr) minmax(0, 1fr);
  column-gap: 5px;
  align-items: center;
}
.ex-depth-cols:not(.ex-trade-cols) { padding-left: 10px; padding-right: 10px; font-size: 9px; }
.ex-book-row { padding-left: 10px; padding-right: 10px; }
.ex-depth-cols:not(.ex-trade-cols) > span:nth-child(n+2),
.ex-book-row > span:nth-child(n+2) { text-align: right; }
.ex-book-row > span { min-width: 0; overflow: hidden; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ex-book-row > span:last-child { font-weight: 650; color: #a7bdc5; }
@media (min-width: 851px) {
  .ex-trading-middle { grid-template-columns: minmax(0, 1fr) 284px; }
}
@media (min-width: 851px) and (max-width: 1450px) {
  .ex-trading-middle { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (min-width: 1800px) {
  .ex-trading-middle { grid-template-columns: minmax(0, 1fr) 304px; }
}
@media (max-width: 850px) {
  .ex-marketbar-left { min-width: 0; }
  .ex-marketbar-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ex-marketbar-stats > div { min-width: 0; overflow: hidden; contain: layout paint; }
  .ex-marketbar-stats strong { font-variant-numeric: tabular-nums; display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .ex-change-pill { width: 67px; min-width: 67px; text-align: center; }
}


/* V5 — five stable 24h market metrics (rolling 24h Open / live Close). */
@media (min-width: 851px) {
  .ex-watch-list {
    flex: 0 1 auto;
    height: 800px;
    max-height: 800px;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  .ex-marketbar {
    display: grid;
    grid-template-columns: minmax(0, min(400px, 43%)) minmax(0, 1fr);
    column-gap: 0;
    min-height: 83px;
    align-items: center;
    border-bottom: 1px solid var(--edge);
  }
  .ex-marketbar-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    gap: 0;
  }
  .ex-marketbar-stats > div {
    padding-inline: clamp(5px, .7vw, 16px);
    min-width: 0;
    overflow: hidden;
    contain: layout paint;
  }
  .ex-marketbar-stats strong {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
  }
}
/* Compact desktop: two rows give each of five cells room without moving around. */
@media (min-width: 851px) and (max-width: 1480px) {
  .ex-marketbar { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(43px, auto) minmax(46px, auto); row-gap: 0; min-height: 112px; }
  .ex-marketbar-stats { grid-column: 1; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid #263845; padding-top: 4px; }
  .ex-marketbar-stats > div:first-child { border-left: 0; }
}
@media (max-width: 850px) {
  .ex-marketbar-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 0; }
  .ex-marketbar-stats > div { min-width: 0; padding: 6px 8px; overflow: hidden; contain: layout paint; }
  .ex-marketbar-stats > div:nth-child(4) { border-left: none; }
  .ex-marketbar-stats > div strong { display: block; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 390px) {
  .ex-marketbar-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex-marketbar-stats > div:nth-child(odd) { border-left: 0; }
}

/* Language picker: same markup, flags and cookie behavior as the homepage. */
.exchange-standalone .ex-topbar{overflow:visible}
.exchange-standalone .wc-language-picker{position:relative;display:inline-flex;flex:0 0 auto;z-index:300}
.exchange-standalone .wc-language-trigger{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:78px;height:38px;padding:0 9px;border:1px solid #bc9a6666;border-radius:9px;background:#142521;color:#f0e2c3;cursor:pointer;list-style:none}
.exchange-standalone .wc-language-trigger::-webkit-details-marker{display:none}
.exchange-standalone .wc-language-flag{width:26px;height:18px;object-fit:cover;flex:none;border-radius:3px}
.exchange-standalone .wc-language-code{font-size:11px;font-weight:800;color:#f0e2c3}
.exchange-standalone .wc-language-trigger .icon{width:13px;height:13px}
.exchange-standalone .wc-language-menu{position:absolute;right:0;left:auto;top:calc(100% + 10px);width:min(426px,calc(100vw - 24px));max-height:min(75vh,540px);overflow-y:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:12px;border:1px solid #bc9a6680;border-radius:13px;background:#09241d;box-shadow:0 24px 65px #000b;z-index:310}
.exchange-standalone .wc-language-picker:not([open])>.wc-language-menu{display:none}
.exchange-standalone .wc-language-menu-heading{grid-column:1/-1;display:flex;align-items:center;gap:8px;color:#e8cb94;padding:4px 6px 9px}
.exchange-standalone .wc-language-option{min-width:0;min-height:44px;display:flex;align-items:center;gap:7px;border:1px solid transparent;border-radius:8px;padding:7px;background:transparent;color:#e3eee7;text-align:left;cursor:pointer}
.exchange-standalone .wc-language-option:hover,.exchange-standalone .wc-language-option:focus-visible{background:#214438}
.exchange-standalone .wc-language-option.is-selected{background:#344328;border-color:#c1a26878}
.exchange-standalone .wc-language-name{font-size:11px;min-width:0;overflow-wrap:anywhere}
.exchange-standalone .wc-language-option .icon{width:12px;height:12px}
@media(max-width:630px){.exchange-standalone .ex-top-tools{gap:7px}.exchange-standalone .wc-language-trigger{min-width:66px;height:34px;padding:0 5px;gap:4px}.exchange-standalone .wc-language-flag{width:22px;height:16px}.exchange-standalone .wc-language-code{font-size:10px}.exchange-standalone .wc-language-menu{position:fixed;left:10px;right:10px;top:65px;width:auto;max-height:65vh}}
/* Per-level quote totals, not cumulative contract counts. */
.ex-depth-cols:not(.ex-trade-cols),.ex-book-row{grid-template-columns:minmax(0,1.28fr) minmax(0,.92fr) minmax(0,1.08fr)}

@media(max-width:390px){.exchange-standalone .ex-topbar{padding:0 8px;gap:4px}.exchange-standalone .ex-top-brand{gap:5px}.exchange-standalone .ex-wordmark,.exchange-standalone .ex-wordmark img{width:86px}.exchange-standalone .ex-product-beta,.exchange-standalone .ex-brand-divider{display:none}.exchange-standalone .ex-top-tools{gap:4px}.exchange-standalone .ex-dashboard-link{padding:7px}}

/* Compact Exchange market figures */
.ex-book-row, .ex-trade-row, .ex-statusline, .ex-bottom-empty small, .ex-depth-cols:not(.ex-trade-cols) {font-size:11px;}

/* Desktop market-stat dimensions. Keep mobile rules untouched. */
@media (min-width: 851px) {
  .ex-marketbar-stats strong {
    font-variant-numeric: tabular-nums;
    font-size: 15px;
  }
  .ex-marketbar-stats label {
    font-size: 11px;
    letter-spacing: .01em;
  }
  .ex-marketbar-stats > div {
    padding-inline: clamp(5px, .7vw, 16px);
    min-width: 0;
    overflow: hidden;
    contain: layout paint;
    text-align: center;
  }
}
/* Winchain Exchange 31-market additions. Shared site layout and other modules are untouched. */
.ex-tv-chart{position:absolute;inset:0;z-index:4;background:#0b141e;overflow:hidden}
.ex-tv-chart[hidden]{display:none!important}.ex-tv-chart .tradingview-widget-container{height:100%!important;min-height:320px}
.ex-chart-widget[hidden],.ex-chart-fallback[hidden],.ex-chart-loading[hidden]{display:none!important}
.ex-market-secondary{font-size:10px;letter-spacing:.035em}
.ex-wallet-bar{position:relative;display:flex;gap:14px;align-items:center;justify-content:space-between;background:#101e27;border-top:1px solid #283d45;padding:10px 20px;color:#cfede2;font-size:12px;flex-wrap:wrap}
.ex-wallet-bar>div:first-child{display:grid;gap:4px}.ex-wallet-bar>div:first-child span{font-size:10px;color:#8198a2}
.ex-wallet-balances{display:flex;gap:20px}.ex-wallet-balances strong{color:#e6f6ef;font-variant-numeric:tabular-nums}
.ex-wallet-bar button,.ex-account-entry button{border:1px solid #376c5c;background:#16372c;border-radius:7px;color:#bdf9d7;padding:8px 12px;font-size:11px;cursor:pointer}
.ex-wallet-modal{position:fixed;z-index:510;inset:0;background:#000c;display:grid;place-items:center;padding:20px}
.ex-wallet-modal[hidden]{display:none!important}.ex-wallet-modal form{background:#13232e;color:#daeee8;border:1px solid #335246;max-width:420px;width:100%;padding:25px;border-radius:14px;display:grid;gap:12px;box-shadow:0 30px 90px #000b}
.ex-wallet-modal h3{margin:0;font-size:18px}.ex-wallet-modal p{margin:0;font-size:12px;color:#aac2bb;line-height:1.6}
.ex-wallet-modal label{display:grid;gap:6px;font-size:12px}.ex-wallet-modal input,.ex-wallet-modal select{width:100%;background:#0e1923;color:#d4efe6;border:1px solid #345245;border-radius:7px;padding:11px}
.ex-wallet-modal button{padding:12px;border-radius:8px;background:#2d8b65;color:white;border:0;cursor:pointer}
.ex-wallet-modal button[data-ex-wallet-close]{background:#20343c}.ex-account-list{display:grid;max-height:125px;overflow:auto;gap:6px;margin-top:8px}
.ex-account-entry{display:flex;justify-content:space-between;gap:10px;padding:7px 10px;border:1px solid #2c4147;border-radius:7px;align-items:center;font-size:10px;color:#aac7be}
.ex-modal-confirm.ex-modal-cancel{background:#1b3237;color:#bfd9d0;margin-top:7px}.ex-modal-confirm:disabled{opacity:.5;cursor:not-allowed}
.ex-ticket [hidden]{display:none!important}
@media(max-width:630px){.ex-wallet-bar{padding:12px}.ex-wallet-balances{gap:9px}.ex-chart-mode button{font-size:9px;padding:4px 6px}}

/* Accessible exchange order-cancellation dialog, never a native browser confirm. */
.ex-cancel-dialog{width:min(430px,calc(100% - 32px));background:#131e2c;border:1px solid #334453;border-radius:16px;padding:25px;color:#eef3f8;box-shadow:0 24px 80px #0009}
.ex-cancel-dialog h3{margin:0 0 10px;font-size:19px}.ex-cancel-dialog p{margin:0 0 22px;color:#a4b4c2;line-height:1.6}.ex-cancel-actions{display:flex;gap:12px}.ex-cancel-actions button{flex:1;border-radius:9px;padding:12px 14px;border:1px solid #45556b;background:#223147;color:#fff;cursor:pointer}.ex-cancel-actions button:last-child{background:#8e3540;border-color:#b94657}.ex-cancel-actions button:focus-visible{outline:3px solid #9bd7ff;outline-offset:2px}

/* Exchange v32 — compact wallet, accessible transfer dialog and usable position actions. */
.ex-funds-compact{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid #325949;background:linear-gradient(135deg,#14372d,#10232b);border-radius:12px;margin-bottom:18px;min-width:0}
.ex-funds-copy{display:grid;gap:3px;min-width:0}
.ex-funds-copy>span{font-size:9px;letter-spacing:.08em;color:#95b8af;text-transform:uppercase;font-weight:700}
.ex-funds-copy>strong{font-size:16px;font-variant-numeric:tabular-nums;color:#e6fff4;white-space:nowrap}
.ex-funds-copy>strong small{font-size:10px;color:#a8c8c3;font-weight:650}
.ex-funds-copy>small{font-size:9px;color:#8eada5;line-height:1.35;overflow-wrap:anywhere}
.ex-funds-compact button{background:#266d51;border:1px solid #4aad87;border-radius:8px;padding:10px 11px;color:#effff7;white-space:nowrap;font-size:10px;font-weight:750;transition:background .15s,transform .15s}
.ex-funds-compact button:hover{background:#319a70;transform:translateY(-1px)}
.ex-order-stops{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ex-order-stops .ex-form-field{min-width:0}
.ex-order-stops label{font-size:10px}
.ex-order-stops .ex-control{padding:0 9px}
.ex-order-stops input{height:39px;font-size:12px}
.ex-wallet-modal{z-index:510;background:#010a10dd;backdrop-filter:blur(12px)}
body.ex-funds-open{overflow:hidden}
.ex-wallet-modal form{max-width:475px;width:min(100%,475px);padding:26px;gap:15px;border:1px solid #3b6a5e;border-radius:18px;background:linear-gradient(155deg,#18322f,#111f2b 58%,#101c24);box-shadow:0 30px 100px #000e,0 0 0 1px #ffffff09}
.ex-transfer-top,.ex-transfer-title{display:flex;align-items:center;gap:12px}
.ex-transfer-top{justify-content:space-between;margin-bottom:1px}
.ex-transfer-symbol{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#164c3c;color:#79e9c1;font-size:22px;border:1px solid #327e61}
.ex-transfer-kicker{font-size:9px;color:#75cba9;letter-spacing:.14em;font-weight:800}
.ex-wallet-modal h3{font-size:22px;letter-spacing:-.04em;margin:2px 0 0;color:#f0fff7}
.ex-wallet-modal button.ex-transfer-close{padding:0;width:31px;height:31px;display:grid;place-items:center;background:#172c34;border:1px solid #3c5859;border-radius:9px;font-size:22px;line-height:1;color:#acc6bd}
.ex-wallet-modal form>p:first-of-type{padding:0 0 10px;border-bottom:1px solid #29453f}
.ex-wallet-modal label{font-size:11px;font-weight:680;color:#b9d5d0;gap:8px}
.ex-wallet-modal input,.ex-wallet-modal select{padding:12px;border:1px solid #38594f;border-radius:9px;background:#0c1e26;color:#ecfff8;font-size:12px}
.ex-wallet-modal input:focus-visible,.ex-wallet-modal select:focus-visible{outline:2px solid #58c99d;outline-offset:0}
.ex-transfer-available{background:#0e2d2b;border:1px solid #30594e;border-radius:11px;padding:14px;display:grid;gap:4px}
.ex-transfer-available>span{font-size:10px;color:#a6c0bb}
.ex-transfer-available>strong{font-size:22px;letter-spacing:-.03em;color:#8ef2c8;font-variant-numeric:tabular-nums}
.ex-transfer-available>small{color:#a6bfb8;font-size:10px;line-height:1.5}
.ex-wallet-modal [data-ex-maxout-note]{font-size:11px;line-height:1.6;color:#e7ca86;background:#342b1c;border-radius:8px;padding:9px}
.ex-transfer-amount{display:flex;align-items:center;background:#0d1d27;border:1px solid #3b6b59;border-radius:10px;overflow:hidden}
.ex-transfer-amount:focus-within{border-color:#5dd1a3}
.ex-wallet-modal .ex-transfer-amount input{border:0;outline:0;flex:1;min-width:0;background:transparent;height:48px;padding:0 14px;font-weight:750;font-size:17px}
.ex-wallet-modal .ex-transfer-amount button{margin-right:7px;border:1px solid #3f926e;background:#1c5342;color:#94f7cb;font-size:10px;font-weight:850;padding:8px 10px;letter-spacing:.05em}
.ex-wallet-modal button.ex-transfer-submit{background:linear-gradient(120deg,#208962,#28b184);border:1px solid #48d3a3;padding:14px;font-weight:800;font-size:12px}
.ex-wallet-modal button.ex-transfer-submit:hover:not(:disabled){filter:brightness(1.12)}
.ex-wallet-modal [data-ex-wallet-message]{min-height:0;color:#d5f9e9;font-size:11px}
.ex-account-list{max-height:290px;gap:7px;margin:9px 0 0;padding:0 6px 5px 0;overflow-y:auto}
.ex-bottom-empty{height:auto;min-height:220px;max-height:480px;flex:1 1 auto;align-items:flex-start}
.ex-bottom{min-height:265px}
.ex-account-entry{gap:14px;flex-wrap:wrap;align-items:center}
.ex-position-entry{background:#111f2a;border:1px solid #2c4b44;border-radius:9px;padding:12px;display:grid;gap:10px;width:100%}
.ex-position-heading{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.ex-position-heading strong{font-size:11px;color:#def8ed}
.ex-position-heading>span{font-size:10px;color:#98b9ae}
.ex-position-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.ex-position-stats>span{display:grid;gap:4px;min-width:0}
.ex-position-stats small{font-size:9px;color:#829b9d}
.ex-position-stats strong{font-size:10px;color:#d6e9e7;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.ex-position-actions{display:flex;gap:7px;justify-content:flex-end}
.ex-position-actions button{font-size:10px!important;padding:7px 12px!important}
.ex-position-actions button:last-child{background:#5f293a!important;border-color:#99516a!important;color:#ffe9ef!important}
.ex-position-stops{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.ex-position-stops input{border:1px solid #376354;background:#10252b;border-radius:7px;color:#dbfaf0;min-width:90px;flex:1;padding:9px;font-size:11px}
.ex-coin img{background:#e5ebef;padding:2px;filter:drop-shadow(0 0 1px #617780)}
.ex-coin-win img{background:#183d34;padding:0;filter:none}
.ex-coin{box-shadow:inset 0 0 0 1px #98f4d246,0 0 0 1px #17362e!important}
@media(min-width:851px) and (max-width:1150px){.ex-funds-compact,.ex-order-stops{grid-column:1 / -1}.ex-position-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){.ex-order-stops{grid-template-columns:1fr 1fr}.ex-funds-compact{margin:0 0 18px}.ex-bottom-empty{max-height:none;min-height:280px}.ex-account-list{max-height:65vh}}
@media(max-width:480px){.ex-wallet-modal{padding:12px}.ex-wallet-modal form{padding:17px}.ex-transfer-available>strong{font-size:19px}.ex-position-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.ex-order-stops{grid-template-columns:1fr}}

.ex-position-close-size{background:#15332f;color:#d2f5e3;border:1px solid #3a7b65;border-radius:7px;padding:7px 8px;font-size:10px}
.ex-position-stats{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:850px){.ex-position-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media(min-width:851px) and (max-width:1150px){.ex-position-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Exchange v33 — trade ticket uses its header for Manage funds; status/empty-state compact. */
.ex-ticket-head{gap:10px}
.ex-ticket-funds-btn{margin-left:auto;border:1px solid #3b9475;background:#1b5743;color:#d4ffed;border-radius:8px;padding:8px 11px;font-weight:750;font-size:11px;white-space:nowrap;transition:background .15s,border-color .15s}
.ex-ticket-funds-btn:hover{background:#237758;border-color:#53bc93}
.ex-ticket-funds-btn:focus-visible{outline:2px solid #7cf0be;outline-offset:2px}
.ex-ticket-summary [data-ex-available]{color:#b8ffe0}
.ex-lev-manual{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:11px;color:#a4c9be;margin:4px 0 8px}
.ex-lev-manual>span{display:flex;align-items:center;gap:5px;font-size:12px}
.ex-lev-manual input{background:#12242a;border:1px solid #3d7765;color:#e9fff5;border-radius:7px;font-size:13px;font-weight:750;padding:7px 9px;width:76px;text-align:center}
.ex-lev-presets button:disabled{opacity:.32;cursor:not-allowed}
.ex-bottom-empty{position:relative;display:flex;align-items:center;justify-content:center;gap:15px;text-align:center;min-height:220px;max-height:none;height:auto;flex:1 1 auto;padding:24px}
.ex-bottom-empty>div{min-width:0;max-width:100%;display:grid;justify-items:center;gap:5px}
.ex-bottom-empty>svg{color:#709c90}
.ex-bottom-empty>div>strong{display:block}
.ex-bottom-empty>div>small{display:block}
.ex-bottom-empty .ex-account-list:empty{display:none}
.ex-bottom-empty.has-records{justify-content:flex-start;align-items:stretch;text-align:left;gap:0}
.ex-bottom-empty.has-records>svg{display:none}
.ex-bottom-empty.has-records>div{width:100%;display:block}
.ex-bottom-empty.has-records .ex-account-list{width:100%;max-height:360px}
.ex-coin-pepe img,.ex-coin-op img,.ex-coin-inj img{background:#e9eff1;filter:none;padding:2px}
@media(max-width:630px){.ex-bottom-empty{min-height:220px;justify-content:center;align-items:center}.ex-bottom-empty>svg{display:block}.ex-bottom-empty.has-records{align-items:stretch}.ex-ticket-funds-btn{padding:8px 10px;font-size:10px}}


/* Exchange v38 — professional responsive positions / orders tables. */
.ex-bottom{background:#0b131d}
.ex-bottom-tabs{display:flex;align-items:stretch;gap:24px;min-height:47px;padding:0 22px;border-bottom:1px solid #263642;background:#0e1822}
.ex-bottom-tabs button{display:inline-flex;align-items:center;gap:7px;height:47px;border:none;border-bottom:2px solid transparent;padding:0 3px;background:none;color:#8fa5b4;font-size:12px;font-weight:650;white-space:nowrap}
.ex-bottom-tabs button.active{border-bottom-color:#23d9ae;color:#eef8f5}
.ex-bottom-tabs button:hover{color:#d7f5ec}
.ex-bottom-tabs i{font-style:normal;border-radius:5px;background:#243540;color:#a1bac5;font-size:10px;min-width:19px;padding:2px 4px;text-align:center}
.ex-bottom-empty.has-records{display:block;padding:0;min-height:116px;max-height:none;overflow:visible}
.ex-bottom-empty.has-records>div{display:block;width:100%;max-width:none}
.ex-bottom-empty.has-records [data-bottom-title],.ex-bottom-empty.has-records [data-bottom-summary]{display:none}
.ex-bottom-empty.has-records .ex-account-list{display:block;margin:0;padding:0;width:100%;max-width:none;max-height:410px;overflow:auto;scrollbar-width:thin;scrollbar-color:#345468 #101b24}
.ex-trade-table{width:100%;min-width:1090px;border-collapse:separate;border-spacing:0;font-size:12px;line-height:1.4;text-align:left;color:#d6e5ea;table-layout:auto}
.ex-trade-table th{position:sticky;top:0;z-index:2;padding:12px 12px;white-space:nowrap;color:#758e9e;font-weight:600;font-size:11px;background:#111d28;border-bottom:1px solid #273b49}
.ex-trade-table td{height:76px;padding:12px 12px;vertical-align:middle;border-bottom:1px solid #20303e;font-variant-numeric:tabular-nums;white-space:nowrap}
.ex-trade-table th:first-child,.ex-trade-table td:first-child{padding-left:24px}
.ex-trade-table th:last-child,.ex-trade-table td:last-child{padding-right:24px}
.ex-trade-table tbody .ex-trade-row:hover{background:#14252d}
.ex-trade-cell{font-size:12px;font-weight:600}
.ex-trade-contract{min-width:160px}
.ex-trade-pair{display:grid;justify-content:start;gap:6px}
.ex-trade-pair>strong{font-size:13px;color:#e9faf3;font-weight:750;letter-spacing:-.01em}
.ex-trade-pair>small{color:#7994a2;font-size:10px;font-weight:500}
.ex-trade-pair-meta{display:flex;align-items:center;gap:5px}
.ex-trade-side{display:inline-flex;padding:3px 6px;border-radius:4px;font-size:10px;font-weight:750;line-height:1.2}
.ex-trade-side.is-long{background:#123e35;color:#3ce5b0}
.ex-trade-side.is-short{background:#4a2432;color:#ff8299}
.ex-trade-leverage,.ex-trade-mode{font-size:10px;font-weight:650;color:#b4c7d0}
.ex-trade-leverage{padding:3px 6px;border-radius:4px;background:#21333f}
.ex-trade-mode{color:#738f9e}
.ex-trade-value-stack{display:grid;gap:3px;align-content:center}
.ex-trade-value-stack strong{font-size:12px;font-weight:750;line-height:1.25}
.ex-trade-value-stack small{color:#7996a2;font-size:10px;font-weight:500}
.ex-trade-value-stack .ex-trade-tp{color:#41dbab}
.ex-trade-value-stack .ex-trade-sl{color:#ef8694}
.ex-trade-cell--actions{min-width:200px}
.ex-trade-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;white-space:nowrap}
.ex-trade-btn{min-height:31px;padding:7px 10px!important;border:1px solid #375b60!important;border-radius:6px!important;background:#1a343a!important;color:#c8f7e6!important;font-size:11px!important;font-weight:700;line-height:1.2;white-space:nowrap;transition:background .15s,border-color .15s}
.ex-trade-btn:hover:not(:disabled){background:#245447!important;border-color:#58b98f!important}
.ex-trade-btn--close{background:#532837!important;border-color:#944b5e!important;color:#ffdeea!important}
.ex-trade-btn--close:hover:not(:disabled){background:#71364a!important;border-color:#d06a86!important}
.ex-trade-btn--ghost{background:#14242d!important;border-color:#375160!important;color:#afc8d1!important}
.ex-trade-btn--save{background:#17664e!important;border-color:#298f70!important;color:#e8fff4!important}
.ex-position-close-size{height:31px;min-width:65px;padding:5px 6px;border:1px solid #375365;border-radius:6px;background:#142530;color:#e1f4eb;font-size:11px;font-weight:650}
.ex-trade-status,.ex-trade-order-kind{display:inline-flex;padding:4px 8px;border-radius:5px;background:#21323c;color:#bbd0d7;font-size:11px;font-weight:650}
.ex-trade-status[data-state='open']{background:#1c3a3b;color:#70dbb7}
.ex-trade-status[data-state='partially_filled']{background:#3d3522;color:#f3cb78}
.ex-trade-status[data-state='filled']{background:#183a32;color:#66dcb1}
.ex-trade-status[data-state='cancelled'],.ex-trade-status[data-state='rejected']{background:#3d2932;color:#e0a5b1}
.ex-trade-muted{color:#607b88}
.ex-bottom-empty:not(.has-records){padding:35px 15px;min-height:220px;max-height:none}
@media(max-width:850px){
 .ex-bottom-tabs{padding:0 14px;gap:18px}
 .ex-bottom-tabs button{font-size:11px}
 .ex-bottom-empty.has-records .ex-account-list{max-height:none;overflow:visible}
 .ex-trade-table,.ex-trade-table tbody{display:block;min-width:0;width:100%}
 .ex-trade-table thead{display:none}
 .ex-trade-table .ex-trade-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;padding:12px 14px;margin:10px;border:1px solid #294450;border-radius:10px;background:#111f2a}
 .ex-trade-table .ex-trade-row td{display:grid;gap:5px;min-width:0;height:auto;min-height:50px;padding:9px 8px;border-bottom:1px solid #1d333f;white-space:normal;align-content:center;overflow-wrap:anywhere}
 .ex-trade-table .ex-trade-row td:before{content:attr(data-label);color:#7897a4;font-size:10px;font-weight:500}
 .ex-trade-table .ex-trade-row td.ex-trade-contract{grid-column:1/-1;padding-bottom:12px;border-bottom:1px solid #33515a}
 .ex-trade-table .ex-trade-row td.ex-trade-contract:before{display:none}
 .ex-trade-table .ex-trade-row td.ex-trade-cell--actions{grid-column:1/-1;padding-top:13px;border-bottom:0;min-width:0}
 .ex-trade-actions{justify-content:flex-start;gap:9px}
 .ex-trade-table .ex-trade-row td:first-child,.ex-trade-table .ex-trade-row td:last-child{padding-left:8px;padding-right:8px}

}
@media(max-width:430px){.ex-bottom-tabs{gap:10px}.ex-bottom-tabs button{font-size:10px}.ex-trade-actions{flex-wrap:wrap}.ex-trade-btn{font-size:10px!important}}

/* v38 · Standalone TP/SL editor; does not alter order-entry fields. */
.ex-stops-overlay{position:fixed;inset:0;z-index:850;display:flex;align-items:center;justify-content:center;overflow-y:auto;padding:24px 14px;background:rgba(2,10,17,.84);backdrop-filter:blur(9px)}
.ex-stops-dialog{width:min(100%,650px);max-height:min(92vh,850px);overflow:auto;border:1px solid #31534f;border-radius:18px;background:linear-gradient(155deg,#142a2d,#101e2b 65%,#0d1722);color:#e8f8f4;box-shadow:0 32px 100px #000b,0 0 0 1px #ffffff08;scrollbar-width:thin}
.ex-stops-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:25px 27px 19px;border-bottom:1px solid #273f43}
.ex-stops-modal-heading{display:grid;gap:6px}
.ex-stops-modal-heading small{color:#45d5a3;font-size:10px;font-weight:800;letter-spacing:.115em}
.ex-stops-modal-heading h2{margin:0;color:#f3fff9;font-size:23px;letter-spacing:-.035em;line-height:1.22}
.ex-stops-modal-heading p{margin:0;color:#91abae;font-size:12px;line-height:1.5}
.ex-stops-dismiss{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:9px;background:#213740;border:1px solid #3b555b;color:#b3cdd0;font-size:26px;line-height:1;cursor:pointer}
.ex-stops-dismiss:hover{background:#2d4750;color:#fff}
.ex-stops-position-summary{padding:18px 27px 20px;border-bottom:1px solid #243c43;background:#12232c}
.ex-stops-modal-contract{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:17px}
.ex-stops-modal-contract strong{font-size:17px;letter-spacing:-.02em}
.ex-stops-modal-contract .ex-trade-side{font-size:11px;padding:5px 8px}
.ex-stops-modal-figures{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.ex-stops-metric{display:grid;gap:7px;min-width:0}
.ex-stops-metric span{font-size:11px;color:#8aa7ae}
.ex-stops-metric strong{font-size:13px;color:#e1f4f2;font-weight:750;white-space:normal;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.ex-stops-modal-form{padding:22px 27px 26px}
.ex-stops-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.ex-stops-panel{min-width:0;padding:16px;border:1px solid #31534c;border-radius:12px;background:#132d2b}
.ex-stops-panel--sl{border-color:#67414d;background:#2b222d}
.ex-stops-panel-heading{display:flex;align-items:center;gap:9px;margin-bottom:16px}
.ex-stops-panel-heading strong{font-size:13px}
.ex-stops-panel-chip{display:inline-flex;align-items:center;justify-content:center;border-radius:5px;padding:5px 7px;background:#22644d;color:#b4ffdd;font-weight:800;font-size:10px}
.ex-stops-panel--sl .ex-stops-panel-chip{background:#773846;color:#ffe5e8}
.ex-stops-price-label{display:grid;gap:9px;font-size:11px;color:#b1ccca;font-weight:650}
.ex-stops-price-label input{width:100%;height:44px;min-width:0;border-radius:8px;border:1px solid #486b63;background:#0c1f27;color:#f3fff9;padding:10px 12px;font-size:16px;font-weight:750;font-variant-numeric:tabular-nums;outline:0}
.ex-stops-price-label input:focus{border-color:#32cf9a;box-shadow:0 0 0 3px #28bb8e26}
.ex-stops-price-label input[aria-invalid="true"]{border-color:#ef8598}
.ex-stops-pnl-result{display:grid;gap:4px;margin-top:14px;border-top:1px solid #36544b;padding-top:12px}
.ex-stops-panel--sl .ex-stops-pnl-result{border-color:#62434f}
.ex-stops-pnl-result>span{font-size:10px;color:#8fb2ad}
.ex-stops-pnl-value{font-size:19px;font-weight:800;letter-spacing:-.02em;color:#e2f5f1;font-variant-numeric:tabular-nums}
.ex-stops-pnl-roe{font-size:11px;color:#9cb9b5;font-variant-numeric:tabular-nums}
.ex-stops-pnl-value.pos,.ex-stops-pnl-roe.pos{color:#44e5af}
.ex-stops-pnl-value.neg,.ex-stops-pnl-roe.neg{color:#ff8196}
.ex-stops-field-error{min-height:0;margin:9px 0 0;color:#f8a9b4;font-size:11px;line-height:1.5}
.ex-stops-field-error:empty{display:none}
.ex-stops-caution{margin:18px 0 12px;font-size:11px;color:#91a9b2;line-height:1.65}
.ex-stops-modal-feedback{margin:0;color:#ffb0b9;font-size:12px;line-height:1.5}
.ex-stops-modal-feedback:empty{display:none}
.ex-stops-modal-actions{display:grid;grid-template-columns:1fr 1.3fr;gap:11px;margin-top:17px}
.ex-stops-modal-actions button{height:43px;border-radius:9px;padding:10px 16px;font-size:12px;font-weight:750;cursor:pointer}
.ex-stops-cancel{background:#22323d;border:1px solid #435664;color:#d0e0e5}
.ex-stops-save{background:linear-gradient(120deg,#19855f,#22aa80);border:1px solid #43c79b;color:#f3fff9}
.ex-stops-modal-actions button:hover:not(:disabled){filter:brightness(1.12)}
.ex-stops-modal-actions button:disabled{opacity:.45;cursor:not-allowed}
.ex-stops-dialog button:focus-visible{outline:2px solid #9aeed2;outline-offset:2px}
@media(max-width:620px){.ex-stops-overlay{padding:12px;align-items:center}.ex-stops-dialog{max-height:94dvh}.ex-stops-modal-head{padding:18px 18px 15px}.ex-stops-position-summary{padding:15px 18px}.ex-stops-modal-form{padding:17px 18px 20px}.ex-stops-modal-figures{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.ex-stops-panels{grid-template-columns:1fr}.ex-stops-modal-heading h2{font-size:19px}.ex-stops-pnl-value{font-size:18px}}


/* Exchange v39 — table rows must never inherit 28px/grid clipping from the trade tape. */
.ex-trade-table tbody tr.ex-trade-row{
 display:table-row;height:auto;min-height:0;max-height:none;overflow:visible;
 contain:none;line-height:normal;white-space:normal;padding:0;
}
.ex-trade-table tbody tr.ex-trade-row td{height:auto;min-height:70px;max-height:none;overflow:visible;line-height:1.4}
.ex-trade-live-mark,.ex-trade-live-pnl{font-variant-numeric:tabular-nums;transition:color .15s}
.ex-trade-live-mark.is-stale{color:#889aa7}
@media(max-width:850px){
 .ex-trade-table tbody tr.ex-trade-row{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  height:auto;min-height:0;max-height:none;overflow:visible;contain:none;
  gap:0;padding:12px 14px;margin:10px;border:1px solid #294450;border-radius:10px;background:#111f2a;
 }
 .ex-trade-table tbody tr.ex-trade-row td{min-height:48px;padding:9px 8px}
}

.ex-allocation-hint{display:block;font-size:10px;color:#7898a0;line-height:1.5;margin:9px 0 0}

/* The positions panel is narrower than the page whenever the market sidebar and
   order ticket are present. Switch to labelled 4-column rows before the last
   column (Edit / Close) disappears behind horizontal overflow. */
@media (min-width:851px) and (max-width:1720px){
 .ex-bottom-empty.has-records .ex-account-list{overflow-x:hidden}
 .ex-trade-table,.ex-trade-table tbody{display:block;min-width:0;width:100%}
 .ex-trade-table thead{display:none}
 .ex-trade-table tbody tr.ex-trade-row{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;
  padding:8px 12px;margin:10px 12px;border:1px solid #294450;
  border-radius:9px;background:#111f2a;min-width:0;
 }
 .ex-trade-table tbody tr.ex-trade-row td{
  display:grid;align-content:center;gap:5px;min-width:0;min-height:61px;
  padding:9px 10px;white-space:normal;overflow-wrap:anywhere;border-bottom:1px solid #243a44;
 }
 .ex-trade-table tbody tr.ex-trade-row td::before{
  content:attr(data-label);color:#7f9ba8;font-size:10px;font-weight:550;
 }
 .ex-trade-table tbody tr.ex-trade-row td.ex-trade-contract::before{display:none}
 .ex-trade-table tbody tr.ex-trade-row td.ex-trade-cell--actions{
  grid-column:1/-1;min-width:0;border-bottom:0;min-height:47px;
 }
 .ex-trade-table tbody tr.ex-trade-row td.ex-trade-cell--actions::before{display:none}
 .ex-trade-actions{justify-content:flex-end;gap:8px}
 .ex-trade-table tbody tr.ex-trade-row td:first-child{padding-left:10px}
 .ex-trade-table tbody tr.ex-trade-row td:last-child{padding-right:10px}
}

/* v40: Fixed-size order panel; each order/position stays on ONE table row.
   On smaller viewports, scroll horizontally instead of switching to multi-line cards. */
.ex-bottom.ex-panel{min-height:370px;contain:layout}
.ex-bottom .ex-bottom-empty{height:318px;min-height:318px;max-height:318px;box-sizing:border-box}
.ex-bottom .ex-bottom-empty.has-records{height:318px;min-height:318px;max-height:318px;overflow:clip}
.ex-bottom .ex-bottom-empty.has-records>div{height:100%;min-height:0}
.ex-bottom .ex-bottom-empty.has-records .ex-account-list{width:100%;height:318px;max-height:318px;overflow:auto!important;overscroll-behavior:auto;scrollbar-gutter:stable}
.ex-bottom .ex-trade-table,.ex-bottom .ex-trade-table tbody{display:table;table-layout:fixed;min-width:1360px;width:1360px;border-collapse:separate;border-spacing:0}
.ex-bottom .ex-trade-table tbody{display:table-row-group;width:auto;min-width:0}
.ex-bottom .ex-trade-table--positions{min-width:1510px;width:1510px}
.ex-bottom .ex-trade-table thead{display:table-header-group}
.ex-bottom .ex-trade-table tbody tr.ex-trade-row{display:table-row!important;margin:0;padding:0;border:0;box-shadow:none;contain:none;height:68px;min-height:68px;max-height:68px;background:transparent}
.ex-bottom .ex-trade-table tbody tr.ex-trade-row td{display:table-cell!important;vertical-align:middle;height:68px;min-height:68px;max-height:68px;padding:8px 10px!important;border:0;border-bottom:1px solid #233742;white-space:nowrap;overflow:hidden;overflow-wrap:normal;text-overflow:ellipsis}
.ex-bottom .ex-trade-table tbody tr.ex-trade-row td::before{display:none!important}
.ex-bottom .ex-trade-table .ex-trade-cell--actions{min-width:210px;overflow:visible}
.ex-bottom .ex-trade-table .ex-trade-actions{display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:6px}
.ex-bottom .ex-trade-table--positions th:nth-child(1){width:175px}
.ex-bottom .ex-trade-table--positions th:nth-child(2){width:130px}
.ex-bottom .ex-trade-table--positions th:nth-child(3),.ex-bottom .ex-trade-table--positions th:nth-child(4){width:125px}
.ex-bottom .ex-trade-table--positions th:nth-child(5){width:130px}
.ex-bottom .ex-trade-table--positions th:nth-child(6){width:128px}
.ex-bottom .ex-trade-table--positions th:nth-child(7){width:150px}
.ex-bottom .ex-trade-table--positions th:nth-child(8){width:130px}
.ex-bottom .ex-trade-table--positions th:nth-child(9){width:280px}
.ex-bottom .ex-trade-table--orders th:nth-child(1),.ex-bottom .ex-trade-table--history th:nth-child(1){width:180px}
.ex-bottom .ex-trade-table--orders th:nth-child(7),.ex-bottom .ex-trade-table--history th:nth-child(7){width:195px}
.ex-bottom .ex-trade-table--orders th:nth-child(9),.ex-bottom .ex-trade-table--history th:nth-child(9){width:110px}
.ex-order-status-stack{display:grid;gap:5px;justify-items:start}
.ex-chart-live-title{display:inline-block;min-width:98px;font-size:12px;font-weight:750;color:#2edab0;font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:850px){
 .ex-bottom .ex-trade-table tbody tr.ex-trade-row{display:table-row!important;margin:0;padding:0;height:68px;min-height:68px;max-height:68px}
 .ex-bottom .ex-trade-table tbody tr.ex-trade-row td{display:table-cell!important;min-height:68px;max-height:68px;padding:8px 10px!important;white-space:nowrap}
 .ex-bottom .ex-bottom-empty.has-records .ex-account-list{overflow-x:auto!important}
}
/* Keep order identity and Cancel/Close actions accessible during horizontal scrolling. */
.ex-bottom .ex-trade-table th:first-child,.ex-bottom .ex-trade-table td:first-child{position:sticky;left:0;z-index:2;background:#101c27;box-shadow:6px 0 12px #07111b66}
.ex-bottom .ex-trade-table th:last-child,.ex-bottom .ex-trade-table td:last-child{position:sticky;right:0;z-index:2;background:#101c27;box-shadow:-6px 0 12px #07111b66}
.ex-bottom .ex-trade-table th:first-child,.ex-bottom .ex-trade-table th:last-child{z-index:4;background:#111d28}
.ex-bottom .ex-trade-table tbody tr.ex-trade-row:hover td:first-child,.ex-bottom .ex-trade-table tbody tr.ex-trade-row:hover td:last-child{background:#152a32}

/* v40 fixed table geometry: one colgroup controls both column headers and cells. */
.ex-bottom .ex-trade-table{table-layout:fixed;border-collapse:separate;border-spacing:0}
.ex-bottom .ex-trade-table--positions{width:1510px;min-width:1510px}
.ex-bottom .ex-trade-table--orders,.ex-bottom .ex-trade-table--history{width:1360px;min-width:1360px}
.ex-bottom .ex-trade-table col{box-sizing:border-box}
.ex-bottom .ex-trade-table thead,.ex-bottom .ex-trade-table tbody{display:table-header-group;width:auto;min-width:0}
.ex-bottom .ex-trade-table tbody{display:table-row-group}
.ex-bottom .ex-trade-table th,.ex-bottom .ex-trade-table td{box-sizing:border-box;min-width:0;max-width:none;width:auto!important;text-align:left;vertical-align:middle}
.ex-bottom .ex-trade-table .ex-trade-cell--fee{font-variant-numeric:tabular-nums;color:#66e9c1}
.ex-bottom .ex-trade-table .ex-trade-cell--fee .ex-trade-fee{white-space:nowrap}


/* v41 · Positions: every field, badge, value and action stays on ONE visual line.
   Keep a real table and colgroup so headers line up with values and scroll safely on mobile. */
.ex-bottom .ex-trade-table--positions{
 width:1311px;min-width:1311px;table-layout:fixed;
}
.ex-bottom .ex-trade-table--positions thead th{
 height:37px;padding:9px 8px;white-space:nowrap;font-size:10px;
}
.ex-bottom .ex-trade-table--positions tbody tr.ex-trade-row{
 height:52px;min-height:52px;max-height:52px;
}
.ex-bottom .ex-trade-table--positions tbody tr.ex-trade-row td{
 height:52px;min-height:52px;max-height:52px;
 padding:6px 8px!important;white-space:nowrap;vertical-align:middle;
}
.ex-bottom .ex-trade-table--positions .ex-trade-pair,
.ex-bottom .ex-trade-table--positions .ex-trade-value-stack{
 display:inline-flex;flex-direction:row;align-items:center;justify-content:flex-start;
 flex-wrap:nowrap;gap:5px;white-space:nowrap;vertical-align:middle;
}
.ex-bottom .ex-trade-table--positions .ex-trade-pair>strong{font-size:11px}
.ex-bottom .ex-trade-table--positions .ex-trade-pair-meta{
 display:inline-flex;align-items:center;flex-wrap:nowrap;gap:3px;
}
.ex-bottom .ex-trade-table--positions .ex-trade-pair-meta span{
 white-space:nowrap;font-size:9px;
}
.ex-bottom .ex-trade-table--positions .ex-trade-side,
.ex-bottom .ex-trade-table--positions .ex-trade-leverage{
 padding:2px 4px;
}
.ex-bottom .ex-trade-table--positions .ex-trade-value-stack strong{font-size:11px}
.ex-bottom .ex-trade-table--positions .ex-trade-value-stack small{font-size:9px}
.ex-bottom .ex-trade-table--positions .ex-trade-value-stack .ex-trade-tp,
.ex-bottom .ex-trade-table--positions .ex-trade-value-stack .ex-trade-sl{font-size:10px}
.ex-bottom .ex-trade-table--positions .ex-trade-cell{font-size:11px}
.ex-bottom .ex-trade-table--positions .ex-trade-actions{gap:4px}
.ex-bottom .ex-trade-table--positions .ex-trade-btn{
 min-height:28px;padding:5px 7px!important;font-size:10px!important;
}
.ex-bottom .ex-trade-table--positions .ex-position-close-size{
 height:28px;min-width:58px;padding:4px 3px;font-size:10px;
}
.ex-bottom .ex-trade-table--positions .ex-trade-cell--actions{min-width:0;overflow:visible}
/* The scroll container remains fixed; do not turn table rows into cards at narrower widths. */
@media(max-width:850px){
 .ex-bottom .ex-trade-table--positions{width:1311px;min-width:1311px}
 .ex-bottom .ex-trade-table--positions tbody tr.ex-trade-row,
 .ex-bottom .ex-trade-table--positions tbody tr.ex-trade-row td{
  height:52px;min-height:52px;max-height:52px;
 }
}

/* Avoid the sticky Actions cell covering Margin/PnL/TP when horizontal scrolling is required. */
.ex-bottom .ex-account-list{container-type:inline-size}
@container (max-width:1310px){
 .ex-bottom .ex-trade-table--positions th:last-child,
 .ex-bottom .ex-trade-table--positions td:last-child{
  position:static;box-shadow:none;
 }
}

/* v42: Quote in the TP/SL dialog updates on each ticker frame; delayed quotes are dimmed. */
.ex-stops-metric strong.is-stale{opacity:.58}

/* Allow wheel scrolling to return to the page at both ends of the Orders table. */
.ex-bottom .ex-bottom-empty.has-records .ex-account-list{overscroll-behavior-x:auto;overscroll-behavior-y:auto}


/* v43: Exactly one chart implementation is visible for each market. */
.ex-chart-mode [data-chart-engine][hidden]{display:none!important}

/* v43: TP and SL labels align on the same visual baseline. */
.ex-bottom .ex-trade-table--positions .ex-trade-value-stack:has(.ex-trade-tp){
 display:inline-flex;flex-flow:row nowrap;align-items:center;gap:8px;
}
.ex-bottom .ex-trade-table--positions .ex-trade-tp,
.ex-bottom .ex-trade-table--positions .ex-trade-sl{
 display:inline-flex;align-items:center;align-self:center;vertical-align:middle;
 height:17px;margin:0;padding:0;line-height:17px;font-size:10px;font-weight:650;white-space:nowrap;
}
/* TP and SL editor panels begin on the same row even if one contains an error. */
.ex-stops-panels{align-items:stretch}
.ex-stops-panels .ex-stops-panel{display:flex;flex-direction:column;align-self:stretch}
.ex-stops-panels .ex-stops-panel-heading{min-height:25px;align-items:center}
.ex-stops-panels .ex-stops-price-label{margin:0}

/* v43: Open Orders and Order History have the same fixed one-line geometry as Positions. */
.ex-bottom .ex-trade-table--orders,
.ex-bottom .ex-trade-table--history{width:1255px;min-width:1255px;table-layout:fixed}
.ex-bottom .ex-trade-table--orders thead th,
.ex-bottom .ex-trade-table--history thead th{height:37px;padding:9px 8px;white-space:nowrap;font-size:10px}
.ex-bottom .ex-trade-table--orders tbody tr.ex-trade-row,
.ex-bottom .ex-trade-table--history tbody tr.ex-trade-row{
 height:52px;min-height:52px;max-height:52px;
}
.ex-bottom .ex-trade-table--orders tbody tr.ex-trade-row td,
.ex-bottom .ex-trade-table--history tbody tr.ex-trade-row td{
 height:52px;min-height:52px;max-height:52px;padding:6px 8px!important;
 vertical-align:middle;white-space:nowrap;text-overflow:ellipsis;
}
.ex-bottom .ex-trade-table--orders .ex-trade-pair,
.ex-bottom .ex-trade-table--history .ex-trade-pair,
.ex-bottom .ex-trade-table--orders .ex-trade-value-stack,
.ex-bottom .ex-trade-table--history .ex-trade-value-stack,
.ex-bottom .ex-trade-table--orders .ex-order-status-stack,
.ex-bottom .ex-trade-table--history .ex-order-status-stack{
 display:inline-flex;flex-direction:row;align-items:center;justify-content:flex-start;
 flex-wrap:nowrap;gap:6px;white-space:nowrap;vertical-align:middle;
}
.ex-bottom .ex-trade-table--orders .ex-trade-pair strong,
.ex-bottom .ex-trade-table--history .ex-trade-pair strong,
.ex-bottom .ex-trade-table--orders .ex-trade-value-stack strong,
.ex-bottom .ex-trade-table--history .ex-trade-value-stack strong{font-size:11px;line-height:17px}
.ex-bottom .ex-trade-table--orders .ex-trade-pair small,
.ex-bottom .ex-trade-table--history .ex-trade-pair small,
.ex-bottom .ex-trade-table--orders .ex-trade-value-stack small,
.ex-bottom .ex-trade-table--history .ex-trade-value-stack small,
.ex-bottom .ex-trade-table--orders .ex-order-status-stack small{
 font-size:10px;line-height:17px;white-space:nowrap;
}
.ex-bottom .ex-trade-table--orders .ex-trade-status,
.ex-bottom .ex-trade-table--history .ex-trade-status,
.ex-bottom .ex-trade-table--orders .ex-trade-order-kind,
.ex-bottom .ex-trade-table--history .ex-trade-order-kind{padding:3px 5px;font-size:10px;white-space:nowrap}
.ex-bottom .ex-trade-table--orders .ex-trade-btn{min-height:28px;padding:5px 9px!important;font-size:10px!important}
.ex-bottom .ex-trade-table--orders .ex-trade-cell--actions,
.ex-bottom .ex-trade-table--history .ex-trade-cell--fee{min-width:0}
@media(max-width:850px){
 .ex-bottom .ex-trade-table--orders,
 .ex-bottom .ex-trade-table--history{width:1255px;min-width:1255px}
 .ex-bottom .ex-trade-table--orders tbody tr.ex-trade-row,
 .ex-bottom .ex-trade-table--history tbody tr.ex-trade-row,
 .ex-bottom .ex-trade-table--orders tbody tr.ex-trade-row td,
 .ex-bottom .ex-trade-table--history tbody tr.ex-trade-row td{
  height:52px;min-height:52px;max-height:52px;
 }
}
/* Avoid sticky rightmost actions covering real columns in narrow Orders containers. */
@container (max-width:1254px){
 .ex-bottom .ex-trade-table--orders th:last-child,
 .ex-bottom .ex-trade-table--orders td:last-child,
 .ex-bottom .ex-trade-table--history th:last-child,
 .ex-bottom .ex-trade-table--history td:last-child{
  position:static;box-shadow:none;
 }
}


/* v44 · The table must fill the Orders panel; fixed 1255/1311px widths left a
   blank strip on wider screens. Keep a minimum width for touch scrolling. */
.ex-bottom .ex-trade-table--positions{width:100%;min-width:1311px;max-width:none}
.ex-bottom .ex-trade-table--orders,
.ex-bottom .ex-trade-table--history{width:100%;min-width:1255px;max-width:none}
.ex-bottom .ex-bottom-empty.has-records .ex-account-list{
 width:100%;min-width:0;scrollbar-gutter:auto;
 overflow-x:auto!important;overflow-y:auto!important;
 -webkit-overflow-scrolling:touch;touch-action:pan-x pan-y;
}
/* Make room for DD-MM-YYYY HH:mm:ss UTC without truncating it. */
.ex-bottom .ex-trade-table--orders col:nth-child(7),
.ex-bottom .ex-trade-table--history col:nth-child(7){width:186px!important}
.ex-bottom .ex-trade-table--orders col:nth-child(8),
.ex-bottom .ex-trade-table--history col:nth-child(8){width:184px!important}
.ex-bottom .ex-trade-table .ex-trade-cell--timestamp{
 font-variant-numeric:tabular-nums;white-space:nowrap;
 font-size:10px;letter-spacing:0;
}
@media(max-width:850px){
 /* All three tabs stay single-row tables; the first column is sticky and the
    user can swipe horizontally to reach fee, TP/SL, and close controls. */
 .ex-bottom .ex-trade-table--positions{width:100%;min-width:1311px}
 .ex-bottom .ex-trade-table--orders,
 .ex-bottom .ex-trade-table--history{width:100%;min-width:1255px}
 .ex-bottom .ex-bottom-empty.has-records .ex-account-list{scrollbar-width:thin}
 .ex-bottom .ex-trade-table th,
 .ex-bottom .ex-trade-table td{font-size:10px}
 .ex-bottom .ex-trade-table th:first-child,
 .ex-bottom .ex-trade-table td:first-child{box-shadow:4px 0 9px #07111b77}
}
/* Mobile Orders uses the vertical space above the bottom navigation instead of
   stopping at 318px and leaving an empty half-screen. */
@media(max-width:850px){
 [data-mobile-view='orders'] .ex-bottom .ex-bottom-empty,
 [data-mobile-view='orders'] .ex-bottom .ex-bottom-empty.has-records{
  height:max(320px,calc(100dvh - 185px - env(safe-area-inset-bottom,0px)));
  min-height:max(320px,calc(100dvh - 185px - env(safe-area-inset-bottom,0px)));
  max-height:none;
 }
 [data-mobile-view='orders'] .ex-bottom .ex-bottom-empty.has-records .ex-account-list{
  height:100%;max-height:100%;
 }
 [data-mobile-view='orders'] .ex-bottom .ex-trade-table thead th{
  position:sticky;top:0;z-index:5;
 }
 [data-mobile-view='orders'] .ex-bottom .ex-trade-table thead th:first-child{
  z-index:6;
 }
}
@media(max-width:850px){
 /* Only the pair column stays pinned horizontally. Header cells remain sticky
    vertically without inheriting the old right-pinned last-column position. */
 [data-mobile-view='orders'] .ex-bottom .ex-trade-table thead th:last-child{
  right:auto;box-shadow:none;
 }
}

/* v45 · Mobile account cards: reference-style label/value rows.
   Desktop retains its fixed single-line trading tables. */
@media (max-width: 850px) {
  .ex-bottom .ex-bottom-empty.has-records {
    overflow: hidden;
    background: #0b131d;
  }
  .ex-bottom .ex-bottom-empty.has-records .ex-account-list {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 14px 12px 22px;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto;
    touch-action: pan-y;
    scrollbar-gutter: auto;
  }
  .ex-bottom .ex-trade-table,
  .ex-bottom .ex-trade-table--positions,
  .ex-bottom .ex-trade-table--orders,
  .ex-bottom .ex-trade-table--history {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: auto;
    border: 0;
    border-spacing: 0;
  }
  .ex-bottom .ex-trade-table colgroup,
  .ex-bottom .ex-trade-table thead { display: none !important; }
  .ex-bottom .ex-trade-table tbody {
    display: flex !important;
    width: 100%;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
  }
  .ex-bottom .ex-trade-table tbody tr.ex-trade-row,
  .ex-bottom .ex-trade-table--positions tbody tr.ex-trade-row,
  .ex-bottom .ex-trade-table--orders tbody tr.ex-trade-row,
  .ex-bottom .ex-trade-table--history tbody tr.ex-trade-row {
    display: block !important;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 3px 13px !important;
    border: 1px solid #2d554a;
    border-radius: 13px;
    background: linear-gradient(150deg,#13252b 0%,#101e27 100%);
    box-shadow: 0 5px 18px #00000024;
    overflow: hidden;
  }
  .ex-bottom .ex-trade-table tbody tr.ex-trade-row:hover {
    background: #14272d;
  }
  .ex-bottom .ex-trade-table tbody tr.ex-trade-row td,
  .ex-bottom .ex-trade-table--positions tbody tr.ex-trade-row td,
  .ex-bottom .ex-trade-table--orders tbody tr.ex-trade-row td,
  .ex-bottom .ex-trade-table--history tbody tr.ex-trade-row td {
    display: flex !important;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 11px 0 !important;
    margin: 0;
    border: 0;
    border-bottom: 1px solid #293d42;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere;
    text-overflow: clip !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: right;
    font-size: 12px !important;
    line-height: 1.4;
    box-shadow: none !important;
    position: static !important;
  }
  .ex-bottom .ex-trade-table tbody tr.ex-trade-row td::before {
    content: attr(data-label);
    display: block !important;
    flex: 0 0 auto;
    align-self: center;
    max-width: 42%;
    color: #93b3ad;
    font-size: 10px;
    font-weight: 760;
    letter-spacing: .06em;
    line-height: 1.3;
    text-align: left;
    text-transform: uppercase;
    white-space: normal;
  }
  .ex-bottom .ex-trade-table tbody tr.ex-trade-row td:first-child {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid #35544c;
  }
  .ex-bottom .ex-trade-table tbody tr.ex-trade-row td:last-child {
    border-bottom: 0;
    padding-bottom: 14px !important;
  }
  .ex-bottom .ex-trade-table .ex-trade-pair,
  .ex-bottom .ex-trade-table .ex-trade-value-stack,
  .ex-bottom .ex-trade-table .ex-order-status-stack {
    display: flex !important;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 70%;
    flex-direction: column !important;
    justify-content: center;
    align-items: flex-end !important;
    flex-wrap: wrap;
    gap: 3px;
    text-align: right;
    white-space: normal;
  }
  .ex-bottom .ex-trade-table .ex-trade-pair-meta {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
  }
  .ex-bottom .ex-trade-table .ex-trade-value-stack:has(.ex-trade-tp) {
    flex-direction: row !important;
    gap: 8px;
    align-items: center !important;
  }
  .ex-bottom .ex-trade-table .ex-trade-status,
  .ex-bottom .ex-trade-table .ex-trade-side,
  .ex-bottom .ex-trade-table .ex-trade-order-kind,
  .ex-bottom .ex-trade-table .ex-trade-leverage {
    max-width: 100%;
    white-space: normal;
    text-align: right;
  }
  .ex-bottom .ex-trade-table .ex-trade-cell--timestamp {
    font-size: 11px !important;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
  }
  .ex-bottom .ex-trade-table .ex-trade-actions {
    min-width: 0;
    max-width: 72%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
  }
  .ex-bottom .ex-trade-table .ex-trade-btn {
    min-height: 33px;
    font-size: 11px !important;
    padding: 7px 9px !important;
  }
  .ex-bottom .ex-trade-table .ex-position-close-size {
    height: 33px;
    min-width: 65px;
  }
}
@media (max-width: 360px) {
  .ex-bottom .ex-bottom-empty.has-records .ex-account-list { padding-left: 8px; padding-right: 8px; }
  .ex-bottom .ex-trade-table tbody tr.ex-trade-row,
  .ex-bottom .ex-trade-table--positions tbody tr.ex-trade-row,
  .ex-bottom .ex-trade-table--orders tbody tr.ex-trade-row,
  .ex-bottom .ex-trade-table--history tbody tr.ex-trade-row { padding-left: 10px !important; padding-right: 10px !important; }
  .ex-bottom .ex-trade-table tbody tr.ex-trade-row td::before { font-size: 9px; max-width: 40%; }
  .ex-bottom .ex-trade-table .ex-trade-actions { max-width: 73%; }
}

/* v50: Closed Futures fills share Order History with opening/cancelled orders. */
.ex-bottom .ex-trade-table--history .ex-trade-actions--history-close{flex-direction:column;align-items:flex-end;gap:3px;white-space:normal}
.ex-bottom .ex-trade-table--history .ex-trade-actions--history-close .ex-trade-fee{font-size:11px;white-space:normal;text-align:right}
.ex-trade-status[data-state='closed']{background:#183a32;color:#66dcb1}
.ex-trade-status[data-state='liquidated']{background:#3d2932;color:#e0a5b1}

/* v51: make the 99% wallet ceiling explicit instead of confusing margin with total debit. */
.ex-allocation-note{display:block;margin:9px 0 0;color:#8aa49e;font-size:10px;line-height:1.5}
