.replication-workbench {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
}

.replication-scene-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 10px;
  border-right: 1px solid #dce9e8;
  background:
    radial-gradient(circle at 45% 48%, rgba(83, 183, 157, 0.09), transparent 44%),
    linear-gradient(180deg, #fff, #f7fbfb);
}

.replication-scene {
  width: 100%;
  height: 100%;
  min-height: 440px;
  display: block;
  border: 1px solid rgba(174, 205, 204, 0.75);
  border-radius: 20px;
  background: #fbfefe;
  box-shadow: inset 0 0 60px rgba(74, 146, 132, 0.06);
}

.replication-info {
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
  background: rgba(248, 252, 251, 0.94);
}

.stage-status {
  padding: 13px;
  border: 1px solid #d8e7e4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 80, 74, 0.07);
}

.stage-status-kicker {
  margin: 0 0 6px;
  color: #3c8f79;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.stage-status h2 { margin: 0; color: #17384a; font-size: 22px; line-height: 1.2; }
.stage-status h2 small { display: block; margin-top: 4px; color: #70838d; font-size: 13px; font-weight: 650; }
.stage-status p { margin: 10px 0 0; color: #5e727d; font-size: 14px; line-height: 1.65; }

.direction-rule {
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  color: #205b51;
  background: linear-gradient(135deg, #eaf8f3, #f8fcfa);
  font-size: 13px;
  line-height: 1.55;
}

.direction-rule strong { display: block; margin-bottom: 3px; font-size: 15px; }
.direction-rule .direction-main { color: #e0526a; font-size: 18px; font-weight: 900; letter-spacing: 0.04em; }

.enzyme-panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 15px 2px 8px;
}

.enzyme-panel-title strong { font-size: 15px; }
.enzyme-panel-title span { color: #809099; font-size: 12px; }
.enzyme-buttons { display: grid; gap: 7px; }

.enzyme-button {
  --enzyme-color: #31816e;
  width: 100%;
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 8px 9px;
  border: 1px solid #d9e5e7;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.enzyme-button:hover,
.enzyme-button:focus-visible { border-color: var(--enzyme-color); outline: none; transform: translateY(-1px); }
.enzyme-button.is-active { border-color: var(--enzyme-color); background: color-mix(in srgb, var(--enzyme-color) 9%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--enzyme-color) 18%, transparent); }
.enzyme-button-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--enzyme-color); box-shadow: 0 0 0 4px color-mix(in srgb, var(--enzyme-color) 18%, transparent); }
.enzyme-button strong, .enzyme-button small { display: block; min-width: 0; }
.enzyme-button strong { font-size: 13px; line-height: 1.25; }
.enzyme-button small { margin-top: 2px; color: #778992; font-size: 11px; }
.enzyme-button-role { color: var(--enzyme-color); font-size: 12px; font-weight: 800; }

.enzyme-detail {
  min-height: 66px;
  margin-top: 8px;
  padding: 10px 11px;
  border: 1px dashed #bdcfce;
  border-radius: 12px;
  color: #5d717c;
  background: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  line-height: 1.55;
}

.enzyme-detail strong { color: #245f52; }

.legend-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.legend-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 999px; background: #fff; color: #617680; font-size: 11px; }
.legend-line { width: 18px; height: 4px; border-radius: 999px; background: var(--legend); }

.dna-template-path,
.dna-new-path,
.primer-path,
.base-line,
.hydrogen-bond,
.flow-arrow {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dna-template-path { stroke: #263d56; stroke-width: 8; }
.dna-template-alt { stroke: #35516d; }
.dna-new-path { stroke: #22a8b6; stroke-width: 7; }
.okazaki-dna { stroke: #21b67a; }
.primer-path { stroke: #e85d75; stroke-width: 8; }
.base-line { stroke-width: 7; }
.new-base-line { stroke-width: 6; opacity: .92; }
.hydrogen-bond { stroke: #a9bac2; stroke-width: 2; stroke-dasharray: 3 5; }
.ligation-bridge { fill: none; stroke: #22a8b6; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.flow-arrow { stroke: #31816e; stroke-width: 3; marker-end: url(#arrowGreen); }
.okazaki-highlight { fill: none; stroke: #79ff69; stroke-width: 17; stroke-linecap: round; stroke-linejoin: round; filter: url(#okazakiGlow); pointer-events: none; }
.okazaki-guide { fill: none; stroke: #5cae28; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.okazaki-label { fill: #4f7810; }
.base-compound,
.hydrogen-compound { vector-effect: non-scaling-stroke; }

.enzyme-node { transform-box: fill-box; transform-origin: center; }
.enzyme-image { pointer-events: none; }
[data-enzyme-node="pol1"] .enzyme-image,
[data-enzyme-node="ligase"] .enzyme-image { opacity: .55; }
.enzyme-node.is-dimmed { opacity: 0.16 !important; filter: grayscale(0.65); }
.enzyme-node.is-focused { filter: url(#enzymeFocus); }
.enzyme-body { transform-box: fill-box; transform-origin: center; }
.enzyme-caption { fill: #17384a; font-size: 14px; font-weight: 900; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.enzyme-caption-small { fill: #60727d; font-size: 11px; font-weight: 800; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.enzyme-symbol { fill: #fff; font-size: 12px; font-weight: 900; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.model-label { fill: #17384a; font-size: 15px; font-weight: 900; paint-order: stroke; stroke: rgba(255,255,255,.96); stroke-width: 5px; stroke-linejoin: round; }
.model-label.subtle { fill: #627783; font-size: 12px; font-weight: 750; }
.end-label { fill: #17384a; font: 900 15px Arial, sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.end-label.new { fill: #148d9b; }
.end-label.primer { fill: #d94c66; }

.hidden-labels .model-label,
.hidden-labels .end-label,
.hidden-labels .enzyme-caption,
.hidden-labels .enzyme-caption-small { opacity: 0 !important; pointer-events: none !important; }
.highlight-off .enzyme-node { filter: none !important; }

@media (prefers-reduced-motion: reduce) {
  .enzyme-button, .stage-tab, .control-button { transition: none; }
}

