/* Cadence 数字/模拟设计套件网页复刻 —— 共享外壳样式
 * 席：web-core-cadence（2026-11-24）。1920x1080 固定画布，无滚动条。
 * 可见像素由各视图的区域资产承载；本文件只定义定位/交互层/占位视图的样式。
 */
:root {
  --stage-w: 1920px;
  --stage-h: 1080px;
  --font-mono: "Nimbus Mono PS", "DejaVu Sans Mono", "Liberation Mono", monospace;
  --font-ui: "Nimbus Sans", "DejaVu Sans", "Liberation Sans", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  width: var(--stage-w); height: var(--stage-h);
  overflow: hidden; background: #000;
}
.stage {
  position: relative; width: var(--stage-w); height: var(--stage-h);
  overflow: hidden; background: #000;
}
.view-root { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
.view { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; overflow: hidden; }

/* 区域资产层：真机 golden 的 1:1 裁切，整数像素定位，不缩放不重采样 */
.view img.layer {
  position: absolute; display: block; left: 0; top: 0;
  image-rendering: pixelated;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.menu-overlay { position: absolute; display: none; z-index: 20; pointer-events: none; }
.menu-overlay img { display: block; image-rendering: pixelated; }
.menu-overlay.visible { display: block; }

/* 透明热区：只承载交互，默认不产生可见像素 */
.hot {
  position: absolute; background: transparent; border: 0; padding: 0; margin: 0;
  z-index: 30; cursor: default; outline: none; color: transparent; font-size: 0;
  -webkit-tap-highlight-color: transparent;
}
.hot:focus-visible { outline: 1px dotted rgba(120, 140, 193, .9); outline-offset: -1px; }
.hot:active { background: rgba(0, 0, 0, .055); }
.hot.hot--hover:hover { background: rgba(255, 255, 255, .10); }

/* 状态提示（交互反馈；默认隐藏，不参与默认态像素） */
.toast {
  position: absolute; z-index: 40; display: none; white-space: nowrap;
  pointer-events: none; user-select: none;
}
.toast.visible { display: block; }
.toast--sv {
  left: 56px; top: 1058px; height: 16px; line-height: 16px;
  padding: 0 4px; background: #e8e8e8; color: #000;
  font: 12px/16px var(--font-mono); letter-spacing: .2px;
}
.toast--ciw {
  left: 36px; top: 1063px; height: 14px; line-height: 14px;
  padding: 0 4px; background: #4b4b4b; color: #d6d6d6;
  font: 11px/14px var(--font-mono);
}

/* 下拉选择（combo popup） */
.combo-popup {
  position: absolute; z-index: 45; display: none; min-width: 120px;
  background: #e8e8e8; border: 1px solid #8b8b8b;
  box-shadow: 1px 1px 0 #5a5a5a; padding: 2px 0; user-select: none;
}
.combo-popup.visible { display: block; }
.combo-popup button {
  display: block; width: 100%; text-align: left; background: transparent; border: 0;
  padding: 1px 10px; font: 12px/16px var(--font-mono); color: #000; cursor: default;
}
.combo-popup button:hover, .combo-popup button.active { background: #cc0000; color: #fff; }

/* CIW 提示输入 / 模拟输出（交互态叠加，默认不可见） */
.ciw-typed {
  position: absolute; z-index: 35; display: none;
  font: 12px/14px var(--font-mono); color: #e0e0e0; white-space: pre;
  left: 36px; top: 1057px;
}
.ciw-typed.visible { display: block; }
.ciw-lines {
  position: absolute; z-index: 34; left: 0; top: 0; width: 1880px;
  pointer-events: none; overflow: hidden;
}
.ciw-lines div {
  position: absolute; left: 7px; white-space: pre;
  font: 11px/14px var(--font-mono); color: #d2d2d2;
  background: #3e3e3e; padding: 0 2px;
}
.ciw-caret {
  position: absolute; z-index: 36; display: none; width: 1px; height: 12px;
  background: #e5e5e5; left: 36px; top: 1060px;
}
.ciw-caret.visible { display: block; animation: ciw-blink 1s step-end infinite; }
@keyframes ciw-blink { 50% { opacity: 0; } }

/* 视图切换器（F2 / ?ui=1；默认隐藏，不参与像素门口径） */
.app-switcher {
  position: absolute; z-index: 60; right: 12px; top: 12px;
  background: rgba(22, 26, 32, .96); border: 1px solid #3d4754; border-radius: 6px;
  padding: 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
  font: 12px/1.5 var(--font-ui); color: #cfd6de;
}
.app-switcher h2 { margin: 0 0 6px; font-size: 12px; color: #8ea0b5; font-weight: 600; }
.app-switcher button {
  display: block; width: 100%; text-align: left; background: transparent; border: 0;
  color: #cfd6de; padding: 3px 8px; border-radius: 4px; cursor: pointer;
  font: 12px/1.5 var(--font-mono);
}
.app-switcher button:hover { background: #26303c; color: #fff; }
.app-switcher button[aria-current="true"] { background: #2f4055; color: #fff; }
.app-switcher .hint { margin-top: 6px; color: #6f7f92; font-size: 10px; }

/* 占位视图 */
.ph {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px;
  background: radial-gradient(1200px 700px at 50% 42%, #171c23 0%, #0b0e12 72%);
  color: #cfd6de; font-family: var(--font-ui);
}
.ph__card {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  width: 860px; padding: 34px 40px; border: 1px solid #2b3440; border-radius: 12px;
  background: #10141a;
}
.ph__kicker { margin: 0 0 10px; font: 11px/1 var(--font-mono); letter-spacing: 3px; color: #7f9bc4; }
.ph__title { margin: 0 0 6px; font-size: 30px; font-weight: 600; color: #edf2f9; }
.ph__sub { margin: 0 0 22px; font: 12px/1.7 var(--font-mono); color: #7d8794; }
.ph__facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 24px; }
.ph__facts dt { font: 11px/1.5 var(--font-mono); color: #8ea0b5; }
.ph__facts dd { margin: 0; font: 11px/1.5 var(--font-mono); color: #cfe3ff; }
.ph__actions { display: flex; gap: 10px; }
.ph__actions a {
  display: inline-block; padding: 7px 14px; border: 1px solid #35507a; border-radius: 6px;
  color: #cfe3ff; text-decoration: none; font: 12px/1 var(--font-mono);
}
.ph__actions a:hover { background: #1a2534; }
/* SimVision 交互叠加层（默认隐藏；默认态不产生可见像素） */
.sv-menu-items { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 25; display: none; }
.sv-menu-items.visible { display: block; }
.sv-scope-text {
  position: absolute; z-index: 35; display: none; height: 16px; line-height: 16px;
  padding: 0 2px; background: #ffffff; color: #000;
  font: 12px/16px var(--font-mono); white-space: nowrap;
}
.sv-scope-text.visible { display: block; }
.sv-marker { position: absolute; z-index: 33; display: none; width: 1px; background: #ff0000; }
.sv-marker.visible { display: block; }
