/* 区域报告：复用全局设计变量，原生 resize，无额外 UI 依赖。 */
#reportWorkspace{--rw-accent:var(--ui-primary,#2563eb);position:fixed;inset:auto;right:16px;top:72px;width:50vw;height:min(680px,calc(100dvh - 88px));min-width:min(390px,calc(100vw - 32px));max-width:calc(100vw - 32px);min-height:0;max-height:calc(100dvh - 88px);z-index:1600;resize:both;overflow:hidden;display:flex;flex-direction:column;background:var(--ui-canvas,#f3f6fa);color:var(--ui-text,#1e293b);border:1px solid var(--ui-line,#e2e8f0);border-radius:16px;box-shadow:0 16px 48px #0f172a26;font:13px/1.5 'Segoe UI','Microsoft YaHei',sans-serif;container-type:inline-size}
#reportWorkspace *{box-sizing:border-box}
#reportWorkspace [hidden]{display:none!important}
#reportWorkspace button{font:inherit;cursor:pointer;border:1px solid var(--ui-line,#e2e8f0);border-radius:7px;background:white;color:inherit;padding:7px 12px;transition:background .15s,border-color .15s}
#reportWorkspace button:hover{background:#f1f5f9;border-color:#cbd5e1}
#reportWorkspace button:focus-visible{outline:2px solid var(--rw-accent);outline-offset:3px}
#reportWorkspace button:disabled{opacity:.45;cursor:wait}
#reportWorkspace header{padding:18px 20px 14px;display:flex;align-items:center;gap:12px;background:white;border-bottom:1px solid var(--ui-line,#e2e8f0)}
#reportWorkspace .rw-title{flex:1;min-width:0}
#reportWorkspace h2{font-size:18px;letter-spacing:-.4px;font-weight:650;margin:0 0 4px}
#reportWorkspace small{font-size:11px;color:var(--ui-muted,#64748b)}
#reportWorkspace .rw-window-tools{display:flex;gap:4px;flex-shrink:0}
#reportWorkspace .rw-window-tools button{width:30px;height:30px;padding:0;border-color:transparent;background:transparent;color:#64748b;font-size:17px}
#reportWorkspace .rw-window-tools button:hover{background:#f1f5f9;color:#0f172a}
#reportWorkspace .rw-toolbar{padding:12px 20px;display:flex;gap:8px;align-items:center;background:white}
#reportWorkspace .rw-toolbar small{margin-right:auto}
#reportWorkspace [data-export]{background:var(--rw-accent);border-color:var(--rw-accent);color:white;font-weight:600}
#reportWorkspace [data-export]:hover{filter:brightness(.94)}
#reportWorkspace nav{display:flex;gap:4px;padding:0 20px 12px;flex-wrap:wrap;background:white;border-bottom:1px solid var(--ui-line,#e2e8f0)}
#reportWorkspace nav button{border-color:transparent;background:transparent;color:#64748b;padding:7px 10px;font-size:12px}
#reportWorkspace nav button.active{color:var(--rw-accent);background:var(--ui-primary-soft,#eff6ff);font-weight:600}
#reportWorkspace .rw-stats{display:grid;grid-template-columns:1.4fr 1fr .8fr;gap:10px;padding:14px 20px;flex-shrink:0}
#reportWorkspace .rw-stats>span{display:flex;flex-direction:column;justify-content:center;padding:10px 14px;background:white;border:1px solid var(--ui-line,#e2e8f0);border-radius:10px;font-size:11px;color:#64748b;min-width:0}
#reportWorkspace .rw-stats strong{display:block;font-size:20px;line-height:1.4;color:#0f172a;font-weight:650;margin-top:3px;overflow-wrap:anywhere}
#reportWorkspace .rw-body{padding:0 20px 14px;display:flex;flex-direction:column;gap:14px;overflow:auto;min-height:0;flex:1}
#reportWorkspace .rw-map{position:relative;flex-shrink:0;height:clamp(300px,40vh,520px);background:white;border:1px solid var(--ui-line,#e2e8f0);border-radius:10px;overflow:hidden}
#reportWorkspace .rw-figure{height:100%;padding:10px}
#reportWorkspace .rw-figure svg{display:block;width:100%;height:100%}
#reportWorkspace .rw-side{background:white;border:1px solid var(--ui-line,#e2e8f0);border-radius:10px;padding:14px;flex-shrink:0}
#reportWorkspace .rw-side h3{font-size:13px;font-weight:650;margin:0 0 3px}
#reportWorkspace .rw-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
#reportWorkspace .rw-list button{display:flex;flex-direction:column;align-items:flex-start;text-align:left;padding:10px 12px;font-size:12px;overflow-wrap:anywhere}
#reportWorkspace .rw-list button b{font-weight:600}
#reportWorkspace .rw-list button span{margin:4px 0;font-size:12px;color:#475569}
#reportWorkspace .rw-list button.active{background:#eff6ff;border-color:#93c5fd;color:#1d4ed8}
#reportWorkspace .rw-message{font-size:11px;line-height:1.7;color:#64748b;padding-top:12px}
#reportWorkspace .rw-error{color:#b91c1c}
#reportWorkspace footer{padding:9px 30px 9px 20px;background:white;border-top:1px solid var(--ui-line,#e2e8f0);font-size:10px;color:#64748b;flex-shrink:0;max-height:70px;overflow:auto}
#reportWorkspace .rw-all{position:absolute;inset:0;background:white;overflow:auto;padding:20px;z-index:2}
#reportWorkspace .rw-all h3{margin-top:0;font-size:14px}
#reportWorkspace .rw-all .zone-indicator-row{padding:10px 0;border-bottom:1px solid #e2e8f0}
#reportWorkspace.rw-print .rw-side,#reportWorkspace.rw-print .rw-stats{display:none}
#reportWorkspace.rw-print .rw-body{padding-top:14px}
#reportWorkspace.rw-print .rw-map{height:100%;min-height:300px;flex:1}
@container (min-width:900px){#reportWorkspace .rw-body{display:grid;grid-template-columns:minmax(0,1fr) 260px;align-items:start}#reportWorkspace .rw-map{height:100%;min-height:350px}#reportWorkspace .rw-list{grid-template-columns:1fr}#reportWorkspace.rw-print .rw-body{grid-template-columns:1fr}}
@container (max-width:460px){#reportWorkspace header{padding:12px}#reportWorkspace .rw-toolbar,#reportWorkspace nav{padding-left:12px;padding-right:12px}#reportWorkspace .rw-toolbar small{display:none}#reportWorkspace .rw-stats{padding:12px;gap:6px}#reportWorkspace .rw-stats>span{padding:8px}#reportWorkspace .rw-stats strong{font-size:17px}#reportWorkspace .rw-body{padding:0 12px 12px}#reportWorkspace .rw-list{grid-template-columns:1fr}#reportWorkspace h2{font-size:16px}}
@media(max-width:600px){#reportWorkspace{width:calc(100vw - 24px);right:12px;max-width:calc(100vw - 24px);min-width:280px}}
@media(prefers-reduced-motion:reduce){#reportWorkspace button{transition:none}}
#reportWorkspace{box-sizing:border-box}
#reportWorkspace[hidden],#reportWorkspaceMinimized[hidden]{display:none!important}
#reportWorkspaceMinimized{position:fixed;right:16px;bottom:16px;z-index:1600;display:flex;align-items:center;max-width:calc(100vw - 32px);background:white;border:1px solid var(--ui-line,#e2e8f0);border-radius:10px;box-shadow:0 6px 24px #0f172a26;padding:4px;font:13px/1.5 'Segoe UI','Microsoft YaHei',sans-serif;color:var(--ui-text,#1e293b)}
#reportWorkspaceMinimized button{font:inherit;color:inherit;border:0;background:transparent;border-radius:6px;padding:10px 12px;cursor:pointer}
#reportWorkspaceMinimized button:hover{background:#eff6ff}
#reportWorkspaceMinimized button:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
#reportWorkspaceMinimized span{margin-left:16px;font-size:12px;color:#2563eb}
#reportWorkspace .rw-window-tools button{display:inline-flex;align-items:center;justify-content:center;width:34px;height:30px;border-radius:4px}
#reportWorkspace .rw-window-tools [data-close]:hover,#reportWorkspaceMinimized [data-dismiss]:hover{background:#c42b1c;color:white}
#reportWorkspaceMinimized [data-dismiss]{display:inline-flex;align-items:center;justify-content:center}
#reportWorkspace.rw-maximized{top:16px;right:16px;width:calc(100vw - 32px)!important;height:calc(100dvh - 32px)!important;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);min-width:0;min-height:0;resize:none}
/* 固定层级导航与年度选择，图面只保留图名和图例。 */
#reportWorkspace .rw-toolbar select{margin-right:auto;padding:7px 30px 7px 10px;border:1px solid #e2e8f0;border-radius:7px;background:white;color:#334155;font:inherit}
#reportWorkspace .rw-title small:empty{display:none}
#reportWorkspace .rw-title small button{border:0;background:none;padding:0;color:#64748b;font-size:11px}
#reportWorkspace .rw-title small button:hover{color:#2563eb}
#reportWorkspace .rw-stats{display:block;padding:12px 20px}
#reportWorkspace .rw-stats>span{flex-direction:row;align-items:center;justify-content:space-between;padding:10px 14px;font-size:12px}
#reportWorkspace .rw-stats strong{margin:0;font-size:21px}
#reportWorkspace .rw-message:empty{display:none}
#reportWorkspace .rw-list button{position:relative;padding-right:28px}
#reportWorkspace .rw-list button i{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:20px;font-style:normal;color:#94a3b8}
#reportWorkspace .rw-side{min-height:90px}
/* 紧凑布局：图面按自身比例展开，不再在拉满高度的卡片里居中。 */
#reportWorkspace header{padding:10px 16px;min-height:50px}
#reportWorkspace h2{font-size:17px;margin-bottom:0}
#reportWorkspace .rw-toolbar{padding:8px 16px;gap:6px}
#reportWorkspace nav{padding:0 16px 8px;gap:2px}
#reportWorkspace nav button{padding:5px 9px}
#reportWorkspace .rw-stats{padding:8px 16px}
#reportWorkspace .rw-stats>span{padding:6px 12px;border-radius:7px}
#reportWorkspace .rw-stats strong{font-size:19px}
#reportWorkspace .rw-body{padding:0 16px 12px;gap:10px;align-content:start}
#reportWorkspace .rw-map,#reportWorkspace.rw-print .rw-map{height:auto;min-height:0;flex:none;align-self:start;width:100%}
#reportWorkspace .rw-figure{height:auto;padding:4px}
#reportWorkspace .rw-figure svg{height:auto;width:100%}
#reportWorkspace .rw-side{padding:12px;min-height:0}
#reportWorkspace .rw-list{margin-top:8px;gap:6px}
#reportWorkspace .rw-list button{padding:8px 26px 8px 10px}
#reportWorkspace .rw-list button span{margin:2px 0 0}
#reportWorkspace.rw-print .rw-body{padding-top:8px;display:block}
@container (min-width:760px){#reportWorkspace .rw-body{display:grid;grid-template-columns:minmax(0,1fr) 220px;align-items:start}#reportWorkspace .rw-list{grid-template-columns:1fr}#reportWorkspace.rw-print .rw-body{display:block}}

#reportWorkspace>header,#reportWorkspace>.rw-toolbar,#reportWorkspace>nav{flex-shrink:0}
#reportWorkspace .rw-body{flex:0 1 auto}
#reportWorkspace.rw-maximized .rw-body{flex:1 1 auto}

/* 窗口尺寸与数据解耦，仅内部图面适配可用空间。 */
#reportWorkspace .rw-body{flex:1 1 auto;display:grid;grid-template-columns:minmax(0,1fr) 200px;grid-template-rows:minmax(0,1fr);align-content:stretch;align-items:start;overflow:hidden}
#reportWorkspace .rw-map,#reportWorkspace.rw-print .rw-map{height:100%;min-height:0;align-self:stretch;overflow:auto}
#reportWorkspace .rw-figure{height:100%;min-height:0}
#reportWorkspace .rw-figure svg{height:100%;width:100%}
#reportWorkspace .rw-side{max-height:100%;overflow:auto}
#reportWorkspace .rw-list{grid-template-columns:1fr}
#reportWorkspace.rw-print .rw-body{display:grid;grid-template-columns:minmax(0,1fr)}
@container(max-width:600px){#reportWorkspace .rw-body{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(140px,1fr) auto;overflow:auto}#reportWorkspace .rw-side{max-height:150px}#reportWorkspace.rw-print .rw-body{grid-template-rows:minmax(0,1fr)}}#reportWorkspace.rw-all-mode .rw-body{display:block;padding-top:8px}
#reportWorkspace.rw-all-mode .rw-map{height:100%;width:100%}
#reportWorkspace .rw-indicator-link{cursor:pointer;border-radius:5px}
#reportWorkspace .rw-indicator-link:hover{background:#eff6ff;color:#1d4ed8}
#reportWorkspace .rw-indicator-link:focus-visible{outline:2px solid #2563eb;outline-offset:-2px}
/* 数据库可返回任意数量的指标，标签横向滚动，避免挤占图面。 */
#reportWorkspace nav{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scroll-padding-inline:16px;min-height:43px}
#reportWorkspace nav button{flex-shrink:0;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#reportWorkspace nav [data-all]{position:sticky;left:0;z-index:1;background:white;box-shadow:6px 0 8px white}
#reportWorkspace nav [data-all].active{background:var(--ui-primary-soft,#eff6ff)}
#reportWorkspace .rw-stats>span{gap:12px}
#reportWorkspace .rw-stats strong{flex-shrink:0}
#reportWorkspace .rw-stats strong.long-value{font-size:14px;line-height:1.5}
#reportWorkspace .rw-stats small.rw-detail{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;font-size:11px;line-height:1.55;color:#64748b;margin-top:4px;overflow-wrap:anywhere}
