/* 단계 흐름 화면 (Target Design, Assay Design). 시각 기준은 targetDesign.png · assayDesign.png,
   수치의 출발점은 targetDesignUI.md 5절 · assayDesignUI.md 5절이다. 두 화면은 색 토큰을 함께 쓰고
   (같은 상태는 같은 색), 탭 수와 크기만 다르다. 모든 규칙은 .stage-flow 아래에 한정한다. */
.dialog.stage-dialog { padding: 0; border: 0; background: transparent; }
.dialog.stage-dialog.active { display: block; overflow: auto; overscroll-behavior-y: contain; }

.stage-flow {
  /* 바탕은 시안의 바탕색이다. 탭 그림의 반투명한 그림자가 이 위에 얹힌다. */
  --sf-bg-top: #e9dcf7;
  --sf-bg-bottom: #dfd0ee;
  --sf-ink: #482355;
  --sf-title: #7020b5;
  --sf-focus: #4e176f;
  min-height: 100%;
  padding: 20px 24px 24px;
  border-radius: 6px;
  color: var(--sf-ink);
  background: linear-gradient(170deg, var(--sf-bg-top), var(--sf-bg-bottom));
  font-family: system-ui, 'Segoe UI', 'Malgun Gothic', sans-serif;
}
.stage-flow > h1 {
  margin: 0 0 4px;
  padding: 0 16px 14px;
  border-bottom: 2px solid #8b60a7;
  color: var(--sf-title);
  font-size: clamp(24px, 2.4vw, 40px);
  font-weight: 750;
  line-height: 1.15;
}

/* ---- 탭 행과 진행선: 좁은 화면에서는 이 둘만 가로로 스크롤한다 */
.stage-flow .sf-workflow-scroll { overflow-x: auto; padding: 0 4px 6px; }
.stage-flow .sf-tabs { display: grid; grid-template-columns: repeat(var(--sf-count, 5), minmax(0, 1fr)); }
.stage-flow.assay-design .sf-tabs { --sf-count: 3; max-width: 1620px; margin-inline: auto; }
.stage-flow.assay-design .sf-rail { max-width: 1620px; margin-inline: auto; }

/* 탭 한 칸. 겉모습은 시안에서 떼어 낸 그림이고(stage-art.css가 상태별 그림과 자리를 정한다),
   칸의 비율이 그림의 비율이라 어느 너비에서도 시안과 같은 모양이다. 높이(Ready > Completed > Locked)는
   그림 안에 있다: 판의 두께와 얼굴이 솟은 정도가 상태마다 다르다. */
.stage-flow .sf-tab {
  position: relative; display: block; min-width: 0; padding: 0;
  aspect-ratio: var(--cell-ratio);
  border: 0; background: none; font: inherit; cursor: pointer;
  container-type: inline-size;
  -webkit-tap-highlight-color: transparent;
}
.stage-flow .sf-art {
  position: absolute; inset: 0;
  background: var(--art) center / 100% 100% no-repeat;
  transition: filter 140ms ease, transform 140ms ease;
}
/* 번호, 아이콘+이름: 모양(알파)은 시안의 것이고 색과 그림자는 상태에 맞춰 여기서 입힌다.
   그림자는 바깥 요소에 건다(마스크가 그림자를 잘라 내지 않게). */
.stage-flow .sf-glyph { position: absolute; pointer-events: none; transition: transform 140ms ease; }
.stage-flow .sf-glyph > i { position: absolute; inset: 0; background: var(--glyph); }
.stage-flow .sf-digits { left: var(--digits-x); top: var(--digits-y); width: var(--digits-w); height: var(--digits-h); }
.stage-flow .sf-digits > i { -webkit-mask: var(--digits) center / 100% 100% no-repeat; mask: var(--digits) center / 100% 100% no-repeat; }
.stage-flow .sf-content { left: var(--content-x); top: var(--content-y); width: var(--content-w); height: var(--content-h); }
.stage-flow .sf-content > i { -webkit-mask: var(--content) center / 100% 100% no-repeat; mask: var(--content) center / 100% 100% no-repeat; }
.stage-flow .sf-tab[data-state='completed'], .stage-flow .sf-tab[data-state='ready'] {
  --glyph: linear-gradient(165deg, #ffffff, #f3eafc 70%, #e6d8f6);
}
.stage-flow .sf-tab[data-state='completed'] .sf-glyph { filter: drop-shadow(0.5cqw 0.9cqw 0.5cqw #3f235c80) drop-shadow(0 0 0.3cqw #3f235c40); }
.stage-flow .sf-tab[data-state='ready'] .sf-glyph { filter: drop-shadow(0.5cqw 0.9cqw 0.5cqw #2d157080) drop-shadow(0 0 0.3cqw #2d157040); }
.stage-flow .sf-tab[data-state='locked'] { --glyph: linear-gradient(165deg, #a691b6, #7b6889); }
.stage-flow .sf-tab[data-state='locked'] .sf-glyph { filter: drop-shadow(-0.12cqw -0.12cqw 0 #ffffffa6) drop-shadow(0.3cqw 0.5cqw 0.4cqw #4a2f6352); }
.stage-flow .sf-tab[data-state='locked'] .sf-digits > i { background: #2b1245; }
.stage-flow .sf-tab[data-state='locked'] .sf-digits { filter: drop-shadow(0 1px 0 #ffffffb3); }
/* 선택: 얼굴 가장자리의 얇고 진한 선. 완료·잠금 여부와는 별개다. */
.stage-flow .sf-ring {
  position: absolute; left: var(--face-x); top: var(--face-y); width: var(--face-w); height: var(--face-h);
  border-radius: 12.5cqw; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 2px var(--sf-focus);
  transition: opacity 140ms ease;
}
.stage-flow.assay-design .sf-ring { border-radius: 10.5cqw; }
.stage-flow .sf-tab[aria-selected='true'] .sf-ring { opacity: 1; }
.stage-flow .sf-tab:focus-visible { outline: none; }
.stage-flow .sf-tab:focus-visible .sf-ring { opacity: 1; box-shadow: 0 0 0 4px var(--sf-focus), 0 0 0 7px #ffffffcc; }
.stage-flow .sf-tab:not([aria-disabled='true']):hover .sf-art { filter: brightness(1.05) saturate(1.05); }
.stage-flow .sf-tab:not([aria-disabled='true']):active .sf-art,
.stage-flow .sf-tab:not([aria-disabled='true']):active .sf-glyph { transform: translateY(0.5cqw); }
.stage-flow .sf-tab[aria-disabled='true'] { cursor: not-allowed; }
/* 읽는 글자. 화면에서는 그림이 대신하므로 가린다. */
.stage-flow .sf-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stage-flow .sf-label { white-space: nowrap; }
/* 단계 사이의 화살표: 칸의 경계, 얼굴 높이의 가운데. 시안처럼 밝고 도톰하다. */
.stage-flow .sf-tab:not(:last-child)::after {
  content: ''; position: absolute; top: 47%; right: -0.45em; z-index: 1;
  font-size: clamp(11px, 1.05vw, 17px);
  width: 0.9em; height: 0.9em; pointer-events: none;
  border-top: 0.42em solid #f7f1fc; border-right: 0.42em solid #f7f1fc; border-radius: 0.14em;
  transform: translateY(-50%) rotate(45deg);
  filter: drop-shadow(1px 2px 1px #5d417a8c) drop-shadow(0 0 1px #5d417a59);
}
.stage-flow .sf-rail { margin-top: 0; height: 48px; }
.stage-flow .sf-rail svg { display: block; width: 100%; height: 48px; overflow: visible; }
/* 홈: 어두운 바깥 선 위에 밝은 안쪽 선을 얹어 파인 자리처럼 보이게 한다. */
.stage-flow .sf-rail-track { stroke: #b9a6c9; stroke-width: 17; stroke-linecap: round; }
.stage-flow .sf-rail-groove { stroke: #efe6f6; stroke-width: 12; stroke-linecap: round; }
.stage-flow .sf-rail-segment { stroke-width: 12; stroke-linecap: round; stroke: transparent; }
.stage-flow .sf-rail-segment[data-state='completed'] { stroke: #a57ad0; }
.stage-flow .sf-rail-segment[data-state='ready'] { stroke: #9a63f0; }
.stage-flow .sf-rail-marker { stroke: #fbf7fd; stroke-width: 3; filter: drop-shadow(1px 3px 3px #2c143f66); }

/* ---- 작업 영역 */
.stage-flow .sf-work-status { margin: 6px 12px 0; min-height: 1.3em; color: var(--sf-ink); }
.stage-flow .sf-work-status.failed { color: #8b1d13; }
.stage-flow .sf-workspace {
  margin-top: 12px; min-height: 240px; padding: 20px;
  border: 2px solid #ffffffb3; border-radius: 26px;
  background: linear-gradient(140deg, #f2e9f7, #e0d1eb);
  box-shadow: inset 0 1px 2px #fff, 3px 5px 5px #48235533;
  color: #16202c;
}
.stage-flow .sf-workspace:focus-visible { outline: 3px solid var(--sf-focus); outline-offset: 2px; }
.stage-flow .sf-workspace > * + * { margin-top: 12px; }
.stage-flow .sf-placeholder {
  display: grid; place-items: center; min-height: 200px;
  margin: 0; color: var(--sf-ink);
  font-size: clamp(22px, 2.2vw, 36px); font-weight: 650;
}
.stage-flow .sf-stage-note { margin: 0; color: var(--sf-ink); }
.stage-flow .sf-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding-top: 14px; border-top: 1px solid #c9b6d6;
}
.stage-flow .sf-confirm {
  padding: 8px 18px; border: 1px solid #4e176f; border-radius: 999px;
  background: #6a2c93; color: #fffaff; font: inherit; font-weight: 650; cursor: pointer;
}
.stage-flow .sf-confirm:hover:not(:disabled) { background: #7a36a8; }
.stage-flow .sf-confirm:disabled { border-color: #b6a4c0; background: #d7c9e0; color: #655270; cursor: not-allowed; }
.stage-flow .sf-foot-note { color: var(--sf-ink); }
.stage-flow .sf-method-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.stage-flow .sf-method {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border: 1px solid #c9b6d6; border-radius: 14px; background: #ffffffa6;
}
.stage-flow .sf-method:has(input:checked) { border-color: #6a2c93; box-shadow: 0 0 0 2px #d8b7ee; }
.stage-flow .sf-method:has(input:disabled) { color: #6f6177; background: #ffffff59; }
.stage-flow .sf-method b { display: block; }
.stage-flow .sf-method small { display: block; margin-top: 2px; }
.stage-flow .sf-announcement {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
/* 작업 영역 안의 기존 블록은 흰 바탕 위에 둔다: 표와 입력 칸의 대비를 지킨다. */
.stage-flow .sf-workspace .procedure-scope {
  margin-top: 0; padding: 14px 16px; border: 1px solid #d9cbe3; border-radius: 16px; background: #ffffffe6;
}
.stage-flow .sf-workspace .procedure-scope .procedure-scope { padding: 0; border: 0; background: transparent; }
/* 아직 내용이 없는 자리는 보이지 않는다(빈 흰 상자가 생기지 않게). */
.stage-flow .sf-workspace .procedure-scope:empty,
.stage-flow .sf-workspace > div:empty,
.stage-flow .sf-workspace > div:has(> :only-child:empty) { display: none; }
.stage-flow .sf-workspace .procedure-form { margin: 0; }
/* 서열 직접 입력 갈래도 저장된 타깃 목록과 같은 상자에 담는다(Target 단계의 두 접이식이 같은 모양). */
.stage-flow .sf-workspace #procedure1FastaBlock { margin-top: 12px; padding: 8px 12px; border: 1px solid #d9cbe3; border-radius: 12px; background: #ffffffb3; }

/* ---- 후보 검토 (PR5_2_reviewLAMP.md): 고르는 데 쓰는 값만 한 줄에 */
.review-lamp .review-summary { margin: 0 0 10px; }
.review-lamp .review-unit + .review-unit { margin-top: 16px; }
.review-lamp h4 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 6px; font-size: 14px; }
.review-lamp h4 small { font-weight: 400; color: #64748b; }
.review-lamp .review-count { margin-left: auto; font-weight: 600; color: #482355; }
.review-table td, .review-table th { vertical-align: middle; }
.review-table small { color: #64748b; }
.review-table tr.review-alternate td { background: #faf7fc; color: #4b5563; }
.review-table tr.review-detail-row > td { background: #f6f1fa; padding: 10px 12px; }
.review-wet { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.review-wet-ready { background: #dcf5e6; color: #14603a; border: 1px solid #8fd3ab; }
.review-wet-check { background: #fdf0d5; color: #7a4b06; border: 1px solid #e8c37a; }
/* APR5 6.2절 후보 등급: 글자로 적고 색은 보조다 */
.rank-tier { display: inline-block; min-width: 1.6em; padding: 1px 6px; border-radius: 6px; font-weight: 700; text-align: center; }
.rank-tier-A { background: #dcf5e6; color: #14603a; border: 1px solid #8fd3ab; }
.rank-tier-B { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }
.rank-tier-C { background: #f3f4f6; color: #4b5563; border: 1px solid #d1d5db; }
.review-note { max-width: 340px; }
.review-note .procedure-chip { margin-left: 4px; }
.review-sequence { font-family: ui-monospace, 'DejaVu Sans Mono', monospace; overflow-wrap: anywhere; }
.review-reasons { margin: 6px 0 0; padding-left: 18px; color: #7a4b06; }
.review-tm { white-space: nowrap; font-variant-numeric: tabular-nums; }
.review-tm-outside { color: #b45309; font-weight: 600; }
.review-library { margin: 4px 0 0; padding: 8px 12px; border: 1px solid #d9cbe3; border-radius: 12px; background: #ffffffb3; }
.review-library > summary { cursor: pointer; font-weight: 600; }
.review-library table { margin-top: 8px; }
.stage-flow .sf-more { padding: 8px 12px; border: 1px solid #d9cbe3; border-radius: 12px; background: #ffffff80; }
.stage-flow .sf-more > summary { cursor: pointer; font-weight: 600; color: #482355; }
.stage-flow .sf-more > .procedure-scope { margin-top: 8px; }

@media (max-width: 1100px) {
  .stage-flow { padding: 14px; }
  .stage-flow.target-design .sf-workflow-inner { min-width: 900px; }
  .stage-flow.assay-design .sf-workflow-inner { min-width: 870px; }
  .stage-flow .sf-workspace { border-radius: 18px; padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-flow .sf-art, .stage-flow .sf-glyph, .stage-flow .sf-ring { transition: none; }
}
@media (forced-colors: active) {
  /* 그림을 쓸 수 없는 모드: 글자를 다시 보이고 탭을 테두리로 그린다. */
  .stage-flow .sf-art, .stage-flow .sf-glyph { display: none; }
  .stage-flow .sf-tab { border: 2px solid ButtonText; border-radius: 12px; }
  .stage-flow .sf-text { position: static; width: auto; height: auto; clip-path: none; display: grid; place-content: center; gap: 4px; height: 100%; }
  .stage-flow .sf-tab[aria-selected='true'] { outline: 3px solid Highlight; }
  .stage-flow .sf-workspace { border: 2px solid ButtonText; box-shadow: none; }
}

/* ------------------------------------------------------------ 설계 상세 창 (PR5_2 6.1절, design-detail.js) */
.review-note .procedure-chip.review-design { background: #482355; color: #fff; border-color: #482355; font-weight: 600; }
.review-note .procedure-chip.review-design:hover { background: #5d2f6d; }
#designDetailDialog { padding: 16px; }
#designDetailDialog[open] { display: flex; flex-direction: column; overflow: hidden; }
#designDetailDialog > .binding-toolbar { flex-shrink: 0; }
#designDetailDialog > .binding-toolbar > form { margin-left: auto; }
#designDetailOrder { background: #482355; color: #fff; border-color: #482355; font-weight: 700; padding-inline: 22px; }
#designDetailOrder:disabled { opacity: .5; }
.design-detail { flex: 1 1 0; min-height: 0; overflow: auto; padding-right: 6px; }
/* 설계 상세를 여는 동안의 진행 표시 (design-detail.js `loading`). */
.design-detail .dd-loading { max-width: 560px; margin: 28px auto; padding: 16px 18px; border: 1px solid #d9cbe3; border-radius: 12px; background: #fff; }
.design-detail .dd-loading p { margin: 0; }
.design-detail .dd-loading-step b { color: #482355; margin-right: 6px; }
.design-detail .dd-progress { display: block; width: 100%; height: 14px; margin: 10px 0 8px; accent-color: #482355; }
.design-detail .dd-loading-time { color: #64748b; font-size: 13px; }
.design-detail .dd-summary { margin: 0 0 8px; }
.design-detail .dd-section { margin-top: 14px; padding: 10px 14px 12px; border: 1px solid #d9cbe3; border-radius: 12px; background: #fff; }
.design-detail .dd-section h4 { margin: 0 0 8px; font-size: 14px; }
.design-detail .dd-section h4 small { font-weight: 400; color: #64748b; margin-left: 8px; }
.design-detail .dd-scroll { overflow-x: auto; }
.design-detail svg { display: block; width: 100%; height: auto; font-family: system-ui, 'Noto Sans KR', sans-serif; }
.design-detail .dd-map { min-width: 900px; }
.dd-small { font-size: 11px; fill: #475569; }
.dd-tiny { font-size: 9.5px; fill: #64748b; }
.dd-strong { font-weight: 700; fill: #1f2937; }
.dd-gene { fill: #e2e8f0; }
.dd-gene-amplicon { fill: #482355; }
.dd-zoom { stroke: #cbd5e1; stroke-width: 1; stroke-dasharray: 3 3; fill: none; }
.dd-strand { stroke: #334155; stroke-width: 2.5; }
.dd-strand.dd-anti { stroke: #94a3b8; }
.dd-tick { stroke: #cbd5e1; stroke-width: 1; }
.dd-oligo .dd-on { font-size: 11px; font-weight: 700; fill: #fff; }
.dd-oligo .dd-off { font-size: 11px; font-weight: 700; }
.dd-drop { stroke-width: 1; stroke-dasharray: 2 2; opacity: .55; }
.dd-tie { fill: none; stroke: #1f2937; stroke-width: 1.5; stroke-dasharray: 5 3; }
.dd-brace { fill: none; stroke: #482355; stroke-width: 1.5; }
.dd-base circle { stroke: none; }
.dd-base text { font: 700 8.5px ui-monospace, 'DejaVu Sans Mono', monospace; fill: #fff; }
.dd-base.dd-plain circle { fill: #e5e7eb; }
.dd-base.dd-plain text { fill: #374151; }
.dd-base.dd-rna circle { stroke: #dc2626; stroke-width: 2.5; }
.dd-pair { stroke: #94a3b8; stroke-width: 1; }
.dd-tag text { font-size: 11px; font-weight: 700; }
.dd-loop-name { font-size: 13px; font-weight: 700; fill: #482355; }
.dd-end { font-size: 11px; font-weight: 700; fill: #1f2937; }
.dd-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 12px; }
/* PR5 6.3절 축퇴 자리 분포: 변이 하나가 칩 하나. 굵은 테두리는 최소 혼합에 든 변이, 흐린 것은 레코드에 없는 변이. */
.dd-variant { display: inline-block; margin: 1px 2px; padding: 0 6px; border: 1px solid #cbd5e1; border-radius: 4px; font-family: Consolas, monospace; font-size: 12px; white-space: nowrap; }
.dd-variant-kept { border: 2px solid #0e7490; font-weight: 700; }
.dd-variant-absent { opacity: .45; }
.dd-variant-conc { background: #fde68a; }
.dd-sequence { font: 13px/1.35 ui-monospace, 'DejaVu Sans Mono', monospace; min-width: max-content; }
.dd-block + .dd-block { margin-top: 10px; }
.dd-line { display: grid; grid-template-columns: 6ch repeat(var(--dd-columns), 1.2ch) 3ch; align-items: center; }
.dd-line > i { font-style: normal; text-align: center; color: #1f2937; }
.dd-line.dd-antisense > i { color: #94a3b8; }
.dd-line > i.dd-bound { color: #fff; font-weight: 700; }
.dd-line > i.dd-variable { color: #dc2626; font-weight: 700; }
.dd-line > i.dd-bound.dd-variable { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; }
.dd-line > i.dd-rna-base { outline: 2px solid #dc2626; outline-offset: -1px; }
.dd-at, .dd-prime { color: #64748b; font-size: 11px; }
.dd-at { text-align: right; padding-right: 1ch; }
.dd-prime { padding-left: .5ch; }
.dd-names { min-height: 17px; }
.dd-name { font: 700 11px/15px system-ui, 'Noto Sans KR', sans-serif; white-space: nowrap; overflow: visible; }
.dd-names:first-child .dd-name { border-bottom: 2px solid; }
.dd-names:last-child .dd-name { border-top: 2px solid; text-align: right; }
.dd-variable-key { color: #dc2626; }
.design-detail tr.dd-control td { background: #faf7fc; }
.design-detail tr.dd-control .review-sequence { color: #475569; font-size: 12px; }

/* ---- Assay Design · Select (APR1_selectTarget.md): .target 고르기와 검출 항목 */
.assay-select .assay-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; }
.assay-select .assay-bar input[type=search] { width: 240px; max-width: 100%; }
.assay-select input[type=checkbox], .assay-pool input[type=checkbox] { width: auto; }
.assay-select label.assay-same, .assay-pool label.assay-alternates { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.assay-files tr.assay-off td { color: #7b7284; background: #f7f4f9; }
.assay-files tr.assay-picked td { background: #f3ecf8; }
.assay-files small.assay-why { color: #8b1d13; }
.assay-pool { margin-top: 14px; }
.stage-flow .sf-workspace .assay-pool.procedure-scope { margin-top: 14px; }
.assay-pool.assay-busy { opacity: .6; }
.assay-pool .assay-summary { margin: 0 0 8px; }
.assay-item { margin-top: 14px; padding: 12px 14px; border: 1px solid #d9cbe3; border-radius: 14px; background: #fbf8fd; }
.assay-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.assay-item-head .assay-field { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.assay-item-head .assay-field input[type=text] { width: 150px; }
.assay-item-head .assay-field-name input[type=text] { width: 300px; max-width: 60vw; }
.assay-item-head .assay-field input[type=number] { width: 64px; }
.assay-item-head .assay-field select { width: auto; }
.assay-item-head .review-count { margin-left: auto; font-weight: 600; color: #482355; }
.assay-item .assay-item-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 8px 0; }
.assay-item .assay-item-scope small { color: #64748b; }
.assay-candidates tr.assay-out td { color: #7b7284; }
.assay-candidates tr.assay-out .review-wet { opacity: .55; }
.assay-sites-ok { color: #14603a; }
.assay-sites-none { color: #8b1d13; font-weight: 600; }
.assay-candidates td.review-note { white-space: normal; min-width: 230px; max-width: 460px; }

/* ---- Assay Design · Cross Check (APR2_crossCheck.md): 검사에 넣을 후보, 조합의 순위, 쌍의 근거 */
.assay-check input[type=checkbox], .assay-check-result input[type=radio] { width: auto; }
.assay-check .check-item .assay-item-head { gap: 6px 14px; }
.assay-check .review-count.failed { color: #8b1d13; }
.assay-check .check-run { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0 0; }
.stage-flow .sf-workspace .assay-check-result.procedure-scope { margin-top: 14px; }
.assay-check-result.assay-busy { opacity: .6; }
.check-result.check-stale table { opacity: .55; }
.check-state { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.check-state-ready { background: #dcf5e6; color: #14603a; border: 1px solid #8fd3ab; }
.check-state-check { background: #fdf0d5; color: #7a4b06; border: 1px solid #e8c37a; }
.check-state-conflict { background: #fbe1de; color: #8b1d13; border: 1px solid #e3a59e; }
.check-state-incomplete { background: #e8e6ee; color: #4b4658; border: 1px solid #bcb6c9; }
.check-combos td, .check-combos th { vertical-align: middle; }
.check-combos td.check-members { white-space: normal; min-width: 260px; }
.check-combos .check-member { display: inline-block; margin: 1px 12px 1px 0; }
.check-combos .check-member small { color: #64748b; margin-right: 4px; }
.check-combos tr.check-picked td { background: #f3ecf8; }
.check-combos tr.check-blocked td { color: #7b7284; }
.check-detail .check-pair + .check-pair { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #d9cbe3; }
.check-detail p { margin: 0 0 4px; white-space: normal; }
.check-detail .check-alignment { margin: 2px 0 8px; padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid #e3d9ea;
  font-family: ui-monospace, 'DejaVu Sans Mono', monospace; font-size: 12px; line-height: 1.25; overflow-x: auto; white-space: pre; }
.check-detail .check-hits { margin: 4px 0 0; padding-left: 18px; white-space: normal; }

/* ---- Assay Design · Deploy (APR3_deployTube.md): .tube 고르기, 형광, 구성 */
.assay-check-result .check-tube-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; font-weight: 600; }
.assay-check-result .check-tube-name input { width: 320px; max-width: 60vw; }
.assay-check-result .check-tube-name small { font-weight: 400; color: #64748b; }
.assay-deploy input[type=checkbox] { width: auto; }
.assay-deploy .assay-bar, .assay-deploy-composition .assay-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; }
.assay-deploy .assay-bar small, .assay-deploy-composition .assay-bar small { color: #64748b; }
.stage-flow .sf-workspace .assay-deploy-composition.procedure-scope { margin-top: 14px; }
.assay-deploy-composition.assay-busy { opacity: .6; }
.assay-deploy-composition h4 { margin: 16px 0 6px; font-size: 14px; }
.assay-deploy-composition h4 small { font-weight: 400; color: #64748b; margin-left: 8px; }
.assay-deploy-composition .assay-field { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.assay-deploy-composition .assay-field input[type=text] { width: 320px; max-width: 60vw; }
.deploy-readouts select { width: auto; min-width: 150px; }
.deploy-dye { display: inline-block; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--dye, #64748b); color: var(--dye, #334155);
  background: #fff; font-weight: 700; white-space: nowrap; }
.deploy-dye-none { border-style: dashed; color: #8b1d13; border-color: #8b1d13; }
.deploy-tube .assay-item-head { gap: 6px 14px; }
.deploy-sets td, .deploy-tubes td { vertical-align: middle; }
.deploy-tubes td small, .deploy-sets td small { color: #64748b; }
.deploy-verification th { white-space: normal; }

/* ---- 작업 폴더 (이 PC): 두 화면의 1단계에서 고르고, 저장한 파일의 사본이 거기에도 쓰인다 (work-folder.js, work-copy.js) */
.stage-flow .sf-workspace > .work-folder-stage { margin: 0 0 12px; padding: 10px 14px; border: 1px solid #d9cbe3; border-radius: 14px; background: #ffffffe6; }
.stage-flow .sf-workspace > .work-folder-stage:has(> [data-work-folder]:empty) { display: none; }
.work-folder-stage .work-copy-about { margin: 6px 0 0; color: #64748b; font-size: 12px; }
.work-folder-stage .work-copy-about:empty { display: none; }
.stage-flow .sf-foot .work-copy { color: #14603a; }
.stage-flow .sf-foot .work-copy.failed { color: #8b1d13; }
.stage-flow .sf-foot .work-copy:empty { display: none; }
.work-folder-stage .work-folder-field { white-space: nowrap; }
