/* 科学教育「做中学」课页补充样式 */
.ldbd-step-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(42, 111, 106, 0.12);
  color: #2a6f6a;
  margin-bottom: 8px;
}
.ldbd-guide-kernel-badge,
.ldbd-guide-ext-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
  letter-spacing: 0.02em;
}
.ldbd-guide-kernel-badge {
  background: #c62828;
  color: #fff;
}
.ldbd-guide-ext-badge {
  background: rgba(42, 111, 106, 0.15);
  color: #2a6f6a;
}
.cover-points .ldbd-guide-kernel-badge,
.cover-points .ldbd-guide-ext-badge {
  margin-left: 0;
  margin-right: 6px;
  font-size: 11px;
}
.ldbd-guide-task {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0, 137, 123, 0.06);
  border: 1px solid rgba(0, 137, 123, 0.18);
}
.ldbd-guide-task h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.ldbd-guide-task-name {
  margin: 0 0 8px;
  font-size: 13px;
}
.ldbd-guide-focus {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}
.cover-guide-probe,
.cover-guide-create {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: #3d5c57;
  font-weight: 400;
}
.ldbd-step-core {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, #eef6f2, #f7faf9);
  border: 1px solid #d5e5dc;
  color: #0f3d34;
  font-size: 0.92rem;
  line-height: 1.5;
}
.ldbd-obj-grid {
  display: grid;
  /* 2/3/4/5 张卡都按列均分铺满；空列由 auto-fit 折叠，避免右侧留白 */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr));
  gap: 12px;
  margin: 10px 0 4px;
  justify-content: center;
  align-items: stretch;
}
@media (max-width: 520px) {
  .ldbd-obj-grid {
    grid-template-columns: 1fr;
  }
}
.ldbd-obj-card {
  margin: 0;
  width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(42, 70, 60, 0.06);
}
.ldbd-obj-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  max-height: 160px;
  object-fit: contain;
  display: block;
  background: #f3f5f4;
}
.ldbd-obj-card figcaption {
  padding: 8px 10px 10px;
  text-align: center;
  line-height: 1.35;
}
.ldbd-obj-card figcaption strong {
  display: block;
  font-size: 15px;
  color: #1f4a45;
}
.ldbd-obj-card figcaption span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #5a7a74;
}
.ldbd-sim {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f7faf9;
  margin: 8px 0 12px;
  box-sizing: border-box;
  /* 仿真区贴合可视高度；优先 dvh，避免 iOS 100vh 裁切底部 */
  height: calc(100vh - 20px);
  height: calc(100dvh - 20px);
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.ldbd-sim.ldbd-ai-root {
  /* AI 台直接挂在 .ldbd-sim 上 */
  gap: 6px;
}
.ldbd-sim > h4 {
  flex: 0 0 auto;
  margin: 0 0 4px;
  font-size: 1.05rem;
  line-height: 1.3;
}
.ldbd-sim > .ldbd-design-goal,
.ldbd-sim > .prose.ldbd-design-goal {
  flex: 0 0 auto;
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.4;
  max-height: 2.8em;
  overflow: hidden;
}
.ldbd-sim > .ldbd-bench,
.ldbd-sim > .ldbd-bench-product,
.ldbd-sim > .ldbd-ai-root,
.ldbd-sim > .ldbd-lab {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.ldbd-sim > .ldbd-sim-readout,
.ldbd-sim > p.ldbd-sim-readout {
  flex: 0 0 auto;
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.35;
  max-height: 2.7em;
  overflow: hidden;
}
.ldbd-lab {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.ldbd-lab-head {
  flex: 0 0 auto;
}
.ldbd-lab-head h4 {
  margin: 0 0 4px;
}
.ldbd-lab-sub {
  margin: 0;
  font-size: 12px;
  color: #3d5c57;
  line-height: 1.45;
}
.ldbd-lab > canvas,
.ldbd-lab .ldbd-lab-canvas,
.ldbd-sim > canvas {
  flex: 1 1 auto;
  min-height: 0;
  width: 100% !important;
  max-height: none;
}
.ldbd-lab-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.85fr);
  gap: 12px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
@media (max-width: 900px) {
  .ldbd-lab-body {
    grid-template-columns: 1fr;
  }
}
.ldbd-lab-stage {
  position: relative;
  background: #e8f0ed;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.ldbd-lab-stage canvas {
  width: 100%;
  max-width: none;
  display: block;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
.ldbd-lab-meter {
  position: absolute;
  right: 10px;
  top: 10px;
  bottom: auto;
  min-width: 118px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(20, 40, 38, 0.88);
  color: #e8fff8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  display: grid;
  gap: 2px;
  z-index: 2;
}
.ldbd-lab-meter-label {
  font-size: 11px;
  opacity: 0.8;
}
.ldbd-lab-meter-val {
  font-size: 28px;
  font-weight: 700;
  font-family: ui-monospace, Consolas, monospace;
  line-height: 1.1;
  color: #7dffd0;
}
.ldbd-lab-meter-unit {
  font-size: 11px;
  opacity: 0.75;
}
.ldbd-lab-status {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #b2dfdb;
}
.ldbd-lab-status.is-run {
  color: #81d4fa;
}
.ldbd-lab-status.is-warn {
  color: #ffe082;
}
.ldbd-lab-status.is-fail {
  color: #ff8a80;
}
.ldbd-lab-panel {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
}
.ldbd-lab-panel-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1f4a45;
}
.ldbd-lab-panel-title + .ldbd-sim-controls {
  margin-bottom: 14px;
}
.ldbd-lab-derived {
  font-size: 13px;
  color: #3d5c57;
}
.ldbd-lab-derived strong {
  color: #1f4a45;
  font-weight: 700;
}
.ldbd-lab-acts .is-primary {
  background: #2a6f6a;
  color: #fff;
  border-color: #2a6f6a;
}
.ldbd-lab-acts .is-primary:hover {
  background: #235e5a;
}
.ldbd-mat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ldbd-mat-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  flex: 0 0 auto;
}
.ldbd-sim h4 {
  margin: 0 0 8px;
  font-size: 15px;
}
/* 同一行控件：自适应占满（所有课共用） */
.ldbd-sim-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
}
.ldbd-sim-controls > label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 220px;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1f4a45;
  box-sizing: border-box;
}
.ldbd-sim-controls > label:has(select) {
  flex: 1 1 180px;
}
/* 右侧面板里的滑条：每条独占一行铺满 */
.ldbd-lab-panel .ldbd-sim-controls > label:has(input[type="range"]) {
  flex: 1 1 100%;
}
.ldbd-sim-controls > label input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 28px;
  margin: 0;
  accent-color: #2a6f6a;
  vertical-align: middle;
}
.ldbd-sim-controls > label select {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 34px;
  font: inherit;
  font-weight: 600;
}
.ldbd-sim-controls > label > span,
.ldbd-sim-controls > label [data-v] {
  flex: 0 0 auto;
  min-width: 2.6em;
  text-align: right;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #102a27;
  line-height: 1;
}
.ldbd-sim-controls > .ldbd-lab-derived {
  flex: 1 1 100%;
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ldbd-sim canvas,
.ldbd-sim .ldbd-sim-stage {
  width: 100%;
  max-width: none;
  display: block;
  margin: 0;
  background: #eef5f3;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}
.ldbd-sim {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.ldbd-lab {
  width: 100%;
}
.ldbd-mat-pick {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
}
@media (max-width: 420px) {
  .ldbd-mat-pick {
    flex-wrap: wrap;
  }
  .ldbd-mat-pick > .ldbd-mat-btn,
  .ldbd-mat-pick > button {
    flex: 1 1 calc(50% - 4px);
  }
}
.ldbd-mat-pick > .ldbd-mat-btn,
.ldbd-mat-pick > button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 2px solid #90a4ae;
  background: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.ldbd-mat-btn.is-on {
  background: #2a6f6a;
  color: #fff;
  border-color: #2a6f6a;
}
.ldbd-sim-controls > button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #2a6f6a;
  background: #fff;
  color: #2a6f6a;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.ldbd-sim-controls > button:hover {
  background: #e8f5f2;
}
.ldbd-sim-controls > span:not(.ldbd-lab-derived) {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: #1f4a45;
}
.ldbd-sim-readout strong {
  font-weight: 700;
}
.ldbd-sim-readout {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  margin-top: 8px;
  color: #1f4a45;
}
.ldbd-checklist {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}
.ldbd-checklist li {
  margin: 6px 0;
}
.ldbd-artifact textarea,
.ldbd-guess {
  width: 100%;
  min-height: 72px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 8px 10px;
  font: inherit;
}
.ldbd-work-name {
  display: block;
  margin: 12px 0 10px;
  font-size: 14px;
  color: #3d5c57;
}
.ldbd-work-name .ldbd-guess {
  margin-top: 6px;
  display: block;
}
.ldbd-peer {
  display: grid;
  gap: 8px;
  margin: 8px 0;
}
.ldbd-peer label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
}
.ldbd-fig-grid {
  display: none;
}
.ldbd-card {
  margin: 0.6em 0 1.1em;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
  box-shadow: none;
}
.ldbd-card-svg {
  width: 100%;
  height: auto;
  max-height: min(42vw, 280px);
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 12px;
  box-shadow: none;
  vertical-align: top;
}
.ldbd-card figcaption {
  margin: 0;
  padding: 8px 16px 12px;
  font-size: 0.86rem;
  color: #3d5c57;
  text-align: center;
  line-height: 1.45;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  background: #f7fbf8;
}
.ldbd-story {
  background: #f7faf9;
  border-left: 4px solid #2a6f6a;
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  margin: 8px 0 12px;
}
.ldbd-bullets {
  margin: 6px 0 10px 1.1em;
  padding: 0;
}
.ldbd-bullets li {
  margin: 4px 0;
}
.ldbd-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 800px) {
  .ldbd-two-col {
    grid-template-columns: 1fr;
  }
}

/* 设计创作台：拖拽 + 连线/拼接 + 仿真 */
.ldbd-design-goal {
  margin: 0 0 10px;
  font-size: 13px;
  color: #3d5c57;
}
.ldbd-bench {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 10px;
  margin: 0;
  min-height: 0;
  height: 100%;
  align-items: stretch;
  overflow: hidden;
}
@media (max-width: 720px) {
  .ldbd-bench {
    grid-template-columns: 1fr;
    overflow: auto;
  }
}
.ldbd-bench-palette {
  background: #f7fbf8;
  border: 1px solid rgba(42, 111, 106, 0.18);
  border-radius: 12px;
  padding: 8px;
  overflow-x: hidden;
  overflow-y: auto; /* 仅左侧可滚 */
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
}
.ldbd-design-group {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 8px;
}
.ldbd-design-g {
  flex: 0 0 100%;
  font-size: 13px;
  font-weight: 800;
  color: #3d5c57;
  letter-spacing: 0.02em;
  margin: 0;
}
.ldbd-bench-pal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: calc(50% - 4px);
  box-sizing: border-box;
  border: 2px solid var(--pc, #90a4ae);
  background: #fff;
  border-radius: 12px;
  padding: 6px 4px 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: grab;
  user-select: none;
  color: #1f4a45;
}
.ldbd-bench-pal-item:active {
  cursor: grabbing;
}
.ldbd-bench-pal-label {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
  color: #102a27;
}
.ldbd-bench-thumb {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.ldbd-bench-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  background: #f7faf9;
}
.ldbd-bench-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.ldbd-bench-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  flex: 0 0 auto;
}
.ldbd-bench-mode {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #3d5c57;
  margin-right: auto;
}
.ldbd-bench-toolbar button {
  font-size: 14px;
  line-height: 1.3;
}
.ldbd-bench-toolbar button.is-running {
  background: #c62828;
  border-color: #b71c1c;
  color: #fff;
}
.ldbd-bench-toolbar button.is-running:hover {
  background: #d32f2f;
}
.ldbd-bench-toolbar .is-primary {
  background: #2a6f6a;
  color: #fff;
  border-color: #2a6f6a;
}
.ldbd-bench-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 12px;
  border: 1px solid rgba(42, 111, 106, 0.22);
  overflow: hidden;
}
.ldbd-bench-canvas.is-circuit {
  background:
    linear-gradient(rgba(42, 111, 106, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 111, 106, 0.05) 1px, transparent 1px),
    #e8f0ee;
  background-size: 20px 20px, 20px 20px, auto;
}
.ldbd-bench-canvas.is-build {
  background: linear-gradient(180deg, #dfe8e4 0%, #c5d4ce 55%, #a8bdb4 100%);
}
.ldbd-bench-table {
  display: none;
}
.ldbd-bench-canvas.is-build .ldbd-bench-table {
  display: block;
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 10%;
  height: 42%;
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      90deg,
      #b08968 0 2px,
      #c9a27a 2px 18px
    );
  box-shadow: inset 0 8px 16px rgba(0, 0, 0, 0.12), 0 10px 0 #8d6e4c;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.ldbd-bench-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* 画在器件上方，端点对准端子；点击穿透到下方端子 */
  z-index: 6;
}
.ldbd-bench-link.is-wire {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  /* stroke 颜色由 JS 按极性写入（红+/黑−） */
}
.ldbd-bench-link-end {
  pointer-events: none;
}
.ldbd-bench-ports.is-terminal {
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 6px 8px;
}
.ldbd-bench-port.pol-pos,
.ldbd-bench-port.pol-neg,
.ldbd-bench-port.pol-x {
  width: auto;
  min-width: 30px;
  height: 24px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
  padding: 0 7px;
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
.ldbd-bench-port.pol-pos {
  background: #c62828;
  border-color: #ffcdd2;
}
.ldbd-bench-port.pol-neg {
  background: #212121;
  border-color: #bdbdbd;
}
.ldbd-bench-port.pol-x {
  background: #546e7a;
  border-color: #90a4ae;
}
.ldbd-bench-port.is-wired {
  box-shadow: 0 0 0 2px #ffeb3b;
}
.ldbd-live-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;
  background: #eef6f4;
  border: 1px solid #c5d8d4;
  border-radius: 10px;
  box-sizing: border-box;
}
.ldbd-live-ctl {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 220px;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #1f4a45;
  box-sizing: border-box;
}
.ldbd-live-ctl input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 28px;
  margin: 0;
  accent-color: #2a6f6a;
}
.ldbd-live-ctl b,
.ldbd-live-ctl [data-ctl-val] {
  flex: 0 0 auto;
  min-width: 2.2em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}
.ldbd-design-empty {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  margin: 0;
  color: #4a635e;
  font-size: 14px;
  z-index: 0;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.ldbd-bench-node {
  position: absolute;
  z-index: 2;
  user-select: none;
}
/* 电路器件：略保留底板 */
.ldbd-bench-node.is-device {
  width: 112px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid var(--pc, #2a6f6a);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
  overflow: visible;
}
/* 机械零件：就是实物本身，无白卡片 */
.ldbd-bench-node.is-piece {
  width: 108px;
  background: transparent;
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 6px 4px rgba(0, 0, 0, 0.28));
}
.ldbd-bench-node.is-piece .ldbd-bench-node-body {
  padding: 0;
}
.ldbd-bench-piece-img {
  width: 108px;
  height: 108px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  border-radius: 8px;
}
.ldbd-bench-node.is-device .ldbd-bench-piece-img {
  width: 72px;
  height: 72px;
  margin: 0 auto;
}
/* 灯头+灯杆一体：更高的整灯外形 */
.ldbd-bench-node.is-streetlight,
.ldbd-bench-node.is-tall {
  width: 100px;
}
.ldbd-bench-node.is-streetlight .ldbd-bench-piece-img,
.ldbd-bench-node.is-tall .ldbd-bench-piece-img {
  width: 88px;
  height: 140px;
  object-fit: contain;
}
.ldbd-bench-node.is-drag {
  opacity: 0.95;
  z-index: 6;
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.35));
}
.ldbd-bench-node.is-joined {
  animation: ldbd-join-pop 0.45s ease;
}
@keyframes ldbd-join-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}
.ldbd-bench-node.is-run.is-piece {
  outline: none;
  filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.95))
    drop-shadow(0 6px 4px rgba(0, 0, 0, 0.28));
}
.ldbd-bench-node.is-run.is-device {
  outline: 2px solid #ffd54f;
  box-shadow: 0 0 0 3px rgba(255, 213, 79, 0.35);
}
.ldbd-bench-node.is-lamp {
  outline: 3px solid #ffeb3b;
  background: #fffde7 !important;
  box-shadow:
    0 0 0 6px rgba(255, 235, 59, 0.35),
    0 0 28px 8px rgba(255, 193, 7, 0.85),
    0 0 56px 16px rgba(255, 152, 0, 0.45);
  filter: none;
  z-index: 4;
  animation: ldbd-lamp-glow 1s ease-in-out infinite alternate;
}
.ldbd-bench-node.is-lamp .ldbd-bench-piece-img {
  filter: brightness(1.55) saturate(1.4) drop-shadow(0 0 12px #ffeb3b);
  animation: ldbd-lamp-pulse 0.9s ease-in-out infinite;
}
.ldbd-lamp-badge {
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  z-index: 8;
  background: #ff6f00;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(255, 111, 0, 0.55);
  pointer-events: none;
  white-space: nowrap;
}
@keyframes ldbd-lamp-glow {
  from {
    box-shadow:
      0 0 0 4px rgba(255, 235, 59, 0.3),
      0 0 20px 6px rgba(255, 193, 7, 0.7),
      0 0 40px 12px rgba(255, 152, 0, 0.35);
  }
  to {
    box-shadow:
      0 0 0 8px rgba(255, 235, 59, 0.45),
      0 0 36px 14px rgba(255, 193, 7, 0.95),
      0 0 64px 22px rgba(255, 152, 0, 0.55);
  }
}
@keyframes ldbd-lamp-pulse {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1.4) saturate(1.3) drop-shadow(0 0 10px #ffeb3b);
  }
  50% {
    transform: scale(1.06);
    filter: brightness(1.75) saturate(1.5) drop-shadow(0 0 18px #fff59d);
  }
}
.ldbd-bench-node.is-spin .ldbd-bench-piece-img {
  animation: ldbd-spin 1.2s linear infinite;
}
@keyframes ldbd-spin {
  to {
    transform: rotate(360deg);
  }
}
.ldbd-bench-node-body {
  padding: 10px 6px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  cursor: grab;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.ldbd-bench-node-label {
  line-height: 1.15;
  font-size: 11px;
  color: #1f4a45;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  padding: 1px 8px;
  margin-top: 2px;
}
.ldbd-bench-node.is-piece .ldbd-bench-node-label {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.ldbd-bench-x {
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 3;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(33, 33, 33, 0.55);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 20px;
  padding: 0;
}
.ldbd-bench-ports {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 6px 8px;
}
.ldbd-bench-port {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ffc107;
  background: #212121;
  cursor: crosshair;
  padding: 0;
}
.ldbd-bench-port.is-pick {
  background: #ffeb3b;
  box-shadow: 0 0 0 3px rgba(255, 235, 59, 0.5);
}
.ldbd-sim-readout.is-ok {
  color: #1b5e20;
  font-weight: 600;
}

/* —— 一件作品 · 实物槽位叠装（左中右三列等高，贴满仿真区） —— */
.ldbd-bench-product {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-template-columns: none;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.ldbd-bench-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}
.ldbd-bench-tri {
  display: grid;
  grid-template-columns: minmax(148px, 200px) minmax(0, 1fr) minmax(220px, 280px);
  gap: 10px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
/* 接线台：左零件栏 + 右列上下（接线画布 / 仿真效果），保证都可见 */
.ldbd-bench-tri.is-wire-tb {
  grid-template-columns: minmax(148px, 200px) minmax(0, 1fr);
}
.ldbd-wire-main {
  display: grid;
  grid-template-rows: minmax(0, 1.35fr) minmax(160px, 0.85fr);
  gap: 8px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
@media (max-width: 900px) {
  .ldbd-bench-tri {
    grid-template-columns: minmax(130px, 170px) minmax(0, 1fr) minmax(180px, 220px);
  }
  .ldbd-bench-tri.is-wire-tb {
    grid-template-columns: minmax(130px, 170px) minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .ldbd-bench-tri {
    grid-template-columns: 1fr;
    min-height: 280px;
    overflow: auto;
  }
  .ldbd-bench-tri.is-wire-tb {
    grid-template-columns: 1fr;
  }
  .ldbd-wire-main {
    grid-template-rows: minmax(220px, 1fr) minmax(180px, auto);
    min-height: 420px;
  }
}
.ldbd-bench-product .ldbd-bench-palette {
  height: 100%;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto; /* 仅左侧零件栏可滚 */
  min-height: 0;
  align-self: stretch;
}
/* 接线台：上画布 + 下真实效果图 */
.ldbd-wire-stage {
  position: relative;
  min-height: 0;
  height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(42, 111, 106, 0.18);
  background: #eef2f1;
}
.ldbd-wire-stage .ldbd-bench-canvas {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  border-radius: 16px;
  overflow: auto; /* 零件/连线完整可见，可滚动 */
}
.ldbd-fx-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  align-self: stretch;
  background: #fff;
  border: 1px solid rgba(42, 111, 106, 0.22);
  border-radius: 14px;
  overflow: hidden;
  box-sizing: border-box;
}
.ldbd-wire-main .ldbd-fx-panel {
  min-height: 0;
}
.ldbd-wire-main .ldbd-fx-svghost,
.ldbd-wire-main .ldbd-cup-fx {
  flex: 1 1 auto;
  min-height: 120px;
  width: 100%;
}
.ldbd-fx-head {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 2px;
  min-height: 0;
  /* 与中栏舞台内横幅顶边对齐：舞台 padding-top 10px */
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(42, 111, 106, 0.14);
  background: linear-gradient(180deg, #f4faf8 0%, #eef6f3 100%);
  box-sizing: border-box;
}
.ldbd-fx-head strong {
  font-size: 14px;
  font-weight: 800;
  color: #102a27;
  letter-spacing: 0.02em;
  line-height: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
}
.ldbd-fx-head [data-fx-cap] {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #1b5e20;
  line-height: 1.2;
  margin: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ldbd-fx-head.is-warn [data-fx-cap] {
  color: #b71c1c;
}
.ldbd-fx-head.is-muted [data-fx-cap] {
  color: #4a6661;
}
.ldbd-build-stage {
  position: relative;
  min-height: 0;
  height: 100%;
  align-self: stretch;
  border-radius: 16px;
  background: linear-gradient(180deg, #dfe8e4 0%, #c5d4ce 60%, #a8bdb4 100%);
  border: 2px dashed transparent;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 10px 10px 8px;
  overflow: hidden;
  box-sizing: border-box;
}
.ldbd-build-stage.is-dragging {
  border-color: rgba(0, 137, 123, 0.55);
}
.ldbd-build-stage.has-core {
  border-style: solid;
  border-color: rgba(0, 137, 123, 0.45);
}
.ldbd-build-banner {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  align-self: center;
  margin: 0 0 6px;
  padding: 0 12px;
  height: 28px;
  line-height: 28px;
  border-radius: 999px;
  background: #00897b;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-sizing: border-box;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ldbd-build-mid {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* 与右图画布同区：组装块上下居中 */
  overflow: hidden;
}
.ldbd-build-assembly {
  position: relative;
  z-index: 1;
  flex: 0 1 auto;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 0;
  max-height: 100%;
  box-sizing: border-box;
  padding: 8px 4px 4px;
}
.ldbd-build-desk {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 22%;
  bottom: 26%;
  height: auto;
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, #b08968 0 2px, #c9a27a 2px 18px);
  box-shadow: inset 0 8px 16px rgba(0, 0, 0, 0.12), 0 10px 0 #8d6e4c;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.ldbd-build-stack {
  position: relative;
  z-index: 1;
  width: min(240px, 78%);
  height: min(220px, 48%);
  min-height: 120px;
  margin: 0 auto;
  flex: 0 1 auto;
}
.ldbd-build-zone {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  transition: border-color 0.15s, background 0.15s, transform 0.2s;
}
.ldbd-build-zone.is-drop-hot {
  border-color: #ffeb3b;
  background: rgba(255, 235, 59, 0.22);
  box-shadow: 0 0 0 3px rgba(255, 235, 59, 0.25);
}
.ldbd-build-zone.is-filled {
  border-style: solid;
  border-color: transparent;
  background: transparent;
}
.ldbd-build-zone.is-pop {
  animation: ldbd-join-pop 0.4s ease;
}
.ldbd-build-ghost {
  display: block;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.35;
  color: rgba(16, 42, 39, 0.72);
  text-align: center;
  padding: 2px 6px;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
}
.ldbd-build-piece {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.28));
}
.ldbd-build-x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(33, 33, 33, 0.6);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 20px;
  padding: 0;
  z-index: 2;
}

/* 保温杯叠装位置 */
.ldbd-build-stack.is-cup .ldbd-z-body {
  bottom: 4%;
  width: 88%;
  height: 72%;
  z-index: 1;
  align-items: flex-end;
  padding-bottom: 10px;
}
.ldbd-build-stack.is-cup .ldbd-z-sleeve {
  bottom: 22%;
  width: 78%;
  height: 32%;
  z-index: 2;
}
.ldbd-build-stack.is-cup .ldbd-z-opening {
  top: 2%;
  width: 70%;
  height: 26%;
  z-index: 3;
  align-items: flex-start;
  padding-top: 6px;
}

/* 材料承重：两边支撑 + 中间材料 */
.ldbd-span-rig {
  position: relative;
  z-index: 1;
  width: min(360px, 96%);
  margin: 0 auto;
  padding-bottom: 10px;
}
.ldbd-span-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  min-height: 140px;
  width: 100%;
}
.ldbd-span-rig .ldbd-z-left,
.ldbd-span-rig .ldbd-z-right {
  position: relative;
  left: auto;
  transform: none;
  flex: 0 0 72px;
  width: 72px;
  height: 96px;
  min-height: 96px;
}
.ldbd-span-rig .ldbd-z-span {
  position: relative;
  left: auto;
  transform: none;
  flex: 1 1 auto;
  width: auto;
  min-width: 120px;
  height: 64px;
  min-height: 64px;
  margin-bottom: 28px;
}
.ldbd-span-rig .ldbd-z-span .ldbd-build-piece {
  object-fit: cover;
  width: 100%;
  height: 70%;
}
.ldbd-span-ground {
  height: 14px;
  margin-top: 4px;
  border-radius: 8px;
  background: linear-gradient(180deg, #a1887f 0%, #8d6e63 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2);
}
.ldbd-build-stage.is-scaffold .ldbd-build-desk {
  display: none;
}

.ldbd-poster-rig {
  position: relative;
  z-index: 1;
  width: min(300px, 92%);
  height: min(300px, 55%);
  min-height: 220px;
  margin: 0 auto;
}
.ldbd-poster-wall {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(180deg, #e8eaf6 0%, #cfd8dc 100%);
  box-shadow: inset 0 0 0 2px rgba(69, 90, 100, 0.15);
}
.ldbd-poster-rig .ldbd-z-board {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 8%;
  height: 52%;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
}
.ldbd-poster-stickers {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 8%;
  height: 28%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.ldbd-poster-rig .ldbd-z-s1,
.ldbd-poster-rig .ldbd-z-s2,
.ldbd-poster-rig .ldbd-z-s3,
.ldbd-poster-rig .ldbd-z-s4 {
  position: relative;
  left: auto;
  transform: none;
  width: auto;
  min-height: 52px;
  height: auto;
}

/* lesson100–107：各主题独立设计舞台 */
.ldbd-build-stage[class*="is-desk"],
.ldbd-build-stage[class*="is-lightcorner"],
.ldbd-build-stage[class*="is-hygiene"],
.ldbd-build-stage[class*="is-pactboard"],
.ldbd-build-stage[class*="is-plate"],
.ldbd-build-stage[class*="is-geardummy"],
.ldbd-build-stage[class*="is-weekgrid"],
.ldbd-build-stage[class*="is-sportprep"],
.ldbd-build-stage[class*="is-potbench"],
.ldbd-build-stage[class*="is-craftbench"],
.ldbd-build-stage[class*="is-earthcut"],
.ldbd-build-stage[class*="is-weatherpole"],
.ldbd-build-stage[class*="is-windbench"],
.ldbd-build-stage[class*="is-hullasm"],
.ldbd-build-stage[class*="is-waterloop"],
.ldbd-build-stage[class*="is-solarsys"],
.ldbd-build-stage[class*="is-seismo"],
.ldbd-build-stage[class*="is-airframe"],
.ldbd-build-stage[class*="is-teststand"],
.ldbd-build-stage[class*="is-mission"] {
  background: linear-gradient(180deg, #f1f8e9 0%, #e8f5e9 55%, #d7ccc8 100%);
}
.ldbd-build-stage[class*="is-desk"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-lightcorner"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-hygiene"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-pactboard"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-plate"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-geardummy"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-weekgrid"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-sportprep"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-potbench"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-craftbench"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-earthcut"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-weatherpole"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-windbench"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-hullasm"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-waterloop"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-solarsys"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-seismo"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-airframe"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-teststand"] .ldbd-build-desk,
.ldbd-build-stage[class*="is-mission"] .ldbd-build-desk {
  display: none;
}

[class$="-rig"] {
  position: relative;
  z-index: 1;
  width: min(320px, 94%);
  min-height: 240px;
  margin: 0 auto;
}
[class$="-rig"] .ldbd-build-zone {
  position: absolute;
  min-height: 48px;
  height: auto;
  transform: none;
}

/* 读写角 */
.ldbd-desk-rig { height: min(300px, 52vh); }
.ldbd-desk-wall {
  position: absolute;
  inset: 0 0 38% 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #e8eaf6, #cfd8dc);
}
.ldbd-desk-wall-slot { left: 12%; right: 12%; top: 10%; height: 46%; width: auto; }
.ldbd-desk-surface {
  position: absolute;
  left: 6%; right: 6%; bottom: 0; height: 36%;
  border-radius: 8px;
  background: linear-gradient(180deg, #d7ccc8, #bcaaa4);
}
.ldbd-desk-edge { left: 8%; width: 28%; bottom: 18%; height: 52px; }
.ldbd-desk-side { left: 38%; width: 24%; bottom: 18%; height: 52px; }
.ldbd-desk-lamp { right: 8%; width: 28%; bottom: 18%; height: 52px; left: auto; }

/* 灯光角 */
.ldbd-light-rig { height: min(300px, 52vh); background: transparent; }
.ldbd-light-window {
  position: absolute;
  right: 8%; top: 8%; width: 34%; height: 42%;
  border-radius: 6px;
  background: linear-gradient(180deg, #90caf9, #e3f2fd);
}
.ldbd-light-curtain { inset: 8%; width: auto; height: auto; position: absolute; }
.ldbd-light-plan { left: 8%; top: 10%; width: 44%; height: 38%; }
.ldbd-light-lamp { left: 10%; bottom: 12%; width: 32%; height: 56px; }
.ldbd-light-meter { right: 10%; bottom: 12%; width: 32%; height: 56px; left: auto; }

/* 卫生流程 */
.ldbd-hygiene-rig { height: 200px; }
.ldbd-hygiene-title { left: 8%; right: 8%; top: 0; height: 52px; width: auto; }
.ldbd-hygiene-flow {
  position: absolute;
  left: 4%; right: 4%; bottom: 0; height: 120px;
  display: flex; align-items: center; gap: 4px;
}
.ldbd-hygiene-step { position: relative; flex: 1; min-height: 72px; height: auto; left: auto; width: auto; }
.ldbd-flow-arrow { color: #00897b; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }

/* 公约板 */
.ldbd-pact-rig { height: min(280px, 48vh); }
.ldbd-pact-header { left: 10%; right: 10%; top: 0; height: 56px; width: auto; }
.ldbd-pact-cards {
  position: absolute; left: 6%; right: 6%; bottom: 0; top: 72px;
  display: flex; flex-direction: column; gap: 8px;
}
.ldbd-pact-card { position: relative; flex: 1; min-height: 44px; left: auto; width: auto; height: auto; }
.ldbd-broadcast-rig { height: min(300px, 52vh); display: flex; flex-direction: column; gap: 8px; }
.ldbd-broadcast-backdrop { position: relative; left: auto; width: auto; height: 56px; margin: 0 8%; }
.ldbd-broadcast-cards {
  display: flex; gap: 8px; padding: 0 6%; flex: 1; align-items: stretch;
}
.ldbd-broadcast-card { position: relative; flex: 1; min-height: 52px; left: auto; width: auto; height: auto; }
.ldbd-broadcast-script { position: relative; left: auto; width: auto; height: 48px; margin: 0 8% 4px; }

/* 餐盘 */
.ldbd-plate-rig { height: 280px; }
.ldbd-plate-dish {
  position: absolute;
  left: 50%; top: 54%; transform: translate(-50%, -50%);
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #fff 0%, #fafafa 55%, #e0e0e0 100%);
  box-shadow: inset 0 0 0 3px #bdbdbd;
}
.ldbd-plate-dish::before,
.ldbd-plate-dish::after {
  content: ""; position: absolute; background: #eceff1;
}
.ldbd-plate-dish::before { left: 50%; top: 12%; bottom: 12%; width: 2px; transform: translateX(-50%); }
.ldbd-plate-dish::after { top: 50%; left: 12%; right: 12%; height: 2px; transform: translateY(-50%); }
.ldbd-plate-q { width: 38%; height: 38%; min-height: 44px; }
.ldbd-plate-q.q1 { left: 14%; top: 14%; }
.ldbd-plate-q.q2 { right: 14%; top: 14%; left: auto; }
.ldbd-plate-q.q3 { left: 14%; bottom: 14%; top: auto; }
.ldbd-plate-q.q4 { right: 14%; bottom: 14%; top: auto; left: auto; }
.ldbd-plate-center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 22%; height: 22%; min-height: 36px; z-index: 2; }

/* 护具模型 */
.ldbd-gear-rig { height: 300px; }
.ldbd-gear-plan { left: 8%; right: 8%; top: 0; height: 48px; width: auto; }
.ldbd-gear-body {
  position: absolute;
  left: 50%; bottom: 8%; transform: translateX(-50%);
  width: 100px; height: 160px;
  border-radius: 50px 50px 24px 24px;
  background: linear-gradient(180deg, #ffccbc, #ffab91);
  pointer-events: none;
}
.ldbd-gear-body::before {
  content: ""; position: absolute;
  left: 50%; top: -36px; transform: translateX(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: #ffe0b2;
}
.ldbd-gear-head { left: 50%; top: 56px; transform: translateX(-50%); width: 64px; height: 48px; }
.ldbd-gear-knee { left: 50%; bottom: 72px; transform: translateX(-50%); width: 56px; height: 48px; top: auto; }
.ldbd-gear-pad { right: 12%; bottom: 16%; width: 72px; height: 48px; left: auto; top: auto; }

/* 周计划 */
.ldbd-week-rig { height: 240px; }
.ldbd-week-header { left: 8%; right: 8%; top: 0; height: 52px; width: auto; }
.ldbd-week-grid {
  position: absolute; left: 6%; right: 6%; bottom: 0; top: 64px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.ldbd-week-cell { position: relative; min-height: 64px; left: auto; width: auto; height: auto; }

/* 运动清单 */
.ldbd-sport-rig { height: 280px; }
.ldbd-sport-kit { left: 8%; right: 8%; top: 0; height: 48px; width: auto; }
.ldbd-sport-check {
  position: absolute; left: 10%; right: 10%; bottom: 0; top: 60px;
  margin: 0; padding: 0 0 0 1.4em; list-style: decimal;
  display: flex; flex-direction: column; gap: 8px;
}
.ldbd-sport-item { position: relative; min-height: 44px; left: auto; width: 100%; height: auto; }

/* 花盆 */
.ldbd-pot-rig { height: 260px; }
.ldbd-pot-card { left: 8%; right: 8%; top: 0; height: 48px; width: auto; }
.ldbd-pot-plant {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 120px; height: 140px;
}
.ldbd-pot-plant::before {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 90px; height: 36px; border-radius: 8px; background: #8d6e63;
}
.ldbd-pot-tag { width: 72px; min-height: 40px; height: auto; }
.ldbd-pot-tag.p1 { left: -80px; top: 40%; }
.ldbd-pot-tag.p2 { right: -80px; top: 30%; left: auto; }
.ldbd-pot-tag.p3 { left: 50%; bottom: 48px; transform: translateX(-50%); top: auto; width: 80px; }

/* 创客台 */
.ldbd-craft-rig { height: 240px; }
.ldbd-craft-table { left: 8%; right: 8%; top: 0; height: 56px; width: auto; }
.ldbd-craft-zones {
  position: absolute; left: 4%; right: 4%; bottom: 0; top: 68px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.ldbd-craft-mat, .ldbd-craft-tool, .ldbd-craft-deco {
  position: relative; min-height: 72px; left: auto; width: auto; height: auto;
}

/* 地球剖面 */
.ldbd-earth-rig { height: 280px; }
.ldbd-earth-title { left: 8%; right: 8%; top: 0; height: 44px; width: auto; }
.ldbd-earth-layers {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  width: 160px; height: 200px;
  border-radius: 80px 80px 20px 20px;
  background: linear-gradient(180deg, #90caf9 0%, #29b6f6 35%, #66bb6a 70%, #8d6e63 100%);
  overflow: visible;
}
.ldbd-earth-layer { width: 72%; left: 14%; min-height: 36px; height: auto; }
.ldbd-earth-layer.l1 { top: 6%; }
.ldbd-earth-layer.l2 { top: 28%; }
.ldbd-earth-layer.l3 { top: 50%; }
.ldbd-earth-layer.l4 { bottom: 6%; top: auto; }

/* 气象杆 */
.ldbd-pole-rig { height: 300px; }
.ldbd-pole-plan { left: 8%; right: 8%; top: 0; height: 44px; width: auto; }
.ldbd-pole-mast {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 16px; height: 220px; background: #78909c; border-radius: 4px;
}
.ldbd-pole-mast::before {
  content: ""; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 80px; height: 12px; background: #8d6e63; border-radius: 4px;
}
.ldbd-pole-hook { width: 88px; min-height: 40px; height: auto; left: calc(50% + 12px); }
.ldbd-pole-hook.h1 { top: 18%; }
.ldbd-pole-hook.h2 { top: 42%; }
.ldbd-pole-hook.h3 { top: 66%; }

/* 风洞台 */
.ldbd-wbench-rig { height: 220px; }
.ldbd-wbench-log { left: 8%; right: 8%; top: 0; height: 44px; width: auto; }
.ldbd-wbench-fan { left: 6%; bottom: 16%; width: 72px; height: 56px; top: auto; }
.ldbd-wbench-foil { left: 50%; bottom: 20%; transform: translateX(-50%); width: 80px; height: 48px; top: auto; }
.ldbd-wbench-trace { right: 6%; bottom: 16%; width: 72px; height: 56px; left: auto; top: auto; }

/* 潜水器 */
.ldbd-hull-rig { height: 240px; }
.ldbd-hull-plan { left: 8%; right: 8%; top: 0; height: 44px; width: auto; }
.ldbd-hull-body {
  position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%);
  width: 200px; height: 56px;
  border-radius: 28px;
  background: rgba(69, 90, 100, 0.25);
}
.ldbd-hull-part { min-height: 44px; height: auto; width: 88px; }
.ldbd-hull-part.p1 { left: 8%; bottom: 28%; top: auto; }
.ldbd-hull-part.p2 { left: 50%; bottom: 48%; transform: translateX(-50%); top: auto; width: 72px; }
.ldbd-hull-part.p3 { right: 8%; bottom: 28%; left: auto; top: auto; }

/* 水循环 */
.ldbd-loop-rig { height: 280px; }
.ldbd-loop-center {
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 72px; height: 72px; min-height: 56px;
}
.ldbd-loop-node { width: 72px; min-height: 44px; height: auto; }
.ldbd-loop-node.n1 { left: 50%; top: 8%; transform: translateX(-50%); }
.ldbd-loop-node.n2 { right: 8%; top: 50%; transform: translateY(-50%); left: auto; }
.ldbd-loop-node.n3 { left: 50%; bottom: 8%; transform: translateX(-50%); top: auto; }
.ldbd-loop-node.n4 { left: 8%; top: 50%; transform: translateY(-50%); }

/* 太阳系 */
.ldbd-solar-rig { height: 280px; }
.ldbd-solar-base { left: 8%; right: 8%; top: 0; height: 44px; width: auto; }
.ldbd-solar-sun {
  left: 50%; top: 52%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%;
}
.ldbd-solar-orbit {
  left: 50%; top: 52%; transform: translate(-50%, -50%);
  width: 180px; height: 64px; border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 2px rgba(120, 144, 156, 0.6);
}
.ldbd-solar-mark { right: 12%; top: 38%; width: 72px; left: auto; }
.ldbd-solar-zone { left: 12%; bottom: 16%; width: 72px; top: auto; }

/* 地震仪 */
.ldbd-seismo-rig { height: 280px; }
.ldbd-seismo-plan { left: 8%; right: 8%; top: 0; height: 44px; width: auto; }
.ldbd-seismo-frame { left: 50%; bottom: 48px; transform: translateX(-50%); width: 120px; height: 12px; min-height: 12px; top: auto; border-radius: 4px; }
.ldbd-seismo-pend { left: 50%; top: 38%; transform: translateX(-50%); width: 48px; height: 72px; }
.ldbd-seismo-paper { left: 50%; bottom: 8px; transform: translateX(-50%); width: 100px; height: 36px; top: auto; }

/* 飞机 */
.ldbd-air-rig { height: 260px; }
.ldbd-air-plan { left: 8%; right: 8%; top: 0; height: 44px; width: auto; }
.ldbd-air-fuse {
  left: 50%; top: 48%; transform: translate(-50%, -50%);
  width: 160px; height: 36px; min-height: 36px; border-radius: 18px;
}
.ldbd-air-wing { left: 50%; top: 48%; transform: translate(-50%, -50%); width: 200px; height: 32px; min-height: 32px; z-index: 0; }
.ldbd-air-tail { right: 18%; top: 42%; width: 48px; height: 40px; left: auto; }
.ldbd-air-mass { left: 18%; bottom: 16%; width: 56px; height: 40px; top: auto; }

/* 测试架 */
.ldbd-stand-rig { height: 260px; }
.ldbd-stand-log { left: 8%; right: 8%; top: 0; height: 44px; width: auto; }
.ldbd-stand-frame { left: 50%; bottom: 18%; transform: translateX(-50%); width: 72px; height: 96px; top: auto; }
.ldbd-stand-foil { left: 50%; bottom: 42%; transform: translateX(-50%); width: 120px; height: 28px; min-height: 28px; top: auto; }
.ldbd-stand-angle { right: 10%; bottom: 20%; width: 64px; height: 44px; left: auto; top: auto; }

/* 任务控制台 */
.ldbd-mission-rig { height: 280px; background: transparent; }
.ldbd-mission-brief { left: 8%; right: 8%; top: 0; height: 48px; width: auto; }
.ldbd-mission-console {
  position: absolute; left: 6%; right: 6%; bottom: 0; top: 60px;
  border-radius: 8px;
  background: linear-gradient(180deg, #37474f, #263238);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 8px;
}
.ldbd-mission-mod { position: relative; min-height: 64px; left: auto; width: auto; height: auto; }

/* 支架/工程类：按槽位自下而上叠（通用兜底） */
.ldbd-build-stack.is-scaffold {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  height: auto;
  min-height: 0;
  max-height: min(300px, 55vh);
  width: min(260px, 85%);
}
.ldbd-build-stack.is-scaffold .ldbd-build-zone {
  position: relative;
  left: auto;
  transform: none;
  width: 88%;
  min-height: 56px;
  height: 64px;
}

/* 小风车：现场组装（一台立在场地上） */
.ldbd-wind-rig {
  position: relative;
  z-index: 1;
  width: min(280px, 90%);
  height: min(280px, 52%);
  min-height: 200px;
  margin: 0 auto;
}
.ldbd-wind-sky {
  position: absolute;
  inset: 0 0 48px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.ldbd-wind-ground {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(180deg, #a5d6a7 0%, #81c784 100%);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.25);
  pointer-events: none;
}
.ldbd-wind-rotor {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: -18px;
  z-index: 3;
}
.ldbd-wind-rotor.is-spinning {
  animation: ldbd-wind-spin 1.1s linear infinite;
}
.ldbd-wind-rotor.is-spinning.is-ready {
  animation-duration: 0.75s;
}
@keyframes ldbd-wind-spin {
  to {
    transform: rotate(360deg);
  }
}
.ldbd-wind-rig .ldbd-z-blade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  left: 0;
  transform: none;
  border-radius: 50%;
  z-index: 1;
  align-items: flex-start;
  padding-top: 14px;
}
.ldbd-wind-rig .ldbd-z-blade .ldbd-build-ghost {
  font-size: 13px;
}
.ldbd-wind-rig .ldbd-z-blade .ldbd-build-piece {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ldbd-wind-rig .ldbd-z-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 2;
  background: rgba(255, 255, 255, 0.45);
}
.ldbd-wind-rig .ldbd-z-hub .ldbd-build-ghost {
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 0;
}
.ldbd-wind-rig .ldbd-z-hub .ldbd-build-piece {
  width: 44px;
  height: 44px;
}
.ldbd-wind-rig .ldbd-z-tower {
  position: relative;
  width: 56px;
  height: 120px;
  left: auto;
  transform: none;
  z-index: 1;
  border-radius: 10px;
}
.ldbd-wind-rig .ldbd-z-tower .ldbd-build-piece {
  height: 100%;
  width: auto;
  max-width: 56px;
}
.ldbd-wind-rig .ldbd-z-fence {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 28px;
  height: 44px;
  width: auto;
  transform: none;
  z-index: 4;
  border-radius: 8px;
}
.ldbd-wind-rig .ldbd-z-fence .ldbd-build-piece {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ldbd-build-stage.is-turbine {
  background: linear-gradient(180deg, #bbdefb 0%, #e8f5e9 55%, #c8e6c9 100%);
}
.ldbd-build-stage.is-turbine .ldbd-build-desk {
  display: none;
}

/* 小电站：现场组装（底座 + 倾角架 + 光伏板） */
.ldbd-pv-rig {
  position: relative;
  z-index: 1;
  width: min(300px, 92%);
  height: min(280px, 52%);
  min-height: 200px;
  margin: 0 auto;
}
.ldbd-pv-sky {
  position: absolute;
  inset: 0 0 40px 0;
  background: linear-gradient(180deg, #90caf9 0%, #e3f2fd 70%, transparent 100%);
  pointer-events: none;
  border-radius: 12px 12px 0 0;
}
.ldbd-pv-ground {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 0;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(180deg, #a5d6a7 0%, #81c784 100%);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.25);
  pointer-events: none;
}
.ldbd-pv-mount {
  position: absolute;
  left: 12%;
  right: 22%;
  bottom: 36px;
  top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 2;
}
.ldbd-pv-rig .ldbd-z-base {
  position: relative;
  width: 72%;
  height: 56px;
  left: auto;
  transform: none;
  z-index: 1;
}
.ldbd-pv-rig .ldbd-z-frame {
  position: relative;
  width: 78%;
  height: 52px;
  left: auto;
  transform: none;
  z-index: 2;
  margin-bottom: -6px;
}
.ldbd-pv-rig .ldbd-z-mat {
  position: relative;
  width: 92%;
  height: 88px;
  left: auto;
  transform: none;
  z-index: 3;
  margin-bottom: -4px;
  border-radius: 8px;
}
.ldbd-pv-rig .ldbd-z-mat.is-filled {
  transform: rotate(-18deg);
  transform-origin: 50% 100%;
}
.ldbd-pv-rig .ldbd-z-meter {
  position: absolute;
  right: 2%;
  bottom: 48px;
  width: 64px;
  height: 72px;
  left: auto;
  transform: none;
  z-index: 4;
}
.ldbd-pv-rig .ldbd-build-piece {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ldbd-build-stage.is-pv {
  background: linear-gradient(180deg, #90caf9 0%, #e8f5e9 58%, #c8e6c9 100%);
}
.ldbd-build-stage.is-pv .ldbd-build-desk {
  display: none;
}

/* 分水工程：现场横向布置（库区→坝闸→渠道→田） */
.ldbd-canal-rig {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  height: min(260px, 50%);
  min-height: 180px;
  margin: 0 auto;
}
.ldbd-canal-sky {
  position: absolute;
  inset: 0 0 36px 0;
  background: linear-gradient(180deg, #81d4fa 0%, #e3f2fd 65%, transparent 100%);
  pointer-events: none;
  border-radius: 12px 12px 0 0;
}
.ldbd-canal-ground {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 0;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(180deg, #a5d6a7 0%, #81c784 100%);
  pointer-events: none;
}
.ldbd-canal-row {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 28px;
  bottom: 40px;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 6px;
  z-index: 2;
}
.ldbd-canal-res {
  position: relative;
  flex: 0 0 38%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.ldbd-canal-rig .ldbd-z-base {
  position: relative;
  width: 88%;
  height: 110px;
  left: auto;
  transform: none;
  z-index: 1;
}
.ldbd-canal-rig .ldbd-z-frame {
  position: absolute;
  right: 2%;
  bottom: 18%;
  width: 42%;
  height: 72px;
  left: auto;
  transform: none;
  z-index: 3;
}
.ldbd-canal-rig .ldbd-z-meter {
  position: absolute;
  left: 4%;
  top: 8%;
  width: 36%;
  height: 64px;
  transform: none;
  z-index: 4;
}
.ldbd-canal-rig .ldbd-z-mat {
  position: relative;
  flex: 1 1 34%;
  height: 72px;
  left: auto;
  transform: none;
  margin-bottom: 18px;
}
.ldbd-canal-rig .ldbd-z-field {
  position: relative;
  flex: 0 0 24%;
  height: 100px;
  left: auto;
  transform: none;
  margin-bottom: 8px;
}
.ldbd-canal-rig .ldbd-build-piece {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ldbd-build-stage.is-canal {
  background: linear-gradient(180deg, #81d4fa 0%, #e8f5e9 55%, #c8e6c9 100%);
}
.ldbd-build-stage.is-canal .ldbd-build-desk {
  display: none;
}

.ldbd-cup-slots {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 380px;
  justify-content: center;
  flex-wrap: wrap;
  flex: 0 0 auto;
  margin: 0;
}
.ldbd-cup-slot {
  flex: 1;
  min-width: 84px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  padding: 10px 8px;
  border: 1px solid #c5d8d4;
  font-size: 13px;
  font-weight: 600;
  color: #3d5c57;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  box-sizing: border-box;
}
.ldbd-cup-slot span {
  display: block;
  margin-bottom: 4px;
  opacity: 0.9;
  font-size: 12px;
  font-weight: 700;
}
.ldbd-cup-slot b {
  font-size: 14px;
  color: #102a27;
  font-weight: 700;
  line-height: 1.3;
}
.ldbd-cup-fx {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-height: 0;
  height: 100%;
  border: none;
  border-radius: 0;
  background: #f4f8f7;
  display: block;
}
.ldbd-fx-svghost {
  overflow: hidden;
  position: relative;
}
.ldbd-fx-svghost > svg {
  display: block;
  width: 100%;
  height: 100%;
}
.ldbd-bench-product .ldbd-bench-pal-item {
  cursor: grab;
}
.ldbd-bench-product .ldbd-bench-pal-item:hover {
  outline: 2px solid #00897b;
  outline-offset: 2px;
}

/* AI 聊天 / 工作台 */
.ldbd-ai-root {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.ldbd-ai-head {
  flex: 0 0 auto;
}
.ldbd-ai-head h4 {
  margin: 0 0 4px;
  color: #102a27;
}
.ldbd-ai-sub {
  margin: 0;
  font-size: 13px;
  color: #3d5c57;
}
.ldbd-ai-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.ldbd-ai-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
@media (max-width: 720px) {
  .ldbd-ai-split {
    grid-template-columns: 1fr;
    overflow: auto;
  }
}
.ldbd-ai-pane {
  background: #f7fbf8;
  border: 1px solid rgba(42, 111, 106, 0.18);
  border-radius: 12px;
  padding: 8px 10px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ldbd-ai-pane.ldbd-ai-chat {
  overflow: hidden;
}
.ldbd-ai-chat .ldbd-ai-thread {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 4px 2px 8px;
}
.ldbd-ai-pane-title {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  color: #2a6f6a;
  margin: 0 0 2px;
  padding: 0;
  line-height: 1.35;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
}
.ldbd-ai-check,
.ldbd-ai-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #1f4a45;
  margin: 0;
  line-height: 1.3;
}
.ldbd-ai-field {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
/* 滑条：标签 · 轨道 · 数值同一行，去掉上下大空隙 */
.ldbd-ai-field:has(> input[type="range"]) {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}
.ldbd-ai-field textarea,
.ldbd-ai-field input[type="text"],
.ldbd-ai-field select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(42, 111, 106, 0.28);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
  background: #fff;
}
.ldbd-ai-field textarea {
  min-height: 0;
  resize: vertical;
}
.ldbd-ai-field input[type="range"] {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  margin: 0;
  height: 22px;
}
.ldbd-ai-field:has(> input[type="range"]) > span[data-v],
.ldbd-ai-field:has(> input[type="range"]) > span {
  flex: 0 0 2.25em;
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #2a6f6a;
}
.ldbd-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  flex: 0 0 auto;
}
.ldbd-ai-actions button {
  border: 1px solid rgba(42, 111, 106, 0.35);
  background: #fff;
  color: #102a27;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.ldbd-ai-actions button.is-primary,
.ldbd-ai-actions button.ldbd-ai-primary {
  background: #2a6f6a;
  border-color: #2a6f6a;
  color: #fff;
}
.ldbd-ai-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.ldbd-ai-bubble.is-user {
  align-self: flex-end;
  background: #2a6f6a;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ldbd-ai-bubble.is-ai {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(42, 111, 106, 0.2);
  color: #102a27;
  border-bottom-left-radius: 4px;
}
.ldbd-ai-meter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: #3d5c57;
}
.ldbd-ai-meter i {
  display: block;
  height: 10px;
  width: 0;
  border-radius: 999px;
  background: #90a4ae;
  transition: width 0.2s ease, background 0.2s ease;
}
.ldbd-ai-meter i.is-good {
  background: #43a047;
}
.ldbd-ai-meter i.is-bad {
  background: #e53935;
}
.ldbd-ai-preview {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  color: #102a27;
  background: #fff;
  border: 1px solid rgba(42, 111, 106, 0.14);
  border-radius: 10px;
  padding: 10px;
  min-height: 120px;
}
.ldbd-ai-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}
.ldbd-ai-feed-card {
  background: #fff;
  border: 1px solid rgba(42, 111, 106, 0.16);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.ldbd-ai-feed-card .tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  color: #2a6f6a;
  background: rgba(42, 111, 106, 0.1);
  border-radius: 999px;
  padding: 2px 8px;
}
.ldbd-ai-feed-card small {
  color: #3d5c57;
}
.ldbd-ai-post {
  background: #fff;
  border-left: 4px solid #2a6f6a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #102a27;
  margin-bottom: 6px;
}
.ldbd-ai-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ldbd-ai-swatch {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.ldbd-ai-swatch.is-on {
  outline: 3px solid #e8c547;
  outline-offset: 2px;
}
.ldbd-ai-swatch.is-labeled {
  box-shadow: 0 0 0 2px #2a6f6a;
}
.ldbd-ai-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: #3d5c57;
}

/* 最终成果区：与左侧同高，内容铺满 */
.ldbd-ai-product {
  background: #eef5f3;
}
.ldbd-ai-artifact {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ldbd-ai-artifact > .ldbd-ai-notebook,
.ldbd-ai-artifact > .ldbd-ai-book,
.ldbd-ai-artifact > .ldbd-ai-app,
.ldbd-ai-artifact > .ldbd-ai-board,
.ldbd-ai-artifact > .ldbd-ai-tree,
.ldbd-ai-artifact > .ldbd-ai-verdict,
.ldbd-ai-artifact > .ldbd-ai-koujue,
.ldbd-ai-artifact > .ldbd-ai-news {
  flex: 1 1 auto;
  min-height: 0;
}
.ldbd-ai-artifact > .ldbd-ai-phone,
.ldbd-ai-artifact > .ldbd-ai-card-out {
  flex: 0 0 auto;
}
.ldbd-ai-stamp {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.ldbd-ai-stamp.is-ok {
  background: #e8f5e9;
  color: #1b5e20;
}
.ldbd-ai-stamp.is-bad {
  background: #ffebee;
  color: #b71c1c;
}
.ldbd-ai-obj {
  width: 100%;
  height: auto;
  max-height: 88px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  background: #fff;
}
.ldbd-ai-mat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ldbd-ai-mat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: #fff;
  border: 1px solid rgba(42, 111, 106, 0.18);
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #102a27;
}
.ldbd-ai-mat img {
  max-height: 64px;
}
.ldbd-ai-phone {
  position: relative;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(42, 111, 106, 0.2);
  padding: 8px;
  overflow: hidden;
}
.ldbd-ai-phone-bg {
  max-height: 72px;
  opacity: 0.35;
  margin-bottom: 4px;
}
.ldbd-ai-phone-screen {
  max-height: 180px;
  overflow: auto;
}
.ldbd-ai-card-out {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(42, 111, 106, 0.18);
  padding: 8px;
  overflow: hidden;
}
.ldbd-ai-card-img {
  width: 88px;
  max-width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: #f4f8f7;
}
.ldbd-ai-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.ldbd-ai-card-body b {
  display: block;
  margin: 0;
  color: #102a27;
  line-height: 1.35;
  word-break: break-word;
}
.ldbd-ai-card-body p {
  margin: 0;
  font-size: 12px;
  color: #3d5c57;
  line-height: 1.4;
  word-break: break-word;
}
.ldbd-ai-card-body .ldbd-ai-stamp {
  position: static;
  margin-top: 4px;
  flex: 0 0 auto;
}
.ldbd-ai-book {
  position: relative;
  background: #fffdf8;
  border: 2px solid #c4a574;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  box-shadow: 0 8px 20px rgba(100, 70, 30, 0.12);
}
.ldbd-ai-book-illust {
  background: #efe6d6;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.ldbd-ai-book-photo {
  max-height: 140px;
  width: auto;
  max-width: 100%;
}
.ldbd-ai-book-empty {
  color: #8d6e4c;
  font-size: 13px;
  font-weight: 700;
}
.ldbd-ai-book-text {
  padding: 12px 14px 14px;
  flex: 1;
}
.ldbd-ai-book-text h5 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #5d4037;
}
.ldbd-ai-book-text p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.55;
  color: #3e2723;
}
.ldbd-ai-book-text footer {
  font-size: 11px;
  color: #8d6e63;
  border-top: 1px dashed #d7ccc8;
  padding-top: 6px;
}
.ldbd-ai-book .ldbd-ai-stamp {
  position: absolute;
  right: 10px;
  top: 10px;
}
.ldbd-ai-app {
  position: relative;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(42, 111, 106, 0.2);
  padding: 8px;
  overflow: hidden;
}
.ldbd-ai-app-chrome {
  max-height: 56px;
  margin-bottom: 6px;
  opacity: 0.85;
}
.ldbd-ai-app-feed {
  max-height: 240px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ldbd-ai-app-meta {
  margin: 6px 0 0;
  font-size: 12px;
  color: #3d5c57;
}
.ldbd-ai-news {
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(42, 111, 106, 0.16);
  padding: 8px;
  margin-bottom: 6px;
}
.ldbd-ai-news-img {
  max-height: 72px;
  margin-bottom: 6px;
}
.ldbd-ai-news p {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #102a27;
}
.ldbd-ai-koujue {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(42, 111, 106, 0.2);
  padding: 10px;
  align-items: start;
  overflow: hidden;
  box-sizing: border-box;
}
.ldbd-ai-koujue-img {
  width: 96px;
  max-width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: #f4f8f7;
}
.ldbd-ai-koujue-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
}
.ldbd-ai-koujue-body b {
  display: block;
  margin: 0;
  color: #102a27;
  line-height: 1.35;
  word-break: break-word;
}
.ldbd-ai-koujue-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #3d5c57;
  word-break: break-word;
}
.ldbd-ai-koujue-body .muted {
  color: #5a7a74;
  font-size: 12px;
}
.ldbd-ai-koujue-body .ldbd-ai-stamp {
  position: static;
  margin-top: 4px;
  flex: 0 0 auto;
}
.ldbd-ai-board {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(42, 111, 106, 0.2);
  padding: 12px;
}
.ldbd-ai-board > b {
  display: block;
  margin-bottom: 8px;
  color: #102a27;
}
.ldbd-ai-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 72px), 1fr));
  gap: 8px;
  margin-bottom: 10px;
  justify-content: center;
}
.ldbd-ai-board-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.ldbd-ai-board-cell span {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 800;
  color: #102a27;
}
.ldbd-ai-notebook {
  background: #fffef7;
  border: 2px solid #a1887f;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: inset 0 0 0 1px #efebe9;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.ldbd-ai-notebook .ldbd-ai-thread.is-mini {
  flex: 1 1 auto;
  max-height: none;
  min-height: 48px;
  overflow: auto;
}
.ldbd-ai-notebook > b {
  display: block;
  margin-bottom: 8px;
  color: #4e342e;
}
.ldbd-ai-notebook p {
  margin: 0 0 6px;
  font-size: 13px;
  color: #3e2723;
}
.ldbd-ai-plan-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}
.ldbd-ai-plan-block {
  background: #e0f2f1;
  color: #00695c;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}
.ldbd-ai-thread.is-mini {
  max-height: 100px;
  margin: 6px 0;
}
.ldbd-ai-tree {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(42, 111, 106, 0.2);
  padding: 12px;
}
.ldbd-ai-tree > b {
  display: block;
  margin-bottom: 10px;
}
.ldbd-ai-tree-node {
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.ldbd-ai-tree-node.is-if {
  background: #e3f2fd;
  color: #0d47a1;
}
.ldbd-ai-tree-branches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ldbd-ai-tree-node.is-then {
  background: #e8f5e9;
  color: #1b5e20;
}
.ldbd-ai-tree-node.is-else {
  background: #fff3e0;
  color: #e65100;
}
.ldbd-ai-tree-result {
  margin: 8px 0 0;
  font-size: 13px;
  color: #102a27;
  line-height: 1.45;
}
.ldbd-ai-verdict {
  background: #fff;
  border: 2px solid #5d4037;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 4px 0 #efebe9;
}
.ldbd-ai-verdict > b {
  display: block;
  margin-bottom: 8px;
  color: #3e2723;
  letter-spacing: 0.04em;
}
.ldbd-ai-verdict p {
  margin: 0 0 6px;
  font-size: 13px;
}
.ldbd-ai-verdict-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #bcaaa4;
  font-size: 12px;
  line-height: 1.5;
  color: #4e342e;
}
