/* Chart workspace: scoped to the candle view; sphere visuals have their own lifecycle. */
.sr-chart-workspace,.sr-chart-legend,.sr-chart-workspace__details,.sr-chart-orderbook-host,.sr-market-zones{display:none}
#detached:has(.card[data-sphere-view="chart"]) .detached-frame{width:min(1600px,calc(100vw - 32px))!important;max-width:none!important}
#detached:has(.card[data-sphere-view="chart"]) .detached-hint{display:none!important}
#detached .card.detached[data-sphere-view="chart"]{width:100%!important;box-sizing:border-box;background:#07121e!important}
#detached .card.detached[data-sphere-view="chart"] .chart-shell{height:auto!important;padding:14px!important;gap:9px!important;border-radius:14px!important;background:#07121e!important;overflow:visible!important}
#detached .card.detached[data-sphere-view="chart"] .chart-wrapper{height:clamp(360px,59dvh,780px)!important;border:1px solid #2c4659!important;border-radius:10px!important;background:#07111c!important}
#detached .card.detached[data-sphere-view="chart"] .chart-radar{opacity:0!important}
#detached .card.detached[data-sphere-view="chart"] .overlay{filter:none!important}
#detached .card.detached[data-sphere-view="chart"] .sr-chart-workspace{display:flex;align-items:center;flex-wrap:wrap;gap:6px;color:#a8c6d7;font:600 12px Inter,system-ui,sans-serif}
#detached .card.detached[data-sphere-view="chart"] .sr-chart-workspace button{min-height:38px;padding:7px 12px;border:1px solid #30495f;border-radius:7px;background:#0e2232;color:#e2f1fa;cursor:pointer;font:600 12px Inter,system-ui,sans-serif;letter-spacing:0;box-shadow:none}
#detached .card.detached[data-sphere-view="chart"] .sr-chart-workspace button:first-child{border-color:#407c84;color:#7af5d8;background:#0e2a32}
.sr-chart-workspace button:hover,.sr-chart-workspace button:focus-visible{outline:2px solid #6dddc9;outline-offset:2px}
.sr-chart-workspace__title{margin-left:14px;margin-right:4px}
.sr-chart-workspace__status{color:#f6b66a;font-size:11px}
#detached .card[data-sphere-view="chart"] .sr-chart-legend{display:block;color:#a4c3d6;font:11px ui-monospace,Consolas,monospace;line-height:1.7;min-height:20px;overflow-wrap:anywhere}
#detached .card[data-sphere-view="chart"] .sr-chart-workspace__details{display:block;color:#8aaabe;font:11px Inter,system-ui,sans-serif}
.sr-chart-workspace__details summary{cursor:pointer;width:max-content;max-width:100%}
.sr-chart-workspace__details p{max-width:850px;margin:8px 0;line-height:1.6}
.sr-pattern-layer{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3;overflow:hidden}
.sr-pattern-trace,.sr-pattern-boundary{stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.sr-pattern-boundary{stroke-width:1.4;opacity:.7;stroke-dasharray:7 5}
.sr-pattern-glow{stroke-width:8;opacity:.13}
.sr-pattern-trace.is-revealing,.sr-pattern-boundary.is-revealing{animation:sr-pattern-build .95s cubic-bezier(.2,.65,.25,1) both}
@keyframes sr-pattern-build{from{stroke-dasharray:1;stroke-dashoffset:1}to{stroke-dasharray:1;stroke-dashoffset:0}}
.sr-pattern-node{fill:#07121e;stroke:currentColor;stroke-width:1.6}
.sr-pattern-candle{fill:currentColor;fill-opacity:.12;stroke:currentColor;stroke-width:1.5;stroke-dasharray:4 3}
.sr-pattern-zone{fill:currentColor;fill-opacity:.1;stroke:currentColor;stroke-width:1.5;stroke-dasharray:7 4}
.sr-pattern-leader{stroke:currentColor;stroke-width:.8;opacity:.55}
.sr-pattern-label-bg{fill:#081b28;fill-opacity:.96;stroke:currentColor;stroke-opacity:.5;stroke-width:.7}
.sr-pattern-label{fill:currentColor;font:600 11px Inter,system-ui,sans-serif}
.sr-pattern-caption{padding:9px 12px;background:#0d2230;border-left:2px solid #4b9eaa;color:#bbd4e3;font:12px/1.6 Inter,system-ui,sans-serif;border-radius:4px;max-width:100%;box-sizing:border-box}
.card:not(.detached) .sr-pattern-caption{font-size:10px;padding:5px 8px;max-height:52px;overflow:hidden}
#detached .card[data-sphere-view="chart"] .sr-market-zones{display:block;position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:2}
.sr-market-zone{position:absolute;box-sizing:border-box;overflow:hidden;border:0;background:linear-gradient(105deg,rgba(24,216,170,.13),rgba(18,128,119,.02));color:#51e3bf}
.sr-market-zone--bearish{background:linear-gradient(105deg,rgba(254,95,136,.12),rgba(143,50,91,.02));color:#ef859e}
.sr-market-zone--order-block::before{content:'';position:absolute;inset:0;background:repeating-linear-gradient(0deg,transparent 0 4px,currentColor 4px 5px);opacity:.07;animation:sr-zone-scan 4s linear infinite}
.sr-market-zone--fvg{background:transparent}
.sr-market-zone svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;opacity:.6}
.sr-market-zone svg rect{stroke:currentColor;stroke-width:1;vector-effect:non-scaling-stroke}
.sr-market-zone--fvg svg rect{stroke-dasharray:6 5;animation:sr-gap-flow 3s linear infinite}
.sr-market-zone span{position:absolute;top:2px;left:5px;font:600 9px Inter,system-ui,sans-serif;white-space:nowrap;background:#07121ecc;padding:1px 4px;border-radius:2px}
@keyframes sr-gap-flow{to{stroke-dashoffset:-44}}
@keyframes sr-zone-scan{to{transform:translateY(10px)}}
#detached .card[data-sphere-view="chart"] .sr-chart-orderbook-host{display:block}
.sr-depth-panel{display:grid;grid-template-columns:1fr auto;gap:5px 12px;border:1px solid #274354;padding:12px;border-radius:10px;background:linear-gradient(100deg,#0b2030,#071723);font-family:Inter,system-ui,sans-serif}
.sr-depth-heading{color:#d9edf6;font-size:12px;font-weight:650}
.sr-depth-state{color:#e7ae69;font-size:11px}
.sr-depth-state[data-state="live"]{color:#67d9b7}
.sr-depth-state[data-state="live"]::before{content:'';display:inline-block;margin-right:5px;width:5px;height:5px;border-radius:100%;background:currentColor;box-shadow:0 0 9px currentColor;animation:sr-depth-pulse 2s ease-in-out infinite}
.sr-depth-meta{grid-column:1/-1;color:#789caf;font:10px ui-monospace,monospace}
.sr-depth-rows{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;grid-auto-flow:column;grid-template-rows:repeat(5,auto);gap:3px 16px;font:11px ui-monospace,Consolas,monospace}
.sr-depth-row{display:flex;justify-content:space-between;gap:12px;padding:4px 6px;border-radius:3px;white-space:nowrap;min-width:0}
.sr-depth-row[data-side="bid"]{color:#6be0b9;background:#24a87e0e}
.sr-depth-row[data-side="ask"]{color:#fa94ad;background:#c75a7b0d}
.sr-depth-quantity{margin-left:auto;color:#a3bfce}
.sr-depth-side{opacity:.6;font-size:9px}
@keyframes sr-depth-pulse{50%{opacity:.4}}
@media(max-width:700px){
 #detached:has(.card[data-sphere-view="chart"]) .detached-frame{width:calc(100vw - 12px)!important}
 #detached .card.detached[data-sphere-view="chart"] .chart-shell{padding:7px!important;gap:7px!important}
 #detached .card.detached[data-sphere-view="chart"] .chart-wrapper{height:54dvh!important;min-height:340px!important}
 #detached .card.detached[data-sphere-view="chart"] .sr-chart-workspace{gap:5px}
 #detached .card.detached[data-sphere-view="chart"] .sr-chart-workspace button{min-height:40px;padding:6px 9px;font-size:11px}
 .sr-chart-workspace__title{display:none}
 .sr-pattern-caption{font-size:11px}
 .sr-depth-panel{padding:9px}
 .sr-depth-rows{gap:2px 7px;font-size:10px}
 .sr-depth-row{gap:5px;padding:4px 2px}
 .sr-depth-side{display:none}
}
@media(prefers-reduced-motion:reduce){.sr-pattern-trace,.sr-market-zone::before,.sr-market-zone svg rect,.sr-depth-state::before{animation:none!important}}
.sr-depth-plot{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden}
.sr-depth-band{position:absolute;min-height:1px;box-shadow:0 0 8px currentColor;opacity:.7;transition:width .2s ease,top .12s linear}
.sr-depth-band[data-side="bid"]{color:#45dfb3;background:#45dfb3}
.sr-depth-band[data-side="ask"]{color:#ff789f;background:#ff789f}
.sr-depth-plot-caption{position:absolute;bottom:30px;color:#90b1c5;font:9px Inter,system-ui,sans-serif;background:#07121ed9;padding:3px 6px;border-radius:4px}
@media(prefers-reduced-motion:reduce){.sr-depth-band{transition:none}}
