*{box-sizing:border-box} :root{color-scheme:dark;--bg:#07090c;--panel:#0e1117;--line:#242a35;--muted:#7d899b;--text:#dce2ec;--accent:#dfb45b;--orange:#ff9d00;--blue:#35b4ff;--green:#15e855;--yellow:#ffe300;--purple:#f01ced;--up:#ff2525;--down:#f0f0f0}html,body{margin:0;width:100%;height:100%;background:var(--bg);font:13px 'Segoe UI','Microsoft JhengHei',sans-serif;color:var(--text)}button,input,select{font:inherit}button{cursor:pointer;color:inherit;background:#171c25;border:1px solid #303845;border-radius:4px;padding:6px 10px;white-space:nowrap}button:hover{background:#252d3b;border-color:#667080}button:disabled{opacity:.28;cursor:not-allowed}button:focus-visible,select:focus-visible,input:focus-visible,canvas:focus-visible{outline:2px solid var(--accent);outline-offset:2px}select,input{border:1px solid #303845;background:#10151e;color:var(--text);border-radius:4px;padding:6px}input[type=date]{color-scheme:dark;width:134px}button.active{background:#30291d;border-color:#97763b;color:#f0cc81}button.quiet{background:transparent;border-color:transparent;color:#9da8ba}.app{height:100dvh;min-height:520px;display:flex;flex-direction:column;overflow:hidden}.topbar{height:65px;flex-shrink:0;display:flex;align-items:center;padding:0 20px;border-bottom:1px solid var(--line);gap:35px;background:#0e1117}.brand{display:flex;align-items:center;gap:11px;color:#e5eaf1;text-decoration:none;font-size:17px;font-weight:600;letter-spacing:.7px}.brand-icon{color:var(--accent);font-size:27px;line-height:1}.brand small{display:block;font-size:9px;letter-spacing:2.3px;color:#758194;font-weight:400;margin-top:4px}.workspace-title{color:#a0aaba;font-size:12px;display:flex;align-items:center;gap:8px}.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#75bc92;flex-shrink:0}.separator{color:#3e4858;margin:0 8px}.top-actions{margin-left:auto;display:flex;align-items:center;gap:8px}.local-tag{padding-left:15px;border-left:1px solid var(--line);font-size:11px;color:#788599}.commandbar{height:52px;flex-shrink:0;display:flex;align-items:center;gap:10px;padding:0 14px;border-bottom:1px solid var(--line);background:#10141b}.symbol-select{display:flex;align-items:center;gap:8px;padding-right:12px;border-right:1px solid var(--line)}.symbol-badge{font:bold 11px monospace;border:1px solid #56614a;color:#bbcca7;padding:4px;border-radius:3px}.symbol-select select{border:0;background:transparent;font-size:14px;font-weight:600;width:220px}.periods{display:flex;gap:3px;align-items:center}.periods button{border-color:transparent;background:transparent;color:#8e9cb0;min-width:34px;padding:7px 9px}.periods button.active{background:#2e271b;color:#f0cc81;border-color:#7b6034}.vdiv{height:19px;border-left:1px solid var(--line);margin:0 6px}.command-spacer{flex:1}.toggle{font-size:12px;background:transparent;color:#97a3b4;border-color:#2c3441}.toggle.active{color:#c6d3e6;background:#1b2330;border-color:#46546b}.replay-button{color:#efd193;background:#282116;border-color:#6d5630;font-size:12px}.quote-strip{min-height:46px;display:flex;align-items:center;gap:22px;padding:8px 17px;background:#080b10;border-bottom:1px solid #1f2630;font-family:Consolas,'Microsoft JhengHei',monospace;font-size:13px;flex-wrap:wrap}.instrument{display:flex;align-items:center;gap:10px}.instrument strong{color:#e3e9f3;font-size:14px}.instrument>span{color:#929fb1}.close-tag{font:10px 'Segoe UI',sans-serif;border:1px solid #30394a;border-radius:3px;padding:3px 5px}.ohlc{display:flex;gap:13px}.ohlc span{white-space:nowrap}.ohlc em{font-style:normal;color:#6e7c90;margin-right:5px}.change-quote{margin-left:auto;font-size:14px;font-weight:bold}.workspace{flex:1;display:flex;min-height:0}.inspector{width:181px;flex-shrink:0;background:#0e1219;border-right:1px solid #2d3541;display:flex;flex-direction:column}.inspector-head{padding:12px 12px 10px;font-size:12px;color:#b3bece;border-bottom:1px solid #232c39;display:flex;justify-content:space-between}.inspector-head span{font-size:10px;color:#708096}.selected-time{padding:17px 13px 14px;display:flex;flex-direction:column;gap:6px;font-family:Consolas,monospace}.selected-time>span{color:#b8c3d4;font-size:12px}.selected-time strong{font-size:25px;letter-spacing:1px;font-weight:400;color:#eef1f6}.selected-time small{font-size:10px;color:#758297;min-height:12px}.section-label{font-size:10px;letter-spacing:1px;color:#758196;display:flex;justify-content:space-between;padding:7px 12px}.section-label span{letter-spacing:0;color:#49586e}.ma-details{padding:5px 12px;font-family:Consolas,monospace;font-size:12px}.ma-row{display:flex;justify-content:space-between;padding:5px 0}.ma-row span:last-child{font-weight:bold}.inspector-divider{border-top:1px solid #252d3a;margin:10px 12px}.bar-details{padding:0 12px;margin:3px 0;font-family:Consolas,'Microsoft JhengHei',monospace}.bar-details div{display:flex;justify-content:space-between;padding:4px 0}.bar-details dt{color:#8997aa;font-size:11px}.bar-details dd{margin:0;color:#e4e9f1;font-size:12px}.dataset-info{display:flex;flex-direction:column;gap:3px;padding:8px 13px;color:#a0aec1;font:11px Consolas,monospace}.range-dash{color:#516075}.dataset-info small{color:#627289;margin-top:7px}.inspector-foot{display:flex;gap:9px;align-items:center;font-size:10px;color:#607088;line-height:1.8;padding:14px 12px;margin-top:auto;border-top:1px solid #222a36}.drawing-toolbar{width:40px;flex-shrink:0;padding:9px 4px;background:#0b0e14;border-right:1px solid #212a37;display:flex;align-items:center;flex-direction:column;gap:6px}.drawing-toolbar button{width:31px;height:32px;border-color:transparent;padding:0;background:transparent;color:#8795a9;font-size:21px}.drawing-toolbar button.active{color:#e8c47b;background:#2d281d;border-color:#6e5938}.tool-separator{width:20px;border-top:1px solid #28303b;margin:5px 0}.line-icon{display:block;margin:0 6px;border-top:2px solid}.resistance{color:#18e45e}.support{color:#ff3434}.chart-panel{flex:1;min-width:0;display:flex;flex-direction:column;background:#000}.ma-legend{min-height:33px;display:flex;align-items:center;gap:22px;padding:5px 12px;font:12px Consolas,'Microsoft JhengHei',monospace;flex-wrap:wrap;border-bottom:1px solid #302333}.ma-legend span{white-space:nowrap}.chart-wrap{flex:1;position:relative;min-height:100px;overflow:hidden}.chart-wrap canvas{position:absolute;inset:0;width:100%;height:100%}#chart{outline-offset:-2px;touch-action:none;cursor:crosshair}#crosshair{pointer-events:none}.chart-watermark{position:absolute;top:38%;left:38%;pointer-events:none;opacity:.055;display:flex;flex-direction:column;align-items:center}.chart-watermark span{font-size:90px;font-weight:700;letter-spacing:9px}.chart-watermark small{font-size:17px;letter-spacing:5px}.chart-caption{height:27px;padding:4px 12px;display:flex;gap:20px;align-items:center;flex-shrink:0;font:10px Consolas,'Microsoft JhengHei',monospace;color:#65758a;border-top:1px solid #262332}.chart-caption>span:first-child{display:flex;align-items:center;gap:4px}#visibleRange{margin-left:auto}#barCount{color:#8b98ab}.legend-up{background:red;width:5px;height:9px;margin-left:3px}.legend-down{background:#eee;width:5px;height:9px}.navigator{height:57px;flex-shrink:0;display:flex;align-items:center;gap:9px;padding:6px 14px;background:#11151d;border-top:1px solid #2a3341}.date-controls{display:flex;align-items:center;gap:7px;font-size:11px}.date-controls label{color:#8f9caf}.date-controls input{font-size:11px}.date-controls button{padding:6px 9px}.overview{position:relative;flex:1;height:37px;border:1px solid #273241;border-radius:3px;background:#080d14;overflow:hidden}.overview canvas{width:100%;height:100%;position:absolute;inset:0;opacity:.7}#overviewSelection{position:absolute;top:0;bottom:0;background:#8193b029;border:1px solid #7c8ca8;pointer-events:none;border-radius:2px}#timeScroll{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:ew-resize;padding:0}.nav-arrow{padding:5px 8px;color:#9aa9be}.zoom-controls{display:flex;gap:7px;align-items:center}.zoom-controls button{padding:4px 7px}.zoom-controls span{font:11px Consolas,monospace;color:#94a3b8;min-width:60px;text-align:center}.statusbar{height:29px;flex-shrink:0;border-top:1px solid #242b36;display:flex;align-items:center;padding:0 15px;gap:16px;font-size:10px;background:#0c1016;color:#69788d}.statusbar button{border:0;background:none;font-size:10px;color:#94a1b5;margin-left:auto;padding:2px 0}.keyboard-hint{margin-left:auto;color:#53637a}.replay-panel{display:flex;align-items:center;gap:12px;background:#241d12;border-top:1px solid #755527;padding:8px 16px;font-size:12px;flex-shrink:0}.replay-panel[hidden]{display:none}.replay-label{color:#f2c66d;font-weight:600}.replay-note{font-size:11px;color:#b19a73;margin-right:auto}#replayTime{font-family:Consolas,monospace;color:#f2debb}.replay-panel button{font-size:11px;padding:5px 10px}.replay-panel select{font-size:11px}.loading{position:absolute;inset:0;background:#000d;display:flex;justify-content:center;align-items:center;gap:12px;flex-direction:column;z-index:5}.loading[hidden]{display:none}.loading strong{font-weight:400;color:#d9c398;font-size:14px}.loading small{color:#7c8c9f}.spinner{width:24px;height:24px;border:2px solid #282c34;border-top-color:#d9b56e;border-radius:50%;animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.empty-state{position:absolute;inset:0;background:#03060af5;padding:60px 30px;color:#bbc6d6;z-index:6;line-height:1.8;display:flex;flex-direction:column;align-items:center;justify-content:center}.empty-state[hidden]{display:none}.toast{position:fixed;bottom:100px;left:50%;transform:translateX(-50%);padding:12px 20px;border:1px solid #7d683e;background:#211b11;box-shadow:0 10px 40px #0008;color:#ebd4a6;border-radius:5px;z-index:20;max-width:80vw}.toast[hidden]{display:none}dialog{max-width:650px;width:calc(100% - 40px);border:1px solid #3e4859;background:#111721;color:#b6c2d3;border-radius:8px;padding:24px;box-shadow:0 20px 100px #000a}dialog::backdrop{background:#0009}.dialog-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #2b3442;margin-bottom:15px;padding-bottom:12px}.dialog-header h2{font-size:17px;color:#ebd4a6;font-weight:500;margin:0}.dialog-header button{border:0;background:none;font-size:22px;color:#8f9db0}#dialogBody{font-size:13px;line-height:1.9}#dialogBody ul{padding-left:22px}#dialogBody strong{color:#e3e8ef}#dialogBody code{color:#e9cb84;background:#24251f;padding:1px 5px;border-radius:3px}@media(max-width:1200px){.workspace-title,.local-tag{display:none}.topbar{height:55px}.commandbar{gap:7px}.symbol-select select{width:185px}.periods button{padding:6px}.toggle{padding:6px;font-size:11px}.ma-legend{gap:12px;font-size:11px}.inspector{width:163px}}@media(max-width:850px){.commandbar{height:auto;min-height:52px;flex-wrap:wrap;padding:9px}.symbol-select{border:0}.symbol-select select{width:175px}.command-spacer{display:none}.topbar{padding:0 12px}.brand{font-size:14px}.brand small{font-size:8px}.top-actions .quiet{font-size:11px;padding:4px}.inspector{width:135px}.inspector-head{padding:10px 7px;font-size:11px}.inspector-head span{display:none}.section-label,.ma-details,.bar-details,.selected-time,.dataset-info{padding-left:8px;padding-right:8px}.ma-details{font-size:10px}.ma-row{padding:4px 0}.ma-legend{gap:8px;font-size:10px}.drawing-toolbar{width:33px}.drawing-toolbar button{width:27px}.quote-strip{gap:9px;font-size:11px}.ohlc{gap:8px}.change-quote{font-size:12px}.navigator{padding:7px;gap:5px}.date-controls label{display:none}.date-controls input{width:119px}.zoom-controls span{min-width:46px;font-size:10px}.keyboard-hint{display:none}.replay-note{display:none}.replay-panel{gap:7px;flex-wrap:wrap}.statusbar{padding:0 8px}.inspector-foot{font-size:9px;padding:8px}.chart-caption{font-size:9px;gap:5px}.selected-time strong{font-size:20px}}@media(max-height:700px){.dataset-info{padding-top:2px}.inspector-foot{display:none}.selected-time{padding-top:9px;padding-bottom:6px}.ma-row{padding:3px 0}.inspector-divider{margin:6px 12px}}
 .line-editor{position:absolute;top:5px;left:16px;z-index:8;display:flex;gap:8px;align-items:center;padding:8px 10px;border:1px solid #90713d;border-radius:5px;background:#171d27f5;box-shadow:0 3px 16px #0009;font-size:11px}.line-editor[hidden]{display:none}.line-editor label{display:flex;align-items:center;gap:5px;color:#aab6c6}.line-editor input{width:105px;padding:4px}.line-editor button{font-size:11px;padding:5px 7px}.line-editor #removeSelectedLine{color:#f0aba8}.line-editor #deselectLine{border:0;background:none;color:#9ca9ba;font-size:16px;padding:0 4px}@media(max-width:850px){.line-editor{left:5px;gap:5px;padding:6px;font-size:10px}.line-editor input{width:77px}.line-editor button{font-size:10px;padding:4px}}

.layout-bar{height:42px;display:flex;gap:20px;align-items:center;padding:5px 14px;background:#111721;border-bottom:1px solid #44516a;color:#dce2ec}.layout-bar strong{font-size:14px}.layout-bar label{display:flex;align-items:center;gap:9px}.layout-bar span{font-size:11px;color:#96a7bc}.chart-grid{height:calc(100dvh - 42px);display:grid;gap:4px;background:#42516a}.chart-grid[data-layout=single]{grid-template:1fr / 1fr}.chart-grid[data-layout=two]{grid-template:repeat(2,minmax(0,1fr)) / 1fr}.chart-grid[data-layout=three]{grid-template:repeat(3,minmax(0,1fr)) / 1fr}.chart-grid[data-layout=four]{grid-template:repeat(2,minmax(0,1fr)) / repeat(2,minmax(0,1fr))}.chart-grid iframe{border:0;width:100%;height:100%;min-width:0;min-height:0;background:#000}.chart-grid iframe[hidden]{display:none}
.embedded-chart .app{min-height:0}.compact-chart .topbar{display:none}.compact-chart .commandbar{height:34px;min-height:34px;flex-wrap:nowrap;overflow-x:auto;padding:3px 7px;gap:5px}.compact-chart .commandbar>*{flex-shrink:0}.compact-chart .symbol-select{display:none}.compact-chart .commandbar button{font-size:10px;padding:4px 6px}.compact-chart .quote-strip{min-height:28px;padding:4px 8px;gap:8px;font-size:10px}.compact-chart .instrument strong{font-size:11px}.compact-chart .instrument{gap:5px}.compact-chart .close-tag{display:none}.compact-chart .ohlc{gap:6px}.compact-chart .change-quote{font-size:11px}.compact-chart .inspector{width:128px;overflow:auto}.compact-chart .inspector-head,.compact-chart .section-label,.compact-chart .dataset-info,.compact-chart .inspector-foot,.compact-chart .inspector-divider{display:none}.compact-chart .selected-time{padding:5px 7px;gap:2px}.compact-chart .selected-time strong{font-size:16px}.compact-chart .selected-time>span{font-size:10px}.compact-chart .selected-time small{display:none}.compact-chart .ma-details{padding:0 7px;font-size:10px}.compact-chart .ma-row{padding:1px 0}.compact-chart .bar-details{padding:0 7px}.compact-chart .bar-details div{padding:1px 0}.compact-chart .bar-details dd{font-size:10px}.compact-chart .ma-legend{min-height:23px;padding:3px 7px;font-size:10px;gap:9px}.compact-chart .drawing-toolbar{width:30px;padding:3px 2px;gap:2px;overflow-y:auto}.compact-chart .drawing-toolbar button{width:25px;height:25px;flex-shrink:0}.compact-chart .tool-separator{margin:2px}.compact-chart .chart-wrap{min-height:50px}.compact-chart .chart-caption{height:20px;padding:2px 7px}.compact-chart .chart-caption>span:first-child{display:none}.compact-chart .navigator{height:34px;padding:3px 6px;gap:4px}.compact-chart .overview{height:25px}.compact-chart .date-controls label{display:none}.compact-chart .date-controls input{width:112px;padding:3px;font-size:10px}.compact-chart .date-controls button,.compact-chart .zoom-controls button,.compact-chart .nav-arrow{padding:3px 5px;font-size:10px}.compact-chart .statusbar{display:none}.compact-chart .zoom-controls span{min-width:40px;font-size:10px}.compact-chart .replay-panel{padding:3px 7px;gap:5px}.compact-chart .replay-panel .replay-note{display:none}
@media(max-width:850px){.layout-bar span{display:none}.layout-bar{gap:12px}.compact-chart .quote-strip .ohlc{display:none}.compact-chart .inspector{width:108px}.compact-chart .ma-details{font-size:9px}.compact-chart .chart-caption #visibleRange{font-size:8px}}
.drawing-toolbar .arrow-up-tool{color:#ff2020;font-size:26px}.drawing-toolbar .arrow-down-tool{color:#16e84f;font-size:26px}
.drawing-toolbar .arrow-up-tool svg,.drawing-toolbar .arrow-down-tool svg{width:13px;height:18px;vertical-align:middle}
.chart-panel>.commandbar{height:29px;min-height:29px;padding:2px 6px;gap:5px;flex-wrap:nowrap;overflow-x:auto}.chart-panel>.commandbar>*{flex-shrink:0}.chart-panel>.commandbar .symbol-select{display:none}.chart-panel>.commandbar button{font-size:10px;padding:3px 6px}.chart-panel>.commandbar .periods{gap:2px}.chart-panel>.commandbar .periods button{min-width:27px;padding:2px 5px}.chart-panel>.commandbar .vdiv{height:13px;margin:0 3px}
.chart-wrap>.ma-legend{position:absolute;top:0;left:0;right:78px;z-index:2;min-height:24px;padding:4px 12px;border:0;gap:16px;pointer-events:none;font-size:12px;background:var(--chart-bg,#000)}
[data-theme=light]{--chart-bg:#fff}.line-editor{top:33px}
.inspector,.compact-chart .inspector{width:174px}.ma-details,.compact-chart .ma-details{font-size:13px;padding-left:9px;padding-right:9px}.ma-row,.compact-chart .ma-row{padding:3px 0}.bar-details dd,.compact-chart .bar-details dd{font-size:13px}.bar-details dt,.compact-chart .bar-details dt{font-size:12px}.bar-details div,.compact-chart .bar-details div{padding:3px 0}.selected-time>span,.compact-chart .selected-time>span{font-size:12px}.compact-chart .selected-time strong{font-size:20px}
@media(max-width:850px){.inspector,.compact-chart .inspector{width:155px}.ma-details,.compact-chart .ma-details{font-size:12px}.bar-details dd,.compact-chart .bar-details dd{font-size:12px}.chart-wrap>.ma-legend{gap:9px;font-size:11px}}
:root[data-theme=light]{color-scheme:light;--bg:#edf5fa;--panel:#e2f2fc;--line:#b9ccd9;--muted:#526779;--text:#192936;--accent:#886124;--down:#111}
[data-theme=light] .topbar,[data-theme=light] .commandbar,[data-theme=light] .navigator,[data-theme=light] .statusbar,[data-theme=light] .drawing-toolbar,[data-theme=light] .inspector,[data-theme=light] .quote-strip{background:#e2f2fc;border-color:#b9ccd9}
[data-theme=light] button,[data-theme=light] input,[data-theme=light] select{background:#f7fbfd;color:#243746;border-color:#b4c9d8;color-scheme:light}
[data-theme=light] button:hover{background:#d1e9f6}[data-theme=light] button.active{background:#c8e3f4;color:#183e5a;border-color:#6b99b7}
[data-theme=light] .brand,[data-theme=light] .instrument strong,[data-theme=light] .selected-time strong,[data-theme=light] .bar-details dd,[data-theme=light] #dialogBody strong{color:#152736}
[data-theme=light] .workspace-title,[data-theme=light] .brand small,[data-theme=light] .local-tag,[data-theme=light] .instrument>span,[data-theme=light] .ohlc em,[data-theme=light] .inspector-head,[data-theme=light] .inspector-head span,[data-theme=light] .selected-time>span,[data-theme=light] .selected-time small,[data-theme=light] .section-label,[data-theme=light] .section-label span,[data-theme=light] .bar-details dt,[data-theme=light] .dataset-info,[data-theme=light] .dataset-info small,[data-theme=light] .inspector-foot,[data-theme=light] .chart-caption,[data-theme=light] #barCount,[data-theme=light] .date-controls label,[data-theme=light] .zoom-controls span,[data-theme=light] .keyboard-hint,[data-theme=light] .statusbar button{color:#496477}
[data-theme=light] .chart-panel{background:#fff}[data-theme=light] .ma-legend,[data-theme=light] .chart-caption{border-color:#c9d9e4}[data-theme=light] .legend-down{background:#111}[data-theme=light] .overview{background:#f7fcff;border-color:#b4c9d8}
[data-theme=light] .line-editor,[data-theme=light] dialog{background:#f7fcff;color:#243746;border-color:#9bb6c9}[data-theme=light] .line-editor label,[data-theme=light] #maDialog p,[data-theme=light] .dialog-header h2{color:#37556a}[data-theme=light] .ma-settings input[type=number]{background:#fff;color:#192936;border-color:#b4c9d8}[data-theme=light] .ma-settings th,[data-theme=light] .ma-settings td,[data-theme=light] .dialog-header{border-color:#c3d6e3}
[data-theme=light] .loading{background:#fffffff0}[data-theme=light] .loading strong,[data-theme=light] .loading small{color:#496477}[data-theme=light] .empty-state{background:#f7fcfff5;color:#243746}[data-theme=light] .toast{background:#fff7e8;color:#60471f;box-shadow:0 8px 30px #3453}[data-theme=light] .replay-panel{background:#fff2d9;color:#644d29}[data-theme=light] .replay-label,[data-theme=light] #replayTime,[data-theme=light] .replay-note{color:#785620}
#maDialog{max-width:620px;width:calc(100vw - 36px)}#maDialog p{color:#9eacbe;font-size:13px}.ma-settings{width:100%;border-collapse:collapse}.ma-settings th,.ma-settings td{padding:9px 5px;text-align:left;border-bottom:1px solid #29313e}.ma-settings input[type=number]{width:85px;background:#101722;color:#fff;border:1px solid #3d4b5f;border-radius:4px;padding:7px}.ma-settings input[type=checkbox]{accent-color:#e1bc76;width:18px;height:18px}.ma-settings input[type=color]{width:44px;height:30px;background:#111;border:0}.ma-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:16px}#maError{color:#ff7b7b!important}#maDialog button{padding:7px 10px}.ma-actions button[type=submit]{background:#b7985d;color:#090b0f}.line-editor{flex-wrap:wrap}
