:root{--green:#205741;--green-dark:#173f31;--green-light:#eaf2ee;--ink:#20342c;--muted:#68786f;--border:#dce5df;--paper:#fff;--bg:#f1f5f2;--blue:#376b9e;--red:#b75b60;font-family:"Microsoft YaHei","Noto Sans CJK SC",Arial,sans-serif;color:var(--ink);font-size:14px;letter-spacing:0}*{box-sizing:border-box}body{margin:0;background:var(--bg)}button,select,input{font:inherit;color:inherit}button,select{border:1px solid var(--border);background:white;border-radius:4px}button{cursor:pointer;min-height:32px;padding:5px 11px}button:hover{background:var(--green-light);border-color:#9db5a7}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #418f74;outline-offset:2px}button:disabled,select:disabled{cursor:not-allowed;color:#7e8782;background:#f1f3f1}button.active{background:var(--green);color:white;border-color:var(--green)}.quiet{background:transparent;border-color:var(--border);font-size:12px}.header{height:82px;background:white;border-bottom:1px solid var(--border);padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:18px}.brand{display:flex;gap:14px;align-items:center;min-width:0}.brand-mark{border-left:4px solid var(--green);padding:10px 10px 10px 8px;color:var(--green);font-family:Arial,sans-serif;font-weight:800;font-size:17px}.brand h1{font-size:21px;margin:0;font-weight:700;line-height:1.4}.brand p{font-size:12px;margin:4px 0 0;color:var(--muted)}.header-tools{display:flex;align-items:center;gap:10px;flex-shrink:0}.status{font-size:12px;color:var(--green);background:var(--green-light);padding:6px 10px;border-radius:3px}.module-nav{display:flex;justify-content:space-between;align-items:center;padding:0 24px;background:white;height:49px;border-bottom:1px solid var(--border);gap:10px}.module-nav [role=tablist]{display:flex;gap:26px;height:100%}.module-nav button{border:0;border-bottom:3px solid transparent;border-radius:0;background:none;min-width:130px;font-weight:700;padding:0 8px}.module-nav button.active{background:none;color:var(--green);border-bottom-color:var(--green)}.module-nav>span{font-size:12px;color:var(--muted)}.workspace{padding:14px 20px 10px;display:grid;grid-template-columns:230px minmax(460px,1fr) 285px;gap:14px;align-items:start}.controls{grid-row:1 / span 2;background:white;border:1px solid var(--border);border-radius:5px;padding:0 16px;min-width:0}.controls section{padding:16px 0;border-bottom:1px solid var(--border)}.controls section:last-child{border-bottom:0}.controls h2,.details h2{font-size:14px;margin:0 0 13px}.controls label:not(.check){display:block;font-size:12px;color:var(--muted);margin:12px 0 7px}.controls select{width:100%;padding:8px;min-height:35px;font-size:12px}.controls input[type=range]{width:100%;accent-color:var(--green);margin:9px 0}.controls strong{float:right;font-size:18px;color:var(--green)}.playback{display:grid;grid-template-columns:30px 39px 30px 1fr;gap:5px;align-items:center}.playback button{padding:3px;font-size:16px}.static-field{padding:10px;background:var(--green-light);font-size:12px;border-radius:4px}.field-note{font-size:11px;line-height:1.75;color:var(--muted);margin:9px 0 0;overflow-wrap:anywhere}.check{display:flex;align-items:center;gap:7px;font-size:12px;margin:12px 0}.check input{accent-color:var(--green)}.module-control[hidden]{display:none}.map-panel{background:white;border:1px solid var(--border);border-radius:5px;overflow:hidden;min-width:0;position:relative}.map-toolbar{min-height:65px;border-bottom:1px solid var(--border);padding:13px 16px;display:flex;justify-content:space-between;gap:12px;align-items:center}.map-toolbar h2{font-size:16px;margin:0 0 5px}.map-toolbar span{font-size:11px;color:var(--muted)}.map-actions{display:flex;gap:6px;flex-shrink:0}.map-actions button{padding:4px 8px;min-height:30px}.map-canvas{position:relative;background:#fafcfb;min-height:360px;display:flex;align-items:center;justify-content:center}.map-canvas>svg{display:block;width:100%;height:clamp(360px,47vh,580px)}.map-footer{padding:11px 16px 5px;display:flex;justify-content:space-between;align-items:flex-start;gap:14px;min-height:49px}.map-footer>span{font-size:11px;color:var(--muted);text-align:right;white-space:nowrap}.map-footnote{margin:5px 16px 12px;font-size:11px;line-height:1.6;color:var(--muted);min-height:18px}.legend-ramp{width:205px;height:9px;border:1px solid #d9e1dd;border-radius:2px}.legend-numbers{display:flex;justify-content:space-between;width:205px;font-size:10px;margin-top:4px}.legend-label{font-size:10px;margin-bottom:5px}.categorical-legend{display:flex;flex-wrap:wrap;gap:6px 15px;font-size:10px;max-width:600px}.swatch{display:inline-block;width:10px;height:10px;border-radius:1px;margin-right:5px;vertical-align:-1px}.map-notice{padding:8px 15px;background:#f9f3e5;color:#756035;font-size:12px;line-height:1.6;border-bottom:1px solid #e8dfcb}.tooltip{position:absolute;background:rgba(255,255,255,.97);padding:8px 11px;border:1px solid var(--border);border-radius:4px;font-size:11px;line-height:1.7;pointer-events:none;max-width:230px;box-shadow:0 3px 12px #193d2b12;z-index:5}.grid-cell{stroke:#fff;stroke-width:.12;cursor:pointer}.grid-cell:hover{stroke:#172f25;stroke-width:1.2}.selection-outline{fill:none;stroke:#142e22;stroke-width:2;pointer-events:none}.map-gridline{stroke:#dfe8e2;stroke-width:.55;stroke-dasharray:3 5}.map-axis{font-size:12px;fill:#738078}.details{background:white;border:1px solid var(--border);border-radius:5px;overflow:hidden;min-width:0}.details>section{padding:16px;border-bottom:1px solid var(--border)}.details>section:last-child{border:0}.section-head{display:flex;justify-content:space-between;gap:10px;align-items:start}.section-head>span{font-size:10px;color:var(--muted);background:#f1f5f2;padding:3px 5px;border-radius:2px}.stat-row{display:flex;justify-content:space-between;gap:8px;padding:7px 0;font-size:12px;line-height:1.4;border-bottom:1px solid #edf1ee}.stat-row:last-child{border:0}.stat-row span{color:var(--muted)}.stat-row strong{text-align:right;font-size:13px;font-variant-numeric:tabular-nums;max-width:60%;overflow-wrap:anywhere}.stat-row.emphasis strong{color:var(--green);font-size:20px}.empty{font-size:12px;color:var(--muted);line-height:1.8;margin:10px 0 15px}.selection-panel{min-height:150px}.interpretation{background:#f8faf8}.interpretation h2{margin-bottom:8px}.interpretation p{margin:0;font-size:11px;color:var(--muted);line-height:1.85}.charts{grid-column:2 / 4;display:grid;grid-template-columns:1.2fr 1fr;gap:14px;min-width:0}.charts article{background:white;border:1px solid var(--border);border-radius:5px;padding:12px 15px 8px;min-width:0}.chart-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.chart-head h2{font-size:13px;margin:0}.chart-head>span{font-size:10px;color:var(--muted);text-align:right}.charts svg{display:block;width:100%;height:190px;margin-top:8px}.chart-legend{font-size:11px;color:var(--muted);min-height:18px;line-height:1.5;display:flex;justify-content:center;gap:20px;flex-wrap:wrap}.chart-label{font-size:12px;fill:#617068}.chart-zero{stroke:#adbdb3;stroke-width:1;stroke-dasharray:4 4}.chart-grid{stroke:#e8eeea;stroke-width:1}.chart-point{cursor:pointer}.page-footer{padding:4px 24px 11px;display:flex;justify-content:space-between;font-size:10px;color:#7a867e;gap:16px}dialog{border:1px solid var(--border);border-radius:6px;padding:0;width:min(720px,90vw);max-height:78vh;color:var(--ink)}dialog::backdrop{background:#15291e55}.dialog-head{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid var(--border);position:sticky;top:0;background:white}.dialog-head h2{font-size:16px;margin:0}.dialog-head button{font-size:21px;border:0;padding:0 8px}#sourceContent{padding:14px 20px;font-size:12px;line-height:1.85}#sourceContent h3{font-size:13px;margin:15px 0 5px}#sourceContent code{font-size:10px;word-break:break-all;color:#64766b}#loadError{padding:20px;background:#f9e5e5;color:#8a3333}#loadError[hidden]{display:none}.missing{color:#87938b}a{color:var(--green)}
@media(min-width:1700px){.workspace{grid-template-columns:248px minmax(600px,1fr) 310px}.map-canvas>svg{height:425px}.charts svg{height:180px}.header{height:86px}.map-toolbar h2{font-size:17px}.controls select,.stat-row{font-size:13px}.details{max-height:600px;overflow:auto}}
@media(max-width:1190px){.workspace{grid-template-columns:205px minmax(390px,1fr)}.details{grid-column:2;display:grid;grid-template-columns:1fr 1fr}.details .interpretation{grid-column:1 / 3}.charts{grid-column:2}.charts{grid-template-columns:1fr}.controls{grid-row:1 / span 3}.header-tools .status{display:none}.brand h1{font-size:18px}.map-actions{flex-wrap:wrap;justify-content:flex-end}.map-toolbar{align-items:flex-start}.module-nav{gap:6px}}
@media(max-width:760px){.header{height:auto;padding:14px;align-items:flex-start}.brand-mark{display:none}.brand h1{font-size:17px}.brand p{font-size:10px}.header-tools{gap:5px;flex-wrap:wrap;justify-content:flex-end}.header-tools button{font-size:10px;padding:4px 6px}.module-nav{padding:0 10px;height:auto;min-height:53px}.module-nav>span{display:none}.module-nav [role=tablist]{gap:3px;width:100%}.module-nav button{min-width:0;flex:1;font-size:12px;padding:14px 5px}.workspace{display:flex;flex-direction:column;padding:10px;gap:10px}.workspace>*{width:100%}.controls{display:grid;grid-template-columns:1fr 1fr;gap:0 14px;padding:0 12px}.controls .base-layers{display:none}.controls section{border:0;padding:10px 0}.controls h2{margin-bottom:7px}.controls label:not(.check){margin-top:7px}.controls .field-note{font-size:10px}.map-toolbar{padding:10px;gap:4px}.map-toolbar h2{font-size:13px}.map-actions{max-width:145px;gap:4px}.map-actions button{font-size:10px;padding:4px 6px}.map-canvas{min-height:250px}.map-canvas>svg{height:280px}.map-footer{padding:8px 10px;flex-wrap:wrap}.map-footnote{margin:2px 10px 10px}.categorical-legend{font-size:9px;gap:6px 10px}.details{display:block}.charts{display:block}.charts article{margin-bottom:10px}.charts svg{height:180px}.page-footer{padding:0 14px 12px;display:block;line-height:1.8}.page-footer span{display:block}.legend-ramp,.legend-numbers{width:180px}}

/* V1.1 display-only layer: retain all V1 controls, values, and state transitions. */
.basin-code{font-size:11px;fill:#7c8981}
.basin-name{font-size:13px;font-weight:500;fill:#314d3e}
#regionStats,#gridDetails{display:flex;flex-direction:column}
.stat-row.emphasis{order:-1;background:#edf4ef;border-bottom:0;border-left:3px solid #3c8060;padding:12px 10px;margin:0 0 8px}
.stat-row.emphasis span{color:#294e3a;font-weight:600}
#gridDetails .csi-stat{order:-1}
#gridDetails .stat-row[data-label*="Raw逐格CSI"]{order:-3}
#gridDetails .stat-row[data-label="共同域观测事件数"]{order:-2}
#gridDetails .technical-stat{order:3}
.stat-row.technical-stat span,.stat-row.technical-stat strong{font-size:12px;color:#7a887f;font-weight:400}
.baseline-note{flex-basis:100%;color:#4f6557;font-variant-numeric:tabular-nums}

@media(min-width:1280px) and (min-height:850px){
  :root{font-size:16px}
  .header{height:70px;padding:10px 20px}
  .brand h1{font-size:24px}
  .brand-mark{font-size:20px}
  .brand p{font-size:13px;margin-top:2px}
  .header-tools .quiet{font-size:14px;min-height:34px}
  .status{font-size:14px;padding:6px 10px}
  .module-nav{height:42px;padding:0 20px}
  .module-nav button{font-size:17px;min-width:155px}
  .module-nav>span{font-size:13px}
  .workspace{height:calc(100vh - 136px);padding:10px 16px;grid-template-columns:246px minmax(600px,1fr) 338px;grid-template-rows:minmax(0,1fr) 280px;gap:12px;align-items:stretch}
  .controls{height:100%;min-height:0;overflow:auto;padding:0 14px}
  .controls section{padding:13px 0}
  .controls h2,.details h2{font-size:17px;margin-bottom:10px}
  .controls label:not(.check){font-size:14px;margin:10px 0 6px}
  .controls select{font-size:15px;min-height:38px;padding:7px 8px}
  .static-field{font-size:14px;padding:9px}
  .controls .field-note{font-size:12px;line-height:1.65}
  .check{font-size:14px;margin:10px 0}
  .check input{width:15px;height:15px}
  .playback{grid-template-columns:31px 39px 31px 1fr}
  .map-panel{display:flex;flex-direction:column;min-height:0;height:100%}
  .map-toolbar{height:64px;min-height:64px;padding:10px 16px}
  .map-toolbar h2{font-size:23px;margin-bottom:3px}
  .map-toolbar span{font-size:13px}
  .map-actions .quiet{font-size:13px;padding:5px 9px;min-height:33px}
  .map-canvas{flex:1;min-height:0;overflow:hidden}
  .map-canvas>svg{width:100%;height:100%;min-height:0}
  .map-axis{font-size:15px;fill:#5e7064}
  .map-footer{flex:none;padding:9px 16px 5px;min-height:64px;align-items:center}
  .map-footer>span{font-size:13px}
  #mapLegend{position:relative;max-width:calc(100% - 190px)}
  .legend-ramp,.legend-numbers{width:265px}
  .legend-ramp{height:12px}
  .legend-label{font-size:12px;margin-bottom:3px}
  .legend-numbers{font-size:12px;margin-top:3px}
  #mapLegend>.legend-label:last-child:not(:first-child){position:absolute;left:285px;top:23px;white-space:nowrap}
  .categorical-legend{font-size:12px;gap:8px 16px;max-width:100%}
  .swatch{width:12px;height:12px}
  .map-footnote{flex:none;font-size:12px;line-height:1.5;min-height:18px;margin:1px 16px 9px}
  .map-notice{font-size:14px;flex:none;padding:8px 16px}
  .details{height:100%;max-height:none;min-height:0;overflow:auto}
  .details>section{padding:14px 16px}
  .section-head>span{font-size:12px}
  .stat-row{font-size:14px;padding:7px 0;line-height:1.5;align-items:center}
  .stat-row strong{font-size:19px}
  .stat-row.csi-stat[data-label*="空间"] strong{font-size:24px}
  .stat-row.emphasis strong{font-size:35px;line-height:1.1;max-width:54%}
  .stat-row.emphasis span{max-width:50%;line-height:1.5;font-size:15px}
  #gridDetails .csi-stat strong{font-size:26px}
  #gridDetails .stat-row{font-size:14px;padding:7px 0}
  #gridDetails .stat-row strong{font-size:17px}
  #gridDetails .csi-stat strong{font-size:25px}
  .details .field-note{font-size:14px;line-height:1.6}
  .details .technical-stat span,.details .technical-stat strong{font-size:14px}
  .selection-panel{min-height:125px}
  .empty{font-size:15px;line-height:1.65;margin-bottom:10px}
  .interpretation p{font-size:14px;line-height:1.65}
  .charts{grid-template-columns:1.05fr 1fr;gap:12px;min-height:0}
  .charts article{padding:12px 14px 9px;display:flex;flex-direction:column;min-height:0}
  .chart-head{min-height:26px;align-items:start}
  .chart-head h2{font-size:17px}
  .chart-head>span{font-size:12px;line-height:1.6}
  .charts svg{height:auto;flex:1;min-height:0;margin-top:4px}
  .chart-label{font-size:16px;fill:#4f6557}
  .basin-name{font-size:17px}
  .basin-code{font-size:12px}
  .chart-legend{font-size:12px;min-height:19px;line-height:1.6;column-gap:15px;row-gap:2px;flex:none}
  .baseline-note{font-size:13px;line-height:1.4}
  .page-footer{height:24px;padding:3px 18px 5px;font-size:11px;align-items:center}
  .tooltip{font-size:13px;max-width:260px;line-height:1.7}
}
@media(min-width:1280px) and (max-width:1650px) and (min-height:850px){
  .workspace{grid-template-columns:225px minmax(500px,1fr) 310px}
  .map-toolbar h2{font-size:20px}
  .map-actions .quiet{font-size:12px;padding:5px 7px}
  #mapLegend>.legend-label:last-child:not(:first-child){position:static;margin-top:4px;font-size:11px}
  .map-footer{min-height:84px}
  .chart-head h2{font-size:15px}
  .chart-head>span{font-size:11px}
}
