/* 产线在上、模块在下；保留官网品牌字体与色彩。 */
.line-builder-page { background: #f7f8fa; }
.line-builder-main { max-width: 1680px; margin: auto; padding: 42px var(--page-gutter) 72px; }
.lb-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.lb-eyebrow { font-size: 11px; letter-spacing: .17em; color: var(--blue); font-weight: 600; margin: 0 0 10px; }
.lb-heading h1 { font-size: clamp(28px,3vw,44px); line-height: 1.15; letter-spacing: -.035em; margin: 0; }
.lb-heading-actions { display: flex; align-items: center; gap: 12px; }
.line-builder-main button,.lb-menu summary { cursor: pointer; }
.lb-contact { border: 0; border-radius: 4px; background: var(--blue); color: white; padding: 14px 22px; min-height: 48px; display: flex; gap: 20px; align-items: center; }
.lb-menu { position: relative; }
.lb-menu summary { list-style: none; display: flex; gap: 18px; align-items: center; padding: 12px 18px; border: 1px solid var(--line); border-radius: 4px; min-height: 48px; background: white; }
.lb-menu summary::-webkit-details-marker { display: none; }
.lb-menu summary span { font-size: 22px; line-height: 1; }
.lb-menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: 240px; z-index: 20; padding: 8px; background: white; border: 1px solid var(--line); box-shadow: 0 14px 50px #14223516; border-radius: 8px; }
.lb-menu-panel button { display: block; width: 100%; border: 0; background: none; text-align: start; padding: 12px; min-height: 44px; border-radius: 4px; }
.lb-menu-panel button:hover { background: #f0f4ff; color: var(--blue); }
.lb-menu-panel button:disabled { opacity: .35; cursor: default; }
.lb-menu-panel hr { border: 0; border-top: 1px solid var(--line); margin: 6px; }
.lb-danger { color: #b53925; }
.lb-workbench { position: relative; background: #fff; border: 1px solid #e1e6ed; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 34px #14223504; }
.lb-workbench-top { display: flex; justify-content: space-between; gap: 12px; padding: 16px 24px; font-size: 12px; color: var(--muted); border-bottom: 1px solid #edf0f4; min-height: 52px; }
#lb-stage-status { color: var(--ink); }
.lb-breadcrumb { border: 0; background: none; color: #738199; padding: 4px 2px; font-size: inherit; min-height: 28px; }
.lb-breadcrumb.is-active { color: var(--blue); }
#lb-stage-status { display: flex; align-items: center; gap: 12px; }
#lb-stage-status > span { color: #cbd3df; }
#lb-save-status { align-self: center; white-space: nowrap; }
.lb-viewport { height: 342px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #b8c6df transparent; position: relative; background: linear-gradient(#fff 50%,#f3f5f8 100%); cursor: grab; touch-action: pan-x pan-y; }
.lb-viewport.is-panning { cursor: grabbing; }
.lb-viewport[data-view-mode="auto"] { overflow-x: hidden; cursor: default; }
.lb-viewport[data-view-mode="auto"].is-dragging-line { overflow-x: auto; }
#lb-spacer { min-width: 100%; position: relative; height: 330px; }
.lb-line { display: flex; align-items: stretch; justify-content:center; gap: 34px; position: absolute; inset: 0 auto auto 0; min-width: 100%; width: max-content; padding: 12px 26px 18px; transform-origin: top left; }
.lb-zone { position: relative; min-width: 218px; border-radius: 8px; padding: 0 8px 14px; border: 1px solid transparent; transition: background .22s, border-color .22s; }
.lb-zone.is-active { background: linear-gradient(#f4f7ff88, #f9fbff20); border-color: #d4def2; }
.lb-zone:not(:last-child)::after { content: '→'; position: absolute; right: -29px; top: 169px; color: #90a4c8; font-size: 24px; }
.lb-zone-title { border: 0; background: none; color: #647287; padding: 12px 8px; display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 44px; width: 100%; text-align: start; }
.lb-zone-title small { font-size: 10px; letter-spacing: .08em; color: #8793a5; }
.is-active > .lb-zone-title { color: var(--blue); }
.lb-zone-content { display: flex; align-items: center; position: relative; min-height: 232px; }
.lb-station { position: relative; width: 196px; flex: 0 0 196px; border-radius: 7px; transition: background .2s, box-shadow .2s; }
.lb-station.is-selected { background: #ffffff9c; box-shadow: 0 0 0 1px #b3c7f1; }
.lb-station-main { border: none; background: none; display: flex; flex-direction: column; align-items: center; width: 100%; padding: 8px 4px; color: var(--ink); }
.lb-station-image { display: block; position: relative; width: 184px; height: 170px; }
.lb-station-image::after { content: ''; position: absolute; bottom: -2px; width: 90%; left: 5%; height: 10px; border-bottom: 1px solid #bac9e080; border-radius: 50%; pointer-events: none; }
.lb-station-main b { font-size: 18px; line-height: 1.35; margin: 5px 0 2px; font-weight: 500; }
.lb-station-main small { display: block; color: var(--muted); font-size: 11px; line-height: 1.45; min-height: 16px; }
.lb-sequence { position: absolute; top: 8px; left: 9px; font-size: 10px; color: var(--muted); pointer-events: none; z-index: 2; }
.lb-drag-handle { position: absolute; right: 3px; top: 2px; border: none; background: transparent; color: #8b99ae; width: 44px; height: 44px; display: grid; place-items: center; cursor: grab !important; touch-action: none; opacity: .4; }
.lb-drag-handle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.lb-station:is(:hover,:focus-within,.is-selected) .lb-drag-handle { opacity: 1; }
.lb-empty { border: 1px dashed #c9d4e5; border-radius: 8px; background: #ffffff60; width: 196px; min-height: 214px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; color: #73849c; padding: 18px; }
.lb-empty svg { width: 32px; height: 32px; stroke: #98aaca; stroke-width: 1; fill: none; }
.lb-empty span { font-size: 13px; }
.lb-zone.is-active .lb-empty { border-color: #9eb6e6; color: var(--blue); }
.lb-join { width: 34px; flex: 0 0 34px; height: 210px; position: relative; display: grid; place-items: center; color: #7d94b9; }
.lb-join::before { content: ''; height: 1px; width: 100%; background: #c2cfe3; position: absolute; top: 84px; }
.lb-join::after { content: ''; position: absolute; top: 81px; right: 2px; width: 6px; height: 6px; border-top: 1px solid #9aacc9; border-right: 1px solid #9aacc9; transform: rotate(45deg); }
.lb-zone.is-drop-target { outline: 2px solid var(--orange); outline-offset: -2px; }
.lb-drop-marker { width: 70px; flex: 0 0 70px; height: 206px; background: #fff4ec; border: 1px dashed var(--orange); border-radius: 6px; margin: 0 8px; display: grid; place-items: center; color: var(--orange); font-size: 24px; animation: lb-arrive .18s ease-out; }
.lb-dragging { opacity: .22; }
.lb-ghost { position: fixed; z-index: 100; width: 160px; padding: 10px; border: 1px solid #aac0eb; background: #ffffffed; box-shadow: 0 15px 40px #14223528; pointer-events: none; border-radius: 8px; text-align: center; transform: rotate(-2deg); }
.lb-ghost .equipment-visual { height: 110px; }
.lb-ghost strong { display: block; font-size: 15px; margin-top: 4px; }
/* 发牌采用真实设备图，轻微倾转与弧线共同形成悬浮感。 */
.lb-deal-card { position:fixed; left:0; top:0; z-index:105; display:flex; flex-direction:column; align-items:center; padding:12px 10px 14px; box-sizing:border-box; border:1px solid #b5c9ed; border-radius:10px; background:linear-gradient(145deg,#fff 15%,#f3f7ff 100%); box-shadow:0 calc(12px + var(--deal-lift,0)*16px) calc(26px + var(--deal-lift,0)*16px) #14387525,0 2px 7px #203f7710; pointer-events:none; transform-origin:center; will-change:transform; overflow:hidden; }
.lb-deal-picture { width:100%; flex:1; min-height:0; display:flex; align-items:center; justify-content:center; }
.lb-deal-picture .equipment-visual { width:100%; height:100%; }
.lb-deal-card > b { margin-top:8px; font-size:18px; line-height:1.4; font-weight:500; color:var(--blue); }
.lb-deal-pending { background:#f0f5ff88 !important; box-shadow:inset 0 0 0 1px #cfddf5 !important; }
.lb-deal-pending > * { visibility:hidden; }
.lb-station.is-deal-landing::before { content:''; position:absolute; inset:-3px; pointer-events:none; border:1px solid #6d95ec; border-radius:10px; animation:lb-deal-ring .7s ease-out both; }
@keyframes lb-deal-ring { 0% { opacity:.7; box-shadow:0 0 0 0 #7ca4ff24; } 100% { opacity:0; box-shadow:0 0 0 12px #7ca4ff00; } }
.lb-workbench-bottom { min-height: 59px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid #edf0f4; padding: 6px 16px; }
.lb-selection-tools { display: flex; align-items: center; gap: 4px; min-width: 0; }
.lb-selection-tools:empty::before { content: attr(data-empty); font-size: 12px; color: var(--muted); }
.lb-selection-tools button,.lb-view-tools button,.lb-selection-tools a { border: none; background: transparent; display: inline-flex; align-items: center; justify-content: center; min-width: 42px; min-height: 44px; padding: 8px; color: var(--muted); border-radius: 4px; font-size: 12px; }
.lb-selection-tools svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.lb-selection-tools button:hover,.lb-view-tools button:hover,.lb-selection-tools a:hover { background: #eef3fc; color: var(--blue); }
.lb-selection-tools button:disabled { opacity: .25; cursor: default; }
.lb-view-tools { display: flex; align-items: center; flex-shrink: 0; }
.lb-view-tools button:first-child,.lb-view-tools button:last-child { font-size: 22px; }
.lb-library { margin-top: 30px; }
.lb-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.lb-library-heading h2 { font-size: 22px; line-height: 1.35; margin: 0 0 6px; }
.lb-library-heading p:not(.lb-eyebrow) { font-size: 13px; margin: 0; color: var(--muted); }
#lb-library-count { font-size: 12px; color: var(--muted); }
.lb-candidates { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; }
.lb-candidate { min-width: 0; background: white; border: 1px solid #e2e7ef; border-radius: 8px; transition: border-color .2s, transform .2s, box-shadow .2s; overflow: hidden; }
.lb-candidate.is-used { border-color: #adc1ea; }
.lb-candidate > button { display: flex; flex-direction: column; width: 100%; border: 0; padding: 12px 14px 18px; text-align: start; background: none; color: var(--ink); position: relative; }
.lb-candidate:hover { border-color: #91ace0; box-shadow: 0 7px 22px #14223509; transform: translateY(-3px); }
.lb-candidate-image { height: 145px; width: 100%; display: block; margin-bottom: 12px; }
.lb-station-image .equipment-visual,.lb-candidate-image .equipment-visual { width: 100%; height: 100%; }
.lb-candidate strong { font-size: 18px; font-weight: 500; margin-bottom: 5px; }
.lb-candidate small { font-size: 12px; line-height: 1.5; color: var(--muted); }
.lb-candidate .lb-badge { position: absolute; top: 9px; right: 9px; font-size: 10px; color: var(--blue); background: #f2f6fd; padding: 3px 6px; border-radius: 3px; }
.lb-manual-visual { width: 100%; height: 100%; display: grid; place-items: center; color: #8697b0; }
.lb-manual-visual svg { width: 78px; height: 78px; stroke: currentColor; fill: none; stroke-width: 1.2; }
.lb-notice { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%,12px); max-width: min(620px,90vw); padding: 12px 20px; color: #fff; background: #142235; border-radius: 6px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s,transform .2s; z-index: 120; }
.lb-notice.is-visible { opacity: 1; transform: translate(-50%,0); }
.lb-dialog { border: 1px solid var(--line); border-radius: 10px; padding: 28px; width: min(520px,90vw); color: var(--ink); }
.lb-dialog::backdrop { background: #10223d50; backdrop-filter: blur(3px); }
.lb-dialog h2 { font-size: 24px; margin: 0 0 12px; }
.lb-dialog p { font-size: 14px; color: var(--muted); }
.lb-dialog button { min-height: 44px; padding: 10px 18px; background: #f2f5fa; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; margin-right: 8px; }
.lb-dialog input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 4px; padding: 10px; }
@keyframes lb-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes lb-connect { from { transform: scaleX(0); background: var(--orange); } to { transform: scaleX(1); background: #c2cfe3; } }
.lb-line.is-updated .lb-join::before { animation: lb-connect .5s ease-out; transform-origin: left; }
.line-builder-main :focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (max-width: 1000px) { .lb-candidates { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 700px) {
  .line-builder-main { padding: 25px 16px 48px; }
  .lb-heading { align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
  .lb-heading h1 { font-size: 28px; }
  .lb-heading-actions { width: 100%; justify-content: space-between; gap:8px; }
  .lb-heading-actions .lb-contact { flex:1; justify-content:center; gap:8px; font-size:14px; padding:12px; }
  .lb-heading-actions .lb-menu summary { font-size:13px; gap:8px; padding:10px; white-space:nowrap; }
  .lb-heading .lb-eyebrow { font-size: 10px; }
  .lb-heading-actions .lb-menu { order: 1; }
  .lb-menu-panel { right: 0; }
  .lb-workbench-top { padding: 10px 12px; font-size: 11px; min-height: 43px; }
  #lb-stage-status { gap: 5px; flex-wrap: wrap; }
  #lb-save-status { font-size: 9px; }
  .lb-viewport { height: 286px; }
  .lb-drag-handle { width:56px; height:56px; right:0; top:0; opacity:.75; }
  .lb-workbench-bottom { flex-wrap: wrap; padding: 4px 8px; }
  .lb-selection-tools { flex: 1; }
  .lb-selection-tools:empty::before { font-size: 10px; }
  .lb-view-tools { margin-left: auto; }
  .lb-view-tools button { min-width: 36px; padding: 6px; }
  .lb-library { margin-top: 24px; }
  .lb-library-heading h2 { font-size: 20px; }
  .lb-library-heading p:not(.lb-eyebrow) { font-size: 12px; }
  #lb-library-count { display: none; }
  .lb-candidates { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .lb-candidate > button { padding: 12px; min-height: 218px; }
  .lb-candidate-image { height: 125px; margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .line-builder-main *,.lb-ghost { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
