.plant-embed { margin: 12px 0 18px; }
.floor-home { margin: 8px 0 18px; }
body.hmi .zoom-port { background: linear-gradient(180deg, #1a2433, #121820); }
body.hmi .ahu-shell { fill: #1b2636; stroke: #d5deea; }
body.hmi .ahu-inner { fill: #243246; stroke: #6d7f96; }
body.hmi .name-ink { fill: #f4f6fa; }
body.hmi .badge { background: #1c2433; color: #f4f6fa; border-color: #314056; }
body.hmi .badge small { color: #b7c0cc; }
body.hmi .legend { color: #b7c0cc; }
body.hmi .plate b, body.hmi .plate span { color: #f4f6fa; }
.plant-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; margin: 8px 0 12px; }
.plate b { display: block; font-size: 22px; }
.plate span, .legend { color: var(--muted); font-size: 13px; }
.hao { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; font-weight: 700; letter-spacing: 0.04em; }
.hao.auto { background: #e7f6ee; color: #1d7a46; }
.hao.hand { background: #fdf1dc; color: #8a5a0f; }
.hao.off { background: #eceae4; color: #5b616c; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 12px; }
.legend i { display: inline-block; width: 18px; height: 8px; border-radius: 99px; margin-right: 6px; vertical-align: middle; }
.swatch-air { background: #E8A33D; }
.swatch-hot { background: #d4652f; }
.swatch-cold { background: #3c7cb8; }
.swatch-alarm { background: #b42318; }
.view-toggle { display: flex; gap: 8px; margin: 0 0 10px; }
.zoom-port { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, #e6edf6, #f7f5f0 42%); min-height: 560px; touch-action: none; position: relative; }
.zoom-sheet { width: 1280px; transform-origin: 0 0; }
.plant-svg { width: 1280px; height: auto; display: block; }
.badge { position: absolute; min-width: 92px; background: #fff; color: #13294B; border: 1px solid #d7d1c4; border-radius: 12px; padding: 6px 8px; box-shadow: 0 8px 18px rgba(19, 41, 75, 0.08); }
.badge small { display: block; color: #5b616c; font-size: 11px; }
.badge b { font-size: 18px; font-variant-numeric: tabular-nums; }
.badge.alarm { border-color: #b42318; }
.badge.alarm b { color: #b42318; }
.sp-chip { position: absolute; background: #13294B; color: #fff; border-radius: 999px; padding: 6px 10px; font-size: 13px; }
.stack-view { display: none; }
.section-card { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 12px; background: #fff; color: #13294B; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.badge[data-reading], .section-card[data-reading] { cursor: pointer; }
button.badge { font: inherit; text-align: left; }
.reading-pop { position: fixed; inset: 0; z-index: 50; background: rgba(19, 41, 75, 0.45); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.reading-pop[hidden] { display: none !important; }
.reading-pop-card { width: min(520px, 100%); background: #fff; color: #13294B; border-radius: 18px 18px 0 0; padding: 16px; margin-bottom: env(safe-area-inset-bottom); }
.reading-pop-card h2, .reading-now { color: #13294B; }
.reading-now { margin: 0; font-size: 28px; }
.reading-ranges { display: flex; gap: 8px; margin: 8px 0; }
.reading-ranges button { min-height: 36px; border-radius: 999px; border: 1px solid #d9d3c7; background: #fff; color: #13294B; font-weight: 700; padding: 0 14px; cursor: pointer; }
.reading-ranges button.on { background: #13294B; color: #fff; }
.reading-pop-card .meta, body.hmi .reading-pop-card .meta { color: #5b616c; }
.reading-pop-x { float: right; min-height: 44px; }
#readingChart { min-height: 220px; }
#readingChart .u-legend { color: #13294B; }
.reading-trends { display: inline-block; margin-top: 8px; color: #13294B; font-weight: 700; }
.badge:focus-visible, .section-card:focus-visible { outline: 2px solid #E8A33D; outline-offset: 2px; }
html[data-theme="dark"] .reading-pop-card, body.hmi .reading-pop-card { background: #1c2433; color: #f4f6fa; }
html[data-theme="dark"] .reading-pop-card h2, body.hmi .reading-pop-card h2,
html[data-theme="dark"] .reading-now, body.hmi .reading-now,
html[data-theme="dark"] #readingChart .u-legend, body.hmi #readingChart .u-legend,
html[data-theme="dark"] .reading-trends, body.hmi .reading-trends { color: #f4f6fa; }
html[data-theme="dark"] .reading-pop-card .meta, body.hmi .reading-pop-card .meta { color: #c5cedb; }
html[data-theme="dark"] .reading-ranges button, body.hmi .reading-ranges button { background: #121820; color: #f4f6fa; border-color: #3a4658; }
html[data-theme="dark"] .reading-ranges button.on, body.hmi .reading-ranges button.on { background: #E8A33D; color: #13294B; }
@media (max-width: 799px) { .reading-pop { padding: 0; } .reading-pop-card { width: 100%; border-radius: 18px 18px 0 0; } }
@media (min-width: 800px) { .reading-pop { align-items: center; } .reading-pop-card { border-radius: 18px; } }
.section-card > span { font-weight: 700; font-size: 15px; }
.section-card > b { font-size: 22px; font-variant-numeric: tabular-nums; justify-self: end; }
.section-card > .meta { grid-column: 1 / -1; color: #5b616c; }
.section-card.alarm > b { color: #b42318; }
.section-card.alarm { box-shadow: inset 4px 0 0 #b42318; }
body.hmi .section-card > .meta, body.hmi .badge small { color: #5b616c; }
.floor-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; grid-template-rows: 180px 220px; gap: 10px; }
.floor-grid a { border-radius: 16px; padding: 14px; color: #13294B; text-decoration: none; display: flex; flex-direction: column; justify-content: space-between; min-height: 120px; }
.floor-grid a strong { font-size: 28px; font-variant-numeric: tabular-nums; }
.floor-grid .wide { grid-column: 1 / 3; }
.air-flow, .pipe-flow { fill: none; stroke-width: 4; stroke-linecap: round; }
.air-flow { stroke: #8ea0b8; stroke-dasharray: 10 14; }
.pipe-hot { stroke: #d4652f; }
.pipe-cold { stroke: #3c7cb8; }
.pipe-flow { stroke-dasharray: 7 11; }
.running .air-flow { stroke: #E8A33D; animation: march 1.1s linear infinite; }
.running .pipe-flow { animation: march .8s linear infinite; }
.is-off .air-flow, .is-off .pipe-flow { opacity: .35; }
.fan-rotor, .pump-rotor, .ashp-fan { transform-box: fill-box; transform-origin: center; }
.px-ashp.run .ashp-fan { animation: spin 1.15s linear infinite; }
.px-immersion.on .immersion-element { stroke: #E8A33D; }
.px-immersion.fault .immersion-element { stroke: #b42318; }
.px-immersion.unlinked .immersion-element, .px-ashp.unlinked .ashp-fan { opacity: .45; }
.running .fan-rotor, .running .pump-rotor { animation: spin 1.15s linear infinite; }
.ahu-shell { fill: #fbfaf7; stroke: #13294B; stroke-width: 3; }
.ahu-inner { fill: #eef2f7; stroke: #9aabbf; }
.section-rule { stroke: #d5dbe3; stroke-width: 1.5; }
.name-ink { fill: #13294B; font-size: 13px; font-weight: 700; }
@keyframes march { to { stroke-dashoffset: -48; } }
@keyframes spin { to { transform: rotate(360deg); } }
html[data-theme="dark"] .zoom-port { background: linear-gradient(180deg, #1a2433, #121820); }
html[data-theme="dark"] .ahu-shell { fill: #1b2636; stroke: #d5deea; }
html[data-theme="dark"] .ahu-inner { fill: #243246; stroke: #6d7f96; }
html[data-theme="dark"] .name-ink { fill: #f4f6fa; }
html[data-theme="dark"] .badge, html[data-theme="dark"] .section-card { background: #1c2433; color: #f4f6fa; border-color: #314056; }
html[data-theme="dark"] .section-card > span,
html[data-theme="dark"] .section-card > b { color: #f4f6fa; }
html[data-theme="dark"] .section-card > .meta,
html[data-theme="dark"] body.hmi .section-card > .meta { color: #a9b4c4; }
html[data-theme="dark"] .section-card.alarm > b { color: #ff8a80; }
html[data-theme="dark"] .hao.auto { background: #163626; color: #8ddeaf; }
@media (max-width: 800px) {
  .zoom-port { display: none; }
  .stack-view { display: grid; gap: 10px; }
  body.graphics.show-drawing .zoom-port { display: block; min-height: 70vh; }
  body.graphics.show-drawing .stack-view { display: none; }
  .floor-grid { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .floor-grid .wide { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .running .air-flow, .running .pipe-flow, .running .fan-rotor, .running .pump-rotor { animation: none; }
}
/* Chiller + LTHW plant drawings, AHU visual language (8 Nov 2026 redesign) */
.zoom-port.fluid { min-height: 0; }
.zoom-sheet.fluid { width: 100%; }
.zoom-sheet.fluid .plant-svg { width: 100%; }
.px-tall { display: none !important; }
@media (max-width: 800px) {
  .px-wide { display: none !important; }
  .px-tall { display: block !important; }
  body.graphics.show-drawing .zoom-port.fluid { min-height: 0; }
}
.px .pipe-flow { stroke-width: 3.5; }
.px-pipe { fill: none; stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; opacity: .2; }
.px-pipe.cold { stroke: #3c7cb8; }
.px-pipe.cret { stroke: #4fb3c4; }
.px-pipe.hot { stroke: #d4652f; }
.px-pipe.hret { stroke: #e39a6d; }
.pipe-cret { stroke: #4fb3c4; }
.pipe-hret { stroke: #e39a6d; }
.px .pipe-flow { stroke-linejoin: round; }
.is-off .px-pipe { opacity: .12; }
.px-casing { stroke-width: 2.5; }
.px-casing.px-alarm { stroke: #b42318 !important; stroke-width: 3.5; }
.px-part { fill: #eef2f7; stroke: #9aabbf; stroke-width: 1.6; }
.px-vessel { fill: #e7edf4; }
.px-guard { fill: none; stroke: #c3cedb; stroke-width: 1.2; stroke-dasharray: 3 4; }
.px-blade { fill: #13294B; opacity: .82; }
.px-hub { fill: #E8A33D; }
.px-line { fill: none; stroke: #13294B; stroke-width: 2; stroke-linecap: round; }
.px-arrow { fill: none; stroke: #13294B; stroke-width: 2; stroke-linejoin: round; opacity: .55; }
.px-ref { fill: none; stroke: #8c96a3; stroke-width: 3; stroke-dasharray: 2 5; stroke-linecap: round; }
.px-coil { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.px-coil.cold { stroke: #3c7cb8; }
.px-coil.hot { stroke: #d4652f; }
.px-valve { fill: #fbfaf7; stroke: #13294B; stroke-width: 2; stroke-linejoin: round; }
.px-act { fill: #13294B; }
.px-sensor circle { fill: #fff; stroke: #13294B; stroke-width: 1.8; }
.px-sensor text { fill: #13294B; font-size: 9.5px; font-weight: 800; }
.px-head { fill: #13294B; font-size: 15px; font-weight: 800; letter-spacing: .02em; }
.px-sub { fill: #5b616c; font-size: 12.5px; font-weight: 600; }
.px-pipe-label { fill: #5b616c; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.px-tag { cursor: pointer; }
.px-tag rect { fill: #fff; stroke: #d7d1c4; stroke-width: 1.2; filter: drop-shadow(0 6px 10px rgba(19, 41, 75, .1)); transition: stroke .15s; }
.px-tag:hover rect, .px-tag:focus-visible rect { stroke: #E8A33D; stroke-width: 2; }
.px-tag:focus { outline: none; }
.px-tag .k { fill: #5b616c; font-size: 11.5px; font-weight: 600; }
.px-tag .v { fill: #13294B; font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.px-tag .u { font-size: 12px; font-weight: 600; }
.px-tag.alarm rect { stroke: #b42318; stroke-width: 2; }
.px-tag.alarm .v { fill: #b42318; }
.px-chip rect { fill: #13294B; }
.px-chip text { fill: #fff; font-size: 12.5px; font-weight: 600; }
.px-pill rect { fill: #eceae4; }
.px-pill text { fill: #5b616c; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.px-pill.run rect { fill: #e7f6ee; } .px-pill.run text { fill: #1d7a46; }
.px-pill.alarm rect { fill: #fbe3e0; } .px-pill.alarm text { fill: #b42318; }
.px-flame path { fill: #c9d2dd; }
.px-flame .core { fill: #eef2f7; }
.px-flame.lit path { fill: #E8A33D; }
.px-flame.lit .core { fill: #d4652f; }
.px-flame.lit { transform-box: fill-box; transform-origin: 50% 100%; animation: px-flicker 1.4s ease-in-out infinite; }
@keyframes px-flicker { 0%, 100% { transform: scale(1, 1); } 40% { transform: scale(.94, 1.06); } 70% { transform: scale(1.04, .96); } }
.px-standby .px-blade, .px-pump.standby .px-blade { opacity: .45; }
@media (prefers-reduced-motion: reduce) { .px-flame.lit { animation: none; } }
html[data-theme="dark"] .px-part, body.hmi .px-part { fill: #243246; stroke: #6d7f96; }
html[data-theme="dark"] .px-vessel, body.hmi .px-vessel { fill: #22324a; }
html[data-theme="dark"] .px-blade, body.hmi .px-blade { fill: #d5deea; }
html[data-theme="dark"] .px-line, html[data-theme="dark"] .px-arrow, body.hmi .px-line, body.hmi .px-arrow { stroke: #d5deea; }
html[data-theme="dark"] .px-valve, body.hmi .px-valve { fill: #1b2636; stroke: #d5deea; }
html[data-theme="dark"] .px-act, body.hmi .px-act { fill: #d5deea; }
html[data-theme="dark"] .px-sensor circle, body.hmi .px-sensor circle { fill: #1b2636; stroke: #d5deea; }
html[data-theme="dark"] .px-sensor text, html[data-theme="dark"] .px-head, body.hmi .px-sensor text, body.hmi .px-head { fill: #f4f6fa; }
html[data-theme="dark"] .px-sub, html[data-theme="dark"] .px-pipe-label, body.hmi .px-sub, body.hmi .px-pipe-label { fill: #b7c0cc; }
html[data-theme="dark"] .px-tag rect, body.hmi .px-tag rect { fill: #1c2433; stroke: #314056; }
html[data-theme="dark"] .px-tag .k, body.hmi .px-tag .k { fill: #a9b4c4; }
html[data-theme="dark"] .px-tag .v, body.hmi .px-tag .v { fill: #f4f6fa; }
html[data-theme="dark"] .px-tag.alarm .v, body.hmi .px-tag.alarm .v { fill: #ff8a80; }
html[data-theme="dark"] .px-chip rect, body.hmi .px-chip rect { fill: #0f1a2b; stroke: #3a4b66; }
html[data-theme="dark"] .px-pill rect, body.hmi .px-pill rect { fill: #2a3342; }
html[data-theme="dark"] .px-pill text, body.hmi .px-pill text { fill: #c5cedb; }
html[data-theme="dark"] .px-pill.run rect, body.hmi .px-pill.run rect { fill: #163626; }
html[data-theme="dark"] .px-pill.run text, body.hmi .px-pill.run text { fill: #8ddeaf; }
html[data-theme="dark"] .px-pill.alarm rect, body.hmi .px-pill.alarm rect { fill: #3a1d1d; }
html[data-theme="dark"] .px-pill.alarm text, body.hmi .px-pill.alarm text { fill: #ff8a80; }
html[data-theme="dark"] .px-flame path, body.hmi .px-flame path { fill: #3b4a60; }
html[data-theme="dark"] .px-flame .core, body.hmi .px-flame .core { fill: #243246; }
html[data-theme="dark"] .px-flame.lit path, body.hmi .px-flame.lit path { fill: #E8A33D; }
html[data-theme="dark"] .px-flame.lit .core, body.hmi .px-flame.lit .core { fill: #d4652f; }
html[data-theme="dark"] .px-guard, body.hmi .px-guard { stroke: #4a5b73; }
