PipeEnhancement.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <template>
  2. <aside v-if="open" class="pipe-enhancement" data-pipe-enhancement role="dialog" aria-label="地下管线详情视图" @keydown.esc.stop.prevent="$emit('close')">
  3. <header class="pipe-enhancement__header">
  4. <div>
  5. <span class="pipe-enhancement__eyebrow">地下管线详情视图</span>
  6. <h2 data-pipe-enhancement-title>{{ plan.object.title }}</h2>
  7. <p class="pipe-enhancement__controls">左键拖动平移 · 右键旋转 · 滚轮缩放 · Esc 关闭</p>
  8. </div>
  9. <button type="button" class="pipe-enhancement__close" aria-label="关闭地下管线详情视图" title="关闭地下管线详情视图" data-pipe-enhancement-close @click="$emit('close')">×</button>
  10. </header>
  11. <div class="pipe-enhancement__scope" v-if="plan.coverage">
  12. <label>附近范围
  13. <select aria-label="附近范围" :value="plan.radiusM" @change="$emit('radius-change', Number($event.target.value))">
  14. <option v-for="radius in [25, 50, 100]" :key="radius" :value="radius">{{ radius }} 米</option>
  15. </select>
  16. </label>
  17. <span>管道 {{ plan.coverage.pipeCount }} 条 · 构件 {{ plan.coverage.componentCount }} 个 · 邻近管道按范围裁切</span>
  18. </div>
  19. <div class="pipe-enhancement__workspace">
  20. <div ref="viewport" class="pipe-enhancement__viewport" data-pipe-enhancement-viewport role="region" aria-label="地下管线详情视图三维场景"></div>
  21. <!--
  22. 维护者 2026-11-12:设备/设施详情不再浮在三维场景上(遮挡 3D 区域),
  23. 改为右侧「资产详情」页签;「管道临近资产」保留原有的管道 + 设备双列列表。
  24. -->
  25. <aside class="pipe-enhancement__side" aria-label="管道临近资产与资产详情">
  26. <nav class="pipe-enhancement__side-tabs" role="tablist" aria-label="管线详情分区">
  27. <button v-for="tab in sideTabs" :key="tab.key" type="button" role="tab"
  28. :aria-selected="sideTab === tab.key" :class="{ 'is-active': sideTab === tab.key }"
  29. :data-side-tab="tab.key" @click="sideTab = tab.key">{{ tab.label }}</button>
  30. </nav>
  31. <div v-show="sideTab === 'nearby'" class="pipe-enhancement__nearby" data-side-panel="nearby">
  32. <aside class="pipe-enhancement__devices" aria-label="附近资产列表">
  33. <section v-if="localPipeStates.length" class="pipe-enhancement__pipe-list" data-pipe-status-list aria-label="附近管道状态">
  34. <h3>附近管道状态({{ localPipeStates.length }})</h3>
  35. <div class="pipe-enhancement__pipe-scroll">
  36. <button v-for="pipe in pagedPipeStates" :key="pipe.code" type="button"
  37. class="pipe-enhancement__asset-card" data-pipe-card
  38. :aria-pressed="plan.object.sourceKind === 'pipe' && plan.object.code === pipe.code"
  39. @click="$emit('object-pick', { objectKind: 'pipe', code: pipe.code })">
  40. <b>{{ pipe.title }}</b>
  41. <small>{{ pipe.code }} · {{ pipe.stateText || '状态未提供' }}</small>
  42. <small>{{ pipe.diameterM ? pipe.diameter + ' mm' : '管径未提供' }} · {{ pipe.material || '材质未提供' }}</small>
  43. </button>
  44. </div>
  45. <nav v-if="pipePageCount > 1" class="pipe-enhancement__pager" data-pipe-pager aria-label="附近管道状态翻页">
  46. <button type="button" :disabled="pipePage <= 1" @click="pipePage -= 1">上一页</button>
  47. <span>第 {{ pipePage }} / {{ pipePageCount }} 页</span>
  48. <button type="button" :disabled="pipePage >= pipePageCount" @click="pipePage += 1">下一页</button>
  49. </nav>
  50. </section>
  51. <section class="pipe-enhancement__device-list" data-device-list aria-label="监测设备">
  52. <h3>监测设备({{ plan.deviceList?.length || 0 }})</h3>
  53. <div class="pipe-enhancement__device-scroll">
  54. <p v-if="plan.deviceCoverage?.loading">设备读取中({{ plan.deviceCoverage.loadedPoints || 0 }}/{{ plan.deviceCoverage.totalPoints || 0 }} 点),已返回设备可先查看。</p>
  55. <p>场景设备 {{ plan.devices?.length || 0 }} 个 · 清单 {{ plan.deviceList?.length || 0 }} 台</p>
  56. <p v-if="!plan.deviceCoverage?.loading && plan.deviceCoverage?.partial">设备覆盖不完整:快照未齐、设备待确认或部分点位读取失败。</p>
  57. <button v-if="plan.deviceCoverage?.partial && !plan.deviceCoverage?.loading" type="button" @click="$emit('devices-reload')">重新读取设备清单</button>
  58. <p v-if="plan.deviceCoverage?.stalePoints">部分设备为上次保留数据,非实时。</p>
  59. <p v-if="!plan.deviceList?.length && !plan.deviceCoverage?.loading">当前可用数据中没有附近设备。</p>
  60. <button v-for="device in plan.deviceList || []" :key="device.code" :data-device-code="device.code"
  61. class="pipe-enhancement__asset-card" data-device-card type="button"
  62. :aria-pressed="deviceState.selected?.code === device.code" @click="selectDevice(device)">
  63. <b>{{ device.name || device.code }}</b>
  64. <small>{{ device.code }} · {{ device.placementText }}{{ device.retained ? ' · 过期数据' : '' }}</small>
  65. </button>
  66. </div>
  67. </section>
  68. </aside>
  69. </div>
  70. <div v-show="sideTab === 'detail'" class="pipe-enhancement__asset-pane" data-side-panel="detail">
  71. <AssetDetailPanel :context="assetContext">
  72. <template v-if="assetKind === 'device'">
  73. <div class="pipe-enhancement__device-status-card" data-enhancement-device-status-card>
  74. <DeviceStateTags data-enhancement-device-status :device-code="deviceState.selected.code"
  75. :fallback-status="deviceState.selected.status || ''" :aggregate="deviceState.aggregate" />
  76. <span class="pipe-enhancement__device-status-label">设备状态</span>
  77. </div>
  78. <p v-if="deviceState.loadingDetail && !deviceState.aggregate?.data" class="pipe-enhancement__hint">设备详情加载中</p>
  79. <template v-else-if="!deviceState.aggregate?.data">
  80. <p class="pipe-enhancement__hint">设备详情暂不可用</p>
  81. <button type="button" class="pipe-enhancement__action" @click="$emit('device-retry')">重新加载</button>
  82. </template>
  83. <EquipmentDetailSections v-else :aggregate="deviceState.aggregate" :device-code="deviceState.selected.code" monitor-source="enhancement" />
  84. </template>
  85. <template v-else-if="assetKind === 'facility'">
  86. <p v-if="assetFacility?.loading" class="pipe-enhancement__hint" data-asset-facility-loading>设施详情加载中…</p>
  87. <p v-else-if="assetFacility?.error" class="pipe-enhancement__hint is-error" data-asset-facility-error>
  88. 设施详情未取到,已保留现有信息。
  89. <button type="button" class="pipe-enhancement__action" @click="$emit('facility-retry')">重试</button>
  90. </p>
  91. <EntityDetailSections v-if="assetFacility?.detail" :detail="assetFacility.detail" presentation="device" />
  92. </template>
  93. </AssetDetailPanel>
  94. </div>
  95. </aside>
  96. </div>
  97. <dl class="pipe-enhancement__facts">
  98. <div><dt>对象</dt><dd>{{ plan.object.renderKind === 'manhole' ? '窨井剖切' : plan.object.sourceKind === 'pipe' ? '重点管段' : '重点构件' }}</dd></div>
  99. <div><dt>编码</dt><dd>{{ plan.object.code }}</dd></div>
  100. <div v-if="plan.object.diameter !== null"><dt>源管径</dt><dd>{{ plan.object.diameter }} mm</dd></div>
  101. <div v-if="plan.object.sourceKind === 'pipe'"><dt>地理路径长度</dt><dd>{{ plan.object.geographicLengthM?.toFixed(2) }} m</dd></div>
  102. <div v-if="plan.object.sourceKind === 'pipe'"><dt>后端管长(源值)</dt><dd>{{ plan.object.lengthM ?? '未提供' }}</dd></div>
  103. <div><dt>状态</dt><dd>{{ plan.object.stateText || '状态未提供' }}</dd></div>
  104. <div v-if="plan.object.material"><dt>材质</dt><dd>{{ plan.object.material }}</dd></div>
  105. </dl>
  106. <p class="pipe-enhancement__note" data-pipe-enhancement-note>{{ plan.disclaimer }} · {{ plan.connectionNote }} · 管径横向8倍显示,源管径独立保留;长度保持地理路径,后端管长源值不用于拉伸。材质纹理与设备尺寸为显示示意。</p>
  107. </aside>
  108. </template>
  109. <script setup>
  110. import { computed, nextTick, onBeforeUnmount, watch, ref } from 'vue'
  111. import { mountPipeEnhancement } from '../services/threePipeEnhancement.js'
  112. import EquipmentDetailSections from './EquipmentDetailSections.vue'
  113. import EntityDetailSections from './EntityDetailSections.vue'
  114. import DeviceStateTags from './DeviceStateTags.vue'
  115. import AssetDetailPanel from './AssetDetailPanel.vue'
  116. import { ASSET_KIND } from '../domain/assetDetail.js'
  117. import { resolveAssetKind } from '../domain/assetDetailKind.js'
  118. const props = defineProps({
  119. plan: { type: Object, required: true },
  120. deviceState: { type: Object, default: () => ({ selected: null, aggregate: null, loadingDetail: false }) },
  121. /** 设施详情状态:{ detail, loading, error };由外壳把选中设施接进来,与设备详情并列可选。 */
  122. facilityState: { type: Object, default: () => ({ detail: null, loading: false, error: false }) },
  123. })
  124. const emit = defineEmits(['close', 'radius-change', 'device-pick', 'device-close', 'device-retry', 'devices-reload', 'object-pick', 'facility-retry'])
  125. /**
  126. * 右侧两个页签:管道临近资产(原双列列表)|资产详情(设备或设施)。
  127. * 选中的资产一变就自动切到详情页,避免用户还要手动点一下才知道有详情。
  128. */
  129. const SIDE_TABS = [
  130. { key: 'nearby', label: '管道临近资产' },
  131. { key: 'detail', label: '资产详情' },
  132. ]
  133. const sideTabs = SIDE_TABS
  134. const sideTab = ref('nearby')
  135. const assetFacility = computed(() => props.facilityState || { detail: null, loading: false, error: false })
  136. const assetContext = computed(() => ({
  137. device: props.deviceState?.selected || null,
  138. facility: assetFacility.value?.detail ? {
  139. id: assetFacility.value.detail.id || '',
  140. category: assetFacility.value.detail.kind === 'facility' ? (assetFacility.value.detail.category || '') : '',
  141. title: assetFacility.value.detail.name || assetFacility.value.detail.code || '',
  142. subtitle: assetFacility.value.detail.industry || '',
  143. } : null,
  144. }))
  145. const assetKind = computed(() => {
  146. // 设施详情优先(维护者 2026-11-16):用户是在这里主动选了窨井才进来的,
  147. // 上一次残留的设备选择不该继续霸占「资产详情」。判据收在 domain/assetDetailKind.js。
  148. const kind = resolveAssetKind({
  149. deviceCode: props.deviceState?.selected?.code || '',
  150. facilityDetail: assetFacility.value?.detail || null,
  151. })
  152. return kind === 'facility' ? ASSET_KIND.FACILITY : kind === 'device' ? ASSET_KIND.DEVICE : ''
  153. })
  154. // 有资产被选中就切到详情页;全部取消则退回列表页,避免停在空白详情。
  155. watch(assetKind, (kind) => { sideTab.value = kind ? 'detail' : 'nearby' }, { immediate: true })
  156. const viewport = ref(null)
  157. const localPipeStates = computed(() => [...new Map((props.plan.objects || [])
  158. .filter((object) => object.sourceKind === 'pipe').map((object) => [object.code, object])).values()])
  159. /**
  160. * 附近管道状态分页(维护者 2026-10-22):邻域管网很容易几十条,
  161. * 一屏铺开会把设备区挤到看不见。每页固定 8 条,翻页只切窗口、不改数据。
  162. */
  163. const PIPE_PAGE_SIZE = 8
  164. const pipePage = ref(1)
  165. const pipePageCount = computed(() => Math.max(1, Math.ceil(localPipeStates.value.length / PIPE_PAGE_SIZE)))
  166. const pagedPipeStates = computed(() => {
  167. const page = Math.min(Math.max(1, pipePage.value), pipePageCount.value)
  168. const start = (page - 1) * PIPE_PAGE_SIZE
  169. return localPipeStates.value.slice(start, start + PIPE_PAGE_SIZE)
  170. })
  171. // 同一管段的后台数据更新保留页码;换对象/邻域范围才回首页。
  172. watch(() => JSON.stringify([props.plan.object?.sourceKind, props.plan.object?.code, props.plan.radiusM]), () => { pipePage.value = 1 })
  173. watch(pipePageCount, (count) => { pipePage.value = Math.min(pipePage.value, count) })
  174. let viewer = null
  175. let mountGeneration = 0
  176. const open = ref(false)
  177. /**
  178. * 设备被选中(清单点击或场景图标点击)时的统一处理:先让镜头**飞行定位**到该设备,
  179. * 再打开内部详情。
  180. *
  181. * 维护者 2026-10-22:「地下管线详情视图的相机位移没成功实现。」
  182. * 根因是**场景图标点击**走的是 `onDevicePick`,而那条路径只 emit、从不调用 `focusDevice`,
  183. * 所以只有右侧清单点击才会定位。现在两条入口共用本函数,不会再分叉。
  184. */
  185. function pickDevice(device) {
  186. // 只有能上图(有合法坐标)的设备才有可定位的模型;仅清单项没有位置可飞。
  187. if (device && device.placement !== 'list-only') viewer?.focusDevice?.(device.code)
  188. emit('device-pick', device)
  189. }
  190. function selectDevice(device) {
  191. pickDevice(device)
  192. }
  193. function disposeViewer() {
  194. if (viewer) viewer.destroy()
  195. viewer = null
  196. }
  197. async function mount() {
  198. const generation = ++mountGeneration
  199. open.value = props.plan?.visible === true
  200. if (!open.value) { disposeViewer(); return }
  201. if (viewer?.sync) { viewer.sync(props.plan); return }
  202. await nextTick()
  203. if (generation !== mountGeneration || !open.value || !viewport.value) return
  204. viewer = mountPipeEnhancement(viewport.value, props.plan, {
  205. onDevicePick: (device) => pickDevice(device),
  206. onObjectPick: (hit) => emit('object-pick', hit),
  207. })
  208. }
  209. watch(
  210. () => props.plan?.visible === true ? JSON.stringify([props.plan.object, props.plan.radiusM, props.plan.objects, props.plan.devices]) : 'hidden',
  211. mount,
  212. { immediate: true },
  213. )
  214. onBeforeUnmount(() => {
  215. mountGeneration += 1
  216. disposeViewer()
  217. })
  218. </script>
  219. <style scoped>
  220. .pipe-enhancement {
  221. position: absolute;
  222. z-index: 5;
  223. left: 50%;
  224. top: 50%;
  225. transform: translate(-50%, -50%);
  226. /* 票 90(维护者 2026-10-27):尺寸跟着一张图的分辨率走,不再有固定的 1100×760 顶盖。
  227. 包含块就是这个浮层的定位祖先 .cockpit-shell__main(一张图铺满的那块),
  228. 所以 % 指的就是「一张图多大」。
  229. 宽度(2026-10-27 第二条反馈):**不得覆盖左右两侧信息面板**。
  230. 两侧栏各占一条 `--rail-w`(超宽屏 ≥3:1 时栏内两块并排,该 token 自动变成两条栏宽;
  231. 见 tokens.css 的注释「消费点用这一条而不是直接乘 --column-w」),
  232. 所以可用宽度 = 容器 − 2 × rail − 边距。浮层仍是 50% 居中:两侧栏等宽 ⇒ 中间带也居中,
  233. 不需要额外偏移。这里刻意**不留比例/下限顶盖**——任何「至少多宽」的下限都会在窄容器上
  234. 重新压到面板上,而「不覆盖面板」是本条唯一的硬约束;容器窄时浮层就跟着窄。
  235. 高度(不受两侧栏影响):min(容器 − 边距, max(--u 下限, 84%)),随分辨率长大且不溢出。
  236. 三维视口不必另写 resize:threePipeEnhancement.js 已用 ResizeObserver 观察宿主并 setSize。 */
  237. width: calc(100% - 2 * var(--rail-w, 300px) - calc(24 * var(--u, 1px)));
  238. height: min(calc(100% - 24px), max(calc(340 * var(--u, 1px)), 84%));
  239. display: grid;
  240. grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  241. /* 内边距与间距也走设计像素:外框与字号都随 --u 放大,只留固定 px 会在大屏上显得拥挤。
  242. 取值按 1080p(--u≈1.3338)反算,1080p 下与原来的 12px / 16px 逐像素一致。 */
  243. gap: calc(9 * var(--u, 1px));
  244. min-height: 0;
  245. overflow: hidden;
  246. box-sizing: border-box;
  247. padding: calc(12 * var(--u, 1px));
  248. border: 1px solid rgba(1, 171, 234, .58);
  249. border-radius: 6px;
  250. background: rgba(2, 12, 32, .94);
  251. box-shadow: 0 14px 34px rgba(0, 0, 0, .5), 0 0 22px rgba(1, 171, 234, .12);
  252. color: var(--text-1, #e4f4ff);
  253. }
  254. .pipe-enhancement__header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
  255. .pipe-enhancement__eyebrow { color: var(--cyan, #01abea); font-size: 10px; letter-spacing: .08em; }
  256. .pipe-enhancement h2 { margin: 3px 0 0; font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
  257. .pipe-enhancement__controls { margin: 6px 0 0; color: var(--text-3, #7ba4c3); font-size: 12px; }
  258. .pipe-enhancement__close { width: 28px; height: 28px; border: 1px solid rgba(1, 171, 234, .46); border-radius: 4px; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
  259. .pipe-enhancement__close:hover, .pipe-enhancement__close:focus-visible { border-color: var(--cyan, #01abea); color: #fff; outline: none; }
  260. /* 右侧块(附近管道状态 + 监测设备)从 32% 放宽到 42%:两块改成左右并排后,
  261. 每块仍需要能读下「源管径 / 源材质 / 地理路径」那几行小字,否则并排只是把两列都挤扁。 */
  262. .pipe-enhancement__workspace { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(calc(300 * var(--u, 1px)), 46%); gap: 12px; min-height: 0; }
  263. /* 票 90 第二条(维护者 2026-10-27):右侧的「附近管道状态」与「监测设备」改为**左右并排**,
  264. 不再上下堆叠 —— 两块本就各自独立滚动,竖排等于把同一块纵向空间切成两半,谁都读不全。
  265. 分隔线跟着从「上边框」改成两列之间的竖线。 */
  266. .pipe-enhancement__side { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-left: 1px solid #174969; padding-left: 12px; font-size: 12px; }
  267. .pipe-enhancement__side-tabs { display: flex; flex: none; gap: 6px; margin-bottom: 8px; }
  268. .pipe-enhancement__side-tabs button { flex: 1; padding: 6px 8px; border: 1px solid #226286; border-radius: calc(8 * var(--u, 1px)); background: #072039; color: #a7c4d9; font: inherit; cursor: pointer; }
  269. .pipe-enhancement__side-tabs button.is-active { border-color: var(--cyan, #01abea); background: linear-gradient(180deg, rgba(1, 171, 234, .85), rgba(0, 82, 168, .85)); color: #fff; }
  270. .pipe-enhancement__nearby, .pipe-enhancement__asset-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  271. .pipe-enhancement__asset-pane { overflow: auto; }
  272. .pipe-enhancement__nearby { overflow: hidden; }
  273. .pipe-enhancement__devices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; min-height: 0; overflow: hidden; }
  274. .pipe-enhancement__pipe-list { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-right: 1px solid #174969; padding-right: 10px; }
  275. .pipe-enhancement__device-list { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  276. .pipe-enhancement__pipe-scroll, .pipe-enhancement__device-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; }
  277. /* 卡片:只留卡片信息(标题 + 编码/状态 + 管径/材质),不再铺长串描述。 */
  278. .pipe-enhancement__asset-card { display: block; width: 100%; margin-bottom: 6px; padding: 7px 8px; text-align: left; border: 1px solid #21618a; border-radius: calc(8 * var(--u, 1px)); background: #08213a; color: #e4f4ff; font: inherit; cursor: pointer; }
  279. .pipe-enhancement__asset-card b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  280. .pipe-enhancement__asset-card small { display: block; margin-top: 3px; color: #a7c4d9; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  281. .pipe-enhancement__asset-card[aria-pressed="true"] { border-color: #d8fbff; box-shadow: inset 0 0 4px #38bac9; }
  282. .pipe-enhancement__hint { margin: 0 0 8px; color: #a7c4d9; line-height: 1.5; }
  283. .pipe-enhancement__hint.is-error { color: var(--lv1, #ff3b52); }
  284. .pipe-enhancement__action { align-self: flex-start; padding: 5px 10px; border: 1px solid #21618a; border-radius: calc(8 * var(--u, 1px)); background: #08213a; color: #e4f4ff; cursor: pointer; }
  285. .pipe-enhancement__device-status-card {
  286. display: flex;
  287. flex-wrap: wrap;
  288. align-items: center;
  289. gap: 10px;
  290. margin: 6px 0 10px;
  291. padding: 7px 10px;
  292. border: 1px solid rgba(1, 171, 234, .36);
  293. border-radius: 8px;
  294. background: linear-gradient(135deg, rgba(4, 42, 76, .72), rgba(5, 23, 47, .88));
  295. }
  296. .pipe-enhancement__device-status-label { color: #7ba4c3; }
  297. .pipe-enhancement__pager { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 11px; color: #a7c4d9; }
  298. .pipe-enhancement__pager button { padding: 3px 8px; }
  299. .pipe-enhancement__pager button:disabled { opacity: .4; cursor: default; }
  300. .pipe-enhancement__scope { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: #a7c4d9; font-size: 12px; }
  301. .pipe-enhancement__scope select { margin-left: 8px; padding: 5px 10px; border: 1px solid #168bff; border-radius: 4px; background: #031226; color: #e4f4ff; }
  302. .pipe-enhancement__viewport { min-height: 0; overflow: hidden; border: 1px solid rgba(1, 171, 234, .24); background: #031226; outline: none; touch-action: none;
  303. border-radius: calc(8 * var(--u, 1px));}
  304. .pipe-enhancement__viewport[data-scene-focused] { border-color: var(--cyan, #01abea); box-shadow: inset 0 0 0 1px var(--cyan, #01abea); }
  305. .pipe-enhancement__viewport :deep(canvas) { display: block; width: 100%; height: 100%; }
  306. .pipe-enhancement__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 16px; margin: 0; font-size: 14px; }
  307. .pipe-enhancement__facts div { min-width: 0; }
  308. .pipe-enhancement__facts dt { color: var(--text-3, #7ba4c3); }
  309. .pipe-enhancement__facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
  310. .pipe-enhancement__note { margin: 0; color: #a7c4d9; font-size: 12px; line-height: 1.45; }
  311. </style>