:root{--bg:#f4f6fa;--ink:#1b293e;--muted:#768296;--line:#e6eaf0;--blue:#2559e8;--green:#138576;--red:#d94b61;--nav:#101d32}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,"Noto Sans KR","Malgun Gothic",system-ui,sans-serif;font-size:14px;line-height:1.6}button,input,select{font:inherit}button,.file-button{border:1px solid #dbe1eb;border-radius:9px;background:white;padding:10px 16px;color:var(--ink);cursor:pointer;font-weight:600;transition:background .15s,transform .15s}button:hover{background:#edf2ff}button:active{transform:translateY(1px)}button:disabled{opacity:.4;cursor:default;transform:none}.primary{background:var(--blue);border-color:var(--blue);color:white}.primary:hover{background:#1948ce}.danger{color:var(--red);border-color:#f3cad1}input,select{display:block;border:1px solid #dbe1eb;border-radius:8px;padding:10px 12px;width:100%;color:var(--ink);background:white}input:focus,select:focus,button:focus-visible{outline:3px solid #abc2ff;outline-offset:2px}label{display:block;font-size:12px;color:#53617a;font-weight:600}label input,label select{margin-top:6px}label>span{float:right;color:#96a0b2;font-weight:400}.muted{color:var(--muted)}.tiny{font-size:11px;color:var(--muted);line-height:1.8}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:700;color:var(--blue);margin:0 0 8px}h1,h2,h3,p{margin-top:0}h1{font-size:29px;letter-spacing:-1.3px;line-height:1.3;margin-bottom:0}h2{font-size:17px;letter-spacing:-.5px;margin-bottom:14px}h3{font-size:18px}small{color:var(--muted)}[hidden]{display:none!important}.sidebar{position:fixed;width:212px;inset:0 auto 0 0;background:var(--nav);color:#c5cfde;padding:36px 22px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:14px;text-decoration:none;color:white;font-size:39px;font-weight:800;line-height:1}.brand>span{font-size:22px;letter-spacing:1px}.brand small{display:block;font-size:9px;letter-spacing:4px;margin-top:8px;color:#91a4c3}.nav-label{margin:57px 12px 13px;font-size:9px;letter-spacing:2px;color:#687d9c}nav button{display:flex;width:100%;gap:15px;text-align:left;border:0;background:transparent;color:#8fa2be;margin:7px 0;padding:13px 14px;font-size:13px}nav button.active,nav button:hover{background:#213654;color:white}nav button span{font-size:19px;line-height:1.1;color:#86a9ff}.side-bottom{margin-top:auto;font-size:12px}.side-bottom p{color:#8296b3;line-height:1.9;margin-top:20px}.side-bottom small{display:block;font-size:10px;margin-top:20px}.pill{display:inline-block;font-size:9px;letter-spacing:1.4px;color:#90b4ff;border:1px solid #38517a;border-radius:20px;padding:5px 10px}.text-button{background:transparent;border:0;padding:0;color:#9bb2d4}main{margin-left:212px;padding:34px 36px 20px;max-width:1840px}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:32px;gap:20px}.header-right{display:flex;align-items:center;gap:18px;font-size:12px;color:var(--muted)}.badge{display:inline-block;border:1px solid #d4e0f8;background:#edf3ff;color:#4770bb;padding:5px 10px;border-radius:20px;font-size:10px;white-space:nowrap}.badge.subtle{background:white;color:#8b96a8;border-color:var(--line)}.toolbar{display:flex;justify-content:space-between;gap:15px;align-items:center}.segmented{display:flex;padding:4px;background:#e7ebf2;border-radius:10px;flex-shrink:0}.segmented button{background:none;border:0;padding:8px 17px;font-size:12px;color:#7a869b}.segmented button.active{background:white;box-shadow:0 2px 5px #19376410;color:var(--ink)}.toolbar-right{display:flex;align-items:center;gap:10px}.toolbar-right select{width:230px;font-size:12px}.context-note{margin:17px 0 21px;border-left:2px solid #d5a347;padding-left:12px;display:flex;align-items:center;gap:10px;font-size:11px;color:var(--muted)}.context-note strong{color:#856e3e;white-space:nowrap}.dot{width:6px;height:6px;border-radius:50%;display:inline-block}.amber{background:#c79b40}.blue{background:var(--blue)}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:22px}.metrics article{background:white;padding:21px 23px;border:1px solid var(--line);border-radius:12px}.metrics label{font-size:11px}.metrics label span{font-size:8px;letter-spacing:1px;float:right}.metrics strong{display:block;font-size:32px;letter-spacing:-1px;line-height:1.4;margin:13px 0 4px;font-weight:650;font-variant-numeric:tabular-nums}.metrics small{font-size:10px}.desk-grid{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:22px;align-items:start}.panel{background:white;border:1px solid var(--line);border-radius:12px;padding:23px;margin-bottom:22px;overflow:hidden}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px}.panel-head h2{margin-bottom:0}.panel-head .muted{font-size:11px}.chart-panel{padding:24px}.chart-panel .panel-head{margin-bottom:15px}canvas{width:100%;display:block}#price-chart{height:285px}#wave-chart{height:125px}.chart-caption{font-size:10px;color:#7188b4;padding:8px 0}.positive{color:var(--green)}.negative{color:var(--red)}.subchart-head{border-top:1px solid var(--line);padding-top:16px;display:flex;justify-content:space-between;gap:10px;font-size:10px;color:var(--muted)}.subchart-head b{color:#677690}.subchart-head span{max-width:60%;text-align:right}.empty{min-height:285px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:20px}.empty p{color:var(--muted);font-size:12px}.empty h3{margin:10px 0}.empty-icon{width:44px;height:44px;border-radius:13px;background:#edf3ff;color:var(--blue);font-size:27px;display:grid;place-items:center}.empty button{font-size:12px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}form label{margin-bottom:16px}.rule-note{background:#f5f7fb;color:#63718a;font-size:11px;border-radius:8px;padding:12px;margin-top:16px}.right-stack .panel-head{margin-bottom:20px}.right-stack>.panel>button{width:100%;margin-top:9px}#progress{padding:0;margin:12px 0 15px;accent-color:var(--blue)}.play-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.play-controls span{font-size:11px;color:var(--muted);margin-right:auto}.play-controls button{font-size:11px;padding:8px 10px}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:11px}th{text-align:right;color:#8e99ab;font-size:10px;font-weight:500;padding:15px 8px;border-bottom:1px solid var(--line)}th:first-child,td:first-child{text-align:left}td{padding:12px 8px;text-align:right;border-bottom:1px solid #f0f3f7;font-variant-numeric:tabular-nums}.empty-row{text-align:center!important;color:#8e99ab;padding:40px}.trades-panel{margin-top:0}.section-intro{margin:15px 0 27px}.section-intro h2{font-size:23px;margin-bottom:6px}.section-intro p{color:var(--muted);font-size:13px}.data-layout{display:grid;grid-template-columns:1.3fr 1fr;gap:22px}.dropzone{border:1px dashed #bccce6;background:#f8faff;border-radius:10px;display:flex;align-items:center;flex-direction:column;text-align:center;padding:35px 20px;margin-bottom:22px}.dropzone.dragging{background:#e9f0ff;border-color:var(--blue)}.dropzone h2{margin:13px 0 4px}.dropzone p{font-size:12px;color:var(--muted)}.file-button{cursor:pointer;padding:9px 24px;background:white}.file-button input{display:none}.wide{width:100%}.format-help p{font-size:13px;line-height:1.9;color:#66758e}.format-help code{background:#f1f5fc;padding:2px 5px;color:#46679e;border-radius:4px}.dataset-item{display:flex;justify-content:space-between;align-items:center;gap:18px;border-bottom:1px solid var(--line);padding:16px 0}.dataset-item b{display:block}.dataset-item small{display:block;margin-top:5px}.dataset-item button{font-size:11px}.status-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-bottom:22px}.status-card{background:white;border:1px solid var(--line);border-radius:11px;padding:20px}.status-card h3{font-size:12px;color:var(--muted);margin-bottom:12px}.status-card strong{font-size:17px;display:block}.status-card p{font-size:11px;color:var(--muted);margin-top:10px;word-break:break-word}.status-card small{font-size:10px}.connection-form{max-width:850px}.check-label{display:flex;align-items:center;gap:10px}.check-label input{width:auto;margin:0}.log-row{display:grid;grid-template-columns:155px 105px 1fr;gap:15px;font-size:12px;border-bottom:1px solid var(--line);padding:13px 0}.log-row time{color:var(--muted)}.log-row b{font-size:10px;color:#5e7aa9}footer{display:flex;justify-content:space-between;gap:16px;color:#8d99ad;font-size:9px;margin-top:24px;border-top:1px solid #e0e6ef;padding-top:20px}footer b{font-weight:400;margin-left:5px}#notice{background:#e7f5ef;color:#1a7551;border:1px solid #c1e5d5;border-radius:9px;padding:12px 16px;margin:0 0 20px;font-size:13px}#notice.bad{background:#fff0f1;color:#a6394e;border-color:#efccd3}.login-screen{min-height:100vh;display:grid;place-items:center;background:radial-gradient(ellipse at 10% 10%,#e0eaff,transparent 60%),#f5f7fc;padding:30px}.login-card{width:100%;max-width:410px;background:white;border:1px solid var(--line);box-shadow:0 24px 80px #243d7510;border-radius:20px;padding:42px}.mark{background:var(--nav);color:white;width:56px;height:56px;display:flex;align-items:center;justify-content:center;font-size:32px;font-weight:800;border-radius:15px;margin-bottom:30px}.mark span{font-size:17px;color:#8fb0ff}.login-card h1{font-size:33px;margin-bottom:15px}.login-card .muted{margin-bottom:29px}.login-card button{width:100%;text-align:left}.login-card button span{float:right}.login-card small{font-size:10px}.error{color:var(--red);font-size:12px;margin:12px 0}
@media(min-width:1500px){main{padding:42px 55px}.desk-grid{grid-template-columns:minmax(0,1fr) 315px}#price-chart{height:345px}}
@media(max-width:1100px){.sidebar{width:175px;padding:30px 16px}main{margin-left:175px;padding:26px 22px}.desk-grid{grid-template-columns:minmax(0,1fr) 250px}.metrics article{padding:17px}.metrics strong{font-size:26px}.header-right #clock{display:none}.toolbar-right select{width:180px}.context-note{flex-wrap:wrap}.context-note>span:last-child{width:100%}}
@media(max-width:800px){.sidebar{position:sticky;top:0;width:100%;height:auto;z-index:3;padding:12px 16px;flex-direction:row;align-items:center;justify-content:space-between}.brand{font-size:29px;gap:8px}.brand>span{font-size:15px}.brand small{font-size:6px;margin-top:5px}.nav-label,.side-bottom{display:none}nav{display:flex;gap:4px}nav button{width:auto;font-size:11px;padding:8px;margin:0}nav button span{display:none}main{margin-left:0;padding:24px 16px}header{margin-bottom:25px}h1{font-size:24px}.eyebrow{font-size:8px}.toolbar{flex-wrap:wrap}.toolbar-right{width:100%}.toolbar-right select{flex:1;width:auto}.metrics{grid-template-columns:1fr 1fr;gap:10px}.metrics strong{font-size:29px}.desk-grid{grid-template-columns:1fr}.right-stack{display:grid;grid-template-columns:1fr;gap:0}.panel{padding:19px}.data-layout{grid-template-columns:1fr}.status-grid{grid-template-columns:1fr}.status-card{padding:15px}.status-card strong{font-size:15px}.status-card p{margin-bottom:5px}.log-row{grid-template-columns:100px 70px 1fr;font-size:10px;gap:8px}.log-row time{font-size:9px}.header-right{gap:0}.header-right .badge{font-size:9px}footer{flex-wrap:wrap;line-height:1.8}#price-chart{height:250px}#wave-chart{height:110px}.subchart-head{font-size:9px}.chart-panel{padding:16px}.context-note{font-size:10px}}

/* Dedicated chart workspace, independent from ledger controls. */
.chart-panel{background:#08131f;color:#e4edf8;border-color:#263b50}.chart-panel h2,.chart-panel h3{color:#e4edf8}.chart-panel .eyebrow{color:#55a6f4}.chart-panel .muted,.chart-caption,.subchart-head{color:#98abc1}.chart-panel button{background:#12273b;color:#dce9f8;border:1px solid #31536d}.chart-panel button.primary{background:#2378e7}.chart-panel .panel-head{gap:12px;flex-wrap:wrap}.chart-actions{display:flex;align-items:center;gap:7px}.chart-actions button{padding:7px 10px}.chart-panel #price-chart{height:380px}.chart-panel #wave-chart{height:270px}.chart-caption,.subchart-head{border-color:#263b50}.subchart-head{gap:10px;flex-wrap:wrap}.subchart-head button{padding:5px 9px}.chart-panel.expanded{position:fixed;inset:12px;z-index:1000;overflow:auto;padding:24px}.chart-panel.expanded #price-chart{height:43vh}.chart-panel.expanded #wave-chart{height:32vh}.chart-panel.wave-focus #price-chart,.chart-panel.wave-focus .chart-caption,.chart-panel.wave-focus #replay-controls{display:none!important}.chart-panel.wave-focus #wave-chart{height:73vh}.chart-panel.wave-focus .subchart-head{margin-top:18px}.chart-panel .empty p{color:#91a8c0}body.chart-open{overflow:hidden}
@media(max-width:650px){.chart-panel.expanded{inset:0;padding:12px}.chart-panel #price-chart{height:300px}.chart-panel #wave-chart{height:250px}.chart-actions{flex-wrap:wrap}.chart-panel.wave-focus #wave-chart{height:66vh}}
/* Theme and adjustable chart proportions. Preferences stay in this browser. */
:root[data-theme=dark]{color-scheme:dark;--bg:#080f1b;--ink:#e1eaf6;--muted:#9aabc2;--line:#293a50;--green:#24d8aa;--red:#ff728b;--blue:#78a8ff;--nav:#0c1626}
[data-theme=dark] .panel,[data-theme=dark] .metrics article,[data-theme=dark] .status-card,[data-theme=dark] .login-card{background:#111e30;border-color:var(--line)}
[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] button,[data-theme=dark] .file-button{background:#17283e;border-color:#354b66;color:#e1eaf6}
[data-theme=dark] button:hover{background:#243d59}[data-theme=dark] .primary{background:#316ce7;border-color:#316ce7;color:#fff}[data-theme=dark] .primary:hover{background:#427af0}
[data-theme=dark] label,[data-theme=dark] .subchart-head b{color:#b8c9df}[data-theme=dark] .rule-note,[data-theme=dark] .segmented{background:#0c1727;color:#adbed4}
[data-theme=dark] .segmented button.active{background:#294361;color:#fff}[data-theme=dark] .badge{background:#182e49;border-color:#345478;color:#acccff}
[data-theme=dark] .danger{color:#ff8a9c;border-color:#754356}[data-theme=dark] .empty-icon{background:#1e3656;color:#94bbff}
[data-theme=dark] #notice{background:#12372e;color:#a6f1d6;border-color:#2b6957}[data-theme=dark] #notice.bad{background:#43202a;color:#ffc0cd;border-color:#784556}
[data-theme=dark] th{background:#14243a;color:#bacde3}[data-theme=dark] td,[data-theme=dark] th{border-color:#293a50}[data-theme=dark] .dropzone{background:#0c1727;border-color:#3f5f83}
[data-theme=dark] .context-note strong{color:#dfbe79}[data-theme=dark] .login-screen{background:#080f1b}
[data-theme=light] .chart-panel{background:#fff;color:#21344b;border-color:#dce4ed}[data-theme=light] .chart-panel h2,[data-theme=light] .chart-panel h3{color:#21344b}
[data-theme=light] .chart-panel button{background:#edf3fb;color:#263e5c;border-color:#cad8e9}[data-theme=light] .chart-panel .muted,[data-theme=light] .chart-caption,[data-theme=light] .subchart-head{color:#536b86;border-color:#dce4ed}
[data-theme=light] .chart-panel .eyebrow{color:#2862ad}[data-theme=light] .chart-panel .empty p{color:#657a91}
#theme-toggle{white-space:nowrap;padding:7px 12px;font-size:12px}header .header-right{flex-wrap:wrap;justify-content:flex-end;gap:10px}
.chart-panel{--chart-total:650px;--price-ratio:.58;--wave-ratio:.42}
.chart-panel #price-chart{height:calc(var(--chart-total)*var(--price-ratio))}
.chart-panel #wave-chart{height:calc(var(--chart-total)*var(--wave-ratio))}
.chart-panel.expanded{--chart-total:70vh}
.chart-panel.wave-focus #wave-chart{height:73vh}
#chart-divider{height:30px;display:flex;align-items:center;justify-content:center;gap:9px;cursor:row-resize;touch-action:none;user-select:none;color:#8098b2;font-size:10px;border-top:1px solid #34506b;border-bottom:1px solid #34506b;border-radius:4px;margin:5px 0 10px}
#chart-divider span{font-size:25px;line-height:10px}#chart-divider:hover,#chart-divider:focus-visible{background:#254564;color:#fff;outline:2px solid #6ca6e9;outline-offset:1px}
[data-theme=light] #chart-divider{border-color:#d5e0ec;color:#526e8a}[data-theme=light] #chart-divider:hover,[data-theme=light] #chart-divider:focus-visible{background:#e5effb;color:#23466b}
.wave-focus #chart-divider{display:none}.resizing{user-select:none;cursor:row-resize}
@media(max-width:650px){.chart-panel{--chart-total:550px}.chart-panel.expanded{--chart-total:68vh}.chart-panel.wave-focus #wave-chart{height:66vh}#chart-divider{height:38px}.header-right #clock{display:none}}

#price-chart,#wave-chart{touch-action:pan-x}.subchart-head button{flex-shrink:0}.chart-actions{flex-wrap:wrap}

/* LSWT_QUICK_STATE_V1 */
.quick-state{margin:0 0 20px;padding:16px 20px!important;border:1px solid var(--line);border-radius:14px;color:var(--ink)}.quick-top,.quick-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px}.quick-top>div{display:flex;align-items:center;gap:9px}.quick-top a{color:var(--blue);text-decoration:none;font-size:12px}.quick-top strong{font-size:16px}.quick-top #quick-market{font-size:12px;color:var(--muted)}.quick-dot{width:8px;height:8px;border-radius:50%;background:#d3a347;flex-shrink:0}.quick-state[data-health=fresh] .quick-dot{background:var(--green)}.quick-state[data-health=stale] .quick-dot,.quick-state[data-health=error] .quick-dot{background:var(--red)}.quick-cells{display:grid;grid-template-columns:1fr 1.45fr 1fr 1fr 1fr;margin:14px 0;gap:14px}.quick-cells>div{min-width:0;border-left:1px solid var(--line);padding-left:14px}.quick-cells>div:first-child{border:0;padding-left:0}.quick-cells small,.quick-cells span{display:block;font-size:11px;color:var(--muted)}.quick-cells b{display:block;font-size:17px;margin:3px 0;font-weight:650;overflow-wrap:anywhere}.quick-bottom{border-top:1px solid var(--line);padding-top:8px;font-size:11px;color:var(--muted)}.quick-state[data-health=stale] #quick-action,.quick-state[data-health=error] #quick-action{color:var(--red)}@media(max-width:1100px){.quick-cells{grid-template-columns:repeat(3,minmax(0,1fr))}.quick-bottom{align-items:flex-start;flex-direction:column;gap:2px}}@media(max-width:600px){.quick-state{padding:14px!important}.quick-cells{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.quick-cells b{font-size:15px}.quick-top{align-items:flex-start}.quick-top>div{flex-wrap:wrap}.quick-top a{white-space:nowrap}.quick-cells>div{padding-left:0;border-left:0}}

/* LSWT_CHART_PAN_V1 */
#chart-divider{position:relative;height:4px;min-height:4px;margin:2px 0;background:transparent;border:0;border-radius:0;font-size:0;gap:0;color:transparent;overflow:visible;z-index:2}
#chart-divider span{font-size:0}
#chart-divider::before{content:'';position:absolute;left:0;right:0;top:-7px;bottom:-7px;background:linear-gradient(var(--line,#34506b),var(--line,#34506b)) center/100% 1px no-repeat}
#chart-divider::after{content:'';position:absolute;left:0;right:0;top:50%;height:1px;background:transparent;pointer-events:none}
#chart-divider:hover,#chart-divider:focus-visible{background:transparent;outline:none;color:transparent}
#chart-divider:hover::after,#chart-divider:focus-visible::after{background:#6ca6e9}
@media(pointer:coarse){#chart-divider::before{top:-11px;bottom:-11px}}


/* LSWT_LIVE_PROFIT_V1 */
#live-profit{margin:0 0 20px;padding:18px 22px;color:var(--ink)}#live-profit[hidden]{display:none}.profit-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.profit-grid small,#profit-note,.profit-foot{display:block;color:var(--muted);font-size:12px}.profit-grid strong{display:block;font-size:30px;margin:7px 0 12px}.profit-foot{font-size:11px;margin-top:5px}@media(max-width:650px){.profit-grid{grid-template-columns:1fr;gap:5px}.profit-grid strong{font-size:25px}}

/* LSWT_RISK_CAP_V1 */
#risk-cap-status{padding:18px 22px;margin:0 0 20px;color:var(--ink)}#risk-cap-status[hidden]{display:none}.risk-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.risk-grid strong{display:block;font-size:20px;margin-top:6px}#risk-cap-status small{font-size:11px;color:var(--muted)}#risk-reason{font-size:13px;margin:12px 0 5px}@media(max-width:800px){.risk-grid{grid-template-columns:1fr 1fr}}
/* Expanded charts use the same draggable split ratios as the normal view. */
.chart-panel.expanded:not(.wave-focus) #price-chart{height:calc(var(--chart-total)*var(--price-ratio))}
.chart-panel.expanded:not(.wave-focus) #wave-chart{height:calc(var(--chart-total)*var(--wave-ratio))}
.chart-panel.expanded:not(.wave-focus) #chart-divider{display:flex;cursor:row-resize;touch-action:none}

/* LSWT_THIN_DIVIDER_RISK5 */
#chart-divider{position:relative;height:4px;min-height:4px;margin:2px 0;background:transparent;border:0;border-radius:0;font-size:0;gap:0;color:transparent;overflow:visible;z-index:2}
#chart-divider span{font-size:0}
#chart-divider::before{content:'';position:absolute;left:0;right:0;top:-7px;bottom:-7px;background:linear-gradient(var(--line,#34506b),var(--line,#34506b)) center/100% 1px no-repeat}
#chart-divider::after{content:'';position:absolute;left:0;right:0;top:50%;height:1px;background:transparent;pointer-events:none}
#chart-divider:hover,#chart-divider:focus-visible{background:transparent;outline:none;color:transparent}
#chart-divider:hover::after,#chart-divider:focus-visible::after{background:#6ca6e9}
@media(pointer:coarse){#chart-divider::before{top:-11px;bottom:-11px}}

/* LSWT_CHART_FOCUS_V1 */
.chart-panel{padding:8px;border-radius:3px}.chart-panel>.panel-head{margin:0;min-height:36px;gap:8px}.chart-panel>.panel-head .eyebrow{display:none}.chart-panel #chart-title{font-size:13px;margin:0;white-space:nowrap}.chart-panel #chart-count{display:none}.chart-actions{gap:4px}.chart-actions button,.chart-tool-menu>summary{font-size:11px;padding:4px 8px;white-space:nowrap}.chart-tool-menu{position:relative}.chart-tool-menu>summary{cursor:pointer;list-style:none;border:1px solid var(--line);border-radius:4px}.chart-tool-content{display:none}.chart-tool-menu[open]>.chart-tool-content{display:flex;flex-wrap:wrap;position:absolute;right:0;top:30px;width:min(440px,85vw);max-height:70vh;overflow:auto;gap:8px;padding:12px;background:var(--bg);border:1px solid var(--line);box-shadow:0 8px 25px #0006;z-index:1010}.chart-tool-content>.subchart-head,.chart-tool-content>#chart-caption,.chart-tool-content>#replay-controls{width:100%;margin:0}.chart-panel.expanded{inset:0!important;padding:0!important;border:0!important;border-radius:0!important;overflow:hidden;display:flex;flex-direction:column;height:100dvh;max-height:100dvh}.chart-panel.expanded>.panel-head{flex:0 0 auto;padding:3px 8px;min-height:36px}.chart-panel.expanded>canvas{flex:none;width:100%;display:block;margin:0!important;min-height:0!important}.chart-panel.expanded:not(.wave-focus)>#price-chart{height:calc(var(--chart-total)*var(--price-ratio))!important}.chart-panel.expanded:not(.wave-focus)>#wave-chart{height:calc(var(--chart-total)*var(--wave-ratio))!important}.chart-panel.expanded>#chart-divider{flex:0 0 4px;height:4px;min-height:4px;margin:0!important}.chart-panel.expanded.wave-focus>#wave-chart{height:var(--chart-total)!important}.chart-panel.expanded>#empty-chart{position:absolute;inset:40px 0 0}.chart-tool-content #forecast-caption{overflow-wrap:anywhere}.chart-tool-content .subchart-head{display:flex!important}.chart-panel canvas{touch-action:none}@media(max-width:650px){.chart-panel>.panel-head{flex-wrap:wrap}.chart-panel #chart-title{font-size:11px}.chart-actions button,.chart-tool-menu>summary{font-size:10px;padding:4px 6px}}

/* LSWT_CUSTOM_CHART_V1 */
.custom-chart-time,.custom-chart-time label{display:flex;align-items:center;gap:4px;margin:0}.custom-chart-time label{font-size:11px;color:inherit}.custom-chart-time input{width:58px;height:28px;padding:3px 5px;margin:0;font-size:12px}.custom-chart-time{position:relative}.custom-chart-time span{position:absolute;top:100%;right:0;max-width:85vw;background:var(--bg);color:var(--muted);font-size:10px;white-space:nowrap;z-index:1010;padding:1px 5px}.custom-chart-time span:empty{display:none}

/* LSWT_AVERAGE_ENTRY_V1 */
#live-profit .profit-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
#profit-average-entry{font-size:clamp(17px,1.7vw,27px);overflow-wrap:anywhere}
@media(max-width:1100px){#live-profit .profit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){#live-profit .profit-grid{grid-template-columns:1fr}}

/* Persistent paper-test status, including expanded chart. */
#test-mode-banner{position:fixed;top:0;left:0;right:0;z-index:20000;min-height:28px;box-sizing:border-box;padding:5px 8px;background:#5b3b00;color:#fff1bf;text-align:center;font:600 12px/18px sans-serif;border-bottom:1px solid #b58322}
body{padding-top:30px!important}
.chart-panel.expanded{top:30px!important;height:calc(100dvh - 30px)!important;max-height:calc(100dvh - 30px)!important}
.ledger-day{border:1px solid var(--line);border-radius:8px;margin:10px 0;padding:12px}.ledger-day>summary{cursor:pointer;line-height:1.8}.ledger-day-table{max-height:360px;overflow:auto}.ledger-day-table th{position:sticky;top:0;background:var(--bg);z-index:1}#voided-fill-audit{margin-top:16px}#voided-fill-audit summary{cursor:pointer}
.chart-version-badge{display:inline-block;color:#ffd966;border:1px solid #a48632;border-radius:4px;padding:2px 5px;margin-right:6px;font-size:11px;font-weight:700}.chart-panel #chart-title{display:inline-block}
/* Keep the version directly beside the LSWT corporate identity. */
.v1-product-brand{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.v1-product-brand .lswt-ci{width:175px;height:49px;object-fit:contain}
.ci-version{display:inline-block;font-size:32px;font-weight:800;line-height:1;color:var(--text);white-space:nowrap}
.sidebar .brand:has(.ci-version){display:flex;align-items:center;gap:8px!important}
.sidebar .brand .lswt-ci{width:118px;height:40px}
.sidebar .brand .ci-version{font-size:24px}
@media(max-width:600px){.v1-product-brand .lswt-ci{width:140px;height:40px}.v1-product-brand .ci-version{font-size:28px}}/* Compact V1 capital settings and account summaries. */
.panel:has(> #config){padding:16px 20px;margin-bottom:14px}
.panel:has(> #config) .panel-head{margin-bottom:10px}
#config{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
#config>.form-grid{display:contents}
#config label{min-width:0;margin-bottom:10px}
#config input,#config select{height:36px;padding:6px 10px;margin-top:4px}
#config+button{padding:7px 12px;font-size:12px}
#config+button+p{margin:6px 0;font-size:12px}
#config+button+p:empty{display:none}
.panel:has(> #config)>.profit-grid{margin:12px 0 8px;gap:10px 20px}
.panel:has(> #config)>.profit-grid strong{font-size:22px;line-height:1.35;margin:3px 0 5px;overflow-wrap:anywhere}
.panel:has(> #config)>.profit-grid small{font-size:11px}
.panel:has(> #config)>.tiny{margin:6px 0}
.panel:has(> #config)>.rule-note{padding:8px 10px;margin-top:8px}
.metrics{gap:12px;margin-bottom:14px}
.metrics article{padding:12px 18px}
.metrics strong{font-size:25px;margin:5px 0 2px;line-height:1.3}
#risk-cap-status,#live-profit{padding:12px 20px;margin-bottom:14px}
.risk-grid{gap:12px}.risk-grid strong{font-size:18px;margin-top:3px}
#risk-reason{font-size:12px;margin:7px 0 3px}
#live-profit .profit-grid{gap:12px}
#live-profit .profit-grid strong{font-size:23px;line-height:1.35;margin:4px 0 7px;overflow-wrap:anywhere}
#live-profit .profit-grid small,#profit-note{font-size:11px}
#live-profit #profit-average-entry{font-size:21px}
#v1-quick-state{padding:12px 20px!important;margin-bottom:14px}
#v1-quick-state .quick-cells{margin:8px 0;gap:12px}
#v1-quick-state .quick-cells b{font-size:16px}
@media(max-width:1200px){#config{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){#config{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}.panel:has(> #config)>.profit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.panel:has(> #config),#risk-cap-status,#live-profit{padding:12px}.panel:has(> #config)>.profit-grid strong{font-size:18px}.metrics article{padding:12px}.metrics strong{font-size:23px}}

/* Keep source health in Input Connection; hide duplicate workspace cards. */
#live-status{display:none!important}

/* Unified V1 navigation links and workspace buttons. */
.sidebar nav .nav-link,.sidebar nav button{display:flex;align-items:center;gap:12px;width:100%;min-height:47px;padding:12px 14px;margin:7px 0;border:1px solid transparent;border-radius:10px;background:#17283e;color:#c6d7ee;text-decoration:none;text-align:left;font-size:13px;font-weight:600;line-height:21px;transition:background .15s,border-color .15s}
.sidebar nav .nav-link span,.sidebar nav button span{width:18px;flex:0 0 18px;text-align:center;font-size:19px;line-height:21px;color:#86b6ff}
.sidebar nav .nav-link:hover,.sidebar nav button:hover{background:#243d59;border-color:#41618a;color:#fff}
.sidebar nav button.active{background:#213654;border-color:#365985;color:#fff}
.sidebar nav .nav-link:focus-visible{outline:3px solid #abc2ff;outline-offset:2px}
@media(max-width:1100px) and (min-width:801px){.sidebar nav .nav-link,.sidebar nav button{padding:10px 8px;gap:6px;font-size:12px}}
@media(max-width:800px){.sidebar{flex-wrap:wrap;gap:10px}.sidebar nav{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.sidebar nav .nav-link,.sidebar nav button{margin:0;min-height:40px;padding:8px;justify-content:center;gap:6px;font-size:11px;line-height:20px}.sidebar nav .nav-link span,.sidebar nav button span{display:none}}
/* V1 color-only palette: preserve all existing geometry. */
:root[data-theme=dark]{--bg:#031322;--nav:#04182a;--ink:#e9f4ff;--muted:#91b5d6;--line:#12577c;--blue:#61b9ff;--green:#16e3b0;--red:#ff5379}
[data-theme=dark] body{background-color:#031322}
[data-theme=dark] .sidebar{background-color:#04182a}
[data-theme=dark] .panel,[data-theme=dark] .metrics article,[data-theme=dark] .status-card{background-color:#08263d;border-color:#12577c}
[data-theme=dark] .panel h2,[data-theme=dark] .section-intro h2{color:#eff8ff}
[data-theme=dark] .metrics article:nth-child(1) strong{color:#21dbe8}
[data-theme=dark] .metrics article:nth-child(2) strong{color:#85b6ff}
[data-theme=dark] .metrics article:nth-child(3) strong{color:#c29aff}
[data-theme=dark] .metrics article:nth-child(4) strong{color:#ffda78}
[data-theme=dark] #config input,[data-theme=dark] #config select{background-color:#08243a;border-color:#1a628b}
[data-theme=dark] #config+button{background-color:#087dac;border-color:#1bb9db;color:#fff}
[data-theme=dark] .sidebar nav button.active{background-color:#084f80;border-color:#099ee9}
[data-theme=dark] .sidebar nav .nav-link,[data-theme=dark] .sidebar nav button:not(.active){background-color:#09273e;border-color:#164462}
[data-theme=dark] .sidebar nav .nav-link:hover,[data-theme=dark] .sidebar nav button:hover{background-color:#103f60;border-color:#21bce4}
[data-theme=dark] #risk-cap-status{border-color:#9b7939}
[data-theme=dark] #live-profit{border-color:#376fac}
[data-theme=dark] #v1-quick-state{border-color:#148f91}
[data-theme=dark] .chart-panel{background-color:#041827;border-color:#12618c}
[data-theme=dark] .ledger-day{background-color:#071d30;border-color:#1b4868}
[data-theme=dark] .ledger-day>summary{color:#badef5}
/* V1 text contrast: brighter labels and distinct accent numbers, colors only. */
[data-theme=dark] .metrics article:nth-child(1) strong{color:#00edff}
[data-theme=dark] .metrics article:nth-child(2) strong{color:#8fc7ff}
[data-theme=dark] .metrics article:nth-child(3) strong{color:#d5acff}
[data-theme=dark] .metrics article:nth-child(4) strong{color:#ffda4d}
[data-theme=dark] .positive{color:#23f4bc}
[data-theme=dark] .negative{color:#ff698b}
[data-theme=dark] .profit-grid small,[data-theme=dark] #profit-note,[data-theme=dark] .profit-foot,[data-theme=dark] .tiny,[data-theme=dark] .metrics small,[data-theme=dark] #risk-cap-status small,[data-theme=dark] .quick-cells small,[data-theme=dark] .quick-cells span,[data-theme=dark] .quick-bottom,[data-theme=dark] #quick-market{color:#c1e3ff}
[data-theme=dark] label,[data-theme=dark] .metrics label{color:#d5eaff}
[data-theme=dark] .rule-note{color:#c9e1fb}
[data-theme=dark] .sidebar nav .nav-link,[data-theme=dark] .sidebar nav button{color:#e3f1ff}

/* Always-live workspace: no replay controls or file-upload entry points. */
#replay-label,#replay-controls,#page-data,[data-page="data"]{display:none!important}

.chart-bars-control{display:inline-flex;flex-direction:row;align-items:center;gap:6px;white-space:nowrap;margin:0;font-size:11px;line-height:1.2;flex:0 0 auto}.chart-bars-control select{width:90px;min-width:90px;height:28px;min-height:28px;margin:0;padding:3px 7px;font-size:11px;line-height:1.2;box-sizing:border-box}

.chart-panel.expanded>.panel-head{height:34px;min-height:34px;padding:2px 8px;box-sizing:border-box;flex-wrap:nowrap}
.chart-panel.expanded .chart-actions{flex-wrap:nowrap;align-items:center;overflow:visible}
.chart-panel.expanded #live-candle-status,.chart-panel.expanded .custom-chart-time span{display:none!important}
.chart-panel.expanded .chart-bars-control select{height:26px;min-height:26px}
.chart-panel.expanded .chart-bars-control{font-size:10px}
@media(max-width:900px){.chart-panel.expanded>.panel-head{height:auto;min-height:34px;flex-wrap:wrap}.chart-panel.expanded .chart-actions{max-width:100%;overflow-x:auto;padding-bottom:2px}}

.legacy-chart-tools{display:none!important}
