.conf-header {
  padding: 30px 28px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.conf-header .eyebrow {
  margin-bottom: 12px;
}
.conf-header h1 {
  font-size: 30px;
  margin: 0;
  letter-spacing: -0.025em;
}
.conf-header h1 span {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 18px;
}
.conf-disclaimer {
  margin: 0 28px;
  padding: 12px 16px;
  background: var(--warn-bg);
  border-left: 3px solid var(--warn-border);
  color: var(--warn-text);
  font-size: 12px;
  line-height: 1.8;
}
#conf-message {
  min-height: 32px;
  padding: 8px 28px;
  font-size: 12px;
  color: var(--forest);
}
.conf-tools {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 28px 18px;
  flex-wrap: wrap;
}
.conf-tools > div {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.conf-tools label,
.station-meta label {
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.conf-layout {
  display: grid;
  grid-template-columns: 275px minmax(0, 1fr) 255px;
  border-top: 1px solid var(--line);
  min-height: 700px;
  margin-bottom: 35px;
}
.conf-layout button,
.conf-tools button,
.file-button {
  border: 1px solid #b9c5bc;
  background: #fff;
  border-radius: 3px;
  min-height: 36px;
  padding: 7px 11px;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}
.conf-layout button:hover,
.conf-tools button:hover {
  border-color: var(--forest);
  background: #edf3e8;
}
.conf-layout button:disabled,
.conf-tools button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.conf-tools .accent {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.file-button:focus-within {
  outline: 3px solid var(--orange);
}
.conf-layout input,
.conf-tools input,
.conf-layout select {
  border: 1px solid #b9c5bc;
  min-height: 36px;
  padding: 8px;
  font-size: 12px;
  min-width: 0;
  border-radius: 3px;
  background: #fff;
}
.conf-library {
  background: #fff;
  padding: 18px;
  border-right: 1px solid var(--line);
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}
.panel-heading h2 {
  font-size: 17px;
  letter-spacing: 0;
  margin: 0;
  font-weight: 600;
}
.panel-heading > span {
  font-size: 11px;
  color: var(--muted);
}
.conf-library > input,
.conf-library > select {
  width: 100%;
  margin-bottom: 9px;
}
.conf-help {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}
#library-list {
  max-height: 720px;
  overflow: auto;
  padding-right: 3px;
}
.lib-proto-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: #eef4ec;
  border: 1px solid #cfdec9;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 10px 0 4px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.lib-proto-bar b {
  color: var(--forest);
}
.lib-proto-bar button {
  border: 1px solid #b5c6ae;
  background: #fff;
  color: var(--forest);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 11px;
  min-height: 28px;
}
.lib-proto-bar button:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}
.lib-item[data-current-proto="1"] {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
  border-radius: 6px;
}
.lib-item {
  display: grid;
  grid-template-columns: 40px 1fr 32px;
  gap: 8px;
  align-items: center;
  border-top: 1px solid #e4e9e2;
  padding: 13px 0;
  min-width: 0;
}
.lib-item img {
  height: 65px;
  width: 40px;
  object-fit: contain;
}
.lib-item strong {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}
.lib-item p {
  margin: 0;
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
}
.lib-item button {
  padding: 0;
  font-size: 20px;
  min-height: 35px;
}
.lib-noimage {
  font-size: 11px;
  color: #788475;
  border: 1px dashed #cad3c6;
  height: 60px;
  display: grid;
  place-items: center;
  text-align: center;
}
.conf-workspace {
  min-width: 0;
  background: #f3f5ef;
}
.station-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
#station-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
#station-tabs button[aria-pressed="true"] {
  background: var(--forest);
  color: #fff;
}
.station-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 17px 18px 10px;
}
.station-meta input {
  max-width: 155px;
}
.station-info {
  padding: 8px 18px 15px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--forest);
}
.rail-scroll {
  overflow: auto;
  min-height: 370px;
  padding: 24px 24px 12px;
  background:
    linear-gradient(#dce4d329 1px, transparent 1px),
    linear-gradient(90deg, #dce4d329 1px, transparent 1px);
  background-size: 25px 25px;
}
.hardware-rail {
  display: flex;
  gap: 0;
  align-items: flex-start;
  width: max-content;
  min-width: 100%;
  position: relative;
  --zoom: 1;
  padding: 0 12px 24px;
}
.hardware-rail:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(210px * var(--zoom));
  height: 22px;
  border-top: 3px solid #afb8ad;
  border-bottom: 3px solid #949f94;
  background: linear-gradient(#d5dbd1, #b5c0b4, #e1e7dc);
  box-shadow: 0 5px 8px #1c352018;
}
.hardware-card {
  position: relative;
  /* 卡宽=SVG 模块体在 245px 高下的真实宽（140:648 ≈ 52.93px），多卡拼接即连续无隙镜轨 */
  width: calc(52.93px * var(--zoom));
  flex: none;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.hardware-card.coupler {
  width: calc(52.93px * var(--zoom));
  margin-right: 0;
}
.hardware-card .slot {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 10px;
}
.hardware-card .module-select {
  border: 0;
  padding: 0;
  background: transparent;
  height: calc(245px * var(--zoom));
  display: block;
  width: 100%;
  cursor: pointer;
}
.hardware-card .module-select:hover {
  background: transparent;
  filter: brightness(1.12);
}
.hardware-card.selected .module-select {
  background: transparent;
  box-shadow:
    0 0 0 2px var(--orange),
    0 0 0 5px #d8451010;
}
.hardware-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}
.hardware-card strong {
  font-size: 10px;
  text-align: center;
  overflow-wrap: anywhere;
  margin-top: 13px;
  padding: 0 2px;
  line-height: 1.4;
}
.hardware-card .image-state {
  font-size: 11px;
  text-align: center;
  color: #786c46;
  line-height: 1.6;
  margin-top: 6px;
}
.hardware-card.dragover {
  box-shadow: inset 3px 0 0 var(--orange);
}
.module-missing {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #eef0e9;
  border: 1px dashed #aab6a2;
  color: #62715a;
  gap: 12px;
  font-size: 11px;
}
.module-missing b {
  font-size: 17px;
  font-weight: 500;
}
.rail-empty {
  font-size: 12px;
  color: var(--muted);
  align-self: center;
  max-width: 160px;
  line-height: 1.8;
  padding: 15px;
}
.rail-caption {
  padding: 0 20px;
  margin-top: 0;
}
.conf-summary {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}
.conf-summary span {
  font-size: 11px;
  background: #e2eadb;
  border: 1px solid #d3deca;
  padding: 7px 9px;
}
.conf-bom {
  margin: 5px 18px 22px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
}
.table-scroll {
  overflow: auto;
}
.conf-bom table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 11px;
}
.conf-bom th,
.conf-bom td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
}
.conf-bom td:first-child {
  white-space: nowrap;
  font-weight: 600;
}
.conf-properties {
  padding: 20px 17px;
  border-left: 1px solid var(--line);
  background: #fff;
  min-width: 0;
}
.property-image {
  width: 100%;
  height: 160px;
  object-fit: contain;
  margin: 20px 0;
}
.conf-properties h3 {
  font-size: 20px;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.conf-properties p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.prop-specs {
  font-size: 11px;
}
.prop-specs div {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.prop-specs dt {
  color: var(--muted);
  margin-bottom: 5px;
}
.prop-specs dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.conf-properties label {
  display: block;
  font-size: 12px;
  margin: 15px 0;
}
.conf-properties textarea {
  display: block;
  width: 100%;
  min-height: 80px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #aab6af;
  font-size: 12px;
  resize: vertical;
}
.prop-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.conf-properties .delete {
  color: #ae3511;
  border-color: #d7ae9e;
  margin-top: 10px;
  width: 100%;
}
.conf-properties a {
  display: block;
  font-size: 11px;
  margin-top: 20px;
  text-decoration: underline;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 1100px) {
  .conf-layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .conf-properties {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .conf-properties #properties {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
  }
  .conf-properties .property-image {
    grid-column: 1;
    height: 170px;
  }
  .conf-header h1 span {
    display: none;
  }
}
@media (max-width: 820px) {
  .conf-layout {
    grid-template-columns: 1fr;
  }
  .conf-workspace {
    grid-row: 1;
  }
  .conf-library {
    grid-row: 2;
    border-top: 1px solid var(--line);
    border-right: 0;
  }
  .conf-properties {
    grid-row: 3;
  }
  .conf-properties #properties {
    display: block;
  }
  .conf-header {
    padding: 24px 18px 15px;
    flex-wrap: wrap;
  }
  .conf-header h1 {
    font-size: 26px;
  }
  .conf-disclaimer {
    margin: 0 18px;
  }
  .conf-tools {
    padding: 5px 18px 18px;
  }
  .conf-tools > label {
    width: 100%;
  }
  .conf-tools > label input {
    flex: 1;
  }
  #library-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
    max-height: 370px;
  }
  .lib-item {
    grid-template-columns: 30px 1fr 30px;
    gap: 5px;
  }
  .lib-item img {
    width: 30px;
  }
  .station-toolbar {
    align-items: flex-start;
  }
  .rail-scroll {
    min-height: 345px;
    padding-left: 12px;
  }
  .conf-properties {
    padding: 20px;
  }
  .conf-properties .property-image {
    height: 180px;
  }
  .station-meta {
    gap: 10px;
  }
  .conf-bom {
    margin: 5px 12px 18px;
    padding: 12px;
  }
  .conf-tools button,
  .file-button,
  .conf-layout button {
    min-height: 40px;
  }
  .conf-header .text-link {
    font-size: 11px;
  }
  .conf-layout {
    margin-bottom: 0;
  }
}
.conf-steps {
  display: flex;
  gap: 8px;
  padding: 16px 28px 0;
  flex-wrap: wrap;
}
.step-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 12px;
  min-height: 38px;
  color: var(--ink);
  cursor: pointer;
}
.step-chip .step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e4e9e2;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex: none;
}
.step-chip .step-state {
  color: var(--muted);
  font-size: 11px;
}
.step-chip.current {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px #d8451014;
}
.step-chip.current .step-num {
  background: var(--orange);
  color: #fff;
}
.step-chip.done .step-num {
  background: var(--forest);
  color: #fff;
}
.guide-mask {
  position: fixed;
  inset: 0;
  background: #17232266;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.guide-mask.hidden {
  display: none;
}
.guide-dialog {
  background: #fff;
  max-width: 520px;
  width: 100%;
  padding: 30px;
  border-radius: 6px;
  box-shadow: 0 20px 60px #17232240;
  max-height: 90vh;
  overflow: auto;
}
.guide-dialog h2 {
  font-size: 24px;
  margin: 0 0 15px;
}
.guide-dialog ol {
  padding-left: 20px;
  display: grid;
  gap: 12px;
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}
.guide-dialog p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 15px 0;
}
.guide-dialog > div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.guide-dialog button {
  border: 1px solid #b9c5bc;
  background: #fff;
  border-radius: 3px;
  min-height: 40px;
  padding: 9px 14px;
  font-size: 12px;
  cursor: pointer;
}
.guide-dialog button:hover {
  border-color: var(--forest);
}
.guide-dialog .accent {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
@media (max-width: 820px) {
  .conf-steps {
    padding: 14px 18px 0;
  }
  .step-chip {
    padding: 8px 11px;
    font-size: 11px;
    min-height: 40px;
  }
  .step-chip .step-state {
    display: none;
  }
  .guide-dialog {
    padding: 22px;
  }
}
/* Guided selection: keep station controls visible, hide manual editing panels. */
[hidden],
.conf-steps[hidden] {
  display: none !important;
}
.conf-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 28px 16px;
}
.conf-mode span {
  font-size: 12px;
  color: var(--muted);
}
.conf-mode button,
.wizard button {
  border: 1px solid #b9c5bc;
  background: #fff;
  color: var(--ink);
  border-radius: 4px;
  padding: 10px 16px;
  min-height: 44px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}
.conf-mode button[aria-pressed="true"] {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}
.wizard {
  margin: 0 28px 24px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--forest);
  border-radius: 6px;
}
.wizard h2 {
  font-size: 22px;
  margin: 0 0 16px;
}
.wizard p {
  font-size: 13px;
  line-height: 1.8;
}
.wizard-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.wizard-progress li {
  padding: 8px 12px;
  background: #f3f5ef;
  font-size: 13px;
  border-radius: 4px;
}
.wizard-progress [aria-current="step"] {
  background: var(--forest);
  color: #fff;
}
.wizard-warning {
  padding: 14px;
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-border);
  color: var(--warn-text);
  font-size: 14px;
  line-height: 1.8;
}
.wizard-warning p {
  margin: 6px 0 0;
}
.wizard-row {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.wizard-row .wizard-field {
  flex: 1 1 230px;
  max-width: 650px;
}
.wizard-summary {
  font-size: 13px;
  line-height: 1.9;
  padding-left: 22px;
}
.wizard-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}
.wizard-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  max-width: 400px;
}
.wizard select,
.wizard input {
  border: 1px solid #b9c5bc;
  background: #fff;
  border-radius: 4px;
  padding: 10px;
  min-height: 44px;
  font: inherit;
  max-width: 100%;
  min-width: 0;
}
.wizard-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.wizard .accent {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.wizard button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.wizard :focus-visible,
.conf-mode :focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
#wizard-message {
  color: #9b3514;
  min-height: 24px;
}
.conf-layout.wizard-layout {
  grid-template-columns: minmax(0, 1fr);
}
.wizard-layout > .conf-library,
.wizard-layout > .conf-properties {
  display: none;
}
@media (max-width: 820px) {
  .conf-mode {
    margin: 8px 18px 16px;
  }
  .wizard {
    margin: 0 18px 20px;
    padding: 18px;
  }
  .wizard h2 {
    font-size: 20px;
  }
  .wizard-progress li {
    flex: 1 1 40%;
    padding: 8px;
  }
  .conf-mode span {
    width: 100%;
  }
}
/* --- 2026-09-17 紧凑化改造（qwen 提案，PC 端拍板落地；追加块自带移动端重申，层叠安全） --- */

/* --- 2026-09-17 UI v3：页面填满 + 四步流程图水平一行 + 表格密集化（owner 逐条需求，GLM 实现） --- */
/* 容器：8 个顶层块与站点 .wrap 同公式（1440 时内容 x=80 与站头精确对齐） */
.conf-header,
.conf-disclaimer,
#conf-message,
.conf-mode,
.wizard,
.conf-steps,
.conf-tools,
.conf-layout {
  width: min(var(--max), calc(100% - 96px));
  margin-inline: auto;
}
.conf-header {
  padding: 24px 0 14px;
}
.conf-disclaimer {
  margin-block: 0;
}
#conf-message {
  padding: 8px 0;
}
.conf-mode {
  margin-block: 8px 16px;
}
.wizard {
  margin-block: 0 24px;
}
.conf-steps {
  padding: 16px 0 0;
}
.conf-tools {
  padding: 6px 0 14px;
}
@media (max-width: 1100px) {
  .conf-header,
  .conf-disclaimer,
  #conf-message,
  .conf-mode,
  .wizard,
  .conf-steps,
  .conf-tools,
  .conf-layout {
    width: calc(100% - 56px);
  }
}
/* 向导：占满容器；四步流程图水平一行（带箭头，当前步高亮） */
.wizard {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  display: block;
  padding: 16px 24px 18px;
}
.wizard h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
.wizard-lead {
  margin: 0 0 12px;
}
.wizard-meta {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0;
}
.wizard-flow {
  display: flex;
  align-items: stretch;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.wizard-flow li {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 8px;
  background: #f3f5ef;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  color: var(--muted);
  min-height: 42px;
}
.wizard-flow li b {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 11px;
  flex: none;
}
.wizard-flow li.now {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
  font-weight: 600;
}
.wizard-flow li.now b {
  background: transparent;
  color: #fff;
  border-color: #fff8;
}
.wizard-flow li.done {
  background: #eef4e8;
  border-color: #cfdcc2;
  color: var(--forest);
}
.wizard-flow li.done b {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}
.wizard-flow .sep {
  flex: 0 0 16px;
  align-self: center;
  background: none;
  border: 0;
  color: var(--muted);
  padding: 0;
  min-height: 0;
  font-size: 15px;
}
/* 需求核对横条（第三/四步） */
.rail-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.rail-strip .chip {
  font-size: 12px;
  background: #eef4e8;
  border: 1px solid #cfdcc2;
  border-radius: 14px;
  padding: 4px 12px;
  color: var(--forest);
}
.rail-strip .chip.miss {
  background: #fdf0ec;
  border-color: #e5b8a8;
  color: #9b3514;
}
/* 推荐清单/写入表格：密集单行 + 行操作 */
.rec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin: 10px 0 4px;
}
.rec-table th {
  background: #eef1e9;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.rec-table th,
.rec-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}
.rec-table td:first-child {
  color: var(--muted);
}
.rec-table select {
  width: 100%;
  min-height: 34px;
  padding: 4px 26px 4px 8px;
  font-size: 12.5px;
}
.rec-table button {
  min-height: 30px;
  padding: 3px 9px;
  font-size: 12px;
}
.row-ops {
  display: flex;
  gap: 5px;
}
.row-ops button {
  padding: 3px 8px;
}
#wizard-regenerate {
  margin-top: 10px;
}
.cell-input {
  width: 100%;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid #b9c5bc;
  border-radius: 3px;
  font: inherit;
  font-size: 12.5px;
  background: #fff;
  min-width: 90px;
}
/* 协议卡片一行填满（8 卡） */
.proto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.proto-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  text-align: center;
  padding: 12px 6px;
  border: 1px solid #b9c5bc;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  min-height: 60px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
}
.proto-card small {
  font-size: 10.5px;
  color: var(--muted);
}
.proto-card:hover {
  border-color: var(--forest);
  background: #f4f8f0;
}
.proto-card.picked,
.proto-card[aria-checked="true"] {
  border-color: var(--forest);
  box-shadow: inset 0 0 0 2px var(--forest);
  background: #eef4e8;
}
.proto-card.picked small,
.proto-card[aria-checked="true"] small {
  color: var(--forest);
}
/* 第二步输入一行填满（6 项） */
.wizard-inputs {
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 10px;
}
.wizard-inputs .wizard-field {
  font-size: 13px;
  gap: 5px;
}
/* BOM：满宽 8 列，紧凑且列宽收敛 */
.conf-bom th {
  background: #eef1e9;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.conf-bom th:first-child,
.conf-bom td:first-child {
  width: 1%;
}
.conf-bom td:nth-child(2),
.conf-bom th:nth-child(2) {
  white-space: nowrap;
}
.conf-bom th:nth-child(5),
.conf-bom td:nth-child(5),
.conf-bom th:nth-child(8),
.conf-bom td:nth-child(8),
.conf-bom th:nth-child(9),
.conf-bom td:nth-child(9) {
  text-align: right;
}
.conf-bom td:nth-child(5) {
  font-weight: 600;
}
#bom-body tr:nth-child(even) {
  background: #f6f8f3;
}
/* 垂直节奏与无障碍 */
.conf-header h1 {
  font-size: 26px;
}
.conf-header .eyebrow {
  margin-bottom: 10px;
}
.conf-layout {
  margin-bottom: 24px;
  min-height: 560px;
}
.rail-scroll :focus-visible,
.table-scroll :focus-visible,
#library-list :focus-visible {
  outline-offset: 2px;
}
#library-list {
  padding: 5px 6px 5px 0;
}
/* 完成条（写入成功后） */
.wizard-done {
  margin-top: 14px;
  padding: 12px 14px;
  background: #eef4ea;
  border: 1px solid #cfdcc2;
  border-left: 4px solid var(--forest);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.wizard-done p {
  margin: 0;
  flex: 1 1 320px;
}
.wizard-actions {
  margin-top: 12px;
}
@media (max-width: 1100px) {
  .wizard-flow li span {
    display: none;
  }
  .wizard-flow li {
    justify-content: center;
  }
}
@media (max-width: 820px) {
  .conf-header,
  .conf-disclaimer,
  #conf-message,
  .conf-mode,
  .wizard,
  .conf-steps,
  .conf-tools,
  .conf-layout {
    width: auto;
  }
  .conf-header {
    padding: 24px 18px 15px;
  }
  .conf-disclaimer {
    margin: 0 18px;
  }
  .conf-tools {
    padding: 5px 18px 18px;
  }
  .conf-steps {
    padding: 14px 18px 0;
  }
  .conf-mode {
    margin: 8px 18px 16px;
  }
  .wizard {
    margin: 0 18px 20px;
    padding: 14px;
  }
  #conf-message {
    padding: 8px 18px;
  }
  .conf-layout {
    margin-bottom: 0;
  }
  .wizard h2 {
    font-size: 18px;
  }
  .wizard-flow {
    flex-wrap: wrap;
  }
  .wizard-flow .sep {
    display: none;
  }
  .wizard-flow li {
    flex: 1 1 40%;
    min-height: 40px;
    padding: 8px 6px;
    font-size: 12px;
  }
  .wizard-flow li span {
    display: inline;
  }
  .proto-grid {
    grid-template-columns: 1fr 1fr;
  }
  .wizard-inputs {
    grid-template-columns: 1fr 1fr;
  }
  .rail-strip .chip {
    font-size: 11px;
    padding: 4px 9px;
  }
  .rec-table th,
  .rec-table td {
    padding: 5px 7px;
    font-size: 12px;
  }
  .conf-bom th,
  .conf-bom td {
    padding: 6px 8px;
  }
  .conf-layout button,
  .conf-tools button,
  .file-button,
  .step-chip,
  .conf-layout input,
  .conf-tools input,
  .conf-layout select {
    min-height: 44px;
  }
  .guide-dialog button {
    min-height: 44px;
  }
  .lib-item button {
    min-height: 44px;
    width: 44px;
  }
  .lib-item {
    grid-template-columns: 30px 1fr 44px;
  }
}
/* BOM 汇总行（汇总总价/税率/税金） */
.conf-bom tfoot td {
  padding: 8px 10px;
  border-top: 2px solid var(--line);
  background: #fafbf7;
  white-space: nowrap;
}
.conf-bom tfoot tr:first-child td {
  color: var(--ink);
}
.conf-bom tfoot tr:last-child td {
  color: var(--muted);
}
.conf-bom tfoot td:first-child {
  text-align: right;
}
#bom-tax-rate {
  width: 58px;
  min-height: 28px;
  padding: 2px 6px;
  font-size: 12px;
  border: 1px solid #b9c5bc;
  border-radius: 3px;
  background: #fff;
  text-align: center;
}
/* BOM 一键下单按钮 */
.panel-heading > div {
  display: flex;
  gap: 10px;
  align-items: center;
}
#order-bom {
  min-height: 48px;
  padding: 0 24px;
  font-size: 15px;
}
/* BOM GSD 列与汇总下载区（同文件仅需下载一次） */
.gsd-box {
  margin-top: 14px;
  padding: 12px 14px;
  background: #f7faf5;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.gsd-box:empty {
  display: none;
}
.gsd-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.gsd-item:last-child {
  border-bottom: 0;
}
.gsd-item small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.gsd-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.gsd-dl {
  background: var(--forest);
  color: #fff;
  border-radius: 4px;
  padding: 6px 14px;
  text-decoration: none;
  font-size: 12px;
}
.gsd-pending {
  color: #9b3514;
  font-size: 11px;
  background: #fdf0ec;
  border-radius: 10px;
  padding: 2px 8px;
}
.gsd-name {
  font-size: 12px;
  font-weight: 600;
}
.gsd-none {
  color: var(--muted);
  font-size: 12px;
}
#bom-body .gsd-name,
#bom-body .gsd-none,
#bom-body .gsd-pending {
  white-space: nowrap;
}
/* 一键下单：BOM 表下方大按钮（更醒目） */
.bom-order-bar {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.bom-order-bar .accent {
  width: auto;
  margin-left: auto;
  min-height: 48px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 8px;
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 6px 16px #d8451026;
}
.bom-order-bar .accent:hover {
  background: #fff;
  border-color: var(--orange);
  color: var(--orange);
}
.bom-order-bar .accent:active {
  transform: translateY(1px);
}
.bom-order-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
/* 网关适配器（PN2002）：同高、按自身比例更宽，与模块体紧贴 */
.hardware-card.coupler {
  width: calc(108.41px * var(--zoom));
  margin-right: 0;
}
