:root{color-scheme:dark;font:13px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#969ea4;background:#171b1e}*{box-sizing:border-box}body{margin:0}button,select{font:inherit;color:#c5cbcf;background:#20272c;border:1px solid #343e44;border-radius:6px;padding:8px 10px;min-height:36px}button{cursor:pointer}button:hover,select:hover{border-color:#5b747b}button:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid #3f9a72;outline-offset:3px}button:disabled,select:disabled{opacity:.45;cursor:default}a{color:inherit;text-decoration:none}a:hover{color:#d6dcdf}[hidden]{display:none!important}#app{min-height:100dvh;display:flex;flex-direction:column}#app[data-count="1"],#app[data-expanded]{height:100dvh}.page-head{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;border-bottom:1px solid #2a3237;flex-shrink:0}.brand{font-size:17px;letter-spacing:2px;color:#d0d7db}.brand strong{color:#57a785}nav{display:flex;gap:18px;align-items:center}.charts-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:21px;flex:1;min-height:0;min-width:0;padding:12px}.charts-grid[data-count="3"],.charts-grid[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr))}.chart-cell{display:flex;flex-direction:column;min-width:0;min-height:0;border:1px solid #343e44;border-radius:8px;overflow:hidden;position:relative}.charts-grid:not([data-count="1"]) .chart-cell.focused{border-color:#9a771f}.toolbar{display:flex;align-items:end;gap:12px;padding:10px 12px;border-bottom:1px solid #2a3237}label{display:flex;flex-direction:column;gap:5px;font-size:11px;min-width:0}select{min-width:90px;max-width:200px}.badge{align-self:center;margin-top:14px;color:#b0b9bf;font-size:10px;border:1px solid #343e44;border-radius:4px;padding:5px 7px;white-space:nowrap}.chart-actions{display:flex;justify-content:flex-end;gap:6px;padding:5px 12px 0}.chart-actions button{font-size:10px;min-height:25px;padding:4px 8px}.chart-actions [data-node=remove]{font-size:16px;padding:0 7px}.chart-panel{position:relative;display:flex;flex-direction:column;min-height:100px;flex:1}.chart-heading{min-height:30px;padding:7px 12px 4px;display:flex;justify-content:space-between;gap:10px;font-size:10px}[data-node=title]{font-weight:500;color:#b5bec3;min-width:0}[data-node=status]{text-align:right}[data-node=status][data-state=live]{color:#57a785}[data-node=status][data-state=reconnecting]{color:#d6a35e}[data-pending=true] [data-node=interval]{border-color:#d6a35e}.chart-canvas{flex:1;min-height:0}.charts-grid:not([data-count="1"]) .chart-canvas{height:clamp(260px,35svh,440px);min-height:260px;flex:none}.chart-empty{position:absolute;inset:32px 0 0;display:flex;align-items:center;justify-content:center;text-align:center;background:#171b1e;color:#adb7bd;padding:24px;line-height:1.6}footer{display:flex;justify-content:space-between;gap:10px;padding:8px 12px;border-top:1px solid #2a3237;font-size:10px;font-variant-numeric:tabular-nums}[data-node=ohlc]{overflow:hidden;white-space:nowrap;min-width:0}#auth-status{margin:24px}#app[data-expanded] .charts-grid{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}#app[data-expanded] .chart-cell .chart-canvas{height:auto;min-height:0;max-height:none;flex:1}.hold-indicator{position:absolute;pointer-events:none;width:61.6px;height:61.6px;border:2px solid white;border-radius:50%;transform:translate(-50%,-50%);z-index:3}.gesture-hint{font-size:9px;color:#aeb8be}.chart-cell[data-locked=true] .chart-canvas{touch-action:pan-y}
@media(max-width:760px){.charts-grid[data-count="3"],.charts-grid[data-count="4"]{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.page-head{padding:9px 12px}.brand{font-size:14px}nav{gap:10px;font-size:11px}nav button{padding:7px 9px}.charts-grid{padding:8px;gap:15px}.toolbar{padding:8px 10px;gap:7px;flex-wrap:wrap}.toolbar label{flex:1;min-width:78px}select{width:100%;min-width:0;max-width:none;padding:8px 4px}.badge{margin:0;width:100%;text-align:center;padding:3px}.chart-heading{padding:7px 10px 3px}.chart-actions{padding:4px 10px 0}footer{padding:7px 10px;font-size:9px}.gesture-hint{position:absolute;bottom:28px;left:10px;pointer-events:none;background:#171b1ecc;padding:3px}}
body[data-phone-portrait=true] #app:not([data-expanded]) .charts-grid:not([data-count="1"]){grid-template-columns:minmax(0,1fr);grid-auto-rows:calc((100dvh - 76px - 15px)/2);flex:none}
body[data-phone-portrait=true] #app:not([data-expanded]) .charts-grid:not([data-count="1"]) .chart-canvas{flex:1;height:auto;min-height:0}

/* One page exposure snapshot, contextual sidebar, per-cell current price levels. */
.view-shell{display:flex;flex:1;min-height:0;min-width:0;align-items:stretch}.exposure-panel{width:235px;flex-shrink:0;padding:12px 0 12px 12px;min-width:0}.exposure-panel[data-collapsed=true]{width:40px}.exposure-panel[data-collapsed=true] #exposure-body{display:none}#sidebar-toggle{width:100%;font-size:12px;padding:7px 5px;min-height:32px}#exposure-body{padding:12px 8px 0 0;overflow:auto;max-height:calc(100dvh - 120px)}#exposure-body select{width:100%;max-width:none}#exposure-body h2{font-size:13px;font-weight:500;display:flex;justify-content:space-between;margin:18px 0 10px}#exposure-status,.exposure-note{font-size:10px;line-height:1.5}.exposure-note{color:#78858d;margin-top:18px}.view-exposure-card{border:1px solid #343e44;border-radius:7px;position:relative;margin-bottom:10px;overflow:hidden}.view-exposure-card[data-side=long]{background:#3f9a7214}.view-exposure-card[data-side=short]{background:#af596214}.view-exposure-card[data-stale=true]{border-style:dashed}.view-exposure-card.selected{border-color:#9a771f}.exposure-select{display:block;width:100%;min-height:70px;border:0;border-radius:0;background:transparent;text-align:left;padding:10px 28px 10px 10px}.exposure-select:disabled{opacity:.7}.exposure-market{font-size:12px;font-weight:600}.exposure-account{font-size:10px;margin:4px 0 7px;color:#82929c;overflow-wrap:anywhere}.exposure-details{font-size:10px;line-height:1.8;font-variant-numeric:tabular-nums}.exposure-pnl[data-sign=positive]{color:#57a785}.exposure-pnl[data-sign=negative]{color:#cf7c83}.exposure-add{position:absolute;right:5px;top:5px;font-size:15px;border:0;background:transparent;min-height:22px;width:22px;padding:0}.exposure-add.open-elsewhere{border:1px solid #9a771f;border-radius:50%}.exposure-empty{font-size:11px;color:#78858d;padding:6px 0}.drawing-toggle{display:flex;flex-direction:row;align-items:center;gap:3px;font-size:9px;white-space:nowrap}.drawing-toggle input{accent-color:#3f9a72;margin:0}.chart-actions{flex-wrap:wrap;align-items:center}.level-legend{padding:5px 10px;border-top:1px solid #252c31;font-size:9px;line-height:1.7;max-height:62px;overflow:auto;display:flex;gap:3px 10px;flex-wrap:wrap}.level-legend span{white-space:nowrap}.level-legend [data-kind=sl]{color:#cf7c83}.level-legend [data-kind=tp]{color:#57a785}.level-legend [data-kind=limit]{color:#d6a35e}#app[data-expanded] .exposure-panel{display:none}
@media(max-width:760px){.view-shell{flex-direction:column}.exposure-panel,.exposure-panel[data-collapsed=true]{width:100%;padding:6px 8px 0}.exposure-panel[data-collapsed=true] #sidebar-toggle{min-height:28px;padding:4px}#exposure-body{max-height:35dvh;padding:6px 2px}#exposure-body h2{margin-top:10px}#view-positions,#view-orders{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px}.view-exposure-card{margin:0}.exposure-note{margin:8px 0}.level-legend{max-height:40px}.drawing-toggle{font-size:8px}}
body[data-phone-portrait=true] #app:not([data-expanded]) .charts-grid:not([data-count="1"]){grid-auto-rows:calc((100dvh - 110px - 15px)/2)}

.history-controls{display:flex;align-items:center;gap:10px;padding:4px 10px;font-size:9px;border-top:1px solid #252c31;min-width:0}.history-controls select{font-size:9px;min-height:24px;padding:3px;min-width:90px;max-width:58%}.history-controls span{min-width:0;color:#78858d}.chart-actions button[aria-pressed=true]{border-color:#9a771f;color:#eee}.chart-actions{row-gap:5px}@media(max-width:600px){.history-controls{font-size:8px;padding:3px 8px}.chart-actions{gap:4px}.chart-actions button{font-size:9px;padding:3px 5px}}

/* Per-cell local tools; reference tile height, gaps, colors and badge geometry. */
.chart-fib-tools{position:relative;z-index:7;height:20px;margin-right:9px;--fib-tools-background:rgba(32,36,40,.8)}.chart-fib-tools .chart-tools-toggle{height:20px;min-height:20px;display:flex;align-items:center;justify-content:center;gap:3px;padding:2px 4px;border:0;background:transparent;color:#969ea4;font-size:12px;font-weight:700;white-space:nowrap}.chart-tools-toggle:hover,.chart-tools-toggle:focus-visible{color:#fff}.chart-fib-menu{position:absolute;left:0;top:24px;width:146px;display:flex;flex-direction:column;gap:6px}.chart-fib-tools .chart-fib-choice{display:grid;grid-template-columns:22px 68px;justify-content:center;align-items:center;text-align:left;gap:6px;width:100%;height:46px;min-height:46px;flex:none;padding:6px;border:1px solid #343e44;border-radius:8px;background:var(--fib-tools-background);color:#969ea4;font-size:13px;font-weight:700;line-height:1;touch-action:manipulation}.chart-fib-choice span{white-space:nowrap}.chart-fib-choice svg{width:22px;height:22px;flex:none;color:inherit;pointer-events:none}.chart-fib-choice[data-fib-side=long][aria-checked=true] svg{color:#3f9a72}.chart-fib-choice[data-fib-side=short][aria-checked=true] svg{color:#af5962}.chart-fib-choice[aria-checked=true] span,.chart-fib-choice[data-fib-side=fix][aria-checked=true] svg{color:white}.fib-status{position:absolute;top:0;right:100%;max-width:150px;font-size:9px;line-height:1.3;color:#d6a35e;pointer-events:none}.fixed-fib-controls{position:absolute;inset:0;pointer-events:none;z-index:6}.fixed-fib-delete{position:absolute;transform:translate(-50%,-50%);width:20px;height:20px;min-height:20px;padding:0;border:0;background:transparent;color:#969ea4;pointer-events:auto;touch-action:manipulation}.fixed-fib-delete svg{display:block;width:20px;height:20px;pointer-events:none}.fixed-fib-delete:hover,.fixed-fib-delete:focus-visible{color:white}

@media(max-width:600px){.chart-fib-tools{margin-right:11px}}


.interval-info{font-size:9px;color:#78858d;padding:0 10px 3px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-height:0}.interval-info:empty{display:none}
