/* One plotting area, a shared time axis and a movable pane boundary. */
[hidden]{display:none!important}
.app>main.unified-chart,.terminal-embed .app>main.unified-chart{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:35px minmax(0,1fr) 23px;min-width:0;min-height:0;height:clamp(500px,82dvh,1000px);overflow:hidden;border:1px solid var(--line);border-radius:4px}
.terminal-embed .app>main.unified-chart{flex:1;height:auto}
.unified-chart>.chart-toolbar,.terminal-embed .unified-chart>.chart-toolbar{grid-column:1;grid-row:1;display:flex;justify-content:flex-end;align-items:center;padding:4px 10px;gap:0;border-bottom:1px solid var(--divider)}
.unified-chart .live-button{min-height:25px;padding:4px 10px;font-size:10px}
.chart-panes canvas:focus{outline:0}
.chart-panes{grid-column:1;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,var(--spread-fr,.32fr)) 10px minmax(0,var(--price-fr,.68fr));position:relative;min-width:0;min-height:0;overflow:hidden;isolation:isolate}
.unified-chart .chart-panes>.spread-panel,.terminal-embed .unified-chart .chart-panes>.spread-panel{grid-column:1;grid-row:1;height:auto;min-height:0;border:0;display:flex;flex-direction:column}
.unified-chart .spread-heading,.terminal-embed .unified-chart .spread-heading{min-height:27px;padding:5px 16px;display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px;font-size:9px;border:0;white-space:nowrap}
.unified-chart .spread-heading>span{font-size:9px;min-height:0}
.unified-chart .chart-panes>.chart-container,.terminal-embed .unified-chart .chart-panes>.chart-container{grid-column:1;grid-row:3;height:100%;min-height:0;min-width:0;border:0;touch-action:none;user-select:none}
.chart-divider{grid-column:1;grid-row:2;position:relative;cursor:row-resize;touch-action:none;user-select:none;background:#fff;z-index:6;outline:0}
.chart-divider:before{content:"";position:absolute;left:0;right:0;top:50%;height:1px;background:#5f6875}
.chart-divider:after{content:"";position:absolute;left:calc(50% - 22px);top:calc(50% - 2px);width:44px;height:5px;border-radius:3px;border:1px solid #5f6875;background:#dce2e8}
.chart-divider:hover,.chart-divider:focus-visible,.chart-divider.resizing{background:#eaf1f6}
.chart-divider:focus-visible:after,.chart-divider.resizing:after{background:#9daebd}
.unified-chart>.chart-footer,.terminal-embed .unified-chart>.chart-footer{grid-column:1;grid-row:3;padding:4px 10px;font-size:8px;min-width:0}
.shared-crosshair{position:absolute;width:0;border-left:1px dashed #63758a;z-index:4;pointer-events:none}
.cursor-time{position:absolute;bottom:5px;transform:translateX(-50%);z-index:5;pointer-events:none;background:#263240;color:#fff;font:9px var(--mono);white-space:nowrap;padding:3px 5px;border-radius:2px}
.chart-panes>#tooltip{z-index:7;pointer-events:none;max-width:calc(100% - 8px);font-size:10px}
@media(max-width:760px){.terminal-embed .app{padding:8px;gap:0}.chart-panes{grid-template-rows:minmax(0,var(--spread-fr,.32fr)) 14px minmax(0,var(--price-fr,.68fr))}.unified-chart .spread-heading,.terminal-embed .unified-chart .spread-heading{font-size:8px;min-height:29px;padding:4px 12px;white-space:normal;gap:5px}.unified-chart .spread-heading strong{max-width:54%}.unified-chart .spread-heading>span{font-size:8px;text-align:right}.app>main.unified-chart,.terminal-embed .app>main.unified-chart{grid-template-rows:34px minmax(0,1fr) 22px}.terminal-embed .unified-chart .chart-watermark{left:17px}}

.axis-zoom-button{position:absolute;top:4px;right:10px;z-index:5;width:40px;min-height:22px;padding:2px 4px;border:1px solid #929ca9;border-radius:3px;background:#fff;color:#263240;font:10px var(--mono);cursor:pointer}.axis-zoom-button[aria-pressed="true"]{color:#117853;background:#eaf7ef;border-color:#6eaa8c}.axis-zoom-button:disabled{opacity:.4;cursor:default}

.live-position{position:absolute;border-left:1px dashed #16836388;width:0;z-index:3;pointer-events:none}

/* Both panes accept direct pan gestures; their right axes accept vertical zoom drags. */
.chart-panes canvas{touch-action:none;user-select:none;-webkit-user-select:none}

/* Embedded charts share the terminal's single header and Live control. */
.terminal-embed .app>main.unified-chart{grid-template-rows:0 minmax(0,1fr) 22px;border:0;border-radius:0}
.terminal-embed .unified-chart>.chart-toolbar{display:none}
.terminal-embed .app{padding:0!important;gap:0}
