.replay-lab{margin-top:20px}.replay-lab *{box-sizing:border-box}.replay-lab label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:700;color:#573650}.replay-toolbar{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:12px;margin:18px 0}.replay-lab :is(select,input,textarea){width:100%;min-height:44px;border:1px solid #c4a9bd;border-radius:10px;background:#fff8ef;color:#51344c;padding:10px;font:inherit}.replay-lab textarea{min-height:80px;resize:vertical}.replay-chart-head{display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;padding:16px;background:#58304f;border-radius:16px 16px 0 0;color:#fff0e8}.replay-chart-head span{font-size:11px;line-height:1.7}.replay-chart-wrap{position:relative;border:1px solid #c4a9bd;background:#fcf5ed;border-radius:0 0 16px 16px;overflow:hidden}#replayCanvas{display:block;width:100%;height:370px;touch-action:none}#replayTooltip{position:absolute;top:8px;left:12px;right:88px;background:#58304fed;color:#fff3ec;font-size:11px;padding:8px;border-radius:8px;pointer-events:none}.replay-playback{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:14px}.replay-playback span{font-size:12px}.replay-lab button{cursor:pointer;font-size:12px}.replay-lab button:disabled{opacity:.45;cursor:default}.replay-lab :is(button,select,input,textarea):focus-visible{outline:3px solid #bd60ba;outline-offset:3px}.replay-message{min-height:24px;font-weight:700}.replay-metrics{display:grid;grid-template-columns:1fr 1fr 1.4fr;gap:12px;margin:18px 0}.replay-metrics>div{border:1px solid #c4a9bd;border-radius:14px;background:#f8ecf2;padding:16px;display:flex;flex-direction:column;gap:9px}.replay-metrics strong{font-size:18px;overflow-wrap:anywhere}.replay-trade-grid{display:grid;grid-template-columns:1fr 1.1fr;gap:16px}.replay-ticket,.replay-review{background:#fff5e8;border:1px solid #cbb697;border-radius:18px;padding:20px}.replay-lab h2{font-size:22px;margin:0}.replay-lab p{font-size:12px;line-height:1.7}.replay-levels{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.replay-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}#replayBuy{background:#7d419c}#replaySell{background:#b4407c}#replayJournal{max-height:310px;overflow:auto}#replayJournal article{border-bottom:1px solid #d6bdcb;padding:15px 0}#replayJournal p{overflow-wrap:anywhere;margin:7px 0}.replay-import{padding:0 16px 16px}.replay-import label{margin:12px 0}.replay-source a{color:#76476d;text-decoration:underline}.replay-source{margin-top:18px}body.dark-mode .replay-lab :is(label,strong,code){color:#51344c!important;-webkit-text-fill-color:#51344c!important}body.dark-mode .replay-chart-head :is(strong,span){color:#fff0e8!important;-webkit-text-fill-color:#fff0e8!important}@media(max-width:760px){.replay-toolbar{grid-template-columns:1fr 1fr}.replay-trade-grid{grid-template-columns:1fr}.replay-metrics{grid-template-columns:1fr 1fr}.replay-metrics>div:last-child{grid-column:1/-1}.replay-metrics strong{font-size:16px}.replay-ticket,.replay-review{padding:16px}.replay-chart-head{padding:12px}}
.terminal-chart-frame{display:grid;grid-template-columns:86px minmax(0,1fr);gap:10px}.terminal-chart-area{min-width:0}.terminal-draw-tools{display:flex;flex-direction:column;gap:7px;background:#eadde7;padding:9px;border:1px solid #c5adbf;border-radius:12px}.terminal-draw-tools button{padding:8px 4px;min-height:44px;background:#fff6ef;color:#65445e;border:1px solid #c5adbf;border-radius:7px}.terminal-draw-tools button[aria-pressed="true"]{background:#633d5c;color:#fff5ee}.terminal-chart-settings{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin:14px 0}.terminal-chart-settings label{min-width:150px}.terminal-chart-settings span{font-size:11px;max-width:220px}.replay-fidelity{max-width:390px;margin-bottom:12px}.replay-lab :is(select,input,textarea){font-size:16px}.trading-lab-page{padding:22px}.replay-chart-head{border-radius:10px 10px 0 0}.replay-chart-wrap{border-radius:0 0 10px 10px}.replay-lab .replay-ticket{border-radius:12px}.terminal-workspace{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:16px;align-items:start}.terminal-workspace .replay-ticket{margin-top:14px}.terminal-main{min-width:0}.replay-trade-grid{display:block;margin-top:16px}.replay-review{border-radius:12px}#replayBuy{background:#21876b}#replaySell{background:#c4495d}@media(max-width:1050px){.terminal-workspace{grid-template-columns:minmax(0,1fr)}.terminal-workspace .replay-ticket{margin:0}.terminal-draw-tools{flex-direction:row;flex-wrap:wrap}.terminal-chart-frame{grid-template-columns:1fr}.terminal-draw-tools button{flex:1 0 65px}.terminal-chart-settings span{max-width:none}.trading-lab-page{padding:14px}.replay-toolbar{grid-template-columns:1fr 1fr}}@media(max-width:430px){.replay-toolbar{grid-template-columns:1fr}.terminal-chart-settings label{min-width:0;flex:1}.replay-chart-head span{font-size:11px}.terminal-draw-tools button{flex-basis:72px}}
.chart-position-layer{position:absolute;inset:0;pointer-events:none;z-index:4}.chart-order-label{position:absolute;pointer-events:auto;transform:translateY(-50%);min-height:32px!important;padding:5px 9px!important;border:1px solid #ffffff80!important;border-radius:5px!important;color:#fff!important;font:700 12px system-ui!important;touch-action:none;cursor:ns-resize;box-shadow:0 2px 5px #0002}.chart-order-entry{cursor:default}.chart-protection-hint{position:absolute;top:0;left:8px;z-index:5;background:#4b284e;color:#fff;border-radius:5px;padding:6px 10px;font:12px system-ui;pointer-events:none}.replay-protection{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.replay-protection button{min-height:40px;font-size:13px!important}.replay-metrics{grid-template-columns:repeat(4,minmax(0,1fr))!important}@media(max-width:650px){.replay-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}.chart-order-label{font-size:11px!important}}
/* Dedicated terminal, scoped to this room. */
body.lab-terminal-open{background:#ead9eb!important}body.lab-terminal-open .app{max-width:none!important;width:100%!important;padding:0!important}body.lab-terminal-open .topbar,body.lab-terminal-open .bottom-nav,body.lab-terminal-open .mentor-launcher{display:none!important}body.lab-terminal-open #view-tradinglab{padding:0!important;max-width:none!important;width:100%;margin:0!important}.terminal-page{padding:0!important;border:0!important;border-radius:0!important;background:#ead9eb!important;max-width:none!important}.terminal-page>header{background:linear-gradient(115deg,#382341,#6b3e71);color:#f9e9fa!important;padding:12px 16px!important;display:flex;justify-content:space-between;align-items:center;margin:0!important;min-height:65px}.terminal-page>header h1{font:600 21px Georgia!important;margin:0!important;color:#f9e9fa!important}.terminal-page>header small{display:none}.terminal-page>header p{font:11px system-ui!important;letter-spacing:.08em;color:#ead5ed!important;margin:4px 0 0!important}.terminal-page>header button{background:#ffffff12!important;color:#f9e9fa!important;border:1px solid #b896b5!important;border-radius:6px!important;min-height:36px}.terminal-page .replay-lab{margin:0!important;padding:0!important}.terminal-page .lab-intro{display:none}.terminal-page .terminal-workspace{display:block;padding:0;gap:0}.terminal-page .replay-metrics{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:0;margin:0!important;background:#ead9eb;border-bottom:1px solid #cbb3cc}.terminal-page .replay-metrics>div{background:transparent!important;border:0!important;border-right:1px solid #cbb3cc!important;border-radius:0!important;padding:9px 10px!important;gap:4px!important;grid-column:auto!important;min-width:0}.terminal-page .replay-metrics small{font:8px system-ui;letter-spacing:.04em;color:#755c78}.terminal-page .replay-metrics strong{font:600 13px system-ui!important;color:#4b2d55}.terminal-page .replay-metrics>div:last-child{display:none}.terminal-page .replay-toolbar{display:flex!important;gap:4px;margin:0!important;padding:6px 8px;background:#e6d0e6;overflow-x:auto;border-bottom:1px solid #cbb3cc;align-items:center}.terminal-page .replay-toolbar label{font-size:0!important;min-width:0;flex:1}.terminal-page .replay-toolbar label:first-child{flex:1.8}.terminal-page .replay-toolbar select{border:0!important;background:#ead9eb!important;border-radius:5px!important;min-height:34px;padding:5px;font-size:12px!important;color:#4b2d55!important}.terminal-page .replay-toolbar label:nth-child(3){display:none}.terminal-page .replay-fidelity{display:none}.terminal-page .terminal-chart-settings{margin:0!important;padding:5px 8px;background:#efdfef;gap:8px;justify-content:end;border-bottom:1px solid #d6bfd5}.terminal-page .terminal-chart-settings label{font-size:0;min-width:0;flex:0 1 128px}.terminal-page .terminal-chart-settings select{font-size:11px!important;min-height:28px;padding:3px 6px;border-radius:4px;background:#f4eaf3}.terminal-page .terminal-chart-settings>span{display:none}.terminal-page .terminal-chart-frame{display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;gap:0!important}.terminal-page .terminal-draw-tools{display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;gap:0;padding:0;background:#d9bfdd;border:0;border-right:1px solid #cbb3cc;border-radius:0;overflow-y:auto;max-height:720px}.terminal-page .terminal-draw-tools button{flex:0 0 auto!important;width:47px;min-height:50px!important;border:0;border-bottom:1px solid #c4a5ca;border-radius:0;padding:4px 1px!important;background:transparent;color:#4b2d55;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:8px!important}.terminal-page .terminal-draw-tools .tool-symbol{font:24px system-ui;line-height:24px}.terminal-page .terminal-draw-tools button[aria-pressed=true]{background:#6b3e71;color:#fff!important}.terminal-page .replay-chart-head{background:#fff!important;border:0;border-radius:0!important;color:#4b2d55!important;padding:8px 10px!important;gap:3px!important;display:flex;flex-direction:column}.terminal-page .replay-chart-head strong{font:600 13px system-ui!important;color:#4b2d55!important;-webkit-text-fill-color:#4b2d55!important}.terminal-page .replay-chart-head span{font:9px system-ui!important;color:#91758f!important;-webkit-text-fill-color:#91758f!important}.terminal-page .replay-chart-wrap{background:#fff!important;border-radius:0!important;border:0!important}.terminal-page #replayCanvas{height:clamp(430px,calc(100dvh - 295px),720px);background:#fff}.terminal-page .replay-playback{margin:0!important;padding:6px 8px;background:#efdfef;gap:5px;flex-wrap:nowrap;overflow-x:auto;border-block:1px solid #d6bfd5}.terminal-page .replay-playback button{min-height:32px!important;padding:4px 8px!important;font-size:10px!important;border:1px solid #c4a5ca!important;border-radius:5px!important;background:#e7d0e6!important;color:#4b2d55!important;white-space:nowrap}.terminal-page #replayClock{font-size:9px;white-space:nowrap}.terminal-page .replay-message{margin:0;padding:4px 9px;min-height:20px!important;font:10px system-ui;color:#6c4b70;background:#efdfef}.terminal-page .terminal-ticket-toggle,.terminal-page .terminal-journal-toggle{width:100%;border:0;border-radius:0;background:#d9bfdd;color:#4b2d55;padding:9px;text-align:left;font-size:12px;font-weight:700}.terminal-page .replay-ticket{display:flex;flex-wrap:wrap;gap:7px;align-items:end;margin:0!important;background:#ead9eb;border:0;border-radius:0;padding:8px!important}.terminal-page .replay-ticket>h2,.terminal-page .replay-ticket>p,.terminal-page .replay-ticket>.replay-levels,.terminal-page .replay-ticket>.replay-protection,.terminal-page .replay-ticket>label:has(textarea){display:none}.terminal-page .replay-ticket>label{flex:1;max-width:160px;font-size:9px}.terminal-page .replay-ticket input{height:40px;min-height:40px;font-size:16px;background:#f9f2f8}.terminal-page .replay-actions{display:flex;flex:2;gap:5px;margin:0;flex-wrap:nowrap}.terminal-page .replay-actions button{flex:1;min-height:40px;padding:6px 8px;border-radius:6px;border:0;font-size:11px!important;color:#fff!important}.terminal-page #replayBuy{background:#79539a!important}.terminal-page #replaySell{background:#c3659b!important}.terminal-page #replayClose{background:#5b3b66!important}.terminal-page .ticket-expanded>.replay-levels,.terminal-page .ticket-expanded>.replay-protection,.terminal-page .ticket-expanded>label:has(textarea){display:flex;width:100%;max-width:none}.terminal-page .ticket-expanded>.replay-levels{gap:8px}.terminal-page .ticket-expanded .replay-levels label{flex:1}.terminal-page .terminal-journal{display:none;margin:0}.terminal-page .terminal-journal.journal-open{display:block}.terminal-page .replay-review{border-radius:0;padding:12px}.terminal-page .replay-lab>details,.terminal-page .replay-source{margin:8px 12px}.terminal-page .replay-lab>details:first-of-type{display:none}.terminal-page .replay-source{font-size:9px}@media(min-width:1050px){.terminal-page .terminal-workspace{display:grid;grid-template-columns:minmax(0,1fr) 275px}.terminal-page .terminal-ticket-toggle{display:none}.terminal-page .replay-ticket{display:block!important;align-self:stretch;padding:16px!important;border-left:1px solid #c4a5ca}.terminal-page .replay-ticket>h2,.terminal-page .replay-ticket>p,.terminal-page .replay-ticket>.replay-levels,.terminal-page .replay-ticket>.replay-protection,.terminal-page .replay-ticket>label:has(textarea){display:flex;max-width:none;gap:8px}.terminal-page .replay-ticket>label{max-width:none;margin:12px 0}.terminal-page .replay-actions{flex-wrap:wrap;margin-top:12px}.terminal-page .terminal-draw-tools{max-height:none}}@media(max-width:430px){.terminal-page .replay-toolbar label:first-child{flex:1.5}.terminal-page .replay-toolbar select{font-size:11px!important}.terminal-page .replay-metrics strong{font-size:12px!important}.terminal-page #replayClock{display:none}}

body.lab-terminal-open .ai-mentor-launch,body.lab-terminal-open .ai-mentor-launch-copy{display:none!important}
.terminal-page .terminal-account{display:flex;align-items:center;gap:8px;padding:6px 10px;background:#f1e4f0;border-bottom:1px solid #d7c2d7}.terminal-page .terminal-account label{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:9px}.terminal-page .terminal-account input{width:82px;min-height:30px;height:30px;padding:4px 7px;font-size:14px!important;border-radius:5px;background:#fff}.terminal-page .terminal-account button{min-height:30px;padding:4px 8px;background:#75537d;color:#fff;border:0;border-radius:5px;font-size:10px}.terminal-page .terminal-account>span{font-size:9px;color:#937699;margin-left:auto}.terminal-page .replay-metrics>div:has(#replayOpenPnl){background:linear-gradient(120deg,#eee0f2 5%,#d5b7e1 45%,#e6d29b 75%,#f2e5bd)!important}.terminal-page .replay-metrics>div:has(#replayOpenPnl) strong{color:#60436a!important;font-weight:800!important}.terminal-page .terminal-chart-settings{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;padding:5px 6px;gap:4px}.terminal-page .terminal-chart-settings label{flex:1;max-width:140px}.terminal-page .terminal-chart-settings button{flex:0 0 auto;min-height:28px;background:#e9d5e9;border:1px solid #cdb4cf;border-radius:5px;color:#68466e;font-size:10px;padding:3px 7px}.terminal-page .terminal-chart-settings button[aria-pressed=true]{background:#75537d;color:#fff}.terminal-page .terminal-draw-tools{max-height:calc(100dvh - 240px);scrollbar-width:thin}.chart-bottom-nav{position:absolute;bottom:40px;left:50%;transform:translateX(-50%);display:flex;gap:3px;padding:4px;border-radius:8px;background:#f8eff8e8;border:1px solid #d7bfd8;z-index:8;opacity:0;transition:opacity .15s}.replay-chart-wrap:hover .chart-bottom-nav,.replay-chart-wrap:focus-within .chart-bottom-nav{opacity:1}.terminal-page .chart-bottom-nav button{height:30px;min-height:30px!important;width:32px;border:0;border-radius:5px;background:#ead9ed;color:#694b70;font-size:19px;padding:0}.chart-tool-panel{position:absolute;z-index:20;left:8px;right:8px;top:35px;max-height:70%;overflow:auto;background:#fbf5fc;box-shadow:0 12px 35px #4a2f5540;border:1px solid #ccb0d1;border-radius:12px;padding:12px;display:flex;flex-wrap:wrap;gap:8px;align-content:start}.chart-tool-panel>strong{width:calc(100% - 75px);font-size:13px;color:#68466e}.chart-tool-panel>button{min-height:34px;background:#ecdbee;border:1px solid #cfb5d2;color:#68466e;border-radius:6px;font-size:12px;padding:6px 10px}.chart-tool-panel label{display:flex!important;flex-direction:row!important;align-items:center;justify-content:space-between;width:100%;font-size:12px!important;padding:5px;color:#68466e}.chart-tool-panel input[type=color]{width:90px;height:42px;padding:3px;background:#fff}.chart-tool-panel input[type=checkbox]{width:24px;min-height:24px}.chart-tool-panel .emoji-choice{font-size:25px!important;min-width:40px;background:#fff}.chart-gif{position:absolute;transform:translate(-50%,-50%);width:54px;height:54px;object-fit:contain;z-index:6;cursor:pointer}.chart-gif[hidden]{display:none}@media(hover:none){.chart-bottom-nav{opacity:1}}@media(max-width:430px){.terminal-page .terminal-account>span{display:none}.terminal-page .terminal-account label{font-size:8px}.terminal-page .terminal-chart-settings select{font-size:10px!important}.terminal-page .terminal-chart-settings button{font-size:9px;padding:3px 5px}}
.terminal-page .ticket-expanded>#replayUnitsInfo{display:block;font-size:10px;width:100%;margin:4px 0}.terminal-page #replayQuantityLabel{font-size:10px}

/* Editing and chart navigation polish. */
.terminal-page .terminal-draw-tools{scrollbar-width:none;overscroll-behavior:contain}.terminal-page .terminal-draw-tools::-webkit-scrollbar{display:none}.terminal-chart-settings{flex-wrap:wrap;gap:6px!important}.terminal-chart-settings label{min-width:0}.terminal-chart-settings select{max-width:160px}.chart-order-estimate{position:absolute;transform:translateY(-50%);padding:4px 7px;border-radius:5px;font:600 10px system-ui;background:#f8eef7;color:#73345f;pointer-events:none;white-space:nowrap}.chart-estimate-tp{background:#e4f5ed;color:#176b51}.chart-estimate-sl{background:#fbe7ee;color:#983451}.chart-order-entry{cursor:pointer!important}.position-action-menu{position:absolute;z-index:30;top:20px;right:90px;display:grid;gap:9px;padding:16px;border-radius:14px;background:#f9edf8;color:#56335f;box-shadow:0 8px 24px #50325435}.position-action-menu button{padding:9px;border:1px solid #c69bbd;border-radius:8px;background:#fff8fd;color:#713561}.chart-tool-panel p{grid-column:1/-1;font-size:12px;line-height:1.5}.chart-tool-panel input[type=url]{min-width:0;width:100%;padding:10px;border:1px solid #c59fbe;border-radius:8px}.chart-tool-panel input[type=color]{height:36px;min-width:48px}.terminal-page #replayCanvas{outline-offset:-3px}@media(max-width:600px){.terminal-chart-settings{display:flex!important;flex-wrap:wrap!important}.terminal-chart-settings>label{flex:1 1 110px}.terminal-chart-settings select{max-width:100%;width:100%}.chart-order-estimate{font-size:9px;padding:3px 4px}}

/* Preview v6: controls remain labeled and reachable at every width. */
.terminal-page .terminal-chart-settings{flex-wrap:wrap!important;justify-content:flex-start!important}.terminal-page .terminal-chart-settings label{font-size:9px!important;flex:1 1 130px!important;max-width:none!important;gap:3px}.terminal-page .terminal-chart-settings select{width:100%;max-width:none}.chart-reference-legend{display:flex;flex-wrap:wrap;gap:5px;padding:7px 9px;background:#f7edf5;color:#67485f;font:10px system-ui}.chart-reference-legend span{padding:3px 6px;border:1px solid #d4bed1;border-radius:5px}.terminal-page .chart-order-label[hidden],.chart-order-estimate[hidden],.chart-protection-hint[hidden]{display:none!important}.preview-revision{display:block;margin:0;padding:5px 12px;background:#fff2ca;color:#644b26;font:600 11px system-ui}

.terminal-page .terminal-draw-tools{background:linear-gradient(135deg,#9675ad,#bc8faa,#806798)!important}.terminal-page .replay-toolbar,.terminal-page .terminal-account,.terminal-page .replay-ticket{background:linear-gradient(115deg,#d0b9d9,#dbb7cf,#baa7cf)!important}.terminal-page .terminal-chart-settings,.terminal-page .replay-playback{background:linear-gradient(105deg,#d9c7df,#e8cddd)!important}.terminal-page>header{background:linear-gradient(110deg,#523c68,#865a88,#624f78)!important}

.terminal-page #replayCanvas{height:clamp(560px,calc(100dvh - 230px),1000px)!important}.terminal-page .terminal-draw-tools{max-height:calc(100dvh - 120px)!important}.terminal-platform-guide{margin:8px 12px;padding:10px;border:1px solid #c5a7c8;border-radius:8px;font-size:12px}.terminal-platform-guide>summary{cursor:pointer;font-weight:700}.terminal-platform-guide>.replay-source{margin:8px 0!important}@media(max-width:650px){.terminal-page #replayCanvas{height:78dvh!important;min-height:560px}.terminal-page .terminal-draw-tools{max-height:78dvh!important;min-height:560px}}

.terminal-page .replay-lab>.terminal-platform-guide{display:block!important}

.lab-strategy-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px;background:linear-gradient(110deg,#dcc9e4,#eed5e6);color:#56375e}.lab-strategy-controls label{font-size:11px!important}.lab-strategy-controls label:first-child{flex-direction:row;align-items:center}.lab-strategy-controls input[type=checkbox]{width:20px;min-height:20px}.lab-strategy-controls select{min-height:30px!important;padding:4px!important}.lab-strategy-controls button{min-height:36px;border:1px solid #b998c3;border-radius:7px;background:#78528c;color:#fff;font-size:11px;padding:7px}.lab-strategy-panel{padding:10px 12px;border-top:1px solid #c6abc8;background:#f8edf7;color:#5c3d64}.lab-strategy-panel[hidden]{display:none!important}.lab-strategy-panel p{font-size:12px;line-height:1.6;margin:7px 0}.lab-strategy-panel strong{font-size:13px}.lab-strategy-panel small{font-size:10px;color:#806887}.lab-coach-ai{white-space:pre-wrap;font-size:12px;line-height:1.65;padding-top:6px}.lab-strategy-panel details{font-size:11px;margin-top:8px}

/* Keep candle inspection in the ticker header, outside the plot. */
.terminal-page #replayTooltip{position:static;inset:auto;background:transparent;color:#694b70;padding:0;border-radius:0;font:10px/1.5 system-ui;min-height:15px;width:100%;pointer-events:none}.terminal-page #replayTooltip[hidden]{display:none!important}.terminal-page .replay-chart-head{min-height:57px}.terminal-page .lab-sound-control{flex-direction:row;align-items:center;gap:5px}.terminal-page .lab-sound-control input[type=checkbox],.terminal-page .session-label-control input{width:16px;min-height:16px;padding:0;accent-color:#895aa8}.terminal-page .lab-sound-control input[type=range]{width:65px;min-height:22px;padding:0;accent-color:#895aa8}.terminal-page .manual-order-fields{display:none;width:100%;border-bottom:1px solid #bd9bbf;padding-bottom:10px}.terminal-page .manual-order-fields label{margin:8px 0}.terminal-page .manual-order-fields p{font-size:10px;line-height:1.5;margin:7px 0}.terminal-page .manual-order-fields button{width:100%;min-height:36px;border:1px solid #ab86b2;border-radius:6px;background:#f2e6f3;color:#5a366c}.terminal-page .ticket-expanded .manual-order-fields{display:block}.terminal-page .session-label-control{flex-direction:row;align-items:center;min-width:auto}@media(min-width:1050px){.terminal-page .manual-order-fields{display:block}}

/* Order ticket: compact account strip, side selector and stacked price controls. */
.terminal-page .replay-ticket{background:linear-gradient(145deg,#f5edf6,#e4cfeb,#eed9e9)!important}.terminal-page .ticket-top{display:none;width:100%}.terminal-page .ticket-badge{font:700 9px system-ui;letter-spacing:1.3px;color:#86658e}.terminal-page .ticket-account{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:12px 0 16px}.terminal-page .ticket-account small{display:block;font-size:9px;color:#785b80}.terminal-page .ticket-account strong{display:block;font:600 14px system-ui;margin-top:5px;overflow-wrap:anywhere}.terminal-page .ticket-side{display:flex;margin-bottom:14px;border:1px solid #bda0c7;border-radius:9px;overflow:hidden}.terminal-page .ticket-side button{width:50%;border:0;border-radius:0;min-height:42px;background:transparent;color:#755b80;font-weight:800}.terminal-page #ticketBuySide[aria-pressed=true]{background:#9673b6;color:white}.terminal-page #ticketSellSide[aria-pressed=true]{background:#cb83af;color:white}.terminal-page .replay-ticket>.replay-actions #replayBuy,.terminal-page .replay-ticket>.replay-actions #replaySell{display:none}.terminal-page #ticketSubmit{background:linear-gradient(110deg,#9265ae,#ba74a5);color:#fff;min-height:44px}.terminal-page .ticket-size-presets{display:none;gap:6px;width:100%;margin:8px 0 14px}.terminal-page .ticket-size-presets button{flex:1;border:1px solid #b89ac3;background:#faf5fc;border-radius:6px;min-height:32px;color:#704f80}.terminal-page .ticket-size-presets[hidden]{display:none!important}.terminal-page .ticket-expanded .ticket-top{display:block}.terminal-page .ticket-expanded .ticket-size-presets{display:flex}.terminal-page .ticket-expanded>.replay-levels{display:block}.terminal-page .ticket-expanded .replay-levels label{margin:12px 0}.terminal-page .replay-ticket>h2{font-size:18px}.terminal-page .ticket-expanded .ticket-quantity{max-width:none;width:100%}.terminal-page .ticket-expanded .manual-order-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}.terminal-page .manual-order-fields>label:nth-of-type(3),.terminal-page .manual-order-fields>p,.terminal-page .manual-order-fields>button{grid-column:1/-1}@media(min-width:1050px){.terminal-page .terminal-workspace{grid-template-columns:minmax(0,1fr) 310px}.terminal-page .ticket-top{display:block}.terminal-page .ticket-size-presets{display:flex}.terminal-page .replay-ticket>.replay-levels{display:block}.terminal-page .replay-levels label{margin:12px 0}.terminal-page .manual-order-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}.terminal-page .replay-ticket>.replay-actions{display:flex;flex-direction:column}.terminal-page .replay-ticket>.ticket-quantity{max-width:none}}

/* Folding rail keeps the chart full-width and always offers a touch flap. */
.terminal-chart-frame{position:relative}.terminal-page .terminal-chart-frame.tools-folded{grid-template-columns:minmax(0,1fr);gap:0}.terminal-page .terminal-draw-tools[hidden]{display:none!important}.terminal-page .chart-tools-flap{position:absolute;left:0;top:50%;transform:translateY(-50%);z-index:21;width:22px;min-height:52px!important;padding:0!important;border:1px solid #b799c9;border-radius:0 9px 9px 0;background:#e5d3ed;color:#684478;font-size:24px;touch-action:manipulation}.terminal-page .terminal-chart-frame:not(.tools-folded) .chart-tools-flap{left:48px}.terminal-page .replay-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}@media(max-width:600px){.terminal-page .replay-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* One column after folding: override the original important two-column rule. */
.terminal-page .terminal-chart-frame.tools-folded{grid-template-columns:minmax(0,1fr)!important;gap:0!important}.terminal-page .terminal-chart-area{grid-column:2;grid-row:1}.terminal-page .tools-folded .terminal-chart-area{grid-column:1}.terminal-page .terminal-draw-tools{grid-column:1;grid-row:1;min-height:0!important;height:78dvh;max-height:78dvh!important;overflow-y:auto!important;scrollbar-width:thin;scrollbar-color:#b99bcc #745983;padding-bottom:12px!important}.terminal-page .terminal-draw-tools::-webkit-scrollbar{display:block;width:4px}.terminal-page .rail-scroll-controls{position:sticky;top:0;z-index:3;display:flex;background:#755784;flex-shrink:0}.terminal-page .rail-scroll-controls button{width:23px!important;min-height:32px!important;font-size:16px!important;color:#fff!important}.terminal-page .replay-metrics{grid-template-columns:repeat(5,minmax(0,1fr))!important}@media(max-width:600px){.terminal-page .replay-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important}}

/* Brief left-side guide: markup stays on the canvas after text dismisses. */
.terminal-page .lab-chart-coach{position:absolute;left:26px;top:12px;width:min(310px,calc(100% - 120px));max-height:calc(100% - 65px);overflow:auto;z-index:12;background:#fff9fdef;border:1px solid #b891ce;border-radius:12px;padding:11px;box-shadow:0 5px 18px #65437424;color:#573664;pointer-events:auto}.terminal-page .lab-chart-coach[hidden]{display:none!important}.lab-chart-coach header{display:flex;align-items:center;justify-content:space-between;gap:8px}.terminal-page .lab-chart-coach header button{min-height:30px;width:30px;padding:0;border:0;background:#e8d8ee;border-radius:6px;color:#634374;font-size:20px}.terminal-page .lab-chart-coach p{font-size:12px;line-height:1.5;margin:9px 0}.lab-chart-coach small{font-size:10px;color:#765a82}.terminal-page .lab-coach-panel-toggle{width:100%;text-align:left;background:#e0cbe8;border:0;border-radius:7px;color:#5b3b69;padding:9px;min-height:36px}.lab-strategy-panel.coach-details-folded>:not(.lab-coach-panel-toggle){display:none!important}@media(max-width:600px){.terminal-page .lab-chart-coach{left:23px;width:calc(100% - 110px);padding:8px}.terminal-page .lab-chart-coach p{font-size:11px}}

.lab-chart-coach footer{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:8px}.terminal-page .lab-chart-coach footer button{min-height:36px;padding:5px 10px;border:1px solid #b69ac6;border-radius:7px;background:#eadcf1;color:#60406f;font-size:12px}.terminal-page .lab-chart-coach footer button[aria-pressed=true]{background:#75518b;color:#fff}

.terminal-page #labExpandChart{margin-left:auto;min-height:32px;width:38px;border:1px solid #b99bc9;border-radius:6px;background:#e3cfe9;color:#624471;font-size:22px}body.chart-only-open{overflow:hidden!important}.replay-chart-wrap.chart-only-fullscreen{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-height:none!important;border:0!important;border-radius:0!important;z-index:100000!important;background:#fff}.replay-chart-wrap.chart-only-fullscreen #replayCanvas{width:100%!important;height:100dvh!important;max-height:none!important}.replay-chart-wrap.chart-only-fullscreen>:not(canvas):not(#labExitChart){display:none!important}#labExitChart{position:absolute;right:12px;top:12px;z-index:100001;background:#e6d5ed;color:#593b6a;border:1px solid #b59bc5;border-radius:8px;padding:8px 12px;min-height:36px}#labExitChart[hidden]{display:none!important}@media(max-width:800px),(hover:none){.terminal-page #labExpandChart{display:none}}

.lab-target-plan{padding:12px;background:#f5eaf5;border:1px solid #cbb1d0;border-radius:9px;margin:8px 0}.lab-target-plan[hidden]{display:none!important}.lab-target-plan summary{font-weight:700;color:#674171;cursor:pointer}.lab-plan-prices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.lab-target-plan input:invalid{outline:2px solid #c56386}.lab-target-plan p{font-size:12px}.lab-target-plan select{max-width:180px}

.lab-entry-log{padding:12px;margin:8px 0;border:1px solid #c7afd0;border-radius:9px;background:#f5ecf8}.lab-entry-log[hidden]{display:none!important}.lab-entry-log summary{font-weight:700;cursor:pointer}.lab-entry-records{max-height:220px;overflow:auto}.lab-entry-records p{border-bottom:1px solid #d8c6df;padding:5px 0}

/* Compact terminal header and fold-down settings. */
.terminal-page .replay-metrics{grid-template-columns:repeat(4,minmax(0,1fr))!important}.terminal-page .replay-toolbar{display:flex!important;flex-wrap:wrap;align-items:end;gap:8px;padding:8px!important}.terminal-page .replay-toolbar>label{flex:1 1 140px;min-width:90px!important}.terminal-page .replay-toolbar>#labTestSound{min-height:36px;border:1px solid #b998c3;border-radius:7px;background:#78528c;color:#fff;padding:6px 12px}.terminal-menu-bar{display:flex;flex-wrap:wrap;gap:6px;padding:7px 9px;background:linear-gradient(110deg,#e0cde5,#ecd7e7);position:relative;z-index:35}.terminal-menu{position:relative}.terminal-menu summary{cursor:pointer;list-style:none;padding:8px 12px;border:1px solid #ba9bc6;border-radius:8px;background:#f8eff9;color:#654473;font-size:12px;font-weight:700;min-height:34px}.terminal-menu summary::after{content:' ▾'}.terminal-menu[open]>summary{background:#79558c;color:#fff}.terminal-menu-content{position:absolute;left:0;top:calc(100% + 5px);width:min(420px,86vw);max-height:65dvh;overflow:auto;padding:12px;border:1px solid #b79bc6;border-radius:10px;background:#f7edf8;box-shadow:0 12px 28px #583b7130;display:flex;flex-wrap:wrap;align-items:center;gap:10px}.terminal-menu:not([open])>.terminal-menu-content{display:none}.terminal-menu:nth-last-child(-n+2)>.terminal-menu-content{left:auto;right:0}.terminal-page .terminal-menu-content label{min-width:120px;flex:1;font-size:11px}.terminal-page .terminal-menu-content button{min-height:36px;border:1px solid #b397c2;border-radius:7px;background:#e8d8ed;color:#674474;padding:7px 10px}.terminal-page .terminal-menu-content .lab-strategy-controls{padding:0;background:none;gap:10px}.terminal-page .terminal-menu-content .terminal-account{display:flex;flex-wrap:wrap;padding:0!important;background:none!important;border:0}.terminal-page .terminal-menu-content .lab-sound-control{min-width:220px}.terminal-page .ticket-position-status{padding:7px 0;color:#674675;font-size:12px}.terminal-page .ticket-position-status strong{display:block}.terminal-page .replay-chart-head{min-height:48px}@media(max-width:600px){.terminal-page .replay-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}.terminal-menu{position:static}.terminal-menu-content,.terminal-menu:nth-last-child(-n+2)>.terminal-menu-content{left:8px;right:8px;top:100%;width:auto}.terminal-menu summary{font-size:11px;padding:7px}.terminal-page .replay-toolbar>label{flex-basis:100px}}
