:root {
  --ops-bg: #F3F7FA;
  --ops-card: #FFFFFF;
  --ops-ink: #0B2B45;
  --ops-muted: #5B738B;
  --ops-faint: #7A93A8;
  --ops-line: #DFE8EF;
  --ops-line-soft: #EBF1F5;
  --ops-cyan: #0891B2;
  --ops-cyan-bright: #00C2D1;
  --ops-green: #0A8A63;
  --ops-amber: #B45309;
  --ops-shadow: 0 1px 2px rgba(11, 43, 69, .035), 0 10px 30px -20px rgba(11, 43, 69, .22);
}

html, body {
  background-color: var(--ops-bg);
  color: var(--ops-ink);
  font-size: 14px;
}

body {
  background-image:
    linear-gradient(rgba(11, 43, 69, .024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 43, 69, .024) 1px, transparent 1px);
  background-size: 48px 48px;
}

.unified-header .uh-inner { height: 60px; max-width: 1600px; }
.unified-header .nav a { font-size: 12px; padding: 7px 11px; }
#app > header { height: 64px; padding: 8px 20px; }
#app > header .h-title { font-size: 15px; }
#app > header .h-sub { font-size: 10px; }
#app > header .main-title { font-size: 21px; letter-spacing: 3px; }
#app > nav:not(.unified-header nav) { min-height: 46px; padding: 7px 16px; gap: 5px; }
#app > nav:not(.unified-header nav) .nav-item { height: 32px; font-size: 12.5px; padding: 0 13px; }
.pt-mode-banner { min-height: 32px !important; font-size: 12px; }

.card {
  border: 1px solid var(--ops-line);
  border-radius: 15px;
  background: var(--ops-card);
  box-shadow: var(--ops-shadow);
}
.card-header {
  height: auto;
  min-height: 42px;
  padding: 8px 14px;
  font-size: 12.5px;
  letter-spacing: .035em;
}
.card-body { padding: 12px 14px; }
.card-body > .dr, .dr {
  min-height: 29px;
  padding: 5px 0;
  gap: 14px;
  font-size: 12px;
}
.dl { color: var(--ops-muted); }
.dv { color: var(--ops-ink); font-size: 13px; font-weight: 700; text-align: right; }
.alert-box { padding: 10px 12px; font-size: 12px; line-height: 1.7; border-radius: 10px; }
.info-box-green { border-radius: 10px; }

.kpi-bar {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
  min-height: 0;
  padding: 0;
}
.kpi {
  min-width: 0;
  min-height: 96px;
  padding: 13px 10px;
  border-radius: 14px;
  box-shadow: var(--ops-shadow);
}
.kpi .kl { font-size: 11px; color: var(--ops-muted); margin-bottom: 5px; }
.kpi .kv { font-size: 27px; line-height: 1.05; color: var(--ops-ink); }
.kpi .ku { font-size: 10px; color: var(--ops-faint); margin-left: 3px; }
.kpi .kd { font-size: 10.5px; color: var(--ops-faint); margin-top: 6px; }

.ov-layout {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr) 282px;
  gap: 12px;
  padding: 12px;
  height: 100%;
}
.ov-left, .ov-right {
  width: auto;
  gap: 12px;
  padding-right: 0;
}
.ov-center { gap: 12px; }
.ov-center > .scene-wrap, .ov-center > #sceneWrap { min-height: 520px; }
#pg1 > div, #pg2 > div { gap: 14px !important; padding: 14px !important; }
#pg2 > div { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
#pg2 > div > .card:first-child { grid-column: 1 / -1; }
#pg1 .card, #pg2 .card { flex-shrink: 0; }

.station-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}
.pump-card, .pump-card-enhanced {
  padding: 15px;
  border-radius: 14px;
  box-shadow: var(--ops-shadow);
}
.pump-card-enhanced { padding: 0; }
.pump-card .pc-name { font-size: 13px; }
.pump-card .pc-status { font-size: 10.5px; }
.pump-card .pc-cop { font-size: 28px; }
.pump-card .pc-cop-label { font-size: 10px; }
.pump-card .pc-row { font-size: 11px; padding: 4px 0; }
.hl-grid, .ov-grid { gap: 10px; }
.hl-item, .ov-item { padding: 11px; border-radius: 10px; }
.hl-item .hl-t, .ov-item .ov-label { font-size: 11px; }
.hl-item .hl-v, .ov-item .ov-val { font-size: 20px; }
.hl-item .hl-d { font-size: 10.5px; }

.trend-layout { gap: 14px; padding: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trend-card { min-height: 330px; border-radius: 15px; }
.trend-card-header { height: 44px; padding: 0 14px; }
.tch-title { font-size: 13px; }
.tch-sub { font-size: 10px; }
.trend-chart-area { min-height: 280px; }
.report-layout { gap: 14px; padding: 14px; }
.report-grid { gap: 14px; align-items: start; }
.proj-table, .pt-point-table { font-size: 12px; }
.proj-table th, .proj-table td, .pt-point-table th, .pt-point-table td { padding: 9px 10px !important; }
.cost-bar { height: 26px; border-radius: 7px; }
.cost-bar-fill { font-size: 11.5px; }

.es-layout { gap: 12px; padding: 12px; }
.es-left { width: 272px; gap: 12px; }
.es-right { width: 292px; gap: 12px; }
.es-center { gap: 12px; }
.es-center > #esSceneWrap, .es-center > .es-scene { min-height: 520px; }
.hp-grid { gap: 8px; }
.hp-card { padding: 9px; border-radius: 10px; }
.hp-card .hp-id { font-size: 11px; }
.hp-card .hp-val { font-size: 17px; }
.hp-card .hp-sub { font-size: 10px; }
.fan-grid { gap: 6px; }

/* 实时舞台：工具、指标、场景、辅助数据各有固定区域 */
#pgLive .pt3d-panel {
  left: 20px;
  top: 20px;
  width: 280px;
  max-height: calc(100% - 174px);
  padding: 16px;
  border: 1px solid rgba(223, 232, 239, .98);
  background: #FFFFFF;
  box-shadow: 0 18px 48px -24px rgba(11, 43, 69, .35);
  animation: none;
  opacity: 1 !important;
  z-index: 30;
}
#pgLive .pt3d-panel-h h4 { font-size: 14px; line-height: 1.45; }
#pgLive .pt3d-toolbar { top: 20px; right: 20px; gap: 2px; padding: 4px; }
#pgLive .pt3d-toolbar .badge { display: none; }
#pgLive .pt3d-toolbar button { height: 32px; padding: 0 10px; font-size: 11px; }
#pgLive .pt3d-hud {
  bottom: 18px;
  width: min(920px, calc(100% - 300px));
  max-width: calc(100% - 300px);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 6px;
  border-radius: 14px;
}
#pgLive .pt3d-hud .seg { min-width: 0; padding: 7px 10px; font-size: 10.5px; }
#pgLive .pt3d-hud .seg b { font-size: 17px; white-space: nowrap; }
#pgLive .pt3d-hud .seg b .u { font-size: 10px; }
#pgLive .pt3d-scale { left: 20px; bottom: 18px; }
#pgLive .pt3d-compass { right: 20px; bottom: 102px; }

.pt-live-float-hud {
  left: 320px;
  right: 20px;
  top: 82px;
  transform: none;
  max-width: none;
  width: auto;
  align-items: stretch;
  z-index: 24;
}
.pt-live-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.pt-live-mini {
  position: relative;
  min-width: 0;
  min-height: 82px;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid rgba(223, 232, 239, .95);
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 26px -18px rgba(11, 43, 69, .32);
}
.pt-live-mini .pt-kl { font-size: 11px; color: var(--ops-muted); }
.pt-live-mini b { margin-top: 3px; font-size: 24px; line-height: 1; letter-spacing: -.03em; }
.pt-live-mini b i { font-size: 10px; letter-spacing: 0; }
.pt-live-mini .pt-kd {
  display: block;
  margin-top: 6px;
  color: var(--ops-faint);
  font-size: 9.5px;
  line-height: 1.2;
  white-space: normal;
}
.pt-live-mini.is-updated { animation: opsDataPulse 1.25s ease-out; }
@keyframes opsDataPulse {
  0% { border-color: var(--ops-cyan-bright); box-shadow: 0 0 0 3px rgba(0, 194, 209, .18); }
  100% { border-color: rgba(223, 232, 239, .95); box-shadow: 0 10px 26px -18px rgba(11, 43, 69, .32); }
}
#pgLive:has(.pt3d-shell.detail-on) .pt-live-float-hud { right: 440px; }
#pgLive:has(.pt3d-shell.detail-on) .pt-live-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#pgLive:has(.pt3d-shell.detail-on) .pt3d-panel { display: none; }
#pgLive:has(.pt3d-shell.detail-on) .pt-live-dock,
#pgLive:has(.pt3d-shell.detail-on) .pt3d-scale { display: none; }
#pgLive .pt3d-shell.detail-on .pt3d-toolbar { right: 440px; }
#pgLive .pt3d-shell.detail-on .pt3d-compass { right: 440px; }
#pgLive:has(.pt-live-dock.open) .pt3d-panel,
#pgLive:has(.pt-live-dock.open) .pt-live-float-hud { display: none; }

.pt-live-dock { left: 20px; right: 20px; bottom: 86px; align-items: flex-start; }
.pt-live-dock-mobile-button { display: none; }
.pt-live-dock-toggle {
  height: 34px;
  padding: 0 15px;
  border: 1px solid var(--ops-line);
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--ops-shadow);
}
.pt-live-dock-body {
  width: 100%;
  max-height: 66vh;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--ops-line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .98);
}
.pt-live-dock-grid { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 16px; margin-top: 16px; }
.pt-raw-details { min-width: 0; }
.pt-raw-details summary {
  cursor: pointer;
  color: var(--ops-muted);
  font: 600 11px var(--pt-mono, monospace);
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.pt-unit-section { min-width: 0; }
.pt-unit-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 10px; }
.pt-unit-formula { color: var(--ops-faint); font-size: 10.5px; margin-top: 4px; }
.pt-unit-summary { text-align: right; white-space: nowrap; }
.pt-unit-summary b { display: block; font: 700 24px var(--pt-mono, monospace); color: var(--ops-green); }
.pt-unit-summary span { color: var(--ops-muted); font-size: 10.5px; }
.pt-unit-table-wrap { overflow-x: auto; border: 1px solid var(--ops-line-soft); border-radius: 11px; }
.pt-unit-table { width: 100%; min-width: 1040px; border-collapse: collapse; font-size: 11.5px; }
.pt-unit-table th {
  padding: 9px 10px;
  text-align: right;
  color: var(--ops-muted);
  background: #F5F8FA;
  border-bottom: 1px solid var(--ops-line);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.pt-unit-table th:first-child, .pt-unit-table th:nth-child(2), .pt-unit-table td:first-child, .pt-unit-table td:nth-child(2) { text-align: left; }
.pt-unit-table td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--ops-line-soft); font-family: var(--pt-mono, monospace); white-space: nowrap; }
.pt-unit-table tr:last-child td { border-bottom: 0; }
.pt-unit-table tr.is-standby td { color: var(--ops-faint); background: #FAFBFC; }
.pt-unit-table td.is-cop { color: var(--ops-green); font-weight: 700; }
.pt-unit-table td.is-supply { color: var(--ops-amber); }
.pt-unit-table td.is-return { color: var(--ops-cyan); }
.pt-unit-state { display: inline-flex; align-items: center; gap: 5px; font-family: var(--pt-sans, sans-serif); }
.pt-unit-state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #B7C4D0; }
.is-run .pt-unit-state { color: var(--ops-green); }
.is-run .pt-unit-state::before { background: #0FB981; box-shadow: 0 0 6px rgba(15, 185, 129, .6); }

/* 真实现场与 3D 共用舞台，实时指标保持可见 */
.pt3d-sitephoto {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  grid-template-rows: minmax(0, 1fr) auto;
  padding-bottom: 84px;
  background: #E8EFF4;
  outline: none;
  touch-action: pan-y;
}
.sitephoto-stage { position: relative; min-height: 0; overflow: hidden; background: #E8EFF4; }
.pt3d-sitephoto .sitephoto-main {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .24s ease;
  user-select: none;
}
.pt3d-sitephoto .sitephoto-main.is-ready { opacity: 1; }
.sitephoto-heading {
  position: absolute;
  top: 22px;
  left: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  background: rgba(250, 253, 254, .9);
  color: #0B2B45;
  box-shadow: 0 4px 18px rgba(11, 43, 69, .08);
  backdrop-filter: blur(12px);
  font: 700 10px var(--pt-mono, monospace);
  letter-spacing: .08em;
}
.sitephoto-heading b { color: #0E7490; font-size: 11px; }
.sitephoto-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  background: rgba(11, 43, 69, .78);
  color: #FFF;
  backdrop-filter: blur(10px);
  font: 300 32px/1 var(--pt-sans, sans-serif);
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.sitephoto-arrow:hover { background: #0E7490; transform: translateY(-50%) scale(1.05); }
.sitephoto-arrow.prev { left: 22px; }
.sitephoto-arrow.next { right: 22px; }
.sitephoto-arrow:focus-visible, .sitephoto-thumb:focus-visible { outline: 3px solid #00C2D1; outline-offset: 2px; }
.pt3d-sitephoto .sitephoto-caption {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  max-width: calc(100% - 150px);
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 12px;
  background: rgba(11, 43, 69, .84);
  color: #FFF;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}
.sitephoto-caption span { color: #7FE9F2; font: 700 10px var(--pt-mono, monospace); letter-spacing: .08em; }
.sitephoto-caption b { font-size: 13px; }
.sitephoto-caption small { color: rgba(255, 255, 255, .72); font-size: 10px; }
.sitephoto-status {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 48px);
  padding: 12px 18px;
  border: 1px solid rgba(11, 43, 69, .1);
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  color: #3D5A73;
  box-shadow: 0 8px 30px rgba(11, 43, 69, .08);
  font-size: 12px;
  text-align: center;
}
.sitephoto-status.show { display: block; }
.sitephoto-status.is-error { color: #B45309; }
.sitephoto-thumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 18px;
  overflow-x: auto;
  border-top: 1px solid rgba(11, 43, 69, .08);
  background: rgba(250, 253, 254, .98);
}
.sitephoto-thumb {
  position: relative;
  flex: 0 0 104px;
  width: 104px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 9px;
  background: #DCE6ED;
  cursor: pointer;
  opacity: .68;
  transition: opacity .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.sitephoto-thumb:hover { opacity: 1; }
.sitephoto-thumb.on { border-color: #00C2D1; box-shadow: 0 0 0 2px rgba(0, 194, 209, .14); opacity: 1; }
.sitephoto-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.sitephoto-thumb span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(11, 43, 69, .8);
  color: #FFF;
  font: 700 9px var(--pt-mono, monospace);
}
.pt3d-sitephoto.is-single .sitephoto-arrow, .pt3d-sitephoto.is-single .sitephoto-thumbs { display: none; }
.pt3d-shell.sitephoto-on .pt3d-sitephoto { display: grid; }
.pt3d-shell.sitephoto-on .pt3d-gl,
.pt3d-shell.sitephoto-on .pt3d-labels,
.pt3d-shell.sitephoto-on .pt3d-panel,
.pt3d-shell.sitephoto-on .pt3d-compass,
.pt3d-shell.sitephoto-on .pt3d-hint,
.pt3d-shell.sitephoto-on .pt3d-scale { display: none; }
#pgLive:has(.pt3d-shell.sitephoto-on) .pt-live-float-hud,
#pgLive:has(.pt3d-shell.sitephoto-on) .pt-live-dock { display: none; }
@media (max-width: 680px) {
  .pt3d-sitephoto { padding-bottom: 126px; }
  .sitephoto-heading { top: 64px; left: 16px; padding: 7px 9px; }
  .sitephoto-arrow { width: 38px; height: 38px; font-size: 28px; }
  .sitephoto-arrow.prev { left: 12px; }
  .sitephoto-arrow.next { right: 12px; }
  .pt3d-sitephoto .sitephoto-caption { bottom: 12px; max-width: calc(100% - 32px); padding: 8px 11px; gap: 4px 8px; }
  .sitephoto-caption small { width: 100%; }
  .sitephoto-thumbs { justify-content: flex-start; padding: 8px 12px; }
  .sitephoto-thumb { flex-basis: 82px; width: 82px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .pt3d-sitephoto .sitephoto-main, .sitephoto-arrow, .sitephoto-thumb { transition: none; }
}

@media (max-width: 1280px) {
  .ov-layout { grid-template-columns: 248px minmax(0, 1fr) 248px; gap: 10px; padding: 10px; }
  .station-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #pgLive .pt3d-panel { width: 250px; }
  .pt-live-float-hud { left: 290px; }
  .pt-live-mini b { font-size: 21px; }
  #pgLive .pt3d-hud { width: min(820px, calc(100% - 220px)); max-width: calc(100% - 220px); }
}

@media (max-width: 1020px) {
  .unified-header .nav { gap: 4px; }
  .ov-layout { grid-template-columns: 1fr; height: auto; }
  .ov-left, .ov-right { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .ov-center { min-height: 680px; }
  .trend-layout, .report-grid, #pg2 > div { grid-template-columns: 1fr; }
  #pgLive .pt3d-panel { display: none; }
  .pt-live-float-hud { left: 16px; right: 16px; top: 76px; }
  .pt-live-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #pgLive .pt3d-toolbar { right: 16px; top: 16px; max-width: calc(100% - 32px); overflow-x: auto; }
  #pgLive .pt3d-hud { grid-template-columns: repeat(3, minmax(0, 1fr)); width: calc(100% - 32px); max-width: calc(100% - 32px); }
  .pt-live-dock { left: 16px; right: 16px; bottom: 118px; }
  .pt-live-dock-grid { grid-template-columns: 1fr; }
  #pgLive:has(.pt3d-shell.detail-on) .pt-live-float-hud { right: 16px; }
  #pgLive .pt3d-shell.detail-on .pt3d-toolbar { right: 16px; }
  #pgLive .pt3d-shell.detail-on .pt3d-compass { right: 16px; }
  .sitephoto-caption { white-space: normal; width: calc(100% - 40px); flex-wrap: wrap; justify-content: center; text-align: center; }
}

@media (max-width: 680px) {
  .unified-header .uh-inner { height: 52px; padding: 0 12px; }
  .unified-header .nav, .unified-header .nav:not(.has-mobile-menu) { display: none !important; }
  #app { min-height: calc(100vh - 52px); }
  #app > header { display: grid; grid-template-columns: 1fr auto; height: auto; min-height: 0; padding: 10px 12px; gap: 8px; }
  #app > header .h-left { grid-column: 1 / -1; width: 100%; }
  #app > header .h-logo, #app > header .h-center, #app > header .sys-tag, #app > header .h-sub { display: none; }
  #app > header .h-info { width: 100%; }
  #app > header .h-title { font-size: 13px; line-height: 1.45; white-space: normal; }
  #app > header .h-right { grid-column: 1 / -1; width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 7px; }
  #app > header .clock { order: 1; font-size: 10.5px; }
  #app > header .pt-mode-switch { order: 2; }
  #app > header .btn-icon { order: 3; }
  #app > nav:not(.unified-header nav) { padding: 6px 8px; }
  .pt-mode-banner { flex-wrap: wrap; font-size: 11px; }
  .ov-left, .ov-right { grid-template-columns: 1fr; }
  .station-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; }
  .kpi-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend-layout, .report-layout, #pg1 > div, #pg2 > div { padding: 8px !important; }
  .pt-live-mini { min-height: 76px; padding: 9px; }
  .pt-live-mini b { font-size: 19px; }
  .pt-live-mini .pt-kd { font-size: 8.5px; }
  #pgLive .pt3d-toolbar { left: 16px; right: 16px; justify-content: flex-start; flex-wrap: nowrap; }
  #pgLive .pt3d-toolbar button { flex: 0 0 auto; padding: 0 8px; font-size: 10px; }
  #pgLive .pt3d-toolbar [data-act="snow"], #pgLive .pt3d-toolbar [data-act="night"],
  #pgLive .pt3d-toolbar [data-act="ghost"], #pgLive .pt3d-toolbar [data-act="sound"], #pgLive .pt3d-toolbar [data-act="lang"] { display: none; }
  #pgLive .pt3d-scale, #pgLive .pt3d-compass { display: none; }
  #pgLive .pt-live-dock-toggle { display: none; }
  #pgLive .pt-live-dock-mobile-button { display: inline-flex; }
  .pt-live-dock { bottom: 170px; }
  .pt-live-dock.open { top: 64px; bottom: 170px; }
  .pt-live-dock.open .pt-live-dock-body { height: 100%; max-height: none; margin-top: 0; }
  .pt-live-dock-body { padding: 10px; }
  .pt-unit-head { align-items: flex-start; }
  .pt-unit-formula { max-width: 220px; }
  .pt3d-detail { width: calc(100% - 32px); right: 16px; }
  #pgLive:has(.pt3d-shell.detail-on) .pt-live-float-hud,
  #pgLive:has(.pt3d-shell.detail-on) .pt3d-hud { display: none; }
  .sitephoto-caption { bottom: 220px; }
}

.ops-archive-title {
  margin: 12px 0 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--ops-line-soft);
  color: var(--ops-faint);
  font: 600 10px var(--pt-mono, monospace);
  letter-spacing: .08em;
}
.ops-archive-row { background: #F5F8FA; }

.ai-page { overflow-y: auto; background: var(--ops-bg); }
.ai-shell { max-width: 1680px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.ai-hero {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 24px; border: 1px solid var(--ops-line); border-radius: 16px;
  background: linear-gradient(120deg, #FFFFFF 20%, #EFF9FA 100%); box-shadow: var(--ops-shadow);
}
.ai-eyebrow, .ai-card-head span { color: var(--ops-cyan); font: 700 10px var(--pt-mono, monospace); letter-spacing: .12em; }
.ai-hero h2 { margin: 6px 0 5px; font-size: 25px; line-height: 1.25; letter-spacing: -.02em; }
.ai-hero p { margin: 0; color: var(--ops-muted); font-size: 11.5px; line-height: 1.6; }
.ai-live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: #EAF8F2; color: var(--ops-green); font-size: 11px; white-space: nowrap; }
.ai-live-pill i { width: 7px; height: 7px; border-radius: 50%; background: #0FB981; box-shadow: 0 0 8px rgba(15,185,129,.65); }
.ai-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ai-metric { padding: 16px 18px; border: 1px solid var(--ops-line); border-radius: 14px; background: #fff; box-shadow: var(--ops-shadow); }
.ai-metric span { display: block; color: var(--ops-muted); font-size: 11px; }
.ai-metric b { display: block; margin: 6px 0; color: var(--ops-ink); font: 700 29px/1.1 var(--pt-mono, monospace); letter-spacing: -.04em; }
.ai-metric small { color: var(--ops-faint); font-size: 10px; }
.ai-metric.is-saving { border-color: rgba(15,185,129,.28); background: linear-gradient(145deg, #fff, #F2FBF7); }
.ai-metric.is-saving b { color: var(--ops-green); }
.ai-metric.is-saving.is-over { border-color: rgba(180,83,9,.32); }
.ai-metric.is-saving.is-over b { color: var(--ops-amber); }
.ai-main-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); gap: 16px; align-items: start; }
.ai-bottom-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.ai-card { min-width: 0; padding: 16px; border: 1px solid var(--ops-line); border-radius: 15px; background: #fff; box-shadow: var(--ops-shadow); }
.ai-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ai-card-head h3 { margin: 4px 0 0; font-size: 15px; }
.ai-card-head > small { color: var(--ops-faint); font-size: 10px; white-space: nowrap; }
.ai-chart { height: 330px; min-width: 0; }
.ai-formula { margin-bottom: 8px; padding: 9px 10px; border: 1px solid var(--ops-line-soft); border-radius: 9px; background: #F6F9FB; color: var(--ops-muted); font: 500 10.5px/1.55 var(--pt-mono, monospace); }
.ai-baseline-ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.ai-baseline-ledger > div { min-width: 0; padding: 12px; border: 1px solid var(--ops-line-soft); border-radius: 10px; background: #F7FAFC; }
.ai-baseline-ledger span { display: block; color: var(--ops-muted); font-size: 10px; }
.ai-baseline-ledger b { display: block; margin-top: 5px; font: 700 18px var(--pt-mono, monospace); white-space: nowrap; }
.ai-deflist { margin: 12px 0 0; }
.ai-deflist > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--ops-line-soft); font-size: 11px; }
.ai-deflist dt { color: var(--ops-muted); }
.ai-deflist dd { margin: 0; color: var(--ops-ink); font: 700 11.5px var(--pt-mono, monospace); text-align: right; }
.ai-energy-row { display: grid; grid-template-columns: 80px 1fr 42px 1fr 42px 70px 34px; align-items: baseline; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--ops-line-soft); }
.ai-energy-row > span { color: var(--ops-muted); font-size: 11px; }
.ai-energy-row b { font: 700 14px var(--pt-mono, monospace); text-align: right; }
.ai-energy-row small { color: var(--ops-faint); font-size: 9.5px; }
.ai-energy-row.is-total { border-bottom: 0; }
.ai-energy-row.is-total b { color: var(--ops-cyan); }
.ai-quality-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.ai-quality-grid > div { padding: 9px; border: 1px solid var(--ops-line-soft); border-radius: 9px; background: #F7FAFC; }
.ai-quality-grid span { display: block; color: var(--ops-faint); font-size: 9.5px; }
.ai-quality-grid b { display: block; margin-top: 3px; font: 700 13px var(--pt-mono, monospace); }
.ai-today-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ai-today-item { min-width: 0; padding: 13px 14px; border: 1px solid var(--ops-line-soft); border-radius: 11px; background: #F7FAFC; }
.ai-today-item span { display: block; color: var(--ops-muted); font-size: 10.5px; }
.ai-today-item b { display: block; margin: 6px 0 4px; color: var(--ops-ink); font: 700 22px/1.15 var(--pt-mono, monospace); letter-spacing: -.03em; }
.ai-today-item small { color: var(--ops-faint); font-size: 9.5px; }
.ai-today-note { margin-top: 10px; color: var(--ops-muted); font-size: 10.5px; line-height: 1.7; }
@media (max-width: 1100px) {
  .ai-today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .ai-today-grid { gap: 8px; }
  .ai-today-item { padding: 11px; }
  .ai-today-item b { font-size: 18px; }
}
.ai-event-list { list-style: none; margin: 0; padding: 0; max-height: 350px; overflow-y: auto; }
.ai-event-list li { position: relative; margin-bottom: 8px; padding: 10px 10px 10px 14px; border: 1px solid var(--ops-line-soft); border-radius: 10px; background: #F8FAFC; }
.ai-event-list li::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 3px; background: var(--ops-cyan); }
.ai-event-list li.is-warning::before { background: #F59E0B; }
.ai-event-list li.is-critical::before { background: #E11D48; }
.ai-event-list li.is-resolved { opacity: .68; }
.ai-event-head { display: flex; justify-content: space-between; gap: 12px; }
.ai-event-head b { font-size: 11.5px; }
.ai-event-head span { color: var(--ops-faint); font-size: 10px; white-space: nowrap; }
.ai-event-list p { margin: 4px 0; color: var(--ops-muted); font-size: 10.5px; line-height: 1.5; }
.ai-event-list small { color: var(--ops-faint); font-size: 9.5px; }
.ops-tour-active { position: relative; overflow: hidden; }
.ops-tour-active > i { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--ops-cyan-bright); transition: width .25s linear; }
.ops-tour-exit { margin-left: auto; padding: 2px 8px; border: 1px solid var(--ops-line); border-radius: 999px; background: #fff; color: var(--ops-muted); cursor: pointer; font-size: 10px; }

@media (max-width: 1100px) {
  .ai-main-grid, .ai-bottom-grid { grid-template-columns: 1fr; }
  .ai-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .ai-shell { padding: 10px; gap: 10px; }
  .ai-hero { padding: 16px; align-items: flex-start; flex-direction: column; gap: 12px; }
  .ai-hero h2 { font-size: 21px; }
  .ai-metrics { gap: 8px; }
  .ai-metric { padding: 12px; }
  .ai-metric b { font-size: 22px; }
  .ai-card { padding: 12px; }
  .ai-chart { height: 260px; }
  .ai-energy-row { grid-template-columns: 62px 1fr 34px 1fr 34px 58px 28px; gap: 4px; }
  .ai-energy-row b { font-size: 11px; }
  .ai-quality-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ai-empty { height: 100%; min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px dashed var(--ops-line); border-radius: 12px; background: #F8FAFC; text-align: center; }
.ai-empty b { color: var(--ops-muted); font-size: 16px; }
.ai-empty span { max-width: 320px; color: var(--ops-faint); font-size: 11px; line-height: 1.6; }

@media (max-width: 680px) {
  html, body, #app, #main, .page, .card, .card-body, .report-grid, .ov-grid, .hl-grid { max-width: 100%; }
  .page { overflow-x: hidden; }
  .card, .card-body, .kpi, .hl-item, .ov-item, .stat { min-width: 0; }
  .card-header { flex-wrap: wrap; gap: 5px; height: auto; min-height: 42px; line-height: 1.45; }
  .card-header > span { min-width: 0; overflow-wrap: anywhere; }
  .card-body { overflow-x: hidden; }
  .card-body p, .card-body span, .card-body b, .card-body td, .dv, .ov-val, .hl-v, .kv, .pc-name { overflow-wrap: anywhere; }
  .proj-table, .pt-point-table { min-width: 560px; }
  .card-body > div[style*="overflow-x:auto"], .pt-unit-table-wrap, .sr-table-wrap, .sr-table {
    max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .proj-table td[style*="font-family"], .proj-table td[style*="font-size:10px"] { word-break: break-all; }
  .hl-grid, .ov-grid, .kpi-bar, .station-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .hl-item, .ov-item, .kpi { overflow: hidden; }
  .hl-item .hl-v, .ov-item .ov-val, .kpi .kv { font-size: 18px !important; line-height: 1.25; white-space: normal; }
  .kpi .kd, .hl-item .hl-d { white-space: normal; line-height: 1.35; }
  #pg4 div[style*="grid-template-columns:repeat(5,1fr)"],
  #pg4 div[style*="grid-template-columns:1fr 1fr 1fr 1fr"],
  #pg4 div[style*="grid-template-columns:1fr 1fr 1fr"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .trend-card-header { height: auto; min-height: 44px; flex-wrap: wrap; gap: 4px; }
  .tch-sub { white-space: normal; line-height: 1.4; }
  .trend-chart-area { min-height: 250px; }
  #app > nav:not(.unified-header nav) { scrollbar-width: none; scroll-snap-type: x proximity; }
  #app > nav:not(.unified-header nav)::-webkit-scrollbar { display: none; }
  #app > nav:not(.unified-header nav) .nav-item { scroll-snap-align: start; }

  .pt3d-shell .pt3d-toolbar {
    top: 10px; right: 10px; left: auto; width: calc(100% - 20px); max-width: calc(100% - 20px);
    display: flex; flex-wrap: nowrap; overflow-x: auto; transform: none;
    justify-content: flex-start; border-radius: 12px;
  }
  .pt3d-shell .pt3d-toolbar .badge { display: none; }
  .pt3d-shell .pt3d-toolbar button { flex: 0 0 auto; height: 30px; padding: 0 8px; font-size: 10px; }
  .pt3d-shell .pt3d-toolbar [data-act="snow"], .pt3d-shell .pt3d-toolbar [data-act="night"],
  .pt3d-shell .pt3d-toolbar [data-act="ghost"], .pt3d-shell .pt3d-toolbar [data-act="sound"],
  .pt3d-shell .pt3d-toolbar [data-act="lang"] { display: none; }
  .pt3d-shell .pt3d-label.station, .pt3d-shell .pt3d-label.aux, .pt3d-shell.pt3d-compact .pt3d-label { display: none !important; }
  .pt3d-shell .pt3d-scale, .pt3d-shell .pt3d-compass { display: none; }
  .pt3d-shell .pt3d-hud {
    bottom: 10px; width: calc(100% - 20px); max-width: calc(100% - 20px);
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible;
    border-radius: 12px;
  }
  .pt3d-shell .pt3d-hud .seg { min-width: 0; padding: 5px 6px; }
  .pt3d-shell .pt3d-hud .seg b { font-size: 15px; }
  .pt3d-shell .pt3d-hint { max-width: calc(100% - 32px); white-space: normal; text-align: center; }
  .pt3d-shell .pt3d-detail { width: calc(100% - 20px); right: 10px; max-height: 62%; }
  .pt3d-shell .dp-kpi b { font-size: 16px; }
  .pt3d-shell .dp-body { padding: 12px; }
  .pt3d-shell .dp-cycle { max-width: 100%; }
  #pgLive .pt3d-hud { width: calc(100% - 32px); max-width: calc(100% - 32px); }
  #pgLive .pt3d-toolbar { left: 16px; right: 16px; width: auto; max-width: calc(100% - 32px); }
  #pgLive .pt3d-shell.detail-on .pt3d-toolbar { right: 16px; }

  .wshp-pipe .pipe-particles, .wshp-pipe .flow-dots, .wshp-pipe .pipe-arrow { display: none !important; }
  .wshp-pipe .pipe-temp { position: relative; right: auto; font-size: 12px; }
  .wshp-pipe { padding: 0 9px; }
  #pg2 .wshp-flow-section > div[style*="display:flex;align-items:center;gap:8px"] {
    display: grid !important; grid-template-columns: 1fr !important; gap: 8px !important;
  }
  #pg2 .wshp-flow-section > div[style*="display:flex;align-items:center;gap:8px"] > div[style*="flex:0 0 auto"] { display: none !important; }
  #pg2 .wshp-flow-section > div[style*="display:flex;align-items:center;gap:8px"] > div[style*="flex:1"] { min-width: 0; }
  .pump-card-enhanced .pc-name { font-size: 12px; line-height: 1.4; }
  .pump-card-enhanced .pc-status { line-height: 1.4; white-space: normal !important; }

  .es-layout { height: auto; }
  .es-left, .es-right { width: 100%; }
  .es-center { min-height: 500px; }
  .hp-detail-overlay { overflow-y: auto; }
  .hp-detail-overlay .hp-detail-3d { position: relative; inset: auto; height: 250px; }
  .hp-detail-overlay .hp-float-panel {
    position: relative !important; left: auto !important; right: auto !important; top: auto !important;
    width: auto !important; max-width: none !important; margin: 8px;
  }
  .hp-detail-overlay .hp-principle-bar {
    position: relative; left: auto; bottom: auto; transform: none; margin: 8px;
    white-space: normal; flex-wrap: wrap; justify-content: center;
  }

  .sr-top { margin: 8px; padding: 10px; gap: 8px; }
  .sr-scan { display: none; }
  .sr-title .sr-t1 { font-size: 14px; line-height: 1.4; }
  .sr-title .sr-t2 { line-height: 1.45; }
  .sr-stage { grid-template-columns: 1fr; }
  .sr-twin { height: 340px !important; min-height: 320px !important; }
  .sr-bar { flex-wrap: wrap; margin: 8px; padding: 10px; gap: 8px; }
  .sr-prog { min-width: 0; }
  .sr-live-grid, .sr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .sr-daypanel, .sr-sidepanel { min-width: 0; }
  .sr-dp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .sr-chart-sum .sum-cell { min-width: 90px; }
}

.ai-history-only[hidden] { display: none !important; }
.ai-rangebar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px;
  padding: 13px 16px; border: 1px solid var(--ops-line); border-radius: 14px;
  background: var(--ops-card); box-shadow: var(--ops-shadow);
}
.ai-range-presets { display: flex; gap: 5px; padding: 3px; border-radius: 999px; background: var(--ops-bg); }
.ai-range-presets button, .ai-apply, .ai-range-status button, .ai-expand-all {
  min-height: 30px; padding: 5px 12px; border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: var(--ops-muted); cursor: pointer; font-size: 11px; white-space: nowrap;
  transition: color .2s, background-color .2s, border-color .2s;
}
.ai-range-presets button.is-active { background: var(--ops-ink); color: #fff; box-shadow: 0 2px 8px rgba(11,43,69,.12); }
.ai-range-presets button:hover:not(.is-active), .ai-range-status button:hover, .ai-expand-all:hover { color: var(--ops-cyan); background: #EFF9FA; }
.ai-date-range { display: flex; align-items: center; gap: 7px; color: var(--ops-faint); font-size: 10px; }
.ai-date-range label { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ai-date-range input {
  width: 132px; min-height: 32px; padding: 4px 7px; border: 1px solid var(--ops-line); border-radius: 8px;
  background: #fff; color: var(--ops-ink); font: 500 10.5px var(--pt-mono, monospace);
}
.ai-apply { border-color: var(--ops-cyan); background: var(--ops-cyan); color: #fff; }
.ai-apply:hover { background: var(--ops-ink); border-color: var(--ops-ink); }
.ai-range-status { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 1 1 300px; min-width: 0; }
.ai-range-status > span { color: var(--ops-muted); font-size: 10.5px; line-height: 1.5; text-align: right; }
.ai-range-status button { flex: 0 0 auto; color: var(--ops-cyan); }
.ai-expand-all { border-color: var(--ops-line); background: #F7FAFC; color: var(--ops-cyan); }
.ai-table-meta { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 10px; color: var(--ops-faint); font-size: 10.5px; }
.ai-table-meta > span:first-child { color: var(--ops-muted); font-weight: 600; }
.ai-table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--ops-line-soft); border-radius: 11px; -webkit-overflow-scrolling: touch; }
.ai-history-table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; font: 500 11px var(--pt-mono, monospace); }
.ai-history-table th {
  padding: 10px 12px; border-bottom: 1px solid var(--ops-line); background: #F7FAFC;
  color: var(--ops-muted); font-size: 10px; font-weight: 600; text-align: right; white-space: nowrap;
}
.ai-history-table th:first-child, .ai-history-table td:first-child { text-align: left; }
.ai-history-table td { padding: 10px 12px; border-bottom: 1px solid var(--ops-line-soft); color: var(--ops-ink); text-align: right; white-space: nowrap; }
.ai-day-row:last-child td { border-bottom: 0; }
.ai-day-row { transition: background-color .2s; }
.ai-day-row:hover, .ai-day-row.is-open { background: #F4FBFC; }
.ai-day-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 2px 0; border: 0; background: transparent; color: var(--ops-ink); cursor: pointer; font: 700 11px var(--pt-mono, monospace); }
.ai-day-toggle > span { display: inline-block; color: var(--ops-cyan); font-size: 14px; transition: transform .2s; }
.ai-day-toggle[aria-expanded="true"] > span { transform: rotate(180deg); }
.ai-saving-value { color: var(--ops-green) !important; font-weight: 700; }
.ai-history-table .is-negative { color: #E11D48 !important; }
.ai-hour-detail > td { padding: 0; background: #F7FAFC; text-align: left; white-space: normal; }
.ai-hour-wrap { max-height: 380px; overflow: auto; padding: 12px 16px 16px; border-bottom: 1px solid var(--ops-line); }
.ai-hour-title { margin-bottom: 8px; color: var(--ops-cyan); font: 700 10px var(--pt-mono, monospace); }
.ai-hour-wrap table { width: 100%; min-width: 780px; border-collapse: collapse; background: #fff; }
.ai-hour-wrap th, .ai-hour-wrap td { padding: 7px 10px; border: 1px solid var(--ops-line-soft); font-size: 10px; }
.ai-hour-wrap th { background: #EFF9FA; }
.ai-table-empty { padding: 28px 16px; color: var(--ops-faint); font: 500 11px/1.6 -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif; text-align: center; }
.ai-rangebar button:focus-visible, .ai-history-table button:focus-visible, .ai-date-range input:focus-visible {
  outline: 2px solid var(--ops-cyan-bright); outline-offset: 2px;
}

@media (max-width: 1280px) {
  .ai-range-status { flex-basis: 100%; justify-content: space-between; }
  .ai-range-status > span { text-align: left; }
}
@media (max-width: 680px) {
  .ai-rangebar { padding: 11px; gap: 10px; }
  .ai-range-presets { width: 100%; overflow-x: auto; border-radius: 11px; }
  .ai-range-presets button { flex: 0 0 auto; }
  .ai-date-range { width: 100%; display: grid; grid-template-columns: 1fr 1fr auto; gap: 7px; }
  .ai-date-range > span { display: none; }
  .ai-date-range label { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
  .ai-date-range input { width: 100%; min-width: 0; padding: 4px; font-size: 10px; }
  .ai-apply { align-self: end; min-height: 32px; padding: 5px 13px; }
  .ai-range-status { flex-basis: 100%; align-items: flex-start; }
  .ai-range-status > span { flex: 1; }
  .ai-table-meta { flex-direction: column; gap: 3px; }
  .ai-history-table { min-width: 900px; }
  .ai-hour-wrap { padding: 10px; }
}
.ai-quality-strip {
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
  padding: 11px 16px; border: 1px solid var(--ops-line); border-radius: 13px; background: var(--ops-card);
}
.ai-quality-heading { display: flex; align-items: baseline; gap: 8px; }
.ai-quality-heading > span { color: var(--ops-cyan); font: 700 9px var(--pt-mono, monospace); letter-spacing: .12em; }
.ai-quality-heading > b { font-size: 12px; }
.ai-source-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-source-badge { padding: 4px 8px; border-radius: 999px; background: #EAF8F2; color: var(--ops-green); font-size: 9.5px; white-space: nowrap; }
.ai-source-badge.is-fallback { background: #FFF7E8; color: var(--ops-amber); }
.ai-quality-summary { margin-left: auto; color: var(--ops-muted); font-size: 10.5px; }
.ai-quality-time { color: var(--ops-faint); font: 500 9.5px var(--pt-mono, monospace); white-space: nowrap; }
.ai-report-metrics, .ai-strategy-metrics { display: grid; gap: 9px; margin-bottom: 12px; }
.ai-report-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ai-strategy-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ai-report-metrics > div, .ai-strategy-metrics > div { min-width: 0; padding: 11px 12px; border: 1px solid var(--ops-line-soft); border-radius: 10px; background: #F7FAFC; }
.ai-report-metrics span, .ai-strategy-metrics span { display: block; color: var(--ops-muted); font-size: 10px; }
.ai-report-metrics b, .ai-strategy-metrics b { display: block; margin: 5px 0 3px; color: var(--ops-ink); font: 700 19px var(--pt-mono, monospace); white-space: nowrap; }
.ai-report-metrics small, .ai-strategy-metrics small { display: block; color: var(--ops-faint); font-size: 9px; line-height: 1.45; }
.ai-chart-compact { height: 290px; }
.ai-metered-chart-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 4px; }
.ai-metered-chart-bar label { display: flex; align-items: center; gap: 8px; color: var(--ops-muted); font-size: 10.5px; }
.ai-metered-chart-bar select { min-height: 30px; padding: 4px 28px 4px 9px; border: 1px solid var(--ops-line); border-radius: 8px; background: #fff; color: var(--ops-ink); font-size: 10.5px; }
.ai-metered-chart-bar > span { color: var(--ops-faint); font-size: 9.5px; }
.ai-metered-details { margin-top: 10px; }
.ai-metered-details > summary { padding: 8px 0; color: var(--ops-cyan); cursor: pointer; font-size: 10.5px; font-weight: 600; }
.ai-metered-table { min-width: 760px; }
.ai-data-note { margin-top: 10px; color: var(--ops-faint); font-size: 9.5px; line-height: 1.65; }
.ai-strategy-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .65fr); gap: 16px; align-items: start; }
.ai-strategy-aside { padding: 12px; border: 1px solid var(--ops-line-soft); border-radius: 11px; background: #F7FAFC; }
.ai-strategy-state { padding: 9px 10px; border-radius: 8px; background: #EFF9FA; color: var(--ops-cyan); font-size: 11px; font-weight: 700; }
.ai-strategy-advice { margin-top: 10px; }
.ai-strategy-advice > div { margin-top: 8px; padding: 9px; border: 1px solid var(--ops-line-soft); border-radius: 8px; background: #fff; }
.ai-strategy-advice b, .ai-strategy-advice span { display: block; }
.ai-strategy-advice b { margin-bottom: 4px; color: var(--ops-cyan); font-size: 9.5px; }
.ai-strategy-advice span { color: var(--ops-muted); font-size: 9.5px; line-height: 1.6; }
.ai-operations-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.ai-operations-grid > .ai-card { display: flex; flex-direction: column; height: 100%; }
.ai-comfort-card .ai-data-note, .ai-thermal-card .ai-data-note { margin-top: auto; padding-top: 12px; }
.ai-storage-card .ai-air-availability { margin-top: auto; }
.ai-air-details { margin-top: 6px; }
.ai-air-details > summary { color: var(--ops-cyan); cursor: pointer; font-size: 9.5px; font-weight: 600; }
.ai-air-details #aiAirUnits { margin-top: 8px; }
.ai-comfort-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.ai-comfort-summary > div { padding: 10px; border: 1px solid var(--ops-line-soft); border-radius: 9px; background: #F7FAFC; }
.ai-comfort-summary span { display: block; color: var(--ops-faint); font-size: 9.5px; }
.ai-comfort-summary b { display: block; margin-top: 4px; font: 700 16px var(--pt-mono, monospace); }
.ai-room-row { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 10px 0; border-bottom: 1px solid var(--ops-line-soft); }
.ai-room-row:last-child { border-bottom: 0; }
.ai-room-row > span { font-size: 11px; font-weight: 600; }
.ai-room-row > b { color: var(--ops-green); font: 700 18px var(--pt-mono, monospace); }
.ai-room-row > small { grid-column: 1/-1; color: var(--ops-faint); font-size: 9.5px; }
.ai-room-row.is-stale > b { color: var(--ops-amber); }
.ai-room-empty { padding: 20px 0; color: var(--ops-faint); font-size: 11px; text-align: center; }
.ai-storage-path { margin-bottom: 10px; padding: 8px 10px; border-radius: 8px; background: #EFF9FA; color: var(--ops-cyan); font-size: 10.5px; font-weight: 600; }
.ai-point-list > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--ops-line-soft); }
.ai-point-list > div > span { color: var(--ops-muted); font-size: 10px; }
.ai-point-list > div > b { font: 700 11px var(--pt-mono, monospace); text-align: right; white-space: nowrap; }
.ai-point-list > div > small { grid-column: 1/-1; color: var(--ops-faint); font-size: 8.5px; }
.ai-air-availability { margin-top: 12px; }
.ai-air-availability > span { display: block; color: var(--ops-muted); font-size: 10px; }
.ai-air-availability > b { display: block; margin: 4px 0 8px; font-size: 10.5px; }
#aiAirUnits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.ai-air-unit { padding: 6px 4px; border: 1px solid var(--ops-line-soft); border-radius: 7px; background: #F7FAFC; text-align: center; }
.ai-air-unit span, .ai-air-unit b { display: block; }
.ai-air-unit span { color: var(--ops-faint); font: 500 8.5px var(--pt-mono, monospace); }
.ai-air-unit b { margin-top: 2px; font-size: 9px; }
.ai-air-unit.is-run b { color: var(--ops-green); }
.ai-air-unit.is-attention { border-color: rgba(225,29,72,.25); }
.ai-air-unit.is-attention b { color: #E11D48; }
.ai-thermal-value { display: flex; align-items: baseline; gap: 8px; padding: 12px 0; }
.ai-thermal-value > b { color: var(--ops-ink); font: 700 42px var(--pt-mono, monospace); letter-spacing: -.04em; }
.ai-thermal-value > span { color: var(--ops-faint); font-size: 10px; }
.ai-thermal-label { display: inline-block; padding: 5px 9px; border-radius: 999px; background: #EFF9FA; color: var(--ops-cyan); font-size: 10px; font-weight: 700; }

@media (max-width: 1100px) {
  .ai-quality-summary { margin-left: 0; }
  .ai-report-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ai-strategy-layout, .ai-operations-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .ai-quality-strip { align-items: flex-start; gap: 8px; padding: 11px; }
  .ai-quality-heading { width: 100%; }
  .ai-quality-summary, .ai-quality-time { width: 100%; white-space: normal; }
  .ai-report-metrics, .ai-strategy-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .ai-report-metrics > div, .ai-strategy-metrics > div { padding: 10px; }
  .ai-report-metrics b, .ai-strategy-metrics b { font-size: 16px; }
  .ai-chart-compact { height: 260px; }
  .ai-metered-chart-bar > span { display: none; }
  .ai-point-list > div > b { white-space: normal; }
  .ai-comfort-summary b { font-size: 13px; }
}
.ai-page .ai-shell { gap: 14px; padding: 18px; }
.ai-page .ai-hero { padding: 18px 22px; border-radius: 16px; }
.ai-page .ai-hero h2 { font-size: 24px; }
.ai-page .ai-card { padding: 18px; border-radius: 16px; box-shadow: 0 1px 2px rgba(11,43,69,.03), 0 12px 30px -24px rgba(11,43,69,.18); }
.ai-page .ai-card-head { align-items: center; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--ops-line-soft); }
.ai-page .ai-card-head h3 { letter-spacing: -.01em; }
.ai-page .ai-metric { min-height: 116px; display: flex; flex-direction: column; justify-content: center; }
.ai-page .ai-metric small { line-height: 1.5; }
.ai-page .ai-main-grid { align-items: stretch; }
.ai-page .ai-chart-card { display: flex; flex-direction: column; }
.ai-page .ai-chart-card .ai-chart { flex: none; }
.ai-page .ai-quality-strip { background: #F8FAFC; box-shadow: none; }
.ai-page .ai-table-scroll { border-radius: 12px; }
.ai-page .ai-report-metrics > div, .ai-page .ai-strategy-metrics > div { background: #FAFCFD; }

@media (max-width: 680px) {
  .ai-page .ai-shell { padding: 10px; gap: 10px; }
  .ai-page .ai-card { padding: 13px; }
  .ai-page .ai-card-head { align-items: flex-start; gap: 8px; }
  .ai-page .ai-card-head > small { white-space: normal; text-align: right; line-height: 1.45; }
  .ai-page .ai-hero h2 { font-size: 21px; }
  .ai-page .ai-metric { min-height: 108px; }
}
body[data-site="beijing"] #app > nav:not(.unified-header nav) {
  height: 54px;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(150px, 210px) 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px 20px;
  overflow: visible;
  background: rgba(255, 255, 255, .97);
}
body[data-site="beijing"] #app > nav:not(.unified-header nav):has(.ai-project-archive[open]) { position: relative; z-index: 60; }
body[data-site="beijing"] #app > nav .nav-item-primary {
  height: 38px;
  padding: 0 20px;
  border: 1px solid var(--ops-line);
  border-radius: 999px;
  color: var(--ops-muted);
  font-size: 13px;
  letter-spacing: .04em;
  background: #FAFCFD;
}
body[data-site="beijing"] #app > nav .nav-item-primary::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: #B7C4D0;
  vertical-align: 1px;
}
body[data-site="beijing"] #app > nav .nav-item-primary[data-page="pgLive"]::before { background: var(--ops-green); }
body[data-site="beijing"] #app > nav .nav-item-primary:hover { border-color: var(--ops-cyan); color: var(--ops-cyan); background: #F4FBFC; }
body[data-site="beijing"] #app > nav .nav-item-primary.active { border-color: var(--ops-ink); background: var(--ops-ink); color: #FFF; }
body[data-site="beijing"] #app > nav .nav-item-primary.active::before { background: var(--ops-cyan-bright); box-shadow: 0 0 8px rgba(0, 194, 209, .65); }
body[data-site="beijing"] .h-right .pt-mode-switch { display: none; }
.ai-project-archive { position: relative; justify-self: end; }
.ai-project-archive > summary {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ops-muted);
  cursor: pointer;
  font-size: 12px;
  list-style: none;
  white-space: nowrap;
}
.ai-project-archive > summary::-webkit-details-marker { display: none; }
.ai-project-archive > summary::after { content: '⌄'; color: var(--ops-faint); font-size: 13px; transition: transform .2s; }
.ai-project-archive[open] > summary::after { transform: rotate(180deg); }
.ai-project-archive > summary:hover, .ai-project-archive[open] > summary { border-color: var(--ops-line); background: #F4FBFC; color: var(--ops-cyan); }
.ai-project-archive:has(.nav-item.active) > summary { color: var(--ops-ink); background: #EFF9FA; }
.ai-project-archive-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 336px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--ops-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 20px 48px rgba(11, 43, 69, .14);
}
.ai-project-archive-menu .nav-item { width: 100%; height: 40px; padding: 0 12px; border-radius: 9px; text-align: left; font-size: 12px; }
.ai-project-archive-menu .nav-item.active { background: var(--ops-ink); }
.ai-project-archive > summary:focus-visible, body[data-site="beijing"] #app > nav .nav-item:focus-visible { outline: 2px solid var(--ops-cyan-bright); outline-offset: 2px; }

body[data-site="beijing"] { background-image: none; }
body[data-site="beijing"] #app > header { box-shadow: none; }
body[data-site="beijing"] .pt-mode-banner.live-ok { border-color: var(--ops-line); background: #F8FAFC; }
.ai-page .ai-shell { max-width: 1480px; gap: 22px; padding: 24px 32px 48px; }
.ai-page .ai-savings-hero {
  min-height: 0;
  padding: 4px 0 24px;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid var(--ops-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.ai-savings-hero::after { display: none; }
.ai-savings-hero .ai-eyebrow { font-size: 9px; letter-spacing: .16em; }
.ai-page .ai-savings-hero h2 { margin: 8px 0 7px; font-size: 32px; font-weight: 700; letter-spacing: -.035em; }
.ai-savings-hero p { color: var(--ops-muted); font-size: 11.5px; }
.ai-savings-hero .ai-live-pill { padding: 7px 11px; border: 0; background: #EAF8F2; font-size: 10px; }
.ai-flow-section { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ai-flow-section + .ai-flow-section { margin-top: 4px; padding-top: 28px; border-top: 1px solid var(--ops-line); }
.ai-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 2px; }
.ai-section-heading span { color: var(--ops-cyan); font: 700 9px var(--pt-mono, monospace); letter-spacing: .14em; }
.ai-section-heading h2 { margin: 5px 0 0; color: var(--ops-ink); font-size: 19px; line-height: 1.35; letter-spacing: -.02em; }
.ai-section-heading > small { color: var(--ops-muted); font-size: 10.5px; line-height: 1.6; text-align: right; }
.ai-page .ai-card { border-color: var(--ops-line); border-radius: 14px; box-shadow: none; }
.ai-page .ai-card-head { margin-bottom: 14px; padding-bottom: 12px; }
.ai-page .ai-card-head h3 { font-size: 15px; font-weight: 650; }
.ai-page .ai-card-head span { font-size: 9px; letter-spacing: .12em; }

.ai-page .ai-current-section {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--ops-line);
  border-radius: 16px;
  background: #FFF;
}
.ai-current-section > .ai-section-heading { padding: 18px 22px; border-bottom: 1px solid var(--ops-line-soft); }
.ai-current-section > .ai-section-heading span { display: none; }
.ai-current-section > .ai-section-heading h2 { margin: 0; font-size: 16px; }
.ai-page .ai-current-saving-card { padding: 18px 22px 20px; border: 0; border-radius: 0; box-shadow: none; }
.ai-current-saving-card .ai-card-head, .ai-current-section .ai-today .ai-card-head { margin-bottom: 8px; padding-bottom: 0; border-bottom: 0; }
.ai-current-saving-card .ai-card-head > div > span, .ai-current-section .ai-today .ai-card-head > div > span { display: none; }
.ai-current-saving-card .ai-card-head h3, .ai-current-section .ai-today .ai-card-head h3 { margin: 0; font-size: 13px; font-weight: 600; }
.ai-current-saving-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 10px 0 4px; }
.ai-current-saving-grid > div { min-width: 0; min-height: 94px; display: flex; flex-direction: column; justify-content: center; padding: 10px 24px; border: 0; border-right: 1px solid var(--ops-line-soft); border-radius: 0; background: transparent; }
.ai-current-saving-grid > div:first-child { padding-left: 0; }
.ai-current-saving-grid > div:last-child { padding-right: 0; border-right: 0; }
.ai-current-saving-grid span { display: block; color: var(--ops-muted); font-size: 11px; }
.ai-current-saving-grid b { display: block; margin: 9px 0 7px; color: var(--ops-ink); font: 700 32px/1.05 var(--pt-mono, monospace); letter-spacing: -.04em; }
.ai-current-saving-grid small { color: var(--ops-muted); font-size: 10px; line-height: 1.5; }
.ai-current-saving-grid .is-saving, .ai-current-saving-grid .is-over { border-color: var(--ops-line-soft); background: transparent; }
.ai-current-saving-grid .is-saving b { color: var(--ops-green); }
.ai-current-saving-grid .is-over b { color: var(--ops-amber); }
.ai-current-saving-formula { margin-top: 12px; padding: 10px 12px; border: 0; border-radius: 8px; background: #F7FAFC; color: var(--ops-muted); font-size: 10.5px; line-height: 1.6; }
.ai-current-strategy { margin: 9px 2px 0; color: var(--ops-cyan); font-size: 10px; line-height: 1.5; }
.ai-current-section .ai-today { margin: 0; padding: 18px 22px 20px; border: 0; border-top: 1px solid var(--ops-line-soft); border-radius: 0; background: #FFF; box-shadow: none; }
.ai-current-section .ai-today-grid { gap: 0; }
.ai-current-section .ai-today-item { min-width: 0; padding: 8px 22px; border: 0; border-right: 1px solid var(--ops-line-soft); border-radius: 0; background: transparent; }
.ai-current-section .ai-today-item:first-child { padding-left: 0; }
.ai-current-section .ai-today-item:last-child { padding-right: 0; border-right: 0; }
.ai-current-section .ai-today-item span { font-size: 11px; }
.ai-current-section .ai-today-item b { margin: 8px 0 5px; font-size: 24px; }
.ai-current-section .ai-today-item small { color: var(--ops-muted); font-size: 9.5px; }
.ai-current-section .ai-today-note { margin-top: 12px; color: var(--ops-muted); font-size: 10px; }

.ai-history-flow .ai-rangebar { padding: 12px 16px; border-radius: 12px; box-shadow: none; }
.ai-history-flow .ai-range-presets { gap: 4px; }
.ai-history-flow .ai-metrics { gap: 0; overflow: hidden; border: 1px solid var(--ops-line); border-radius: 16px; background: #FFF; }
.ai-page .ai-history-flow .ai-metric { min-height: 126px; padding: 22px 24px; border: 0; border-right: 1px solid var(--ops-line-soft); border-radius: 0; background: transparent; box-shadow: none; }
.ai-page .ai-history-flow .ai-metric:last-child { border-right: 0; }
.ai-page .ai-history-flow .ai-metric.is-saving, .ai-page .ai-history-flow .ai-metric.is-saving.is-over { border-color: var(--ops-line-soft); background: transparent; }
.ai-page .ai-history-flow .ai-metric.is-saving.is-over { border-right-color: var(--ops-line-soft); }
.ai-history-flow .ai-metric span { font-size: 11.5px; }
.ai-history-flow .ai-metric b { font-size: 32px; }
.ai-history-flow .ai-metric small { color: var(--ops-muted); font-size: 10.5px; }
.ai-page .ai-chart-card { padding: 20px 22px; }
.ai-history-flow .ai-chart-card .ai-chart { height: 360px; }
.ai-page .ai-history-card { overflow: hidden; }
.ai-history-card .ai-card-head > small { color: var(--ops-muted); font-size: 10px; }
.ai-history-card .ai-table-meta { color: var(--ops-muted); }
.ai-history-card .ai-table-scroll { border: 0; border-radius: 0; }
.ai-history-table th { padding: 11px 12px; }
.ai-history-table td { padding: 12px; }
.ai-day-row td { border-top: 1px solid var(--ops-line-soft); border-bottom: 0; background: #FFF; font-weight: 600; }
.ai-day-row:hover td, .ai-day-row.is-open td { background: #F4FBFC; }
.ai-day-date { font: 700 11.5px var(--pt-mono, monospace); }
.ai-day-date::before { display: none; }
.ai-hour-detail > td { padding: 0; border: 0; background: #FAFCFD; text-align: left; white-space: normal; }
.ai-hour-wrap { max-height: none; overflow-x: auto; padding: 14px 16px 18px; border: 0; background: #FAFCFD; -webkit-overflow-scrolling: touch; }
.ai-hour-title { margin: 0 0 8px; padding-top: 2px; color: var(--ops-muted); font-size: 9.5px; font-weight: 500; }
.ai-hour-wrap table { min-width: 780px; overflow: hidden; border: 1px solid var(--ops-line-soft); border-radius: 10px; background: #FFF; }
.ai-hour-wrap th, .ai-hour-wrap td { padding: 8px 10px; border: 0; border-bottom: 1px solid var(--ops-line-soft); font-size: 10px; }
.ai-hour-wrap th { border-bottom-color: var(--ops-line); background: #F7FAFC; }
.ai-hour-wrap tbody tr:last-child td { border-bottom: 0; }
.ai-report-metrics { gap: 0; overflow: hidden; margin-bottom: 16px; border: 1px solid var(--ops-line-soft); border-radius: 12px; }
.ai-page .ai-report-metrics > div { padding: 14px 16px; border: 0; border-right: 1px solid var(--ops-line-soft); border-radius: 0; background: #FFF; }
.ai-page .ai-report-metrics > div:last-child { border-right: 0; }
.ai-report-metrics b { font-size: 20px; }
.ai-report-metrics small { color: var(--ops-muted); }
.ai-metered-chart-bar select { border-color: var(--ops-line-soft); background: #F7FAFC; }
.ai-metered-details { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ops-line-soft); }
.ai-metered-details h4 { margin: 0 0 10px; color: var(--ops-muted); font-size: 11px; font-weight: 600; }
.ai-strategy-metrics { gap: 0; padding-bottom: 14px; border-bottom: 1px solid var(--ops-line-soft); }
.ai-page .ai-strategy-metrics > div { padding: 4px 16px; border: 0; border-right: 1px solid var(--ops-line-soft); border-radius: 0; background: transparent; }
.ai-page .ai-strategy-metrics > div:first-child { padding-left: 0; }
.ai-page .ai-strategy-metrics > div:last-child { border-right: 0; }
.ai-strategy-metrics small { color: var(--ops-muted); }
.ai-model-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ai-model-grid > .ai-card { height: auto; }
.ai-model-grid .ai-formula { margin: 0; padding: 10px 0; border: 0; border-bottom: 1px solid var(--ops-line-soft); border-radius: 0; background: transparent; }
.ai-model-grid .ai-baseline-ledger { gap: 0; overflow: hidden; border: 1px solid var(--ops-line-soft); border-radius: 10px; }
.ai-model-grid .ai-baseline-ledger > div { padding: 12px 14px; border: 0; border-right: 1px solid var(--ops-line-soft); border-radius: 0; background: transparent; }
.ai-model-grid .ai-baseline-ledger > div:last-child { border-right: 0; }
.ai-model-grid .ai-thermal-card { display: block; }
.ai-model-grid .ai-thermal-card .ai-data-note { margin-top: 10px; }
.ai-page .ai-data-note { color: var(--ops-muted); font-size: 10px; }

body[data-site="beijing"] #pgLive.pt-live-root { overflow-y: auto; overflow-x: hidden; background: var(--ops-bg); }
body[data-site="beijing"] #pgLive #pt3d-root { position: relative; height: var(--live-stage-height, 700px) !important; min-height: 0 !important; flex: 0 0 auto; }
body[data-site="beijing"] #pgLive.live-details-visible #pt3d-root { visibility: hidden; pointer-events: none; }
body[data-site="beijing"] #pgLive.live-details-visible > :not(#pt3d-root):not(.ai-live-detail-shell) { visibility: hidden; pointer-events: none; }
.ai-live-detail-shell { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 18px; max-width: 1480px; margin: 0 auto; padding: 26px 30px 40px; background: var(--ops-bg); }
.ai-live-operations-grid > .ai-card, .ai-live-detail-shell .ai-energy { box-shadow: none; }
.ai-live-detail-shell .ai-quality-strip { background: #FFF; }
.ai-live-operations-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.ai-live-operations-grid > .ai-card { display: flex; flex-direction: column; min-width: 0; height: 100%; padding: 20px; }
.ai-live-operations-grid .ai-card-head { padding-bottom: 12px; border-bottom: 1px solid var(--ops-line-soft); }
.ai-live-operations-grid .ai-data-note { margin-top: auto; padding-top: 12px; }
.ai-live-detail-shell .ai-bottom-grid { margin-top: 2px; }
.ai-live-detail-shell .ai-energy { padding: 20px; }
.ai-live-detail-shell .ai-energy-row { grid-template-columns: 110px 1fr 50px 1fr 50px 100px 40px; padding: 14px 0; }
.ai-live-detail-shell .ai-energy-row b { font-size: 16px; }
.ai-live-detail-shell .ai-quality-grid b { font-size: 14px; }

@media (max-width: 1100px) {
  .ai-page .ai-shell { padding: 22px; }
  .ai-current-saving-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-current-saving-grid > div:nth-child(2) { border-right: 0; }
  .ai-current-saving-grid > div:nth-child(1), .ai-current-saving-grid > div:nth-child(2) { border-bottom: 1px solid var(--ops-line-soft); }
  .ai-model-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body[data-site="beijing"] #app > nav:not(.unified-header nav) { height: 52px; min-height: 52px; grid-template-columns: 1fr 1fr auto; gap: 6px; padding: 6px 10px; }
  body[data-site="beijing"] #app > nav .nav-item-primary { height: 38px; padding: 0 8px; font-size: 12px; }
  body[data-site="beijing"] #app > nav .nav-item-primary::before { margin-right: 5px; }
  .ai-project-archive > summary { height: 38px; gap: 4px; padding: 0 8px; font-size: 11px; }
  .ai-project-archive-menu { width: min(330px, calc(100vw - 20px)); }
  .ai-page .ai-shell { gap: 20px; padding: 16px 12px 32px; }
  .ai-page .ai-savings-hero { flex-direction: row; align-items: flex-start; gap: 10px; padding: 4px 2px 20px; border-radius: 0; }
  .ai-savings-hero > div:first-child { min-width: 0; }
  .ai-savings-hero .ai-eyebrow { font-size: 8px; letter-spacing: .10em; }
  .ai-page .ai-savings-hero h2 { margin: 7px 0; font-size: 25px; white-space: nowrap; }
  .ai-savings-hero p { font-size: 10px; line-height: 1.65; }
  .ai-savings-hero .ai-live-pill { flex: 0 0 auto; gap: 5px; padding: 6px 8px; font-size: 9px; }
  .ai-savings-hero .ai-live-pill i { width: 5px; height: 5px; }
  .ai-flow-section { gap: 13px; }
  .ai-flow-section + .ai-flow-section { margin-top: 0; padding-top: 24px; }
  .ai-section-heading { align-items: flex-end; gap: 12px; }
  .ai-section-heading h2 { font-size: 18px; }
  .ai-section-heading span { font-size: 8px; }
  .ai-section-heading > small { max-width: 150px; font-size: 9px; }
  .ai-current-section > .ai-section-heading { padding: 16px; }
  .ai-current-section > .ai-section-heading h2 { font-size: 16px; }
  .ai-page .ai-current-saving-card, .ai-current-section .ai-today { padding: 16px; }
  .ai-current-saving-grid { gap: 0; padding-top: 6px; }
  .ai-current-saving-grid > div { min-height: 102px; padding: 12px; }
  .ai-current-saving-grid > div:nth-child(odd) { padding-left: 0; }
  .ai-current-saving-grid > div:nth-child(even) { padding-right: 0; border-right: 0; }
  .ai-current-saving-grid span { font-size: 10px; line-height: 1.45; }
  .ai-current-saving-grid b { font-size: 23px; }
  .ai-current-saving-grid small { font-size: 9px; }
  .ai-current-saving-formula { font-size: 10px; }
  .ai-current-section .ai-today-item { padding: 10px 12px; }
  .ai-current-section .ai-today-item:nth-child(odd) { padding-left: 0; }
  .ai-current-section .ai-today-item:nth-child(even) { padding-right: 0; border-right: 0; }
  .ai-current-section .ai-today-item:nth-child(1), .ai-current-section .ai-today-item:nth-child(2) { border-bottom: 1px solid var(--ops-line-soft); }
  .ai-current-section .ai-today-item b { font-size: 20px; }
  .ai-page .ai-chart-card { padding: 14px; }
  .ai-history-flow .ai-range-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; overflow: visible; border-radius: 11px; }
  .ai-range-presets button { min-width: 0; padding: 5px 2px; font-size: 10px; }
  .ai-page .ai-history-flow .ai-metric { min-height: 112px; padding: 16px 14px; }
  .ai-page .ai-history-flow .ai-metric:nth-child(even) { border-right: 0; }
  .ai-page .ai-history-flow .ai-metric:nth-child(1), .ai-page .ai-history-flow .ai-metric:nth-child(2) { border-bottom: 1px solid var(--ops-line-soft); }
  .ai-history-flow .ai-metric b { font-size: 24px; }
  .ai-history-flow .ai-chart-card .ai-chart { height: 280px; }
  .ai-history-card .ai-card-head > small { max-width: 120px; }
  .ai-hour-wrap { padding: 0 10px 13px; }
  .ai-hour-wrap th, .ai-hour-wrap td { padding: 8px 9px; }
  .ai-page .ai-report-metrics > div { padding: 12px; }
  .ai-report-metrics > div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--ops-line-soft); }
  .ai-page .ai-strategy-metrics > div { padding: 8px 10px; }
  .ai-page .ai-strategy-metrics > div:nth-child(even) { border-right: 0; }
  .ai-live-detail-shell { gap: 16px; padding: 22px 12px 30px; }
  .ai-live-operations-grid { grid-template-columns: 1fr; gap: 12px; }
  .ai-live-operations-grid > .ai-card, .ai-live-detail-shell .ai-energy { padding: 16px; box-shadow: none; }
  .ai-live-detail-shell .ai-energy-row { grid-template-columns: 58px 1fr 32px 1fr 32px 58px 26px; gap: 3px; }
  .ai-live-detail-shell .ai-energy-row b { font-size: 11px; }
  .ai-history-card .ai-table-scroll { overflow: visible; }
  .ai-history-card .ai-history-table { display: block; min-width: 0; }
  .ai-history-card .ai-history-table > thead { display: none; }
  .ai-history-card .ai-history-table > tbody { display: block; }
  .ai-history-card .ai-day-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; border: 1px solid var(--ops-line); border-radius: 11px; overflow: hidden; }
  .ai-history-card .ai-day-row td { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; padding: 9px 11px; border: 0; border-bottom: 1px solid var(--ops-line-soft); font-size: 10.5px; white-space: normal; }
  .ai-history-card .ai-day-row td::before { content: attr(data-label); color: var(--ops-faint); font: 500 9px var(--font); }
  .ai-history-card .ai-day-row td:first-child { grid-column: 1 / -1; justify-content: flex-start; font-size: 12px; }
  .ai-history-card .ai-day-row td:first-child::before { display: none; }
  .ai-history-card .ai-day-toggle { width: 100%; font-size: 12px; }
  .ai-history-card .ai-expand-all { min-height: 32px; padding: 5px 10px; }
  .ai-history-card .ai-day-row td:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .ai-history-card .ai-hour-detail { display: block; }
  .ai-history-card .ai-hour-detail > td { display: block; }
  .ai-history-card .ai-hour-wrap { overflow: visible; padding: 11px 0 2px; }
  .ai-history-card .ai-hour-title { padding: 0 2px; }
  .ai-history-card .ai-hour-wrap table { display: block; min-width: 0; }
  .ai-history-card .ai-hour-wrap thead { display: none; }
  .ai-history-card .ai-hour-wrap tbody { display: grid; gap: 7px; }
  .ai-history-card .ai-hour-wrap tbody tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ops-line-soft); border-radius: 9px; overflow: hidden; background: #FAFCFD; }
  .ai-history-card .ai-hour-wrap td { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 8px 7px; border: 0; font-size: 10.5px; white-space: normal; }
  .ai-history-card .ai-hour-wrap td::before { content: attr(data-label); color: var(--ops-faint); font: 500 8px var(--font); white-space: normal; }
  .ai-history-card .ai-hour-wrap td:first-child { color: var(--ops-cyan); font-weight: 700; }
  #aiMeteredCard .ai-metered-table { display: block; min-width: 0; }
  #aiMeteredCard .ai-metered-table thead { display: none; }
  #aiMeteredCard .ai-metered-table tbody { display: grid; gap: 8px; }
  #aiMeteredCard .ai-metered-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--ops-line-soft); border-radius: 9px; overflow: hidden; }
  #aiMeteredCard .ai-metered-table td { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 9px 10px; border: 0; font-size: 10.5px; white-space: normal; }
  #aiMeteredCard .ai-metered-table td::before { content: attr(data-label); color: var(--ops-faint); font: 500 8.5px var(--font); }
  #aiMeteredCard .ai-metered-table td:first-child { grid-column: 1 / -1; color: var(--ops-cyan); background: #F4FBFC; font-weight: 700; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-live-mini.is-updated { animation: none; }
  .ai-range-presets button, .ai-apply, .ai-range-status button, .ai-project-archive > summary::after { transition: none; }
}

/* 北京节能台账：节能、化霜与实测能效同屏核对 */
body[data-site="beijing"] .ai-history-flow .ai-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
body[data-site="beijing"] .ai-history-flow .ai-defrost-metric b { color: var(--ops-amber); }
body[data-site="beijing"] .ai-report-metrics { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (min-width: 681px) {
  body[data-site="beijing"] .ai-history-card .ai-history-table { min-width: 1120px; }
  body[data-site="beijing"] #aiMeteredCard .ai-metered-table { min-width: 980px; }
}
@media (max-width: 1100px) {
  body[data-site="beijing"] .ai-history-flow .ai-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-site="beijing"] .ai-history-flow .ai-metric:nth-child(even) { border-right: 0; }
  body[data-site="beijing"] .ai-history-flow .ai-defrost-metric { grid-column: 1 / -1; border-top: 1px solid var(--ops-line-soft); }
  body[data-site="beijing"] .ai-report-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  body[data-site="beijing"] .ai-history-flow .ai-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-site="beijing"] .ai-history-flow .ai-metric { min-height: 112px; padding: 14px; }
  body[data-site="beijing"] .ai-history-flow .ai-defrost-metric { grid-column: 1 / -1; }
  body[data-site="beijing"] .ai-report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-site="beijing"] .ai-report-metrics > div:nth-child(even) { border-right: 0; }
}
