:root {
  color-scheme: dark;
  --bg: #071814;
  --panel: rgba(12, 35, 30, 0.92);
  --panel-strong: #102c26;
  --panel-soft: #0a211c;
  --ink: #f1f6e9;
  --muted: #8da79d;
  --faint: #5c756c;
  --line: rgba(175, 213, 189, 0.14);
  --line-strong: rgba(183, 247, 94, 0.34);
  --lime: #b7f75e;
  --mint: #5bdfbb;
  --amber: #ffbf54;
  --red: #ff6376;
  --blue: #64a9ff;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  font-family: "DIN Alternate", "Bahnschrift", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(12px, 0.78vw, 16px);
  color: var(--ink);
  background: var(--bg);
}

.api-status { justify-content: center; }
.api-status strong { color: var(--lime); font-size: 13px; }
.api-status small { color: var(--muted); font-size: 10px; }
.blocking-state { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(3, 12, 10, .96); color: var(--ink); padding: 24px; }
.blocking-state[hidden] { display: none; }
.blocking-state > div { width: min(520px, 100%); padding: 38px; border: 1px solid rgba(104, 214, 197, .28); background: #091d18; text-align: center; box-shadow: 0 24px 80px rgba(0,0,0,.45); }
.blocking-state span { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 50%; background: rgba(255,190,84,.12); color: var(--amber); font-size: 26px; }
.blocking-state h2 { margin: 0 0 10px; font-size: 24px; }
.blocking-state p { margin: 0 auto 24px; max-width: 420px; color: var(--muted); line-height: 1.7; }
.blocking-state a, .blocking-state button { display: inline-flex; align-items: center; justify-content: center; min-width: 112px; min-height: 40px; margin: 4px; border: 1px solid rgba(168,241,91,.35); border-radius: 4px; background: rgba(168,241,91,.08); color: var(--lime); text-decoration: none; cursor: pointer; }
.blocking-state .blocking-language { position: absolute; top: 22px; right: 22px; display: inline-flex; }
.blocking-state .blocking-language button { min-width: 42px; min-height: 32px; margin: 0; border-radius: 0; }
.blocking-state .blocking-language button.active { color: #102215; background: var(--lime); }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: .72rem; letter-spacing: .08em; }
.chart-empty[hidden] { display: none; }
.source-real span { background: var(--lime); box-shadow: 0 0 12px var(--lime); }
.source-demo span, .source-mixed span, .source-unknown span { background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.source-none span { background: var(--blue); box-shadow: 0 0 12px var(--blue); }

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 1180px; min-height: 720px; margin: 0; overflow: hidden; background: var(--bg); }
button { font: inherit; }
button:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
h1, h2, h3, p, ul, ol { margin: 0; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 48% 34%, rgba(42, 115, 91, 0.15), transparent 34%),
    linear-gradient(118deg, rgba(255, 255, 255, 0.018), transparent 28%, rgba(183, 247, 94, 0.018) 65%, transparent 83%);
}

.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.52;
  background-image:
    linear-gradient(rgba(143, 192, 169, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 192, 169, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 96%);
}

.wallboard {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  min-width: 1180px;
  min-height: 720px;
  display: grid;
  grid-template-rows: 5.7rem 3.5rem minmax(0, 1fr) 3rem;
  gap: 0.75rem;
  padding: 0 1.45rem 0.9rem;
}

.masthead {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.masthead::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 34%;
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
}

.brand-lockup { display: flex; align-items: center; gap: 0.85rem; }
.brand-lockup strong, .brand-lockup small { display: block; }
.brand-lockup strong { font-size: 1.05rem; letter-spacing: 0.02em; }
.brand-lockup small { margin-top: 0.18rem; color: var(--muted); font-size: 0.58rem; letter-spacing: 0.2em; }
.brand-mark {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.16rem;
  clip-path: polygon(18% 0, 82% 0, 100% 18%, 100% 82%, 82% 100%, 18% 100%, 0 82%, 0 18%);
  color: #0a2119;
  background: var(--lime);
  box-shadow: 0 0 22px rgba(183, 247, 94, 0.15);
  font-weight: 950;
}
.brand-mark i { width: 1px; height: 1.1rem; background: rgba(7, 24, 20, 0.36); }

.title-lockup { justify-self: center; text-align: center; }
.title-lockup p { color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.24em; }
.title-lockup p span { margin: 0 0.35rem; color: var(--lime); }
.title-lockup h1 { margin-top: 0.2rem; font-size: 2rem; line-height: 1; letter-spacing: 0.16em; }

.header-meta { display: grid; grid-template-columns: auto auto auto; justify-content: end; align-items: end; gap: 0.08rem 0.7rem; text-align: right; }
.language-switch {
  grid-row: 1 / span 2;
  align-self: center;
  display: flex;
  padding: 0.18rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}
.language-switch button { min-width: 2rem; min-height: 1.8rem; padding: 0 0.4rem; color: var(--muted); border: 0; background: transparent; cursor: pointer; font-size: 0.57rem; font-weight: 900; }
.language-switch button.active { color: #102215; background: var(--lime); }
.demo-stamp {
  grid-row: 1 / span 2;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.65rem;
  border: 1px solid rgba(255, 191, 84, 0.32);
  color: #ffd896;
  background: rgba(255, 191, 84, 0.07);
  font-size: 0.68rem;
  font-weight: 800;
}
.demo-stamp span { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.demo-stamp b { white-space: nowrap; }
.header-meta time { color: var(--ink); font-size: 1.45rem; line-height: 1; letter-spacing: 0.09em; font-variant-numeric: tabular-nums; }
.header-meta p { align-self: start; color: var(--muted); font-size: 0.66rem; letter-spacing: 0.05em; }

.command-strip {
  display: grid;
  grid-template-columns: minmax(26rem, 1fr) auto auto;
  gap: 0.75rem;
  align-items: stretch;
}
.source-proof, .scenario-switch, .fullscreen-button {
  min-height: 0;
  border: 1px solid var(--line);
  background: rgba(11, 31, 27, 0.82);
}
.source-proof { display: flex; align-items: center; gap: 0.75rem; padding: 0 0.85rem; border-color: rgba(255, 191, 84, 0.18); }
.source-proof__icon { padding: 0.24rem 0.34rem; color: #071814; background: var(--amber); font-size: 0.58rem; font-weight: 950; letter-spacing: 0.08em; }
.source-proof p { display: flex; align-items: baseline; gap: 0.8rem; }
.source-proof strong { color: #ffdb9e; font-size: 0.73rem; }
.source-proof small { color: #9d927d; font-size: 0.63rem; }
.scenario-switch { display: flex; align-items: center; padding: 0.25rem; }
.scenario-switch > span { padding: 0 0.7rem; color: var(--faint); font-size: 0.61rem; font-weight: 800; letter-spacing: 0.08em; }
.scenario-switch button, .fullscreen-button { color: var(--muted); cursor: pointer; }
.scenario-switch button { height: 100%; min-height: 2.35rem; padding: 0 0.85rem; border: 0; background: transparent; font-size: 0.66rem; font-weight: 750; }
.scenario-switch button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.045); }
.scenario-switch button.active { color: #102215; background: var(--lime); }
.fullscreen-button { display: flex; align-items: center; gap: 0.45rem; padding: 0 0.95rem; font-size: 0.68rem; }
.fullscreen-button:hover { color: var(--lime); border-color: var(--line-strong); }

.dashboard-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(18rem, 0.78fr) minmax(39rem, 1.76fr) minmax(18rem, 0.82fr);
  gap: 0.75rem;
}
.left-rail, .right-rail, .center-stage { min-height: 0; display: grid; gap: 0.75rem; }
.left-rail { grid-template-rows: 1.25fr 1fr 0.72fr; }
.right-rail { grid-template-rows: 1.18fr 1.18fr 0.46fr; }
.center-stage { grid-template-rows: 1.8fr 0.92fr; }

.panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(15, 43, 36, 0.94), rgba(8, 28, 24, 0.96));
  box-shadow: var(--shadow);
}
.panel::before, .panel::after { content: ""; position: absolute; width: 1.25rem; height: 1.25rem; pointer-events: none; }
.panel::before { top: -1px; left: -1px; border-top: 2px solid rgba(183, 247, 94, 0.55); border-left: 2px solid rgba(183, 247, 94, 0.55); }
.panel::after { right: -1px; bottom: -1px; border-right: 1px solid rgba(183, 247, 94, 0.34); border-bottom: 1px solid rgba(183, 247, 94, 0.34); }

.panel-label { display: flex; align-items: center; gap: 0.48rem; color: var(--muted); font-size: 0.61rem; font-weight: 850; letter-spacing: 0.12em; }
.panel-label > span { color: var(--lime); font-variant-numeric: tabular-nums; }
.panel-label b { overflow: hidden; font: inherit; white-space: nowrap; text-overflow: ellipsis; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.panel-head h2 { margin-top: 0.38rem; font-size: 1.02rem; letter-spacing: 0.02em; }

.verdict-panel { display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; padding: 0.78rem 0.9rem 0.65rem; text-align: center; }
.verdict-panel .panel-label { justify-self: stretch; }
.verdict-orbit {
  position: relative;
  width: min(8.6rem, 11.5vh);
  aspect-ratio: 1;
  align-self: center;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--score-color, var(--amber)) 0 calc(var(--score, 0) * 1%), rgba(255, 255, 255, 0.07) calc(var(--score, 0) * 1%) 100%);
  box-shadow: 0 0 42px rgba(255, 191, 84, 0.08);
}
.verdict-orbit::before { content: ""; position: absolute; inset: 0.48rem; border-radius: 50%; background: var(--panel-strong); border: 1px solid rgba(255, 255, 255, 0.06); }
.verdict-orbit::after { content: ""; position: absolute; inset: -0.55rem; border: 1px dashed rgba(255, 255, 255, 0.1); border-radius: 50%; animation: orbit 16s linear infinite; }
.verdict-orbit__score { position: relative; z-index: 1; display: grid; }
.verdict-orbit__score strong { font-size: 2.3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.verdict-orbit__score small { margin-top: 0.2rem; color: var(--muted); font-size: 0.56rem; letter-spacing: 0.08em; }
.verdict-copy { align-self: end; }
.verdict-copy p { color: var(--amber); font-size: 0.65rem; font-weight: 800; }
.verdict-copy h2 { margin: 0.2rem 0; font-size: 1.7rem; letter-spacing: 0.08em; }
.verdict-copy > span { color: var(--muted); font-size: 0.62rem; }
.verdict-facts { width: 100%; display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr; align-items: center; margin-top: 0.48rem; padding-top: 0.48rem; border-top: 1px solid var(--line); }
.verdict-facts div { display: grid; }
.verdict-facts strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.verdict-facts span { color: var(--muted); font-size: 0.56rem; }
.verdict-facts i { width: 1px; height: 1.45rem; background: var(--line); }

.environment-panel, .trust-panel, .shift-panel { padding: 1rem; }
.environment-panel { display: grid; grid-template-rows: auto 1fr 1fr auto; gap: 0.65rem; }
.environment-reading { position: relative; min-height: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: center; padding: 0 0.72rem; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.018); }
.environment-reading p { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0.1rem 0.4rem; }
.environment-reading p > span { color: var(--muted); font-size: 0.6rem; }
.environment-reading strong { grid-row: 2; font-size: 1.55rem; line-height: 1; font-variant-numeric: tabular-nums; }
.environment-reading strong small { margin-left: 0.18rem; color: var(--muted); font-size: 0.62rem; }
.environment-reading em { grid-row: 2; align-self: end; color: var(--mint); font-size: 0.58rem; font-style: normal; font-weight: 800; }
.reading-glyph { position: relative; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(91, 223, 187, 0.28); }
.reading-glyph::before { content: ""; width: 0.42rem; height: 1.15rem; border: 2px solid var(--mint); border-radius: 0.4rem 0.4rem 0.6rem 0.6rem; }
.reading-glyph i { position: absolute; bottom: 0.52rem; width: 0.66rem; height: 0.66rem; border-radius: 50%; background: var(--mint); }
.humidity .reading-glyph::before { width: 0.85rem; height: 1.15rem; border: 0; border-radius: 70% 35% 65% 35%; background: transparent; border: 2px solid var(--blue); transform: rotate(45deg); }
.humidity .reading-glyph i { display: none; }
.range-rail { position: absolute; right: 0.75rem; bottom: 0.65rem; width: 4.4rem; height: 2px; background: rgba(255, 255, 255, 0.08); }
.range-rail span { display: block; width: var(--value); height: 100%; background: var(--mint); }
.particle-snapshot { display: grid; grid-template-columns: 1fr auto; align-items: end; padding-top: 0.55rem; border-top: 1px solid var(--line); }
.particle-snapshot p { display: grid; }
.particle-snapshot p span { color: var(--muted); font-size: 0.57rem; }
.particle-snapshot p small { margin-top: 0.1rem; color: var(--ink); font-size: 0.67rem; }
.particle-snapshot strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.particle-snapshot > small { grid-column: 1 / -1; margin-top: 0.2rem; color: var(--faint); font-size: 0.54rem; text-align: right; }

.trust-panel { display: grid; grid-template-columns: auto 1fr; gap: 0.8rem 1rem; align-items: center; }
.trust-panel .panel-label { grid-column: 1 / -1; }
.trust-score { padding-right: 1rem; border-right: 1px solid var(--line); }
.trust-score strong, .trust-score span { display: block; }
.trust-score strong { color: var(--lime); font-size: 1.6rem; }
.trust-score span { color: var(--muted); font-size: 0.52rem; }
.trust-panel ul { display: grid; gap: 0.5rem; padding: 0; list-style: none; }
.trust-panel li { display: flex; align-items: center; gap: 0.48rem; }
.trust-panel li > span { width: 0.36rem; height: 0.36rem; flex: 0 0 auto; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.trust-panel li.offline > span { background: var(--blue); box-shadow: 0 0 8px rgba(100, 169, 255, 0.6); }
.trust-panel li p { display: grid; }
.trust-panel li strong { font-size: 0.58rem; }
.trust-panel li small { color: var(--faint); font-size: 0.5rem; }

.floor-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto 3.85rem; padding: 1rem 1rem 0.65rem; }
.legend { display: flex; align-items: center; gap: 0.8rem; color: var(--muted); font-size: 0.56rem; }
.map-head-tools { display: flex; align-items: center; gap: 0.75rem; }
.room-pagination { display: flex; align-items: center; gap: 0.3rem; padding-left: 0.65rem; border-left: 1px solid var(--line); }
.room-pagination button { width: 1.45rem; height: 1.45rem; display: grid; place-items: center; padding: 0; color: var(--muted); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); cursor: pointer; }
.room-pagination button:hover { color: var(--lime); border-color: var(--line-strong); }
.room-pagination button:disabled { cursor: default; opacity: 0.35; }
.room-pagination strong { min-width: 2rem; color: var(--ink); font-size: 0.55rem; text-align: center; font-variant-numeric: tabular-nums; }
.legend span { display: flex; align-items: center; gap: 0.28rem; }
.legend span::before { content: ""; width: 0.36rem; height: 0.36rem; border-radius: 50%; background: var(--mint); }
.legend .watch::before { background: var(--amber); }.legend .alarm::before { background: var(--red); }.legend .offline::before { background: var(--faint); }
.facility-stage { position: relative; min-height: 0; margin-top: 0.5rem; overflow: hidden; border: 1px solid rgba(153, 205, 181, 0.09); background: rgba(2, 18, 14, 0.38); }
.facility-stage::before { content: ""; position: absolute; inset: 0; opacity: 0.25; background-image: linear-gradient(rgba(183, 247, 94, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(183, 247, 94, 0.08) 1px, transparent 1px); background-size: 2.4rem 2.4rem; }
.facility-lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(128, 182, 156, 0.14); stroke-width: 1.2; stroke-dasharray: 5 7; }
.facility-lines .flow { stroke: rgba(183, 247, 94, 0.17); stroke-width: 2; stroke-dasharray: 4 12; animation: flow 12s linear infinite; }
.scan-line { position: absolute; z-index: 1; top: 0; bottom: 0; width: 18%; opacity: 0.45; background: linear-gradient(90deg, transparent, rgba(183, 247, 94, 0.08), rgba(183, 247, 94, 0.3), transparent); animation: scan 9s ease-in-out infinite; }
.room-zone {
  position: absolute;
  z-index: 2;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  padding: 0.75rem;
  color: var(--ink);
  cursor: pointer;
  border: 1px solid rgba(91, 223, 187, 0.2);
  background: linear-gradient(135deg, rgba(22, 62, 51, 0.82), rgba(9, 36, 30, 0.9));
  text-align: left;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}
.room-zone:hover, .room-zone.selected { z-index: 3; transform: translateY(-2px); border-color: var(--lime); background: linear-gradient(135deg, rgba(29, 76, 60, 0.95), rgba(10, 42, 33, 0.96)); box-shadow: 0 0 28px rgba(183, 247, 94, 0.07); }
.room-zone.selected::after { content: attr(data-selected-label); position: absolute; left: -1px; bottom: -1px; padding: 0.2rem 0.32rem; color: #102215; background: var(--lime); font-size: 0.43rem; font-weight: 950; letter-spacing: 0.08em; }
.room-code { color: var(--mint); font-size: 0.56rem; font-weight: 900; letter-spacing: 0.11em; }
.device-dots { justify-self: end; display: flex; gap: 0.22rem; }
.device-dots i { width: 0.34rem; height: 0.34rem; border-radius: 50%; background: var(--mint); box-shadow: 0 0 7px rgba(91, 223, 187, 0.5); }
.device-dots i.watch { background: var(--amber); box-shadow: 0 0 7px rgba(255, 191, 84, 0.55); }
.device-dots i.alarm { background: var(--red); box-shadow: 0 0 7px rgba(255, 99, 118, 0.65); }
.device-dots i.offline, .device-dots i.stale { background: var(--blue); box-shadow: 0 0 7px rgba(100, 169, 255, 0.65); }
.room-zone strong { grid-column: 1 / -1; align-self: end; margin-bottom: 0.2rem; font-size: clamp(0.76rem, 0.88vw, 1rem); }
.room-zone small { align-self: end; color: var(--muted); font-size: 0.54rem; }
.room-state { justify-self: end; padding: 0.17rem 0.32rem; color: var(--mint); border: 1px solid rgba(91, 223, 187, 0.22); background: rgba(91, 223, 187, 0.06); font-size: 0.5rem; font-style: normal; font-weight: 850; }
.room-zone.watch { border-color: rgba(255, 191, 84, 0.42); background: linear-gradient(135deg, rgba(71, 54, 24, 0.88), rgba(39, 35, 21, 0.9)); }
.room-zone.watch .room-code, .room-zone.watch .room-state { color: var(--amber); }
.room-zone.watch .room-state { border-color: rgba(255, 191, 84, 0.28); background: rgba(255, 191, 84, 0.08); }
.room-zone.alarm { border-color: rgba(255, 99, 118, 0.75); background: linear-gradient(135deg, rgba(83, 28, 35, 0.92), rgba(48, 23, 26, 0.92)); animation: alarm-border 1.8s ease-in-out infinite; }
.room-zone.alarm .room-code, .room-zone.alarm .room-state { color: var(--red); }
.room-zone.alarm .room-state { border-color: rgba(255, 99, 118, 0.35); background: rgba(255, 99, 118, 0.08); }
.room-zone.offline, .room-zone.stale { border-color: rgba(100, 169, 255, 0.62); background: linear-gradient(135deg, rgba(24, 50, 74, 0.92), rgba(18, 35, 48, 0.92)); }
.room-zone.offline .room-code, .room-zone.offline .room-state, .room-zone.stale .room-code, .room-zone.stale .room-state { color: var(--blue); }
.room-zone.offline .room-state, .room-zone.stale .room-state { border-color: rgba(100, 169, 255, 0.3); background: rgba(100, 169, 255, 0.08); }
.facility-caption { position: absolute; z-index: 3; left: 0.7rem; bottom: 0.55rem; display: flex; align-items: center; gap: 0.4rem; color: var(--faint); font-size: 0.48rem; }
.facility-caption span { width: 1.4rem; height: 1px; background: var(--faint); }
.selected-room-summary { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 0.65rem; padding-top: 0.7rem; }
.selected-room-summary > div { min-width: 0; display: grid; align-content: center; padding-left: 0.7rem; border-left: 1px solid var(--line); }
.selected-room-summary > div:first-child { padding-left: 0; border-left: 0; }
.selected-room-summary span { color: var(--faint); font-size: 0.5rem; }
.selected-room-summary strong { overflow: hidden; margin-top: 0.1rem; font-size: 0.72rem; white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.selected-room-summary small { color: var(--faint); font-size: 0.45rem; }
.selected-device-section { min-height: 0; display: grid; grid-template-columns: 7.7rem minmax(0, 1fr); align-items: center; gap: 0.6rem; margin-top: 0.45rem; padding-top: 0.45rem; border-top: 1px solid var(--line); }
.selected-device-section > header { min-width: 0; display: grid; }
.selected-device-section > header span { color: var(--faint); font-size: 0.48rem; letter-spacing: 0.08em; }
.selected-device-section > header strong { margin-top: 0.08rem; font-size: 0.72rem; }
.selected-device-section > header small { color: var(--mint); font-size: 0.48rem; }
.selected-device-list { min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(8.5rem, 1fr); gap: 0.38rem; }
.device-mini { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.38rem; align-items: center; padding: 0.38rem 0.48rem; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.018); }
.device-mini.watch { border-color: rgba(255, 191, 84, 0.3); }.device-mini.alarm { border-color: rgba(255, 99, 118, 0.38); }.device-mini.offline, .device-mini.stale { border-color: rgba(100, 169, 255, 0.34); }
.device-mini p, .device-mini > div { min-width: 0; display: grid; }
.device-mini p strong { overflow: hidden; font-size: 0.54rem; white-space: nowrap; text-overflow: ellipsis; }
.device-mini p small, .device-mini > div small { color: var(--faint); font-size: 0.42rem; white-space: nowrap; }
.device-mini > div { justify-items: end; }
.device-mini > div strong { font-size: 0.62rem; font-variant-numeric: tabular-nums; }
.device-mini.more-devices { grid-template-columns: 1fr; place-items: center; border-style: dashed; text-align: center; }
.device-mini.more-devices p { justify-items: center; }
.device-mini.more-devices p strong { color: var(--lime); font-size: 0.68rem; }

.trend-panel { display: grid; grid-template-rows: auto 1fr; padding: 0.9rem 1rem 0.6rem; }
.trend-summary { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 0 0.4rem; text-align: right; }
.trend-summary span { grid-column: 1 / -1; color: var(--faint); font-size: 0.5rem; }
.trend-summary strong { color: var(--lime); font-size: 0.95rem; }
.trend-summary small { color: var(--muted); font-size: 0.48rem; }
.chart-shell { position: relative; min-height: 0; margin: 0.4rem 0 0 2.5rem; }
.chart-shell svg { position: absolute; inset: 0.1rem 0 1rem; width: 100%; height: calc(100% - 1.1rem); overflow: visible; }
.chart-grid { fill: none; stroke: rgba(153, 205, 181, 0.1); stroke-width: 1; }
.threshold-line { fill: none; stroke: rgba(255, 191, 84, 0.55); stroke-width: 1; stroke-dasharray: 8 8; }
.area-path { fill: url(#trendArea); }
.main-path { fill: none; stroke: var(--lime); stroke-width: 3; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 5px rgba(183, 247, 94, 0.25)); }
.peak-dot circle:first-child { fill: var(--lime); }.peak-dot circle:last-child { fill: none; stroke: rgba(183, 247, 94, 0.25); stroke-width: 4; }
.y-axis { position: absolute; right: calc(100% + 0.45rem); top: 0; bottom: 1rem; display: flex; flex-direction: column; justify-content: space-between; color: var(--faint); font-size: 0.48rem; text-align: right; }
.x-axis { position: absolute; right: 0; bottom: 0; left: 0; display: flex; justify-content: space-between; color: var(--faint); font-size: 0.48rem; }
.threshold-label { position: absolute; top: 26%; right: 0; padding: 0.14rem 0.3rem; color: #ffd48b; background: rgba(46, 37, 20, 0.9); font-size: 0.48rem; }

.action-panel, .room-list-panel { padding: 1rem; }
.action-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.severity { padding: 0.28rem 0.42rem; color: var(--amber); border: 1px solid rgba(255, 191, 84, 0.25); background: rgba(255, 191, 84, 0.06); font-size: 0.54rem; font-weight: 850; }
.severity.alarm { color: var(--red); border-color: rgba(255, 99, 118, 0.3); background: rgba(255, 99, 118, 0.08); }
.severity.offline { color: var(--blue); border-color: rgba(100, 169, 255, 0.3); background: rgba(100, 169, 255, 0.08); }
.action-list { min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); gap: 0.38rem; padding-top: 0.48rem; }
.action-card { min-height: 0; display: grid; grid-template-rows: auto auto auto auto auto 1fr auto; gap: 0.32rem; padding: 0.62rem 0.72rem; border: 1px solid rgba(255, 191, 84, 0.28); background: rgba(255, 191, 84, 0.045); }
.action-card.alarm { border-color: rgba(255, 99, 118, 0.42); background: rgba(255, 99, 118, 0.05); }
.action-card.offline, .action-card.stale { border-color: rgba(100, 169, 255, 0.38); background: rgba(100, 169, 255, 0.05); }
.action-card__top { display: flex; justify-content: space-between; color: var(--amber); font-size: 0.55rem; font-weight: 850; letter-spacing: 0.06em; }
.action-card.alarm .action-card__top { color: var(--red); }
.action-card.offline .action-card__top, .action-card.stale .action-card__top { color: var(--blue); }
.action-card h3 { font-size: 0.82rem; }
.device-identity { color: var(--faint); font-size: 0.46rem; }
.action-value { display: flex; align-items: baseline; gap: 0.35rem; }
.action-value strong { font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.action-value span { color: var(--muted); font-size: 0.52rem; }
.action-progress { height: 0.28rem; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.action-progress span { display: block; width: 96%; height: 100%; background: var(--amber); transition: width 320ms ease, background 320ms ease; }
.action-card.alarm .action-progress span { width: 100%; background: var(--red); box-shadow: 0 0 12px rgba(255, 99, 118, 0.35); }
.action-data-gap { display: flex; align-items: baseline; gap: 0.45rem; }
.action-data-gap strong { color: var(--blue); font-size: 1.15rem; }.action-data-gap span { color: var(--muted); font-size: 0.52rem; }
.action-card > p { align-self: center; color: #c8d4cd; font-size: 0.63rem; line-height: 1.55; }
.action-card > p i { margin-right: 0.25rem; padding: 0.14rem 0.28rem; color: #0d211b; background: var(--amber); font-size: 0.5rem; font-style: normal; font-weight: 900; }
.action-card.alarm > p i { color: #fff; background: var(--red); }
.action-card.offline > p i, .action-card.stale > p i { color: #071814; background: var(--blue); }
.action-card footer { display: flex; justify-content: space-between; padding-top: 0.5rem; border-top: 1px solid var(--line); }
.action-card footer span { color: var(--faint); font-size: 0.52rem; }.action-card footer strong { font-size: 0.58rem; }
.action-list.multi .action-card { grid-template-rows: auto auto 1fr auto; gap: 0.1rem; padding: 0.38rem 0.56rem; }
.action-list.multi .device-identity, .action-list.multi .action-data-gap { display: none; }
.action-list.multi .action-card h3 { font-size: 0.68rem; }
.action-list.multi .action-card > p { font-size: 0.54rem; line-height: 1.25; }
.action-list.multi .action-card footer { padding-top: 0.18rem; }
.empty-action { min-height: 0; display: grid; align-content: center; justify-items: center; margin-top: 0.7rem; border: 1px solid rgba(91, 223, 187, 0.17); background: rgba(91, 223, 187, 0.035); text-align: center; }
.empty-action > span { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; margin-bottom: 0.6rem; color: #0a2119; border-radius: 50%; background: var(--lime); font-size: 1.2rem; font-weight: 900; }
.empty-action strong { font-size: 1rem; }.empty-action p { margin-top: 0.25rem; color: var(--muted); font-size: 0.6rem; }

.room-list-panel { display: grid; grid-template-rows: auto 1fr auto; padding: 0.78rem 1rem 0.62rem; }
.quiet-chip { padding: 0.25rem 0.4rem; color: var(--mint); border: 1px solid rgba(91, 223, 187, 0.18); font-size: 0.52rem; }
.quiet-chip.offline { color: var(--blue); border-color: rgba(100, 169, 255, 0.3); }
.room-list { display: grid; align-content: center; padding: 0; list-style: none; }
.room-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.55rem; align-items: center; padding: 0.18rem 0; border-bottom: 1px solid var(--line); }
.room-list li:last-child { border-bottom: 0; }
.status-dot { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--mint); box-shadow: 0 0 9px rgba(91, 223, 187, 0.55); }
.status-dot.watch { background: var(--amber); box-shadow: 0 0 9px rgba(255, 191, 84, 0.55); }
.status-dot.alarm { background: var(--red); box-shadow: 0 0 9px rgba(255, 99, 118, 0.65); }
.status-dot.offline, .status-dot.stale { background: var(--blue); box-shadow: 0 0 9px rgba(100, 169, 255, 0.65); }
.room-list p { display: grid; }
.room-list strong { font-size: 0.63rem; }.room-list small { color: var(--faint); font-size: 0.5rem; }
.room-list b { font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.list-unit { color: var(--faint); font-size: 0.47rem; text-align: right; }

.shift-panel { display: grid; grid-template-rows: auto 1fr; }
.shift-grid { display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; margin-top: 0.3rem; }
.shift-grid p { display: grid; justify-items: center; border-left: 1px solid var(--line); }
.shift-grid p:first-child { border-left: 0; }
.shift-grid span { color: var(--faint); font-size: 0.49rem; }
.shift-grid strong { margin-top: 0.2rem; font-size: 0.87rem; font-variant-numeric: tabular-nums; }
.shift-grid small { color: var(--muted); font-size: 0.45rem; }

.status-ribbon { display: grid; grid-template-columns: auto 1fr auto; gap: 1.4rem; align-items: center; padding: 0 0.8rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.55rem; }
.live-signal { display: flex; align-items: center; gap: 0.45rem; }
.live-signal span, .rotation > span { width: 0.38rem; height: 0.38rem; border-radius: 50%; background: var(--lime); box-shadow: 0 0 9px rgba(183, 247, 94, 0.7); }
.live-signal strong { color: var(--lime); letter-spacing: 0.08em; }
.ticker { display: flex; justify-content: center; align-items: center; gap: 0.45rem; }
.ticker strong { color: #cbd9d0; }.ticker i { width: 1px; height: 0.75rem; margin: 0 0.35rem; background: var(--line); }
.rotation { display: flex; align-items: center; gap: 0.42rem; }
.rotation strong { color: #cbd9d0; }.rotation button { padding: 0.16rem 0.42rem; color: var(--muted); border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 0.5rem; }
.rotation button:hover { color: var(--lime); border-color: var(--line-strong); }
.rotation.paused > span { background: var(--faint); box-shadow: none; }

body[data-scenario="normal"] .verdict-orbit { --score-color: var(--lime); }
body[data-scenario="normal"] .verdict-copy p { color: var(--mint); }
body[data-scenario="alarm"] .verdict-orbit { --score-color: var(--red); box-shadow: 0 0 48px rgba(255, 99, 118, 0.12); }
body[data-scenario="alarm"] .verdict-copy p { color: var(--red); }
body[data-scenario="alarm"] .verdict-copy h2 { color: #ff8c9a; }
body[data-scenario="dataGap"] .verdict-orbit { --score-color: var(--blue); box-shadow: 0 0 48px rgba(100, 169, 255, 0.12); }
body[data-scenario="dataGap"] .verdict-copy p, body[data-scenario="dataGap"] .verdict-copy h2 { color: var(--blue); }

:lang(en-US) .title-lockup h1 { font-size: 1.62rem; letter-spacing: 0.07em; }
:lang(en-US) .title-lockup p { letter-spacing: 0.12em; }
:lang(en-US) .verdict-copy h2 { font-size: 1.42rem; letter-spacing: 0.045em; }
:lang(en-US) .room-zone strong { font-size: clamp(0.67rem, 0.76vw, 0.88rem); }
:lang(en-US) .room-zone small { font-size: 0.47rem; }

[hidden] { display: none !important; }

@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes flow { to { stroke-dashoffset: -160; } }
@keyframes scan { 0%, 10% { left: -22%; } 55%, 100% { left: 108%; } }
@keyframes alarm-border { 0%, 100% { box-shadow: 0 0 0 rgba(255, 99, 118, 0); } 50% { box-shadow: 0 0 24px rgba(255, 99, 118, 0.12); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

@media (max-aspect-ratio: 4 / 3) {
  :root { font-size: 12px; }
  .dashboard-grid { grid-template-columns: 20rem minmax(42rem, 1fr) 21rem; }
}

.room-zone.maintenance { border-color:var(--amber); }
.device-dots i.maintenance { background:var(--amber); }
body[data-scenario="maintenance"] .verdict-card { border-color:var(--amber); }
