/* Bounded path-preview extension; existing workspaces and layout remain unchanged. */
.youxin-hmi-path-preview { margin-top: 10px; padding: 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 4px; }
.youxin-hmi-path-preview[hidden] { display: none; }
.youxin-hmi-path-preview > label { display: block; margin: 8px 0 4px; font-size: var(--youxin-hmi-font-section); }
.youxin-hmi-path-preview input[type="range"] { display: block; width: 100%; min-height: 28px; }
.youxin-hmi-path-preview .youxin-hmi-section-note { overflow-wrap: anywhere; }
/* SPDX-License-Identifier: AGPL-3.0-only */
/* Copyright (C) 2025 realvirtual GmbH <https://realvirtual.io> */

:root {
  color-scheme: dark;
  --youxin-hmi-primary: #4fc3f7;
  --youxin-hmi-primary-soft: rgba(79,195,247,.14);
  --youxin-hmi-success: #66bb6a;
  --youxin-hmi-warning: #ffa726;
  --youxin-hmi-error: #ef5350;
  --youxin-hmi-text: rgba(255,255,255,.92);
  --youxin-hmi-muted: rgba(255,255,255,.76);
  --youxin-hmi-faint: rgba(255,255,255,.64);
  --youxin-hmi-border: rgba(255,255,255,.08);
  --youxin-hmi-border-strong: rgba(255,255,255,.13);
  --youxin-hmi-toolbar-bg: rgba(38,38,38,.96);
  --youxin-hmi-window-bg: rgba(48,48,48,.94);
  --youxin-hmi-floating-bg: rgba(30,30,30,.60);
  --youxin-hmi-rail-width: 46px;
  --youxin-hmi-left-panel-width: 350px;
  --youxin-hmi-ease-out: cubic-bezier(.23,1,.32,1);
  --youxin-hmi-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --youxin-hmi-sans: system-ui;
  /* Shared type scale: metadata, reading, controls, headings and instrument values. */
  --youxin-hmi-font-meta: 11px;
  --youxin-hmi-font-caption: 12px;
  --youxin-hmi-font-body: 13px;
  --youxin-hmi-font-control: 14px;
  --youxin-hmi-font-section: 15px;
  --youxin-hmi-font-title: 16px;
  --youxin-hmi-font-kpi: 28px;
  --youxin-hmi-font-kpi-compact: 26px;
}

* { box-sizing: border-box; }
html, body { width:100%; height:100%; margin:0; overflow:hidden; background:#cfcfcf; color:var(--youxin-hmi-text); font:var(--youxin-hmi-font-control)/1.5 var(--youxin-hmi-sans); }
button, input, select, textarea { font:inherit; }
button { color:inherit; }
[hidden] { display:none !important; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline:2px solid var(--youxin-hmi-primary); outline-offset:1px; }

#app { position:relative; width:100%; height:100%; isolation:isolate; background:#d2d2d2; }
#scene { position:absolute; left:var(--youxin-hmi-rail-width); top:0; display:block; width:calc(100% - var(--youxin-hmi-rail-width)); height:100%; outline:none; }
[data-ui-panel] { -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); }

/* ActivityBar */
.youxin-hmi-activity-bar { position:fixed; z-index:1300; inset:0 auto 0 0; width:var(--youxin-hmi-rail-width); display:flex; flex-direction:column; align-items:center; gap:2px; padding:4px 0; border-right:1px solid var(--youxin-hmi-border); background:var(--youxin-hmi-toolbar-bg); }
.youxin-hmi-logo-badge,.youxin-hmi-activity-button { position:relative; width:38px; height:38px; flex:0 0 38px; display:grid; place-items:center; border:0; border-radius:4px; background:transparent; color:rgba(255,255,255,.82); cursor:pointer; text-decoration:none; }
.youxin-hmi-logo-badge:hover,.youxin-hmi-activity-button:hover { background:rgba(255,255,255,.08); }
.youxin-hmi-activity-button.is-active { color:var(--youxin-hmi-primary); }
.youxin-hmi-activity-button.is-active::before { content:""; position:absolute; left:-4px; top:8px; bottom:8px; width:2px; background:var(--youxin-hmi-primary); }
.youxin-hmi-logo-badge svg { width:24px; height:24px; fill:#ec4f86; }
.youxin-hmi-activity-button svg { width:21px; height:21px; fill:currentColor; }
.youxin-hmi-rail-divider { width:30px; height:1px; margin:1px 0 4px; background:var(--youxin-hmi-border-strong); }
.youxin-hmi-rail-spacer { flex:1; }

/* Top workflow controls — float above scene or overlay drawer, no extra background strip. */
.youxin-hmi-top-left-cluster { position:fixed; z-index:1285; top:8px; left:calc(var(--youxin-hmi-rail-width) + 8px); width:calc(var(--youxin-hmi-left-panel-width) - 16px); display:flex; align-items:center; gap:4px; pointer-events:none; }
.youxin-hmi-top-left-cluster > * { pointer-events:auto; }
.youxin-hmi-mode-switcher-wrap { position:relative; }
.youxin-hmi-mode-switcher,.youxin-hmi-action-group { border:1px solid var(--youxin-hmi-border); background:var(--youxin-hmi-floating-bg); box-shadow:none; -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); }
.youxin-hmi-mode-switcher { min-width:118px; height:28px; display:flex; align-items:center; gap:6px; padding:0 9px; border-radius:4px; cursor:pointer; }
.youxin-hmi-mode-switcher:hover { background:rgba(30,30,30,.78); }
.youxin-hmi-mode-switcher svg { width:16px; height:16px; fill:var(--youxin-hmi-primary); }
.youxin-hmi-mode-switcher span { font-weight:700; letter-spacing:.02em; }
.youxin-hmi-mode-switcher i { width:0; height:0; border-left:4px solid transparent; border-right:4px solid transparent; border-top:5px solid var(--youxin-hmi-muted); }
.youxin-hmi-mode-menu { position:absolute; top:34px; left:0; width:230px; padding:4px; border:1px solid var(--youxin-hmi-border); border-radius:4px; background:rgba(30,30,30,.97); }
.youxin-hmi-mode-menu button { width:100%; display:grid; gap:2px; padding:8px 9px; border:0; border-radius:3px; background:transparent; text-align:left; cursor:pointer; }
.youxin-hmi-mode-menu button:hover { background:rgba(255,255,255,.08); }
.youxin-hmi-mode-menu strong { font-size:var(--youxin-hmi-font-title); font-weight:650; }
.youxin-hmi-mode-menu small { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-body); }
.youxin-hmi-action-group { height:26px; display:flex; align-items:stretch; overflow:hidden; border-radius:4px; }
.youxin-hmi-top-left-cluster > .youxin-hmi-action-group { height:28px; flex:1; border-color:rgba(79,195,247,.24); }
.youxin-hmi-action-segment { display:inline-flex; align-items:center; justify-content:center; min-width:34px; height:100%; padding:0 9px; border:0; background:transparent; color:rgba(255,255,255,.82); font-size:var(--youxin-hmi-font-section); font-weight:600; white-space:nowrap; cursor:pointer; transition:background-color 120ms ease,color 120ms ease,transform 120ms var(--youxin-hmi-ease-out); }
.youxin-hmi-action-segment:hover { background:rgba(255,255,255,.10); color:#fff; }
.youxin-hmi-action-segment:active { transform:scale(.97); }
.youxin-hmi-action-segment.is-active { background:var(--youxin-hmi-primary-soft); color:var(--youxin-hmi-primary); }
.youxin-hmi-run-segment { min-width:0; width:100%; padding:0 10px; color:var(--youxin-hmi-primary); font-size:var(--youxin-hmi-font-control); font-weight:650; }
.youxin-hmi-run-segment:hover,.youxin-hmi-run-segment.is-active { background:var(--youxin-hmi-primary-soft); color:#fff; }
.youxin-hmi-run-segment:disabled { opacity:.48; background:transparent; color:var(--youxin-hmi-muted); cursor:wait; }
.youxin-hmi-icon-segment { width:34px; padding:0; }
.youxin-hmi-action-divider { width:1px; background:var(--youxin-hmi-border-strong); }

.youxin-hmi-workflow-status { position:absolute; left:0; top:34px; width:286px; display:grid; gap:2px; padding:7px 9px; border:1px solid var(--youxin-hmi-border); border-radius:4px; background:rgba(30,30,30,.68); }
.youxin-hmi-workflow-status small { color:var(--youxin-hmi-primary); font:700 var(--youxin-hmi-font-caption) var(--youxin-hmi-mono); letter-spacing:.06em; }
.youxin-hmi-workflow-status strong { overflow:hidden; color:var(--youxin-hmi-text); font-size:var(--youxin-hmi-font-body); font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.youxin-hmi-workflow-status span { overflow:hidden; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-meta); text-overflow:ellipsis; white-space:nowrap; }
.youxin-hmi-workflow-status span[data-state="locked"] { color:var(--youxin-hmi-warning); }
#app.has-left-panel .youxin-hmi-workflow-status { display:none; }

/* KPI bar remains viewport-fixed; opening a drawer never changes it. */
.youxin-hmi-kpi-bar { position:fixed; z-index:1100; top:8px; left:calc(var(--youxin-hmi-rail-width) + 360px); right:330px; display:flex; justify-content:center; align-items:flex-start; gap:12px; pointer-events:none; transition:opacity 180ms var(--youxin-hmi-ease-out),transform 180ms var(--youxin-hmi-ease-out); }
.youxin-hmi-kpi-bar.is-hidden { opacity:0; transform:translateY(-6px); pointer-events:none; }
.youxin-hmi-kpi-card { position:relative; width:164px; min-width:154px; min-height:104px; padding:10px 12px 8px; overflow:hidden; border:1px solid var(--youxin-hmi-border); border-radius:8px; background:var(--youxin-hmi-floating-bg); pointer-events:auto; -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); }
.youxin-hmi-kpi-card > *:not(.youxin-hmi-kpi-spark) { position:relative; z-index:1; }
.youxin-hmi-kpi-card small { display:block; min-height:28px; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-meta); line-height:1.25; letter-spacing:.04em; }
.youxin-hmi-kpi-card > div { display:flex; align-items:baseline; gap:5px; margin-top:4px; }
.youxin-hmi-kpi-card strong { color:var(--youxin-hmi-primary); font:700 var(--youxin-hmi-font-kpi)/1 var(--youxin-hmi-mono); font-variant-numeric:tabular-nums; }
.youxin-hmi-kpi-card span { color:var(--youxin-hmi-muted); font:var(--youxin-hmi-font-caption) var(--youxin-hmi-mono); }
.youxin-hmi-kpi-card p { margin:4px 0 0; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-caption); line-height:1.4; }
.youxin-hmi-kpi-card[data-kpi="energy"] strong { color:var(--youxin-hmi-success); }
.youxin-hmi-kpi-card[data-kpi="powder"] strong { color:#45b8e8; }
.youxin-hmi-kpi-card[data-kpi="power"] strong { color:var(--youxin-hmi-warning); }
.youxin-hmi-kpi-spark { position:absolute; z-index:0; left:0; bottom:3px; width:100%; height:42%; opacity:.34; }
.youxin-hmi-kpi-spark polyline { fill:none; stroke:currentColor; stroke-width:1.2; vector-effect:non-scaling-stroke; }
.youxin-hmi-kpi-card[data-kpi="progress"] .youxin-hmi-kpi-spark { color:var(--youxin-hmi-primary); }
.youxin-hmi-kpi-card[data-kpi="energy"] .youxin-hmi-kpi-spark { color:var(--youxin-hmi-success); }
.youxin-hmi-kpi-card[data-kpi="powder"] .youxin-hmi-kpi-spark { color:#45b8e8; }
.youxin-hmi-kpi-card[data-kpi="power"] .youxin-hmi-kpi-spark { color:var(--youxin-hmi-warning); }

/* Overlay drawers: they cover the scene; they never change canvas width or KPI positions. */
.youxin-hmi-left-panel { position:fixed; z-index:1250; left:var(--youxin-hmi-rail-width); top:0; bottom:0; width:var(--youxin-hmi-left-panel-width); display:flex; flex-direction:column; overflow:hidden; border-right:1px solid var(--youxin-hmi-border); background:var(--youxin-hmi-window-bg); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); pointer-events:auto; transform:translateX(-100%); visibility:hidden; transition:transform 220ms var(--youxin-hmi-ease-out),visibility 220ms; }
.youxin-hmi-left-panel.is-open { transform:translateX(0); visibility:visible; }
.youxin-hmi-left-panel-header { flex:0 0 auto; min-height:86px; display:flex; align-items:flex-end; gap:8px; padding:42px 9px 9px 12px; border-bottom:1px solid var(--youxin-hmi-border); }
.youxin-hmi-left-panel-header > div { display:grid; gap:2px; min-width:0; flex:1; }
.youxin-hmi-left-panel-header small { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-caption); letter-spacing:.12em; }
.youxin-hmi-left-panel-header strong { font-size:var(--youxin-hmi-font-title); font-weight:650; }
.youxin-hmi-left-panel-header button,.youxin-hmi-shortcuts-panel header button { width:28px; height:28px; display:grid; place-items:center; border:0; border-radius:3px; background:transparent; color:var(--youxin-hmi-muted); font-size:18px; cursor:pointer; }
.youxin-hmi-left-panel-header button:hover,.youxin-hmi-shortcuts-panel header button:hover { background:rgba(255,255,255,.08); color:#fff; }
.youxin-hmi-left-panel-content { flex:1; min-height:0; overflow-y:auto; overflow-x:hidden; padding:8px; scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.18) transparent; }
.youxin-hmi-panel-section { margin:0 0 8px; padding:10px; border:1px solid var(--youxin-hmi-border); border-radius:4px; background:rgba(0,0,0,.10); }
.youxin-hmi-panel-section > header { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:10px; }
.youxin-hmi-panel-section > header span { font-size:var(--youxin-hmi-font-section); font-weight:650; }
.youxin-hmi-panel-section > header small { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-meta); letter-spacing:.12em; }
.youxin-hmi-section-note { margin:6px 0 0; color:var(--youxin-hmi-faint); font-size:var(--youxin-hmi-font-meta); line-height:1.45; }

.youxin-hmi-phase-banner { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; padding:7px 8px; border:1px solid rgba(79,195,247,.26); border-radius:3px; background:rgba(79,195,247,.08); }
.youxin-hmi-phase-banner small { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-meta); letter-spacing:.12em; }
.youxin-hmi-phase-banner strong { color:var(--youxin-hmi-primary); font:var(--youxin-hmi-font-body) var(--youxin-hmi-mono); letter-spacing:.04em; }
.youxin-hmi-experiment-stepper { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; margin:0 0 8px; padding:0; list-style:none; }
.youxin-hmi-experiment-stepper li { min-width:0; display:flex; align-items:center; gap:5px; padding:5px 6px; border:1px solid var(--youxin-hmi-border); border-radius:3px; background:rgba(0,0,0,.10); color:var(--youxin-hmi-faint); font-size:var(--youxin-hmi-font-meta); }
.youxin-hmi-experiment-stepper li i { width:15px; height:15px; display:grid; place-items:center; flex:0 0 15px; border:1px solid rgba(255,255,255,.12); border-radius:50%; color:var(--youxin-hmi-muted); font:700 var(--youxin-hmi-font-meta) var(--youxin-hmi-mono); font-style:normal; }
.youxin-hmi-experiment-stepper li span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.youxin-hmi-experiment-stepper li.is-complete { color:rgba(255,255,255,.64); }
.youxin-hmi-experiment-stepper li.is-complete i { border-color:rgba(102,187,106,.5); background:rgba(102,187,106,.12); color:var(--youxin-hmi-success); }
.youxin-hmi-experiment-stepper li.is-active { border-color:rgba(79,195,247,.42); background:rgba(79,195,247,.10); color:var(--youxin-hmi-primary); }
.youxin-hmi-experiment-stepper li.is-active i { border-color:var(--youxin-hmi-primary); background:rgba(79,195,247,.16); color:var(--youxin-hmi-primary); }
.youxin-hmi-phase-progress { height:3px; margin:-4px 0 8px; overflow:hidden; border-radius:2px; background:rgba(255,255,255,.08); }
.youxin-hmi-phase-progress i { display:block; width:0; height:100%; background:var(--youxin-hmi-primary); transition:width 120ms linear; }

.youxin-hmi-equipment-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; }
.youxin-hmi-equipment-grid button { min-width:0; min-height:38px; display:grid; gap:2px; padding:6px 7px; border:1px solid var(--youxin-hmi-border); border-radius:3px; background:rgba(255,255,255,.03); text-align:left; cursor:pointer; }
.youxin-hmi-equipment-grid button:hover { border-color:rgba(79,195,247,.30); background:rgba(79,195,247,.07); }
.youxin-hmi-equipment-grid strong { overflow:hidden; color:var(--youxin-hmi-text); font-size:var(--youxin-hmi-font-body); text-overflow:ellipsis; white-space:nowrap; }
.youxin-hmi-equipment-grid small { color:var(--youxin-hmi-muted); font:var(--youxin-hmi-font-meta) var(--youxin-hmi-mono); }

.youxin-hmi-interlock-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; }
.youxin-hmi-interlock-row { min-width:0; display:grid; grid-template-columns:14px 1fr auto; align-items:center; gap:5px; padding:6px; border:1px solid var(--youxin-hmi-border); border-radius:3px; background:rgba(0,0,0,.11); cursor:pointer; }
.youxin-hmi-interlock-row input { width:12px; height:12px; margin:0; accent-color:var(--youxin-hmi-success); }
.youxin-hmi-interlock-row span { overflow:hidden; color:rgba(255,255,255,.74); font-size:var(--youxin-hmi-font-caption); text-overflow:ellipsis; white-space:nowrap; }
.youxin-hmi-interlock-row b { color:var(--youxin-hmi-success); font:600 var(--youxin-hmi-font-meta) var(--youxin-hmi-mono); }
.youxin-hmi-interlock-row.is-failed { border-color:rgba(239,83,80,.38); background:rgba(239,83,80,.08); }
.youxin-hmi-interlock-row.is-failed b { color:var(--youxin-hmi-error); }

.youxin-hmi-guidance-ack { border-color:rgba(255,167,38,.30); background:rgba(255,167,38,.055); }
.youxin-hmi-guidance-ack > p { margin:0; color:rgba(255,255,255,.68); font-size:var(--youxin-hmi-font-caption); line-height:1.5; }
.youxin-hmi-engineering-action { width:100%; min-height:32px; margin-top:7px; border:1px solid rgba(79,195,247,.34); border-radius:3px; background:var(--youxin-hmi-primary-soft); color:var(--youxin-hmi-primary); font-size:var(--youxin-hmi-font-body); font-weight:650; cursor:pointer; }
.youxin-hmi-engineering-action:hover { background:rgba(79,195,247,.22); }
.youxin-hmi-engineering-action:disabled { opacity:.42; cursor:not-allowed; background:rgba(255,255,255,.04); color:var(--youxin-hmi-muted); }
.youxin-hmi-secondary-action { width:100%; min-height:32px; margin-top:8px; border:1px solid var(--youxin-hmi-border-strong); border-radius:3px; background:rgba(255,255,255,.035); color:rgba(255,255,255,.72); font-size:var(--youxin-hmi-font-body); cursor:pointer; }
.youxin-hmi-secondary-action:hover { border-color:rgba(255,167,38,.34); background:rgba(255,167,38,.07); color:var(--youxin-hmi-warning); }
.youxin-hmi-secondary-action:disabled { opacity:.36; cursor:not-allowed; }

.youxin-hmi-recipe-lock { display:grid; gap:2px; margin-bottom:8px; padding:8px 9px; border:1px solid rgba(102,187,106,.28); border-radius:3px; background:rgba(102,187,106,.07); }
.youxin-hmi-recipe-lock strong { color:var(--youxin-hmi-success); font-size:var(--youxin-hmi-font-body); }
.youxin-hmi-recipe-lock span { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-meta); line-height:1.4; }
.youxin-hmi-recipe-lock[data-state="locked"] { border-color:rgba(255,167,38,.32); background:rgba(255,167,38,.07); }
.youxin-hmi-recipe-lock[data-state="locked"] strong { color:var(--youxin-hmi-warning); }
.youxin-hmi-recipe-lock[data-state="confirmed"] { border-color:rgba(79,195,247,.34); background:rgba(79,195,247,.07); }
.youxin-hmi-recipe-lock[data-state="confirmed"] strong { color:var(--youxin-hmi-primary); }

.case-switch { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
.case-button { min-width:0; min-height:44px; display:grid; gap:2px; padding:7px 8px; border:1px solid var(--youxin-hmi-border); border-radius:3px; background:rgba(255,255,255,.035); text-align:left; cursor:pointer; }
.case-button:hover { background:rgba(255,255,255,.07); }
.case-button.is-active { border-color:rgba(79,195,247,.45); background:var(--youxin-hmi-primary-soft); }
.case-button strong { font-size:var(--youxin-hmi-font-control); font-weight:650; }
.case-button small { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-caption); }

.youxin-hmi-material-selectors { display:grid; gap:7px; }
.youxin-hmi-material-selectors label { display:grid; gap:4px; }
.youxin-hmi-material-selectors label > span,.parameter-grid label > span { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-caption); }
.youxin-hmi-material-selectors select,.parameter-grid input,.parameter-grid select { width:100%; height:31px; padding:0 8px; border:1px solid var(--youxin-hmi-border); border-radius:3px; outline:none; background:rgba(255,255,255,.045); color:var(--youxin-hmi-text); font:var(--youxin-hmi-font-body) var(--youxin-hmi-mono); }
.youxin-hmi-material-selectors select:focus,.parameter-grid input:focus,.parameter-grid select:focus { border-color:var(--youxin-hmi-primary); box-shadow:0 0 0 2px rgba(79,195,247,.12); }
.youxin-hmi-material-compatibility { margin-top:8px; padding:7px 8px; border:1px solid rgba(102,187,106,.32); border-radius:3px; background:rgba(102,187,106,.08); color:var(--youxin-hmi-success); font:var(--youxin-hmi-font-caption) var(--youxin-hmi-mono); }
.youxin-hmi-material-compatibility[data-tone="warning"] { border-color:rgba(255,167,38,.35); background:rgba(255,167,38,.08); color:var(--youxin-hmi-warning); }
.youxin-hmi-material-compatibility[data-tone="critical"] { border-color:rgba(239,83,80,.38); background:rgba(239,83,80,.08); color:var(--youxin-hmi-error); }
.youxin-hmi-material-risk-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; margin-top:6px; }
.youxin-hmi-material-risk-grid > div { display:grid; gap:2px; min-width:0; padding:6px; border:1px solid var(--youxin-hmi-border); border-radius:3px; background:rgba(0,0,0,.1); }
.youxin-hmi-material-risk-grid small { color:var(--youxin-hmi-faint); font-size:var(--youxin-hmi-font-meta); }
.youxin-hmi-material-risk-grid strong { color:var(--youxin-hmi-text); font:var(--youxin-hmi-font-caption) var(--youxin-hmi-mono); }
.youxin-hmi-material-risk-grid strong[data-tone="good"] { color:var(--youxin-hmi-success); }
.youxin-hmi-material-risk-grid strong[data-tone="warning"] { color:var(--youxin-hmi-warning); }
.youxin-hmi-material-risk-grid strong[data-tone="critical"] { color:var(--youxin-hmi-error); }
.youxin-hmi-material-properties { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-top:7px; }
.youxin-hmi-material-properties section { min-width:0; padding:7px; border:1px solid var(--youxin-hmi-border); border-radius:3px; background:rgba(0,0,0,.11); }
.youxin-hmi-material-properties h4 { margin:0 0 6px; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-caption); font-weight:650; }
.youxin-hmi-material-properties dl { display:grid; gap:4px; margin:0; }
.youxin-hmi-material-properties dl > div { display:grid; gap:1px; min-width:0; }
.youxin-hmi-material-properties dt { color:var(--youxin-hmi-faint); font-size:var(--youxin-hmi-font-meta); }
.youxin-hmi-material-properties dd { margin:0; overflow:hidden; color:var(--youxin-hmi-text); font:var(--youxin-hmi-font-caption) var(--youxin-hmi-mono); text-overflow:ellipsis; white-space:nowrap; }
.youxin-hmi-material-note { margin:7px 0 0; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-meta); line-height:1.45; }
.youxin-hmi-material-recipe-preview { margin:7px 0 0; padding:6px 7px; border-left:2px solid var(--youxin-hmi-primary); background:rgba(79,195,247,.06); color:rgba(255,255,255,.72); font:var(--youxin-hmi-font-meta)/1.45 var(--youxin-hmi-mono); }

.range-row { display:grid; gap:5px; margin-bottom:10px; }
.range-row > span { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.range-row strong { font-size:var(--youxin-hmi-font-body); }
.range-row output { color:var(--youxin-hmi-primary); font:var(--youxin-hmi-font-caption) var(--youxin-hmi-mono); }
.range-row input[type="range"] { width:100%; accent-color:var(--youxin-hmi-primary); }
.parameter-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.parameter-grid label { min-width:0; display:grid; gap:4px; }
.parameter-grid label > span small { color:var(--youxin-hmi-faint); font-size:var(--youxin-hmi-font-meta); }
.youxin-hmi-process-parameter-grid { padding-top:2px; }

.process-readiness[data-tone="warning"] { border-color:rgba(255,167,38,.28); }
.process-readiness[data-tone="critical"] { border-color:rgba(239,83,80,.32); }
.process-readiness > p { margin:0; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-caption); line-height:1.5; }
.process-index-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; margin:7px 0 0; }
.process-index-grid > div { min-width:0; padding:5px; border-radius:3px; background:rgba(0,0,0,.14); }
.process-index-grid dt { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-meta); }
.process-index-grid dd { margin:2px 0 0; overflow:hidden; color:var(--youxin-hmi-text); font:700 var(--youxin-hmi-font-caption) var(--youxin-hmi-mono); text-overflow:ellipsis; white-space:nowrap; }

.path-settings { margin:0 0 8px; overflow:hidden; border:1px solid var(--youxin-hmi-border); border-radius:4px; background:rgba(0,0,0,.10); }
.path-settings summary { min-height:42px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; cursor:pointer; list-style:none; }
.path-settings summary::-webkit-details-marker { display:none; }
.path-settings summary > span { display:grid; gap:2px; }
.path-settings summary small { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-meta); letter-spacing:.12em; }
.path-settings summary strong { font-size:var(--youxin-hmi-font-control); }
.path-settings summary output { color:var(--youxin-hmi-primary); font:var(--youxin-hmi-font-caption) var(--youxin-hmi-mono); }
.path-settings .parameter-grid { padding:0 10px 10px; }
.path-actions { display:grid; grid-template-columns:1.3fr 1fr; gap:6px; padding:0 10px 10px; }
.path-action { min-height:31px; border:1px solid var(--youxin-hmi-border); border-radius:3px; background:rgba(255,255,255,.045); color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-body); cursor:pointer; }
.path-action:hover { background:rgba(255,255,255,.08); color:#fff; }
.path-action.primary { border-color:rgba(79,195,247,.38); background:var(--youxin-hmi-primary-soft); color:var(--youxin-hmi-primary); }
.path-action:disabled { opacity:.38; cursor:not-allowed; }

.simulation-toolbar-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.simulation-toolbar-heading > span { display:grid; gap:2px; }
.simulation-toolbar-heading small { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-meta); letter-spacing:.12em; }
.simulation-toolbar-heading strong { font-size:var(--youxin-hmi-font-control); }
.simulation-rate-group { display:flex; gap:3px; }
.simulation-rate-group button { min-width:31px; height:27px; border:1px solid var(--youxin-hmi-border); border-radius:3px; background:rgba(255,255,255,.035); color:var(--youxin-hmi-muted); font:var(--youxin-hmi-font-caption) var(--youxin-hmi-mono); cursor:pointer; }
.simulation-rate-group button.is-active { border-color:rgba(79,195,247,.4); background:var(--youxin-hmi-primary-soft); color:var(--youxin-hmi-primary); }
.simulation-toolbar > p { margin:7px 0 0; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-caption); line-height:1.45; }

.metric-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; margin:0; }
.metric-grid > div { min-width:0; padding:7px 8px; border:1px solid var(--youxin-hmi-border); border-radius:3px; background:rgba(0,0,0,.11); }
.metric-grid dt { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-caption); }
.metric-grid dd { margin:3px 0 0; overflow:hidden; color:var(--youxin-hmi-text); font:650 var(--youxin-hmi-font-control) var(--youxin-hmi-mono); text-overflow:ellipsis; white-space:nowrap; }
.youxin-hmi-operation-summary > div:first-child { grid-column:1/-1; }

/* Run review */
.youxin-hmi-run-empty { padding:18px 10px; border:1px dashed var(--youxin-hmi-border-strong); border-radius:4px; color:var(--youxin-hmi-faint); font-size:var(--youxin-hmi-font-caption); line-height:1.55; text-align:center; }
.youxin-hmi-run-summary { display:grid; gap:7px; }
.youxin-hmi-run-identity { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.youxin-hmi-run-identity strong { color:var(--youxin-hmi-primary); font:700 var(--youxin-hmi-font-section) var(--youxin-hmi-mono); }
.youxin-hmi-run-identity time { color:var(--youxin-hmi-faint); font:var(--youxin-hmi-font-meta) var(--youxin-hmi-mono); }
.youxin-hmi-run-recipe { margin:0; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-caption); line-height:1.5; }
.youxin-hmi-run-current .youxin-hmi-run-actions { padding:8px 0 0; }
.youxin-hmi-run-list { display:grid; gap:4px; }
.youxin-hmi-run-list > p { margin:0; padding:12px 8px; color:var(--youxin-hmi-faint); font-size:var(--youxin-hmi-font-caption); text-align:center; }
.youxin-hmi-run-row { width:100%; min-height:48px; display:grid; grid-template-columns:1.05fr 1fr; gap:8px; padding:7px 8px; border:1px solid var(--youxin-hmi-border); border-radius:3px; background:rgba(0,0,0,.10); color:var(--youxin-hmi-text); text-align:left; cursor:pointer; }
.youxin-hmi-run-row:hover { border-color:rgba(79,195,247,.24); background:rgba(79,195,247,.06); }
.youxin-hmi-run-row.is-selected { border-color:rgba(79,195,247,.42); background:var(--youxin-hmi-primary-soft); }
.youxin-hmi-run-row > span { min-width:0; display:grid; gap:2px; }
.youxin-hmi-run-row strong,.youxin-hmi-run-row b { overflow:hidden; font-size:var(--youxin-hmi-font-caption); text-overflow:ellipsis; white-space:nowrap; }
.youxin-hmi-run-row strong { color:var(--youxin-hmi-primary); font-family:var(--youxin-hmi-mono); }
.youxin-hmi-run-row small { overflow:hidden; color:var(--youxin-hmi-faint); font:var(--youxin-hmi-font-meta) var(--youxin-hmi-mono); text-overflow:ellipsis; white-space:nowrap; }
.youxin-hmi-danger-text-button { width:100%; margin-top:7px; padding:5px; border:0; background:transparent; color:rgba(239,83,80,.72); font-size:var(--youxin-hmi-font-meta); cursor:pointer; }
.youxin-hmi-danger-text-button:hover { color:var(--youxin-hmi-error); text-decoration:underline; }
.youxin-hmi-danger-text-button:disabled { opacity:.35; cursor:not-allowed; text-decoration:none; }
.youxin-hmi-run-compare-selectors { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.youxin-hmi-run-compare-selectors label { display:grid; gap:4px; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-meta); }
.youxin-hmi-run-compare-selectors select { min-width:0; height:31px; padding:0 6px; border:1px solid var(--youxin-hmi-border); border-radius:3px; background:rgba(255,255,255,.045); color:var(--youxin-hmi-text); font:var(--youxin-hmi-font-meta) var(--youxin-hmi-mono); }
.youxin-hmi-run-compare-result { margin-top:8px; overflow:hidden; border:1px solid var(--youxin-hmi-border); border-radius:3px; }
.youxin-hmi-run-compare-result > p { margin:0; padding:12px 8px; color:var(--youxin-hmi-faint); font-size:var(--youxin-hmi-font-caption); text-align:center; }
.youxin-hmi-run-compare-head,.youxin-hmi-run-compare-row { display:grid; grid-template-columns:1.25fr repeat(3,.8fr); align-items:center; gap:5px; min-height:30px; padding:5px 7px; border-bottom:1px solid var(--youxin-hmi-border); }
.youxin-hmi-run-compare-head { color:var(--youxin-hmi-faint); font:var(--youxin-hmi-font-meta) var(--youxin-hmi-mono); background:rgba(0,0,0,.12); }
.youxin-hmi-run-compare-row:last-child { border-bottom:0; }
.youxin-hmi-run-compare-row strong { font-size:var(--youxin-hmi-font-meta); font-weight:600; }
.youxin-hmi-run-compare-row span,.youxin-hmi-run-compare-row b { overflow:hidden; font:var(--youxin-hmi-font-meta) var(--youxin-hmi-mono); text-overflow:ellipsis; white-space:nowrap; }
.youxin-hmi-run-compare-row b { color:var(--youxin-hmi-primary); }

/* MessagePanel */
.youxin-hmi-message-panel { position:fixed; z-index:1120; right:8px; top:0; bottom:0; width:300px; display:flex; flex-direction:column; justify-content:center; gap:8px; pointer-events:none; transition:transform 240ms var(--youxin-hmi-ease-out); }
.youxin-hmi-message-panel.is-hidden { transform:translateX(calc(100% + 12px)); }
.youxin-hmi-message-panel.is-minimized { right:0; }
.youxin-hmi-message-panel.is-minimized .youxin-hmi-message-card,.youxin-hmi-message-panel.is-minimized .youxin-hmi-alarm-list { transform:translateX(calc(100% - 36px)); }
.youxin-hmi-message-panel.is-minimized .youxin-hmi-message-card:hover,.youxin-hmi-message-panel.is-minimized .youxin-hmi-alarm-list:hover { transform:translateX(0); }
.youxin-hmi-message-minimize { align-self:flex-end; width:30px; height:30px; display:grid; place-items:center; margin-bottom:1px; border:1px solid var(--youxin-hmi-border); border-radius:50%; background:rgba(0,0,0,.38); color:var(--youxin-hmi-text); font-size:20px; cursor:pointer; pointer-events:auto; }
.youxin-hmi-message-panel.is-minimized .youxin-hmi-message-minimize { transform:rotate(180deg); }
.youxin-hmi-message-card { position:relative; min-height:70px; display:grid; grid-template-columns:38px 1fr; gap:6px; padding:10px 10px 10px 6px; border:1px solid var(--youxin-hmi-border); border-left:3px solid var(--youxin-hmi-primary); border-radius:4px; background:rgba(30,30,30,.68); pointer-events:auto; -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); transition:transform 240ms var(--youxin-hmi-ease-out),background-color 160ms ease; }
.youxin-hmi-message-card:hover { background:rgba(30,30,30,.82); }
.youxin-hmi-quality-card[data-tone="good"] { border-left-color:var(--youxin-hmi-success); }
.youxin-hmi-quality-card[data-tone="warning"] { border-left-color:var(--youxin-hmi-warning); }
.youxin-hmi-quality-card[data-tone="critical"] { border-left-color:var(--youxin-hmi-error); }
.youxin-hmi-path-card { border-left-color:#9b8cff; }
.youxin-hmi-message-icon { display:grid; place-items:start center; padding-top:3px; color:var(--youxin-hmi-primary); font-size:18px; }
.youxin-hmi-quality-card[data-tone="good"] .youxin-hmi-message-icon { color:var(--youxin-hmi-success); }
.youxin-hmi-quality-card[data-tone="warning"] .youxin-hmi-message-icon { color:var(--youxin-hmi-warning); }
.youxin-hmi-quality-card[data-tone="critical"] .youxin-hmi-message-icon { color:var(--youxin-hmi-error); }
.youxin-hmi-path-card .youxin-hmi-message-icon { color:#9b8cff; }
.youxin-hmi-message-content { min-width:0; }
.youxin-hmi-message-content header { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.youxin-hmi-message-content header strong { font-size:var(--youxin-hmi-font-section); font-weight:650; }
.youxin-hmi-message-content header span { color:var(--youxin-hmi-muted); font:var(--youxin-hmi-font-caption) var(--youxin-hmi-mono); }
.youxin-hmi-message-content > p { margin:5px 0 0; color:rgba(255,255,255,.70); font-size:var(--youxin-hmi-font-body); line-height:1.45; }
.youxin-hmi-message-content > small { display:block; margin-top:5px; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-caption); line-height:1.35; }
.youxin-hmi-live-progress { height:3px; margin-top:7px; overflow:hidden; border-radius:2px; background:rgba(255,255,255,.10); }
.youxin-hmi-live-progress i { display:block; width:0; height:100%; background:var(--youxin-hmi-primary); transition:width 150ms linear; }
.youxin-hmi-loop-status { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 9px; margin-top:8px; }
.youxin-hmi-loop-status span { display:flex; align-items:center; gap:5px; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-meta); }
.youxin-hmi-loop-status i { width:12px; height:2px; border-radius:1px; }
.youxin-hmi-loop-status .water { background:#4bd4ff; }.youxin-hmi-loop-status .laser { background:#ffa23f; }.youxin-hmi-loop-status .powder { background:#d7dce0; }.youxin-hmi-loop-status .gas { background:#2fbfca; }
.youxin-hmi-alarm-list { display:grid; gap:5px; max-height:190px; overflow-y:auto; pointer-events:auto; scrollbar-width:thin; transition:transform 240ms var(--youxin-hmi-ease-out); }
.youxin-hmi-runtime-alarm { width:100%; display:grid; grid-template-columns:26px 1fr auto; align-items:start; gap:7px; padding:8px; border:1px solid var(--youxin-hmi-border); border-left:3px solid var(--youxin-hmi-warning); border-radius:4px; background:rgba(30,30,30,.74); color:var(--youxin-hmi-text); text-align:left; cursor:pointer; -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); }
.youxin-hmi-runtime-alarm.is-error { border-left-color:var(--youxin-hmi-error); }
.youxin-hmi-runtime-alarm > i { width:20px; height:20px; display:grid; place-items:center; border-radius:50%; background:rgba(255,167,38,.14); color:var(--youxin-hmi-warning); font-style:normal; font-weight:800; }
.youxin-hmi-runtime-alarm.is-error > i { background:rgba(239,83,80,.14); color:var(--youxin-hmi-error); }
.youxin-hmi-runtime-alarm > span { min-width:0; display:grid; gap:3px; }
.youxin-hmi-runtime-alarm em { color:var(--youxin-hmi-faint); font:700 var(--youxin-hmi-font-meta) var(--youxin-hmi-mono); font-style:normal; letter-spacing:.1em; }
.youxin-hmi-runtime-alarm strong { font-size:var(--youxin-hmi-font-body); font-weight:650; }.youxin-hmi-runtime-alarm small { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-caption); line-height:1.35; }.youxin-hmi-runtime-alarm time { color:var(--youxin-hmi-faint); font:var(--youxin-hmi-font-meta) var(--youxin-hmi-mono); }
.youxin-hmi-runtime-alarm-empty { padding:7px 9px; border:1px solid rgba(102,187,106,.20); border-radius:4px; background:rgba(102,187,106,.06); color:var(--youxin-hmi-success); font-size:var(--youxin-hmi-font-caption); text-align:center; -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); }

/* Search / component / trend */
.youxin-hmi-command-host { position:fixed; z-index:1400; left:50%; bottom:8px; transform:translateX(-50%); pointer-events:none; }
.youxin-hmi-command-host > * { pointer-events:auto; }
.youxin-hmi-command-button { width:44px; height:44px; display:grid; place-items:center; margin:0 auto; border:1px solid var(--youxin-hmi-border); border-radius:8px; background:rgba(30,30,30,.72); color:rgba(255,255,255,.78); cursor:pointer; -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); }
.youxin-hmi-command-button:hover { background:rgba(30,30,30,.88); color:#fff; }
.youxin-hmi-command-button svg { width:20px; height:20px; fill:currentColor; }
.youxin-hmi-command-palette { position:absolute; left:50%; bottom:52px; width:min(390px,calc(100vw - 32px)); padding:6px; border:1px solid var(--youxin-hmi-border); border-radius:6px; background:rgba(30,30,30,.97); transform:translateX(-50%); }
.youxin-hmi-command-search { display:flex; align-items:center; gap:7px; height:38px; padding:0 9px; border:1px solid var(--youxin-hmi-border); border-radius:4px; background:rgba(0,0,0,.16); }
.youxin-hmi-command-search svg { width:16px; height:16px; fill:var(--youxin-hmi-muted); }
.youxin-hmi-command-search input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--youxin-hmi-text); font-size:var(--youxin-hmi-font-section); }
kbd { font-family:var(--youxin-hmi-mono); }
.youxin-hmi-command-search kbd,.youxin-hmi-command-results kbd,.youxin-hmi-shortcuts-panel kbd { padding:2px 5px; border:1px solid var(--youxin-hmi-border-strong); border-radius:3px; background:rgba(255,255,255,.05); color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-caption); }
.youxin-hmi-command-results { display:grid; gap:1px; max-height:310px; margin-top:5px; overflow-y:auto; }
.youxin-hmi-command-results button { min-height:34px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 9px; border:0; border-radius:3px; background:transparent; color:var(--youxin-hmi-text); text-align:left; cursor:pointer; }
.youxin-hmi-command-results button:hover { background:rgba(79,195,247,.12); }
.youxin-hmi-component-command-results { display:contents; }.youxin-hmi-component-command-results button small { margin-left:auto; color:var(--youxin-hmi-faint); font-size:var(--youxin-hmi-font-meta); }

.youxin-hmi-component-popover { position:fixed; z-index:1280; left:calc(var(--youxin-hmi-rail-width) + 360px); bottom:62px; width:280px; overflow:hidden; border:1px solid var(--youxin-hmi-border); border-radius:6px; background:rgba(30,30,30,.88); -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); }
.youxin-hmi-component-popover header { min-height:42px; display:flex; align-items:center; gap:8px; padding:7px 8px 7px 10px; border-bottom:1px solid var(--youxin-hmi-border); }
.youxin-hmi-component-popover header > div { flex:1; display:grid; gap:2px; min-width:0; }.youxin-hmi-component-popover header small { color:var(--youxin-hmi-primary); font-size:var(--youxin-hmi-font-meta); letter-spacing:.12em; }.youxin-hmi-component-popover header strong { font-size:var(--youxin-hmi-font-section); }
.youxin-hmi-component-popover header button { width:26px; height:26px; border:0; border-radius:3px; background:transparent; color:var(--youxin-hmi-muted); cursor:pointer; }.youxin-hmi-component-popover header button:hover { background:rgba(255,255,255,.08); color:#fff; }
.youxin-hmi-component-popover dl { display:grid; gap:1px; margin:0; padding:5px; }.youxin-hmi-component-popover dl > div { display:grid; grid-template-columns:1fr auto; align-items:center; gap:10px; min-height:38px; padding:6px 7px; border-radius:3px; background:rgba(255,255,255,.025); }
.youxin-hmi-component-popover dt { min-width:0; color:rgba(255,255,255,.78); font-size:var(--youxin-hmi-font-caption); }.youxin-hmi-component-popover dt small { display:block; margin-top:2px; overflow:hidden; color:var(--youxin-hmi-faint); font:var(--youxin-hmi-font-meta) var(--youxin-hmi-mono); text-overflow:ellipsis; white-space:nowrap; }.youxin-hmi-component-popover dd { margin:0; color:var(--youxin-hmi-primary); font:var(--youxin-hmi-font-body) var(--youxin-hmi-mono); }
#componentFocusButton { width:calc(100% - 10px); min-height:30px; margin:0 5px 5px; border:1px solid rgba(79,195,247,.3); border-radius:3px; background:var(--youxin-hmi-primary-soft); color:var(--youxin-hmi-primary); font-size:var(--youxin-hmi-font-caption); cursor:pointer; }

.youxin-hmi-trend-panel { position:fixed; z-index:1270; left:50%; bottom:62px; width:min(840px,calc(100vw - var(--youxin-hmi-rail-width) - 36px)); height:min(420px,48vh); display:flex; flex-direction:column; border:1px solid var(--youxin-hmi-border); border-radius:6px; background:rgba(30,30,30,.86); transform:translateX(-50%); }
.youxin-hmi-trend-panel header { min-height:42px; display:flex; align-items:center; gap:8px; padding:6px 7px 6px 10px; border-bottom:1px solid var(--youxin-hmi-border); }.youxin-hmi-trend-panel header > div:first-child { display:grid; gap:2px; }.youxin-hmi-trend-panel header small { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-meta); letter-spacing:.12em; }.youxin-hmi-trend-panel header strong { font-size:var(--youxin-hmi-font-section); }
.youxin-hmi-trend-actions { margin-left:auto; display:flex; align-items:center; gap:3px; }.youxin-hmi-trend-actions button { min-height:26px; padding:0 8px; border:1px solid var(--youxin-hmi-border); border-radius:3px; background:transparent; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-caption); cursor:pointer; }.youxin-hmi-trend-actions button:hover,.youxin-hmi-trend-actions button.is-active { border-color:rgba(79,195,247,.34); background:var(--youxin-hmi-primary-soft); color:var(--youxin-hmi-primary); }#trendCloseButton { min-width:26px; padding:0; font-size:15px; }
.youxin-hmi-trend-panel canvas { flex:1; min-height:0; width:100%; height:100%; display:block; }.youxin-hmi-trend-panel footer { min-height:30px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 10px; border-top:1px solid var(--youxin-hmi-border); color:var(--youxin-hmi-muted); font:var(--youxin-hmi-font-meta) var(--youxin-hmi-mono); }

.youxin-hmi-view-actions { position:fixed; z-index:1180; right:8px; bottom:8px; display:flex; align-items:center; gap:4px; }.youxin-hmi-message-panel:not(.is-hidden):not(.is-minimized) ~ .youxin-hmi-view-actions { right:316px; }

/* 3D labels */
.callout-layer { position:absolute; inset:0; z-index:800; pointer-events:none; transition:opacity 160ms ease; }.callout-layer.is-hidden { opacity:0; }
.callout { position:absolute; transform:translate(-50%,-50%); opacity:0; transition:opacity 120ms linear; }.callout.is-visible { opacity:1; }.callout::before { content:""; position:absolute; left:-20px; top:50%; width:16px; height:1px; background:rgba(79,195,247,.72); }.callout::after { content:""; position:absolute; left:-24px; top:calc(50% - 3px); width:6px; height:6px; border:1px solid var(--youxin-hmi-primary); border-radius:50%; background:rgba(20,20,20,.9); }
.callout-card { min-width:102px; padding:6px 8px; border:1px solid var(--youxin-hmi-border); border-radius:4px; background:rgba(30,30,30,.78); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); }.callout-card strong { display:block; color:var(--youxin-hmi-text); font-size:var(--youxin-hmi-font-body); }.callout-card small { display:block; margin-top:2px; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-meta); }

/* Tooltips */
[data-tooltip] { position:relative; }[data-tooltip]::after { content:attr(data-tooltip); position:absolute; z-index:9999; left:calc(100% + 8px); top:50%; padding:5px 7px; border:1px solid var(--youxin-hmi-border); border-radius:3px; background:rgba(18,18,18,.96); color:var(--youxin-hmi-text); font-size:var(--youxin-hmi-font-control); line-height:1.2; white-space:nowrap; opacity:0; pointer-events:none; transform:translate(2px,-50%) scale(.98); transition:opacity 125ms var(--youxin-hmi-ease-out),transform 125ms var(--youxin-hmi-ease-out); }[data-tooltip]:hover::after,[data-tooltip]:focus-visible::after { opacity:1; transform:translate(0,-50%) scale(1); }
.youxin-hmi-top-left-cluster [data-tooltip]::after,.youxin-hmi-view-actions [data-tooltip]::after,.youxin-hmi-command-host [data-tooltip]::after { left:50%; top:auto; bottom:calc(100% + 7px); transform:translate(-50%,2px) scale(.98); }.youxin-hmi-top-left-cluster [data-tooltip]::after { top:calc(100% + 7px); bottom:auto; }.youxin-hmi-top-left-cluster [data-tooltip]:hover::after,.youxin-hmi-view-actions [data-tooltip]:hover::after,.youxin-hmi-command-host [data-tooltip]:hover::after { transform:translate(-50%,0) scale(1); }

.youxin-hmi-shortcuts-panel { position:fixed; z-index:3000; left:calc(var(--youxin-hmi-rail-width) + 8px); bottom:8px; width:310px; padding:8px; border:1px solid var(--youxin-hmi-border); border-radius:6px; background:rgba(30,30,30,.96); }.youxin-hmi-shortcuts-panel header { display:flex; align-items:center; gap:8px; padding:1px 1px 7px; border-bottom:1px solid var(--youxin-hmi-border); }.youxin-hmi-shortcuts-panel header > div { display:grid; gap:2px; flex:1; }.youxin-hmi-shortcuts-panel header small { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-meta); letter-spacing:.12em; }.youxin-hmi-shortcuts-panel header strong { font-size:var(--youxin-hmi-font-section); }.youxin-hmi-shortcuts-panel dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:3px 10px; margin:8px 0 0; }.youxin-hmi-shortcuts-panel dl > div { display:flex; align-items:center; gap:7px; min-height:27px; }.youxin-hmi-shortcuts-panel dt,.youxin-hmi-shortcuts-panel dd { margin:0; }.youxin-hmi-shortcuts-panel dt { min-width:39px; }.youxin-hmi-shortcuts-panel dd { color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-caption); }

.loading-overlay { position:absolute; inset:0; z-index:5000; display:grid; place-content:center; justify-items:center; gap:16px; background:radial-gradient(circle,#31373a,#202326 72%); transition:opacity 220ms var(--youxin-hmi-ease-out),visibility 220ms; }.loading-overlay.is-hidden { opacity:0; visibility:hidden; }.loading-overlay p { margin:0; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-section); letter-spacing:.08em; }.loader-ring { width:42px; height:42px; border:2px solid rgba(255,255,255,.10); border-top-color:var(--youxin-hmi-primary); border-radius:50%; animation:youxin-hmi-spin .8s linear infinite; }@keyframes youxin-hmi-spin { to { transform:rotate(360deg); } }
.error-panel { position:fixed; z-index:6000; left:50%; top:50%; width:min(440px,calc(100vw - 32px)); padding:20px; transform:translate(-50%,-50%); border:1px solid rgba(239,83,80,.45); border-radius:6px; background:rgba(45,20,20,.96); }.error-panel h2 { margin:0 0 7px; font-size:16px; }.error-panel p { margin:0; color:rgba(255,255,255,.72); font-size:var(--youxin-hmi-font-control); line-height:1.55; }

/* Responsive policy */
.youxin-hmi-source-badge { display:inline-block; max-width:100%; margin:2px 0; padding:1px 3px; border:1px solid var(--youxin-hmi-border-strong); border-radius:3px; color:var(--youxin-hmi-muted); font:var(--youxin-hmi-font-caption)/1.4 var(--youxin-hmi-mono); letter-spacing:0; vertical-align:middle; white-space:normal; }
.youxin-hmi-component-popover dt .youxin-hmi-source-badge { display:inline-block; font-size:var(--youxin-hmi-font-caption); white-space:normal; }
.youxin-hmi-science-legend { margin-top:10px; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-control); line-height:1.6; }
.youxin-hmi-science-legend summary { color:var(--youxin-hmi-text); cursor:pointer; }
.youxin-hmi-science-legend dl { margin:8px 0 0; display:grid; gap:6px; }
.youxin-hmi-science-legend dl > div { display:grid; grid-template-columns:85px 1fr; gap:6px; }
.youxin-hmi-science-legend dt { font:var(--youxin-hmi-font-body)/1.6 var(--youxin-hmi-mono); color:var(--youxin-hmi-primary); }
.youxin-hmi-science-legend dd { margin:0; }
.youxin-hmi-recipe-name { display:grid; gap:5px; color:var(--youxin-hmi-muted); font-size:var(--youxin-hmi-font-control); }
.youxin-hmi-recipe-name input { width:100%; min-height:34px; padding:6px 8px; border:1px solid var(--youxin-hmi-border-strong); border-radius:4px; background:rgba(255,255,255,.04); color:var(--youxin-hmi-text); }
.youxin-hmi-recipe-fingerprint { display:block; margin:8px 0; overflow-wrap:anywhere; color:var(--youxin-hmi-muted); font:var(--youxin-hmi-font-body)/1.6 var(--youxin-hmi-mono); }
.youxin-hmi-recipe-validation-list { margin:8px 0; padding-left:16px; color:var(--youxin-hmi-warning); font-size:var(--youxin-hmi-font-control); line-height:1.6; }
.youxin-hmi-recipe-validation details { margin:8px 0; font-size:var(--youxin-hmi-font-control); }
.youxin-hmi-recipe-diff p { margin:6px 0; line-height:1.5; color:var(--youxin-hmi-muted); }
#recipeValidationStatus { margin:8px 0; color:var(--youxin-hmi-primary); font:var(--youxin-hmi-font-control)/1.6 var(--youxin-hmi-mono); }
#recipeValidationStatus[data-tone="critical"],#recipeIoStatus[data-tone="critical"] { color:var(--youxin-hmi-error); }
@media (max-width:1180px) { .youxin-hmi-kpi-bar { left:calc(var(--youxin-hmi-rail-width) + 210px); right:310px; gap:6px; }.youxin-hmi-kpi-card { width:118px; min-width:0; padding-inline:9px; }.youxin-hmi-kpi-card strong { font-size:var(--youxin-hmi-font-kpi-compact); }.youxin-hmi-workflow-status { display:none; }#app:not(.has-left-panel) .youxin-hmi-top-left-cluster { top:94px; } }
@media (max-width:920px) { .youxin-hmi-kpi-bar { left:calc(var(--youxin-hmi-rail-width) + 165px); right:8px; justify-content:flex-end; }.youxin-hmi-kpi-card:nth-child(2),.youxin-hmi-kpi-card:nth-child(3) { display:none; }.youxin-hmi-message-panel { width:280px; } }
@media (max-width:760px) {
  :root { --youxin-hmi-rail-width:0px; }
  #scene { left:0; width:100%; }
  .youxin-hmi-activity-bar { left:auto; right:8px; top:8px; bottom:auto; width:auto; height:44px; flex-direction:row; gap:0; padding:3px; border:1px solid var(--youxin-hmi-border); border-radius:6px; background:rgba(38,38,38,.95); }
  .youxin-hmi-rail-divider,.youxin-hmi-rail-spacer { display:none; }.youxin-hmi-logo-badge { display:grid; width:38px; height:38px; flex:0 0 38px; }.youxin-hmi-activity-button { width:38px; height:38px; flex-basis:38px; }.youxin-hmi-activity-button.is-active::before { left:8px; right:8px; top:auto; bottom:-3px; width:auto; height:2px; }
  .youxin-hmi-top-left-cluster { left:8px; top:136px; width:min(334px,calc(100vw - 16px)); gap:6px; z-index:10010; }.youxin-hmi-mode-switcher { min-width:104px; height:38px; padding-inline:9px; }.youxin-hmi-top-left-cluster > .youxin-hmi-action-group { height:38px; }.youxin-hmi-run-segment { min-width:158px; font-size:var(--youxin-hmi-font-control); }
  .youxin-hmi-kpi-bar { top:58px; left:8px; right:8px; justify-content:flex-start; gap:6px; overflow-x:auto; scrollbar-width:none; }.youxin-hmi-kpi-card { display:block !important; min-width:118px; width:118px; height:70px; flex:0 0 118px; }.youxin-hmi-kpi-card strong { font-size:var(--youxin-hmi-font-kpi-compact); }
  .youxin-hmi-left-panel { inset:0; width:100%; z-index:10000; transform:translateY(100%); }.youxin-hmi-left-panel.is-open { transform:translateY(0); }.youxin-hmi-left-panel-header { min-height:182px; padding:136px 9px 8px 12px; }.youxin-hmi-left-panel-header button { min-width:44px; min-height:44px; }
  .case-button,.parameter-grid input,.parameter-grid select,.path-action,.simulation-rate-group button { min-height:44px; }
  .youxin-hmi-message-panel { right:0; width:286px; top:112px; bottom:64px; justify-content:center; }.youxin-hmi-message-panel:not(.is-hidden) .youxin-hmi-message-card,.youxin-hmi-message-panel:not(.is-hidden) .youxin-hmi-alarm-list { transform:translateX(calc(100% - 36px)); }.youxin-hmi-message-panel:not(.is-hidden) .youxin-hmi-message-card:hover,.youxin-hmi-message-panel:not(.is-hidden) .youxin-hmi-alarm-list:hover { transform:translateX(0); }.youxin-hmi-message-minimize { display:none; }
  .youxin-hmi-view-actions { right:8px !important; bottom:8px; }.youxin-hmi-view-actions .youxin-hmi-action-segment { min-width:44px; min-height:44px; padding-inline:8px; font-size:var(--youxin-hmi-font-body); }.youxin-hmi-command-host { bottom:8px; }.youxin-hmi-command-button { width:44px; height:44px; }
  .youxin-hmi-component-popover { left:8px; bottom:62px; width:min(300px,calc(100vw - 16px)); }.youxin-hmi-trend-panel { left:8px; right:8px; bottom:62px; width:auto; height:min(380px,52vh); transform:none; }.youxin-hmi-trend-actions { flex-wrap:wrap; justify-content:flex-end; }
  .callout-layer { display:none; }[data-tooltip]::after { display:none; }.youxin-hmi-shortcuts-panel { left:8px; right:8px; bottom:60px; width:auto; }
}
@media (max-width:520px) { #activityMetricsButton,#activityMessagesButton,#activityTrendButton { display:none; }.youxin-hmi-kpi-card { min-width:108px; width:108px; }.youxin-hmi-view-actions .youxin-hmi-action-group:first-child { display:none; }.youxin-hmi-shortcuts-panel dl,.parameter-grid { grid-template-columns:1fr; } }
@media (pointer:coarse) { button { min-height:44px; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; } }

/* Names appear only over a hovered component and never capture scene input. */
.callout-layer { z-index: 30; }
.scene-component-name { position:absolute; max-width:220px; padding:6px 9px; border:1px solid var(--youxin-hmi-border); border-radius:4px; background:rgba(25,32,37,.96); color:var(--youxin-hmi-text); box-shadow:0 2px 9px #0002; font-size:var(--youxin-hmi-font-title); line-height:1.5; pointer-events:none; }
.scene-component-name[hidden] { display:none; }
@media (max-width:760px) { .callout-layer { display:block; } }

/* Reading-size text keeps the original compact panels; dense content may wrap. */
.youxin-hmi-panel-section > header,.youxin-hmi-message-content header,.youxin-hmi-phase-banner,
.simulation-toolbar-heading,.youxin-hmi-run-identity { flex-wrap:wrap; row-gap:3px; }
.youxin-hmi-panel-section > header small { letter-spacing:.04em; }
.youxin-hmi-material-selectors label > span,.parameter-grid label > span { font-size:var(--youxin-hmi-font-body); }
.youxin-hmi-material-selectors select,.parameter-grid input,.parameter-grid select,
.youxin-hmi-run-compare-selectors select { min-width:0; height:36px; font-size:var(--youxin-hmi-font-control); }
.youxin-hmi-source-badge,.youxin-hmi-component-popover dt .youxin-hmi-source-badge { font-size:var(--youxin-hmi-font-meta); overflow-wrap:anywhere; }
.youxin-hmi-material-properties dd,.process-index-grid dd,.youxin-hmi-run-compare-row span,
.youxin-hmi-run-compare-row b { white-space:normal; overflow-wrap:anywhere; }
.youxin-hmi-material-properties h4 { font-size:var(--youxin-hmi-font-body); }
.youxin-hmi-interlock-row { grid-template-columns:14px minmax(0,1fr); }
.youxin-hmi-interlock-row b { grid-column:2; }
.youxin-hmi-interlock-row span,.youxin-hmi-equipment-grid strong { white-space:normal; overflow-wrap:anywhere; }
.youxin-hmi-experiment-stepper li i { width:19px; height:19px; flex-basis:19px; }
.youxin-hmi-top-left-cluster > .youxin-hmi-action-group,.youxin-hmi-mode-switcher { height:34px; }
.youxin-hmi-mode-menu,.youxin-hmi-workflow-status { top:40px; }
.youxin-hmi-view-actions .youxin-hmi-action-group { height:32px; }
.youxin-hmi-view-actions .youxin-hmi-action-segment { font-size:var(--youxin-hmi-font-control); }
.youxin-hmi-message-panel { overflow-y:auto; overflow-x:hidden; }
.youxin-hmi-message-card,.youxin-hmi-alarm-list { flex-shrink:0; }
@media (min-width:761px) and (max-width:1360px) {
  .youxin-hmi-kpi-bar { left:calc(var(--youxin-hmi-rail-width) + var(--youxin-hmi-left-panel-width) + 10px); right:8px; gap:6px; }
  .youxin-hmi-kpi-card { width:142px; min-width:136px; padding-inline:9px; }
  .youxin-hmi-kpi-card strong { font-size:var(--youxin-hmi-font-kpi-compact); }
}
@media (max-width:760px) {
  .youxin-hmi-kpi-card { min-height:104px; height:auto; }
  .youxin-hmi-activity-bar { z-index:10030; }
  .youxin-hmi-kpi-bar { z-index:10010; }
  .youxin-hmi-top-left-cluster,#app:not(.has-left-panel) .youxin-hmi-top-left-cluster { top:176px; z-index:10020; }
  .youxin-hmi-left-panel-header { min-height:266px; padding-top:214px; }
  .youxin-hmi-top-left-cluster > .youxin-hmi-action-group,.youxin-hmi-mode-switcher { height:38px; }
  .youxin-hmi-view-actions .youxin-hmi-action-group { height:44px; }
}
