.result-node .image-wrap img {
  object-fit: contain;
  background: #08090b;
}

.annotation-canvas {
  inset: auto;
}

.annotation-canvas.erasing {
  cursor: cell;
}

.mask-note.failed {
  background: #2a191b;
}

.mask-note.failed > span,
.mask-note.failed strong {
  color: #ff9090;
}

.annotation-context {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11171d;
}

.annotation-context > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}

.annotation-context span { color: var(--muted); }
.annotation-context strong { color: #d9e0e6; text-align: right; }
.annotation-context strong.valid { color: var(--lime); }
.annotation-context p {
  margin: 3px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: #c8d5a3;
  font-size: 11px;
  line-height: 1.45;
}

.annotation-context > small {
  display: block;
  overflow-wrap: anywhere;
  color: #7f8995;
  font: 10px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.brush-settings output {
  min-width: 36px;
  color: #d9e0e6;
  font-size: 10px;
  text-align: right;
}

.mask-note.ready { background: #18291d; }

.edit-submit-reason {
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

#submitEdit:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.history-actions .history-annotate-action {
  border-color: #73902d;
  background: #253019;
  color: var(--lime);
  font-weight: 700;
}

.edit-task-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.edit-task-actions .secondary-action {
  margin: 0;
}

.annotation-toolbox {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.annotation-toolbox button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #11171d;
  color: #aeb8c2;
  font-size: 10px;
  cursor: pointer;
}

.annotation-toolbox button.active {
  border-color: #78972d;
  background: #27331a;
  color: var(--lime);
}

.annotation-history-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 7px;
}

.annotation-history-actions button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d1318;
  color: #c5cdd5;
  font-size: 10px;
  cursor: pointer;
}

.annotation-history-actions button:disabled {
  cursor: not-allowed;
  opacity: .38;
}

#annotationClearButton:not(:disabled) {
  border-color: #6c4d3d;
  color: #efb497;
}

.annotation-text-entry {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
}

.annotation-text-entry input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
  background: #0c1116;
  color: #e5eaef;
}

.annotation-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.annotation-compare figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090d11;
}

.annotation-compare img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.annotation-compare figcaption {
  padding: 6px;
  color: #9ea9b4;
  font-size: 9px;
  text-align: center;
}

.annotation-risk {
  margin: 10px 0;
  padding: 8px 9px;
  border: 1px solid #684936;
  border-radius: 7px;
  background: #231a15;
  color: #e2b796;
  font-size: 10px;
  line-height: 1.5;
}

.annotation-save-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.annotation-save-actions .secondary-action { margin: 0; }

.react-flow__node[data-kind="annotated"] {
  border-color: #b56e45;
  box-shadow: 0 0 0 1px rgba(255, 140, 90, .18);
}
