.board-viewport {
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  overflow:auto;
  color:#eaf4f8;
  background:#09141e;
  color-scheme:dark;
}
.board-viewport:fullscreen { display:block; }
.board-viewport.cb-stage { overflow:hidden; }
.corporate-board {
  --surface:#122432;
  --edge:#2b4253;
  --muted:#a0b7c7;
  --mint:#7ce8bc;
  --blue:#7fc9fb;
  --gold:#f4cf8d;
  box-sizing:border-box;
  display:grid;
  grid-template-rows:70px 46px 132px minmax(0,1.54fr) minmax(0,1fr) auto;
  gap:14px;
  width:var(--board-width, 1920px);
  height:var(--board-height, 1080px);
  padding:18px 28px 14px;
  transform:scale(var(--board-scale, 1));
  transform-origin:top left;
  font-family:Inter,'Segoe UI','Microsoft YaHei',sans-serif;
  font-variant-numeric:tabular-nums;
  background:radial-gradient(ellipse at 48% 35%,#1a3648 0%,transparent 52%),#09141e;
}
.corporate-board :is(button,select),.board-return button {
  border:1px solid #375062;
  border-radius:8px;
  padding:8px 14px;
  font-size:15px;
  font-weight:600;
  color:#dcecf4;
  background:#172b39;
}
.corporate-board :is(button,select):hover,.board-return button:hover { background:#244353; color:#fff; border-color:#6796ac; }
.board-viewport :focus-visible { outline:2px solid #8be9c4; outline-offset:2px; }
.cb-header { display:grid; grid-template-columns:1fr minmax(0,1.7fr) 1fr; gap:16px; align-items:center; border-bottom:1px solid var(--edge); padding-bottom:10px; }
.cb-brand { display:flex; align-items:center; gap:12px; font-size:24px; font-weight:700; letter-spacing:.05em; }
.cb-brand b { display:grid; place-items:center; width:44px; height:44px; border-radius:13px; color:#09251f; background:linear-gradient(145deg,#a0edc5,#56cfa8); box-shadow:0 4px 22px #5de2b127; }
.cb-brand svg { width:25px; height:25px; }
.cb-brand small { display:block; margin-top:4px; color:var(--muted); font-size:12px; letter-spacing:.1em; font-weight:500; }
.cb-heading { text-align:center; }
.cb-heading h1 { margin:0; font-size:33px; font-weight:700; letter-spacing:.07em; }
.cb-heading p { margin:5px 0 0; color:var(--muted); font-size:14px; }
.cb-demo { display:inline-block; margin-left:8px; padding:1px 6px; color:#f4cf8d; border:1px solid #796146; border-radius:4px; font-size:11px; }
.cb-tools { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:8px; }
.cb-update { color:var(--muted); font-size:14px; }
.cb-nav { display:flex; gap:12px; align-items:center; }
.cb-nav>button:last-child { margin-left:auto; }
.cb-switch { display:flex; gap:4px; padding:3px; background:#142633; border:1px solid var(--edge); border-radius:10px; }
.cb-switch button { background:transparent; border-color:transparent; padding-block:6px; }
.cb-switch button[aria-pressed="true"] { color:var(--mint); background:#243f43; border-color:#49736d; }
.cb-metrics { display:grid; grid-template-columns:.84fr 1fr 1.62fr 1.48fr .92fr 1.2fr; gap:12px; min-width:0; }
.cb-metric {
  display:flex; flex-direction:column; justify-content:center; gap:11px;
  min-width:0; padding:13px 16px; border:1px solid var(--edge); border-radius:13px;
  background:linear-gradient(150deg,#1b3242,#142634 72%);
}
.cb-metric small { display:flex; align-items:center; gap:9px; color:#c4d8e4; font-size:17px; }
.cb-metric svg,.cb-panel-title svg { width:23px; height:23px; flex:none; color:var(--blue); }
.cb-metric strong { font-size:33px; line-height:1.06; font-weight:700; letter-spacing:-.035em; overflow-wrap:anywhere; }
.cb-metric em { margin-left:7px; color:#b4c8d4; font-size:15px; font-weight:500; font-style:normal; letter-spacing:0; }
.cb-metric-bolt { background:radial-gradient(ellipse at 84% 114%,#307c65 0%,transparent 66%),linear-gradient(140deg,#184a43,#132e32); border-color:#4c8679; color:#a2f5cb; }
.cb-metric-bolt strong,.cb-metric-cost strong { font-size:clamp(34px,2.45vw,46px); }
.cb-metric-bolt svg,.cb-metric-leaf svg { color:var(--mint); }
.cb-metric-cost { background:radial-gradient(ellipse at 84% 115%,#735431 0%,transparent 70%),linear-gradient(145deg,#443c2d,#2a2826); border-color:#7a6546; color:#ffe3ad; }
.cb-metric-cost svg { color:var(--gold); }
.cb-layout,.cb-bottom { display:grid; gap:14px; min-height:0; min-width:0; }
.cb-layout { grid-template-columns:minmax(0,.85fr) minmax(0,2.12fr) minmax(0,1.2fr); }
.cb-agent .cb-layout { grid-template-columns:minmax(0,.95fr) minmax(0,1.25fr) minmax(0,1.25fr); }
.cb-bottom { grid-template-columns:minmax(0,1.15fr) minmax(0,1.4fr); }
.cb-panel {
  display:flex; flex-direction:column; min-width:0; min-height:0; overflow:hidden;
  background:linear-gradient(154deg,#182e3c 0%,var(--surface) 72%); border:1px solid var(--edge); border-radius:14px;
}
.cb-panel-title { display:flex; align-items:center; justify-content:space-between; gap:12px; flex:none; min-height:52px; padding:0 16px; border-bottom:1px solid #2b4253; }
.cb-panel-title h2 { display:flex; align-items:center; gap:9px; margin:0; font-size:20px; font-weight:650; }
.cb-panel-title>span { font-size:13px; color:var(--muted); text-align:right; }
.cb-map {
  position:relative; display:grid; place-items:center; flex:1; min-height:0; padding:4px 22px;
  background:radial-gradient(ellipse at 50% 56%,#23526a88,transparent 72%),
    linear-gradient(#a4d2eb0a 1px,transparent 1px),linear-gradient(90deg,#a4d2eb0a 1px,transparent 1px);
  background-size:auto,32px 32px,32px 32px;
}
.cb-map svg { position:absolute; inset:0; margin:auto; width:100%; height:100%; filter:drop-shadow(0 9px 12px #020912); }
.cb-map [data-province] { fill:#27516a; stroke:#79b6d2; stroke-width:.85; }
.cb-map [data-province].active { fill:#4cccae; fill-opacity:var(--region-intensity,.65); stroke:#89edd6; }
.cb-map [data-province]:hover { stroke:#dcfbff; stroke-width:1.75; }
.cb-map svg text { fill:#ecf8ff; paint-order:stroke; stroke:#142c40; stroke-width:2px; }
.cb-map-legend { display:flex; align-items:center; gap:8px; padding:11px 16px; color:#d0e3ec; font-size:13px; }
.cb-map-legend i { width:8px; height:8px; border-radius:50%; background:var(--mint); }
.cb-map-legend span { margin-left:auto; color:var(--muted); }
.cb-regions,.cb-ranking,.cb-period { margin:0; padding:10px 16px; list-style:none; overflow:auto; scrollbar-width:thin; }
.cb-regions li { display:grid; grid-template-columns:5.4em 1fr 3em; align-items:center; gap:8px; padding:10px 0; font-size:15px; }
.cb-regions strong { text-align:right; color:#c1eaf4; }
.cb-bar { display:block; height:5px; border-radius:20px; background:#2a4252; }
.cb-bar::before { content:''; display:block; width:var(--fill); height:100%; border-radius:inherit; background:linear-gradient(90deg,#52aacc,#7ce8bc); }
.cb-ranking li { display:grid; grid-template-columns:29px minmax(0,1fr); gap:11px; align-items:center; padding:9px 0; }
.cb-ranking li+li { border-top:1px solid #263c4c; }
.cb-rank-number { display:grid; place-items:center; width:29px; height:29px; border-radius:8px; background:#253d4c; color:#c4dae5; font-weight:700; }
.cb-ranking li:first-child .cb-rank-number { background:#50432e; color:#f8d68d; }
.cb-rank-body>div { display:flex; align-items:center; gap:8px; justify-content:space-between; margin-bottom:6px; }
.cb-rank-body span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:15px; }
.cb-rank-body strong { white-space:nowrap; color:var(--mint); font-size:16px; }
.cb-rank-body small { font-size:11px; color:var(--muted); }
.cb-period { display:grid; gap:8px; }
.cb-period .cb-metric { padding:7px 12px; gap:5px; }
.cb-period .cb-metric strong { font-size:24px; }
.cb-period .cb-metric small { font-size:15px; }
.cb-period .cb-metric svg { width:18px; height:18px; }
.cb-trend { flex:1; display:flex; flex-direction:column; min-height:0; padding:8px 12px 6px; }
.cb-trend svg { display:block; width:100%; height:0; flex:1; min-height:0; }
.cb-trend svg text { fill:#b8cfdc; font-size:12px; }
.cb-trend svg line { stroke:#355061; }
.cb-chart-legend { display:flex; gap:16px; justify-content:flex-end; color:var(--muted); font-size:13px; }
.cb-chart-legend span::before { content:''; display:inline-block; width:10px; height:3px; margin-right:6px; vertical-align:middle; background:var(--blue); }
.cb-chart-legend span+span::before { background:var(--mint); }
.cb-table { overflow:auto; flex:1; min-height:0; scrollbar-width:thin; }
.cb-table table { width:100%; border-collapse:separate; border-spacing:0; }
.cb-table th,.cb-table td { padding:8px 14px; text-align:right; border:0; border-bottom:1px solid #2b4253; color:#d6e7f0; }
.cb-table th { position:sticky; top:0; background:#243a49; color:#d4e4ee; font-size:13px; white-space:nowrap; }
.cb-table td { font-size:15px; }
.cb-table tr:nth-child(even) td { background:#ffffff05; }
.cb-table :is(td,th):first-child { text-align:left; }
.cb-table td small { display:block; margin-top:4px; color:var(--muted); font-size:12px; }
.cb-empty { display:grid; flex:1; place-items:center; min-height:75px; color:var(--muted); font-size:15px; text-align:center; padding:14px; }
.cb-footer { font-size:12px; line-height:1.4; color:var(--muted); }
.board-return { display:flex; gap:8px; padding:12px 18px; background:#122432; }
.board-single-content>.display-board { min-height:calc(100dvh - 62px); border-radius:0; }
.board-viewport .board-status:not(:empty),.board-viewport .board-load-error { padding:12px 16px; background:#25364a; color:#fff; border-radius:8px; }
.board-viewport .board-status:not(:empty) { position:fixed; z-index:1; bottom:8px; left:12px; }
.board-viewport .board-status:empty { display:none; }

@media(max-width:750px) {
  .board-viewport.cb-stage { overflow:auto; }
  .corporate-board { width:100%; height:auto; min-height:100%; transform:none; grid-template-rows:none; gap:12px; padding:14px; }
  .cb-header { grid-template-columns:minmax(0,1fr); gap:12px; }
  .cb-brand,.cb-tools { justify-content:center; }
  .cb-heading h1 { font-size:24px; letter-spacing:.04em; }
  .cb-nav { flex-wrap:wrap; }
  .cb-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .cb-metric { padding:10px; }
  .cb-metric strong,.cb-metric-bolt strong,.cb-metric-cost strong { font-size:clamp(20px,5vw,32px); }
  .cb-metric small,.cb-metric em { font-size:12px; }
  .cb-metric svg { width:17px; height:17px; }
  .cb-layout,.cb-agent .cb-layout,.cb-bottom { grid-template-columns:minmax(0,1fr); }
  .cb-layout>.cb-panel:nth-child(2) { order:-1; }
  .cb-map { min-height:255px; }
  .cb-trend { min-height:185px; }
  .cb-table { max-height:370px; }
}

.corporate-board .cb-project-link {
  max-width:100%; min-width:0; padding:0; overflow:hidden;
  color:#b9e6ff; background:none; border:0; border-radius:2px;
  font-size:inherit; font-weight:inherit; text-align:left;
  text-overflow:ellipsis; white-space:nowrap; text-decoration:underline;
  text-underline-offset:3px; text-decoration-color:#6893a9;
}
.corporate-board .cb-project-link:hover { color:#fff; background:none; }
