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

.transcription-scene-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 10px;
  border-right: 1px solid #dce9e8;
  background:
    radial-gradient(circle at 48% 42%, rgba(93, 111, 208, .08), transparent 42%),
    linear-gradient(180deg, #fff, #f6fbfb);
}

.transcription-scene {
  width: 100%;
  height: 100%;
  min-height: 480px;
  display: block;
  border: 1px solid rgba(174, 205, 204, .78);
  border-radius: 20px;
  background: #fbfefe;
  box-shadow: inset 0 0 60px rgba(64, 120, 154, .06);
}

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

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

.stage-status-kicker { margin: 0 0 6px; color: #3c8f79; font-size: 12px; font-weight: 900; letter-spacing: .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: #245e55;
  background: linear-gradient(135deg, #e9f8f4, #f8fcfa);
  font-size: 13px;
  line-height: 1.55;
}
.direction-rule strong { display: block; margin-bottom: 3px; font-size: 15px; }
.direction-rule .direction-main { color: #d94c66; font-size: 18px; font-weight: 900; }

.structure-panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 15px 2px 8px; }
.structure-panel-title strong { font-size: 15px; }
.structure-panel-title span { color: #809099; font-size: 12px; }
.structure-buttons { display: grid; gap: 7px; }

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

.structure-detail {
  min-height: 66px;
  margin-top: 8px;
  padding: 10px 11px;
  border: 1px dashed #bdcfce;
  border-radius: 12px;
  color: #5d717c;
  background: rgba(255,255,255,.76);
  font-size: 13px;
  line-height: 1.55;
}
.structure-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: 5px; border-radius: 999px; background: var(--legend); }

.dna-backbone, .dna-region-backbone, .rna-path, .base-line, .hydrogen-bond, .rna-base-line, .rna-hydrogen-bond, .process-arrow, .gene-guide, .intron-loop, .poly-a-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dna-backbone { stroke: #273f59; stroke-width: 8; filter: url(#strandShadow); }
.dna-region-backbone { stroke-width: 8.6; filter: url(#strandShadow); }
.dna-region-promoter { stroke: #8b5cf6; }
.dna-region-exon { stroke: #3b82f6; }
.dna-region-intron { stroke: #f59e0b; }
.dna-region-terminator { stroke: #ef4444; }
.base-line { stroke-width: 6; }
.hydrogen-bond { stroke: #a9bac2; stroke-width: 2; stroke-dasharray: 3 5; }
.rna-base-line { stroke-width: 5; }
.rna-hydrogen-bond { stroke: #8da7af; stroke-width: 1.8; stroke-dasharray: 2 3; }
.rna-path { stroke-width: 9; }
.rna-exon { stroke: #20b889; }
.rna-intron { stroke: #f49d3f; }
.rna-nascent { filter: none; }
.intron-loop { stroke: #f49d3f; stroke-width: 8; }
.process-arrow { stroke: #31816e; stroke-width: 3; marker-end: url(#arrowGreen); }
.gene-guide { stroke: #b3c8cb; stroke-width: 2; stroke-dasharray: 5 6; }
.poly-a-path { stroke: #8b5cf6; stroke-width: 7; stroke-dasharray: 3 8; }

.gene-region { stroke: rgba(74, 99, 118, .28); stroke-width: 1.5; stroke-dasharray: 4 4; }
.region-promoter { fill: #f2e5ff; }
.region-exon { fill: #dcecff; }
.region-intron { fill: #fff1cf; }
.region-terminator { fill: #ffe1e7; }
.gene-region-label { fill: #314c5c; font-size: 10.5px; font-weight: 900; text-anchor: middle; }
.gene-title { fill: #3b5b69; font-size: 14px; font-weight: 900; }

.polymerase-node { transform-box: fill-box; transform-origin: center; }
.polymerase-image { pointer-events: none; }
.polymerase-node.is-bound .polymerase-image { opacity: .64; }
.polymerase-node.is-focused { filter: url(#structureFocus); }
.structure-node.is-dimmed { opacity: .14 !important; filter: grayscale(.7); }
.structure-node.is-focused { filter: url(#structureFocus); }
.processing-enzyme-image { opacity: .72; pointer-events: none; }
.enzyme-caption, .model-label, .end-label { paint-order: stroke; stroke: rgba(255,255,255,.98); stroke-linejoin: round; }
.enzyme-caption { fill: #17384a; stroke-width: 4px; font-size: 14px; font-weight: 900; text-anchor: middle; }
.enzyme-caption-small { fill: #60727d; font-size: 11px; font-weight: 800; text-anchor: middle; }
.model-label { fill: #17384a; stroke-width: 5px; font-size: 15px; font-weight: 900; }
.model-label.subtle { fill: #627783; font-size: 12px; font-weight: 750; }
.end-label { fill: #17384a; stroke-width: 4px; font: 900 15px Arial, sans-serif; }
.end-label.rna { fill: #0b9572; }
.cap-symbol { fill: #f04f78; stroke: #fff; stroke-width: 3; }
.cap-text { fill: #fff; font-size: 10px; font-weight: 900; text-anchor: middle; dominant-baseline: middle; }
.cut-mark { stroke: #d94c66; stroke-width: 3; }

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

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

