:root{--bg:#f3f5f8;--ink:#18273c;--muted:#7b8798;--line:#e7ebf0;--blue:#376be8;--light:#edf3ff;--green:#278975}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px "Segoe UI","Microsoft YaHei",sans-serif}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:wait}input,select{min-width:0;outline:none;border:1px solid #dce2ea;border-radius:7px;background:white;color:var(--ink);height:36px;padding:0 10px}input:focus,select:focus{border-color:#7199f1;box-shadow:0 0 0 3px #376be810}button:focus-visible{outline:2px solid #376be8;outline-offset:3px}.topbar{height:82px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 36px}.brand{display:flex;align-items:center;gap:13px;font-size:19px;font-weight:650;letter-spacing:.5px}.logo{display:grid;place-content:center;background:var(--blue);color:#fff;width:42px;height:42px;border-radius:12px;font-size:38px;line-height:1}.brand small{display:block;font-size:9px;color:#8e9aab;letter-spacing:2px;font-weight:500;margin-top:4px}.badge{font-size:11px;font-weight:400;letter-spacing:0;margin-left:12px;border-left:1px solid #e1e6ed;padding-left:24px;color:#6b7990}.online{font-size:12px;color:#778397;display:flex;gap:8px;align-items:center}.online i{width:6px;height:6px;border-radius:50%;background:#43a48b}main{max-width:1900px;margin:auto;padding:30px 36px 0}.intro{display:flex;justify-content:space-between;align-items:center;margin:4px 0 28px}.eyebrow{font-size:10px;color:#6684ae;letter-spacing:2px;font-weight:700}h1{font-size:27px;font-weight:650;letter-spacing:1px;margin:9px 0 10px}.intro p{margin:0;color:#7a8697;font-size:13px}.metrics{display:flex;gap:42px;padding:0 22px}.metrics>div{display:flex;flex-direction:column;gap:6px}.metrics strong{font-size:28px;font-weight:550;font-variant-numeric:tabular-nums}.metrics span{font-size:11px;color:var(--muted)}.workspace{display:grid;grid-template-columns:minmax(480px,.95fr) minmax(530px,1.15fr);gap:22px;align-items:stretch}.panel{background:#fff;border:1px solid #e3e8ef;border-radius:13px;box-shadow:0 3px 12px #17283e03;min-width:0;overflow:hidden}.selection-panel{padding:0 22px 14px}.panel-head{height:69px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:10px}.panel-head>div{display:flex;align-items:center;gap:10px}h2{font-size:15px;font-weight:650;margin:0}.step{font-size:11px;background:#f1f4f8;border:1px solid #e5eaf1;border-radius:6px;color:#8191a7;padding:4px 6px;font-weight:600}.button{height:34px;border-radius:7px;padding:0 13px;border:1px solid transparent;white-space:nowrap;font-size:12px;transition:background .15s}.subtle{color:#57749a;background:#f4f7fb}.subtle:hover{background:#e9eff8}.secondary{background:white;border-color:#dde3ed;color:#56657a}.secondary:hover{background:#f6f8fc}.primary{color:#fff;background:var(--blue);box-shadow:0 3px 6px #376be81a}.primary:hover{background:#285bd2}.primary span{margin-left:15px}.channel-tabs{display:flex;gap:6px;overflow:auto;margin:19px 0 17px;padding-bottom:3px}.channel-tab{border:1px solid #e7ebf2;color:#7b8798;background:#fff;border-radius:7px;padding:8px 12px;white-space:nowrap;max-width:200px;display:flex;align-items:center;gap:8px;font-size:12px}.channel-tab.active{border-color:#b5c9fb;background:#f1f5ff;color:#3158a4}.channel-tab span:last-child{overflow:hidden;text-overflow:ellipsis}.dot{width:7px;height:7px;border-radius:50%;display:inline-block;flex-shrink:0}.channel-settings{display:flex;align-items:end;gap:10px;margin-bottom:18px}.channel-settings label,.filters label{display:flex;flex-direction:column;gap:7px;color:#8390a2;font-size:11px}.name-label{flex:1}.channel-settings input[type=color]{width:42px;padding:4px;cursor:pointer}.channel-settings select{width:67px;padding:0 5px}.icon-button{border:0;background:transparent;color:#8d98aa;font-size:22px;height:36px;padding:0 8px;line-height:1}.danger:hover{color:#d95d61;background:#fff4f4;border-radius:6px}.field-label{display:flex;justify-content:space-between;font-size:11px;color:#718198;margin-bottom:7px}.field-label span{font-size:10px;color:#a0a9b5}.path-row{display:flex;gap:7px}.path-row>input{flex:1;font-size:12px}.path-row .button{height:36px}.filters{display:flex;gap:10px;margin:16px 0}.filters select{font-size:12px;max-width:145px}.filters>label:first-child{width:110px}.filters>label:last-child{width:125px}.search-label{flex:1}.search-label input{font-size:12px}.file-toolbar{display:flex;justify-content:space-between;align-items:center;margin:5px 0 9px;font-size:11px;color:#8b98aa}.file-toolbar b{color:var(--blue);font-weight:600}.file-toolbar button{font-size:11px;color:#6b80a2;background:none;border:0;padding:2px 7px}.file-toolbar button:hover{color:var(--blue)}.file-grid{position:relative;background:#f8fafc;border:1px solid #e5eaf1;border-radius:8px;height:300px;overflow:auto;padding:9px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:6px;user-select:none;touch-action:none}.file-item{display:flex;align-items:center;gap:8px;min-height:53px;border:1px solid #e5eaf1;background:#fff;border-radius:6px;padding:7px 8px;cursor:default;overflow:hidden}.file-item.selected{background:#edf3ff;border-color:#99b7fb}.file-check{width:14px;height:14px;border:1px solid #cdd6e2;border-radius:4px;flex-shrink:0;color:transparent;text-align:center;font-size:10px;line-height:12px}.selected .file-check{background:var(--blue);border-color:var(--blue);color:white}.file-text{min-width:0}.file-text strong{display:block;font-size:10px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:17px}.file-text small{font-size:9px;color:#96a0b0}.file-type{font-size:8px;letter-spacing:.5px;margin-right:8px;color:#587da7}.selection-rect{position:absolute;border:1px solid #5789ef;background:#376be81c;pointer-events:none;z-index:3}.file-empty{grid-column:1/-1;text-align:center;color:#99a4b2;padding:70px 10px;font-size:12px;line-height:2}.selection-tip{display:flex;gap:16px;color:#9ba5b3;font-size:10px;margin:10px 0 20px}.action-row{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid var(--line);padding-top:15px}.status{font-size:11px;color:#8b98a9;line-height:1.6}.status.ready{color:var(--green)}#message{display:none;margin-top:12px;font-size:12px;line-height:1.7;padding:9px 11px;border-radius:6px;background:#fff5f1;color:#b35c40;overflow-wrap:anywhere}#message.show{display:block}.chart-panel{display:flex;flex-direction:column;padding:0 23px}.chart-actions{gap:6px!important}.chart-actions .button{padding:0 9px;font-size:11px}.chart-top{display:flex;justify-content:space-between;align-items:start;margin-top:24px;margin-bottom:10px}.chart-top h3{font-size:15px;margin:0 0 7px;font-weight:600}.chart-top p{font-size:11px;margin:0;color:#99a3b2}.chart-tag{font-size:8px;letter-spacing:1.2px;color:#94a2b5;border:1px solid #e9edf4;padding:5px 8px;border-radius:4px;margin-top:1px}#chart-wrap{position:relative;flex:1;min-height:390px;overflow:hidden}#chart{width:100%;height:100%;position:absolute;touch-action:none}#chart-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:none}.empty-wave{color:#b6c8e6;font-size:85px;line-height:1.1;font-family:serif}#chart-empty h3{font-size:15px;font-weight:500;color:#7589a7;margin:8px 0 12px}#chart-empty p{font-size:11px;line-height:1.9;color:#a2acba;text-align:center}.chart-hint{display:flex;justify-content:space-between;gap:8px;color:#9aa5b4;font-size:10px;padding:8px 0 17px}.legend{min-height:65px;display:flex;flex-wrap:wrap;align-content:center;gap:9px;padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.legend-item{display:flex;align-items:center;gap:8px;border:1px solid #e5eaf2;background:white;border-radius:6px;padding:7px 10px;color:#52647d;font-size:11px;max-width:100%}.legend-line{width:18px;height:2px;flex-shrink:0}.legend-item.off{opacity:.4}.legend-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:200px}.legend-item small{font-size:9px;color:#98a3b3}.muted{color:#a1abba;font-size:11px}.chart-foot{display:flex;gap:9px;margin:16px 0 18px;align-items:start}.info-icon{color:#91a2b8;border:1px solid #adbacb;border-radius:50%;width:12px;height:12px;text-align:center;line-height:10px;font-size:8px;flex-shrink:0;margin-top:1px}.chart-foot p{font-size:10px;line-height:1.9;color:#8c9aae;margin:0}#tooltip{display:none;position:absolute;background:#fffefc;border:1px solid #d9e2ef;box-shadow:0 5px 18px #18273c15;border-radius:7px;padding:9px 12px;pointer-events:none;z-index:4;font-size:11px;line-height:1.8;min-width:145px;max-width:270px}#tooltip strong{display:block;font-size:10px;font-weight:500;color:#8b98aa;margin-bottom:5px}#tooltip div{display:flex;gap:7px;align-items:center}#tooltip .tip-name{max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#tooltip b{margin-left:auto;font-weight:500;font-variant-numeric:tabular-nums}footer{display:flex;justify-content:space-between;margin:19px 0 22px;font-size:10px;color:#9aa4b2}dialog{border:1px solid #e1e7f0;border-radius:14px;padding:25px;width:700px;max-width:94vw;box-shadow:0 20px 80px #18273c20;color:var(--ink)}dialog::backdrop{background:#1c2b4155;backdrop-filter:blur(3px)}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.dialog-head h2{margin-top:8px}.dialog-path{display:flex;gap:8px}.dialog-path input{flex:1;height:34px;font-size:12px}#root-links{margin:13px 0;display:flex;gap:8px;flex-wrap:wrap}#root-links button{background:#f0f5ff;border:0;border-radius:5px;color:#5375a9;font-size:11px;padding:6px 8px}#folder-list{height:320px;overflow:auto;border:1px solid var(--line);border-radius:7px}.folder-entry{display:flex;align-items:center;gap:11px;padding:12px 15px;width:100%;text-align:left;border:0;border-bottom:1px solid #f0f3f7;background:white;font-size:12px;color:#536882}.folder-entry:hover{background:#f2f6fc}.folder-entry span:first-child{color:#c09b53}.dialog-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:20px}.dialog-bottom span{font-size:11px;color:#94a1b4}@media(min-width:1600px){.file-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.workspace{grid-template-columns:minmax(600px,.95fr) minmax(650px,1.15fr)}#chart-wrap{min-height:440px}.file-grid{height:350px}}@media(max-width:1130px){main{padding:24px 20px 0}.topbar{padding:0 22px}.workspace{grid-template-columns:1fr}.file-grid{height:265px;grid-template-columns:repeat(3,minmax(0,1fr))}#chart-wrap{height:430px;flex:auto}.metrics{gap:25px}.chart-panel{min-height:650px}}@media(max-width:640px){.topbar{padding:0 16px;height:70px}.badge,.online{display:none}main{padding:20px 12px 0}.intro{align-items:start;gap:20px;flex-direction:column}h1{font-size:23px}.metrics{gap:36px;padding:0}.metrics strong{font-size:24px}.selection-panel{padding:0 14px 14px}.chart-panel{padding:0 14px}.file-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.filters{gap:6px}.filters>label:first-child{width:95px}.filters>label:last-child{width:100px}.filters select{padding:0 5px}.selection-tip{gap:10px;font-size:9px}.chart-tag{display:none}.panel-head{height:64px}.chart-actions .button{font-size:10px;padding:0 6px}h2{font-size:13px}.step{font-size:9px}.chart-hint{font-size:9px}.field-label span{display:none}footer{gap:10px;font-size:9px}.action-row .button{padding:0 10px}.path-row{gap:5px}.path-row .button{padding:0 9px}.channel-settings{gap:6px}}

.client-tip{font-size:10px;line-height:1.7;color:#8b98aa;margin:8px 0 12px}input[readonly]{background:#f8fafc;color:#6f8096}button:disabled{cursor:default}

.import-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:8px}.import-row span{font-size:11px;color:#6f8096}

/* Compact interface: keep controls and data, omit decorative captions. */
.topbar{height:64px}.brand{font-size:18px}.intro{margin-bottom:20px}
main{padding-bottom:24px}#chart-wrap{margin-top:16px}
.action-row{margin-top:16px}.chart-hint{justify-content:flex-end;font-size:12px}
.legend{min-height:0;margin-bottom:16px}.legend:empty{display:none}
.import-row{margin-bottom:12px}.dialog-head h2{margin-top:0}.filters>label:first-child{min-width:120px}

/* Help stays in a modal so the main workspace remains uncluttered. */
#help-dialog{width:760px;max-height:85vh;overflow-y:auto;overscroll-behavior:contain}
#help-dialog .dialog-head{gap:16px;margin-bottom:16px}
.help-content{font-size:14px;line-height:1.85;color:#52647d}
.help-content section+section{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
.help-content h3{margin:0 0 8px;font-size:15px;color:var(--ink)}
.help-content ul{margin:0;padding-left:22px}.help-content li+li{margin-top:6px}
.help-content p{margin:0}.help-actions{display:flex;justify-content:flex-end;margin-top:22px}
@media(max-width:640px){#help-dialog{padding:18px;max-height:88vh}.help-content{font-size:13px}}

.topbar-actions{display:flex;align-items:center;gap:10px}#update-status{font-size:12px;color:var(--muted);max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:640px){.topbar-actions{gap:6px}#update-status{display:none}.topbar-actions .button{padding:0 8px}}

.update-panel{margin-top:20px;padding:0 22px 18px}.update-panel .panel-head{height:60px}#pending-count{font-size:12px;color:var(--muted)}.update-table-wrap{max-height:280px;overflow:auto}.update-table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}.update-table th{position:sticky;top:0;background:#f6f8fc;color:#6f8096;font-weight:500}.update-table th,.update-table td{padding:10px 14px;border-bottom:1px solid var(--line)}.update-table td:first-child{overflow-wrap:anywhere}.update-table th:last-child{width:130px}.state-badge{display:inline-block;border-radius:4px;padding:3px 8px}.state-badge.pending{background:#fff3dd;color:#a46a16}.state-badge.complete{background:#e9f7ef;color:#248059}.topbar-actions{flex-wrap:wrap}@media(max-width:640px){.topbar{height:auto;min-height:70px;padding-top:10px;padding-bottom:10px;gap:10px}.update-panel{padding:0 14px 14px}}

.chart-panel > .panel-head{height:auto;min-height:74px;gap:12px;padding-top:12px;padding-bottom:12px;flex-wrap:wrap}.chart-actions{flex-wrap:wrap;justify-content:flex-end}

.chart-mode{display:flex;gap:8px;margin-bottom:10px}.chart-mode [aria-pressed="true"]{background:#e7efff;color:#245eb7;border-color:#7b9ed7}

.help-lead,.help-note{background:#f2f6fd;border:1px solid #dfe8f6;border-radius:8px;padding:12px 14px}
.help-nav{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.help-nav a{color:#245eb7;background:#edf3ff;border-radius:5px;padding:5px 10px;text-decoration:none;font-size:13px}.help-nav a:hover,.help-nav a:focus-visible{background:#dce9ff;text-decoration:underline}
.help-content section{scroll-margin-top:16px}.help-content h4{margin:16px 0 6px;font-size:14px;color:var(--ink)}.help-content ol{margin:8px 0;padding-left:24px}.help-content ol li+li{margin-top:8px}.help-content .help-note{margin-top:12px}.help-content strong{color:#263e60}
.help-table-wrap{overflow-x:auto;margin:10px 0}.help-table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}.help-table th,.help-table td{border:1px solid #dfe6ef;padding:9px 11px;vertical-align:top}.help-table th{background:#f2f6fd;color:#334c6c}.help-table td:first-child{min-width:105px}
.help-example{background:#f7f9fc;border:1px solid #e2e8f1;border-radius:6px;padding:12px;overflow-x:auto;line-height:1.7;font-size:13px}.help-faq{margin:8px 0 0}.help-faq dt{font-weight:600;color:#263e60;margin-top:14px}.help-faq dd{margin:4px 0 0}

.legend-filters{display:flex;align-items:flex-end;flex-wrap:wrap;gap:9px;margin:6px 0 12px}.legend-filters label{display:flex;flex-direction:column;gap:5px;color:#63758d;font-size:11px}.legend-filters select,.legend-filters input{height:32px;padding:0 8px;border:1px solid #dce3ed;border-radius:5px;background:#fff;font-size:12px;min-width:100px}.legend-filters .legend-search{flex:1;min-width:150px}.legend-filters input{width:100%;box-sizing:border-box}#legend-filter-count{width:100%;font-size:11px;color:#8290a4;line-height:1.6}.legend-filters .button{height:32px}

.channel-filters{margin:0 0 12px;padding:10px;background:#f7f9fc;border:1px solid #e2e8f1;border-radius:7px}#channel-filter-count{width:100%;font-size:11px;color:#8290a4;line-height:1.6}.channel-filters select{max-width:100%}

.upload-destination{display:flex;align-items:center;gap:6px;font-size:12px;color:#63758d}.upload-destination select{max-width:180px;height:34px;border:1px solid #dce3ed;border-radius:5px;padding:0 8px;background:#fff}.topbar-actions{flex-wrap:wrap}

@media(max-width:760px){.topbar{height:auto;min-height:64px;gap:12px;padding-top:12px;padding-bottom:12px;flex-wrap:wrap}.topbar-actions{gap:8px}.upload-destination select{max-width:140px}}

/* Let the extra clear action wrap without clipping the chart header. */
.chart-panel .panel-head{height:auto;min-height:69px;padding-top:12px;padding-bottom:12px}.chart-actions{flex-wrap:wrap;justify-content:flex-end}

.zip-import-controls{align-items:flex-end;flex-wrap:wrap}.zip-import-controls label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--muted)}#zip-import-results{margin:10px 0;font-size:12px}#zip-import-results summary{cursor:pointer}#zip-import-report{white-space:pre-wrap;overflow-wrap:anywhere;max-height:280px;overflow:auto;padding:10px;background:#f5f7fa;border-radius:8px}

.zip-results{margin:0 0 22px;padding:18px 22px}.zip-results[hidden]{display:none}#zip-import-dialog{width:min(580px,calc(100vw - 32px));border:1px solid var(--line);border-radius:13px;padding:20px;color:var(--ink)}#zip-import-dialog::backdrop{background:#18273c66}#zip-import-dialog p{line-height:1.7}#zip-import-dialog .zip-import-controls{display:flex;flex-direction:column;align-items:stretch;gap:10px}#zip-import-dialog .zip-import-controls label{font-size:13px}#zip-import-status{line-height:1.6;overflow-wrap:anywhere}

/* Three independent chart views also fit narrower screens. */
.chart-mode{flex-wrap:wrap}
