:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #20372b;
  background: #f5f7f3;
  font-size: 14px;
  line-height: 1.5;
  --border: #dde5db;
  --muted: #647268;
  --green: #245c3a;
  --panel: #fff;
}
.anomaly-panel .section-heading label { display:flex; align-items:center; gap:6px; font-size:12px; }
.anomaly-panel input[type=checkbox] { width:auto; }
.anomaly-panel .settings-grid { margin:12px 0; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); }
.anomaly-panel details { margin:12px 0; }.anomaly-panel summary { cursor:pointer; font-weight:600; }
.anomaly-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.anomaly-actions .primary { width:auto; font-size:12px; padding:8px 12px; }
.anomaly-legend { display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-size:12px; }
.anomaly-gradient { width:180px; height:12px; border-radius:6px; background:linear-gradient(90deg,#3b82f6,#facc15,#ef4444); }
.anomaly-unknown { color:#64748b; }.anomaly-filter { display:block; max-width:320px; margin:12px 0; font-size:12px; }
.anomaly-table { min-width:520px; }.anomaly-table td { vertical-align:top; }.anomaly-table small { display:block; color:var(--muted); }
.anomaly-plant { padding:0; border:0; background:transparent; color:#176546; text-align:left; text-decoration:underline; }
.anomaly-score { display:inline-block; border-left:5px solid var(--anomaly-color); padding-left:8px; white-space:nowrap; font-weight:600; }
#anomaly-evidence { border:1px solid var(--border); border-radius:7px; padding:12px; margin:14px 0; }
#anomaly-evidence h3 { margin:0 0 8px; font-size:14px; }#anomaly-evidence p { margin:8px 0; font-size:12px; }
.anomaly-neighbors { display:flex; gap:10px; flex-wrap:wrap; font-size:12px; }.anomaly-neighbors button { font-size:12px; }
.anomaly-disease-masks, .anomaly-crops { display:flex; flex-wrap:nowrap; gap:12px; overflow-x:auto; padding-bottom:10px; }
.anomaly-disease-masks { margin-top:12px; }
.anomaly-crops { margin-bottom:12px; }
.anomaly-disease-masks figure, .anomaly-crops figure { flex:0 0 240px; max-width:100%; min-width:0; margin:0; }
.anomaly-disease-masks img, .anomaly-crops svg { display:block; width:100%; max-width:240px; height:180px; max-height:180px; object-fit:contain; background:#17271e; border-radius:4px; }
.anomaly-disease-masks figcaption, .anomaly-crops figcaption { margin-top:5px; font-size:12px; color:var(--muted); overflow-wrap:anywhere; }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button,
a {
  color: inherit;
}
a {
  text-decoration: none;
}
input,
select,
textarea {
  max-width: 100%;
}
input[type="number"],
input[type="text"],
select,
textarea {
  background: #fff;
  border: 1px solid #bdcdbf;
  border-radius: 6px;
  padding: 9px 10px;
  color: #20372b;
  width: 100%;
  min-width: 0;
}
input[type="checkbox"],
input[type="range"] {
  accent-color: var(--green);
}
:focus-visible {
  outline: 3px solid #70ab7c;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.7px;
  margin-bottom: 8px;
}
h2 {
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
}
p {
  margin-bottom: 12px;
}
small,
.help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.help {
  margin: 10px 0;
}
.site-header {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
}
.brand {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.6px;
}
.site-header > span {
  font-size: 12px;
  color: var(--muted);
}
.site-header .connection {
  margin-left: auto;
  font-size: 12px;
  color: #426e49;
}
main {
  max-width: 1700px;
  padding: 28px 32px 50px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.page-heading p {
  color: var(--muted);
  margin: 0;
}
.prototype {
  font-size: 11px;
  background: #e9efdf;
  color: #587243;
  padding: 5px 9px;
  border-radius: 5px;
  white-space: nowrap;
}
.layout {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  min-width: 0;
}
.setup {
  position: sticky;
  top: 16px;
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
.setup > h2 {
  margin-bottom: 18px;
}
.results {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.file-picker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px dashed #8eac90;
  border-radius: 7px;
  background: #f6faf3;
  padding: 24px 10px;
  gap: 8px;
  cursor: pointer;
}
.file-picker strong {
  font-size: 13px;
}
.file-picker span {
  font-size: 12px;
  color: var(--muted);
}
.file-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-picker.dragging {
  background: #e8f3df;
}
.file-picker:focus-within {
  outline: 3px solid #70ab7c;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
}
.settings-section { grid-column: 1 / -1; min-width: 0; margin-top: 12px; }
.settings-section h3 { margin: 0 0 8px; font-size: 1rem; }
.tile-size-control { display: grid; gap: 6px; min-width: 0; }
.tile-size-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.tile-size-presets button { padding: 6px 8px; font-size: .78rem; }
.tile-size-presets button[aria-pressed="true"] { background: #dcebdc; border-color: #557454; color: #24432b; }
.association-guide { grid-column: 1 / -1; }
.setting-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.setting-field .field-title {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}
.setting-field small {
  font-size: 11px;
  line-height: 1.5;
}
.setting-field[data-path="detector"] {
  grid-column: 1/-1;
}
.check-setting {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.check-setting small {
  grid-column: 1/-1;
}
.check-setting input {
  width: 17px;
  height: 17px;
}
.advanced {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 0;
}
details[open] > summary {
  margin-bottom: 8px;
}
.settings-group {
  grid-column: 1/-1;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 10px;
  background: #fbfcfa;
  margin: 5px 0;
}
.settings-group .settings-grid {
  padding-bottom: 12px;
}
.settings-group .settings-group {
  background: #fff;
}
textarea {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.6;
  margin: 8px 0;
}
.small-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0;
}
.link-button {
  padding: 0;
  border: 0;
  background: none;
  font-size: 12px;
  color: #2d7143;
  cursor: pointer;
}
.link-button:hover {
  text-decoration: underline;
}
.primary {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  background: var(--green);
  color: white;
  border-radius: 6px;
  font-weight: 650;
}
.primary:hover {
  background: #194d2d;
}
.secondary {
  border: 1px solid #c7d5c5;
  background: #f7faf4;
  padding: 7px 11px;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
}
.readiness {
  font-size: 11px;
  color: #5c7c59;
  margin: 13px 0 0;
}
.error {
  background: #fff0e9;
  color: #993f23;
  padding: 10px;
  border-radius: 5px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.saved-runs {
  margin-top: 22px;
  border-top: 1px solid var(--border);
  padding-top: 17px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 15px;
}
.saved-runs .section-heading h2 {
  font-size: 14px;
}
#run-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
}
.history-item {
  border: 1px solid transparent;
  border-radius: 5px;
  background: #f2f6ed;
  padding: 9px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  justify-content: space-between;
}
.history-item.active {
  border-color: #83a36c;
}
.history-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; align-items: center; }
.history-row .history-item { width: 100%; min-width: 0; }
.history-source small { display: block; margin-top: 4px; color: #677568; font-size: 10px; }
.delete-confirmation { grid-column: 1 / -1; padding: 8px; border: 1px solid #d6b6a5; border-radius: 5px; }
.delete-confirmation button { margin-right: 6px; }
.run-tools summary { cursor: pointer; font-weight: 600; }
.run-tools fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.run-tools .settings-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 12px 0; }
.run-tools .check-setting { display: flex; align-items: center; gap: 8px; }
.run-tools .setting-field.check-setting { display: grid; grid-template-columns: 1fr auto; }
.run-tools input[type=checkbox] { width: auto; }
.history-item span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}
.badge {
  font-size: 11px;
  border-radius: 4px;
  background: #eff3e9;
  padding: 4px 7px;
  text-transform: capitalize;
  white-space: nowrap;
}
.badge.running {
  color: #47732d;
  background: #e9f4dc;
}
.badge.failed,
.badge.interrupted {
  background: #fff0e7;
  color: #a24d2d;
}
.badge.completed {
  color: #2e743d;
  background: #e7f2e6;
}
.run-message {
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.phase {
  display: flex;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 13px;
  background: #fbfcf9;
}
.phase-number {
  flex: 0 0 23px;
  height: 23px;
  border-radius: 50%;
  border: 1px solid #d0ddc9;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.phase strong {
  font-size: 12px;
}
.phase p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin: 6px 0;
}
.phase small {
  font-size: 11px;
}
.phase.running {
  border-color: #74a45f;
  background: #f2f8e9;
}
.phase.completed {
  background: #f2f8ed;
}
.phase.completed .phase-number {
  background: #d9edcb;
  border-color: #d9edcb;
}
.phase.failed {
  border-color: #c98260;
}
.map-toolbar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 12px;
}
.map-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  min-width: 120px;
}
.map-toolbar select {
  font-size: 12px;
  padding: 7px 9px;
}
.map-toolbar > button {
  margin-left: auto;
  align-self: end;
}
.viewer-actions {
  display: flex;
  gap: 15px;
}
.map-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 11px;
  margin-bottom: 14px;
}
.map-controls > label {
  display: flex;
  gap: 5px;
  align-items: center;
}
.map-controls details {
  margin-left: auto;
  position: relative;
}
.map-controls summary {
  font-size: 11px;
  padding: 0;
  color: #2d7143;
  font-weight: 400;
}
.viewer-settings {
  position: absolute;
  right: 0;
  top: 24px;
  width: 260px;
  border: 1px solid var(--border);
  background: white;
  box-shadow: 0 6px 20px #0001;
  border-radius: 7px;
  padding: 15px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.viewer-settings label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.viewer-settings label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
}
.viewer-settings input[type="range"] {
  width: 100%;
}
#viewer-wrap {
  position: relative;
  height: 470px;
  border-radius: 7px;
  background: #16251f;
  overflow: hidden;
}
#viewer {
  width: 100%;
  height: 100%;
}
#viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.viewer-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #b6c8b5;
  pointer-events: none;
  padding: 25px;
  text-align: center;
  font-size: 13px;
}
.viewer-empty strong {
  color: #e0ebda;
  font-size: 16px;
}
.viewer-loading {
  position: absolute;
  left: 14px;
  bottom: 13px;
  font-size: 11px;
  color: #e7efdf;
  background: #14271fe8;
  border-radius: 4px;
  padding: 7px 10px;
  max-width: calc(100% - 28px);
}
.viewer-tip {
  font-size: 11px;
  color: var(--muted);
  margin: 10px 0;
}
.navigation-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
}
.navigation-toolbar > span {
  font-size: 11px;
  color: var(--muted);
}
.drag-modes {
  display: flex;
  border: 1px solid #b9cdb6;
  border-radius: 6px;
  overflow: hidden;
}
.drag-modes button {
  border: 0;
  background: #f5f8f1;
  padding: 7px 12px;
  font-size: 12px;
}
.drag-modes button[aria-pressed="true"] {
  background: #245c3a;
  color: white;
}
#viewer canvas {
  cursor: grab;
}
#viewer canvas:active {
  cursor: grabbing;
}
@media (pointer: coarse) {
  .drag-modes {
    display: none;
  }
}
.surface-note {
  font-size: 11px;
}
.map-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  gap: 12px;
  margin-top: 17px;
}
.map-summary strong {
  font-size: 25px;
  display: block;
  line-height: 1.2;
  font-weight: 600;
}
.map-summary span {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 6px;
}
.map-panel > p:last-child {
  margin-bottom: 0;
}
.inspector > .section-heading select {
  width: auto;
  font-size: 12px;
}
.frame-image-wrap {
  position: relative;
  height: 380px;
  background: #17271e;
  min-height: 150px;
  max-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  touch-action: none;
  user-select: none;
}
.frame-image-wrap[data-zoomed="true"] { cursor: grab; }
.frame-image-wrap[data-dragging="true"] { cursor: grabbing; }
#frame-image-layer { position: absolute; inset: 0; transform-origin: 0 0; }
.frame-zoom-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.frame-zoom-controls button { padding: 5px 10px; }
#frame-zoom-level { min-width: 45px; text-align: center; font-size: 12px; }
#frame-empty { position: relative; color: #e3eae3; }
.viewer-settings input[type="color"] { width: 100%; min-height: 32px; padding: 3px; }
.frame-image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #17271e;
}
#frame-highlight { width: 100%; height: 100%; background: #17271e; }
#frame-highlight svg { display: block; width: 100%; height: 100%; }
.candidate-crop { display: flex; align-items: center; gap: 7px; font-size: 12px; margin: 12px 0; }
.candidate-crop input { width: auto; }
.candidate-images { display: flex; gap: 10px; overflow-x: auto; padding: 3px 1px 10px; }
.candidate-image { flex: 0 0 200px; min-width: 0; border: 1px solid var(--border); border-radius: 6px; padding: 5px; background: #f5f8f1; text-align: left; }
.candidate-image.active { border-color: #937200; box-shadow: 0 0 0 2px #ffd447; }
.candidate-image svg { display: block; width: 100%; height: 150px; background: #17271e; border-radius: 3px; }
.candidate-image span, .candidate-image small { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: 11px; }
.candidate-image small { color: var(--muted); }
.selected-sighting { background: #fff5cf; }
.candidate-link { padding: 0; }
.frame-navigation {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin: 13px 0;
}
.frame-navigation > span {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.frame-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 12px;
  max-height: 84px;
}
.frame-thumb {
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 5px;
  min-width: 70px;
  width: 70px;
  background: white;
  font-size: 9px;
  text-align: center;
  color: var(--muted);
}
.frame-thumb.active {
  border: 2px solid #6d9951;
  padding: 2px;
}
.frame-thumb img {
  width: 100%;
  height: 40px;
  object-fit: cover;
  display: block;
  margin-bottom: 3px;
}
.table-wrap {
  max-height: 330px;
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
}
th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  background: #f5f8f1;
  position: sticky;
  top: 0;
  white-space: nowrap;
}
td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf1e7;
  vertical-align: top;
}
td small {
  display: block;
  font-size: 10px;
  margin-top: 4px;
}
td:nth-child(3) {
  white-space: nowrap;
}
.located {
  color: #337042;
}
.unlocated {
  color: #9b7445;
}
.run-details details {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 5px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.65;
  background: #f6f8f2;
  border-radius: 5px;
  padding: 12px;
  max-height: 350px;
  overflow: auto;
}
#activity {
  list-style: none;
  padding: 0;
  max-height: 260px;
  overflow: auto;
  font-size: 11px;
  color: var(--muted);
}
#activity li {
  padding: 6px 0;
  border-bottom: 1px solid #eff2ea;
  overflow-wrap: anywhere;
}
#upload-progress {
  width: 100%;
  height: 6px;
  margin-top: 13px;
  accent-color: var(--green);
}
.setup::-webkit-scrollbar {
  width: 5px;
}
.setup::-webkit-scrollbar-thumb {
  background: #d1dbca;
  border-radius: 5px;
}
#viewer-wrap:fullscreen {
  height: 100vh;
  border-radius: 0;
}
#viewer-wrap:fullscreen #viewer {
  height: 100%;
}
@media (min-width: 1500px) {
  .layout {
    grid-template-columns: 380px minmax(0, 1fr);
  }
}
@media (max-width: 1050px) {
  main {
    padding: 22px 18px;
  }
  .site-header {
    padding: 0 18px;
  }
  .layout {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 16px;
  }
  .panel {
    padding: 16px;
  }
  .flow {
    grid-template-columns: 1fr;
  }
  .phase p {
    display: none;
  }
  .phase {
    padding: 9px 11px;
  }
  .phase strong {
    font-size: 12px;
  }
  .phase-detail {
    display: block;
  }
  .map-toolbar {
    gap: 9px;
  }
  .map-toolbar label {
    min-width: 105px;
  }
  #viewer-wrap {
    height: 400px;
  }
  .map-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .frame-navigation {
    flex-wrap: wrap;
  }
  .frame-navigation > span {
    order: -1;
    width: 100%;
  }
  .setting-field small {
    font-size: 10px;
  }
}
@media (max-width: 750px) {
  main {
    padding: 20px 12px;
  }
  .site-header > span:nth-child(2) {
    display: none;
  }
  .page-heading {
    align-items: start;
    gap: 10px;
  }
  h1 {
    font-size: 24px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .prototype {
    font-size: 9px;
  }
  .layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .setup {
    position: static;
    max-height: none;
    width: 100%;
    overflow: visible;
  }
  .results {
    width: 100%;
    gap: 16px;
  }
  .settings-grid {
    gap: 12px;
  }
  .flow {
    grid-template-columns: 1fr;
  }
  .phase p {
    display: block;
  }
  .map-toolbar label {
    flex: 1;
    min-width: 110px;
  }
  .map-controls {
    gap: 10px;
  }
  .map-controls details {
    margin-left: 0;
  }
  .viewer-settings {
    left: 0;
    right: auto;
  }
  .viewer-actions {
    gap: 9px;
    font-size: 10px;
  }
  #viewer-wrap {
    height: 380px;
  }
  .map-summary {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .frame-image-wrap {
    height: 300px;
  }
  .site-header .connection {
    font-size: 10px;
  }
  .surface-note {
    line-height: 1.6;
  }
  #run-history {
    max-height: 130px;
  }
}
/* The 2D image keeps the same viewport size as the reconstruction. */
#viewer-wrap.top-down-mode { background: transparent; }
#top-down-viewport { position: absolute; inset: 0; overflow: hidden; background: transparent; touch-action: none; }
#top-down-canvas { width: 100%; height: 100%; transform-origin: 0 0; display: block; }
#top-down-canvas circle { cursor: pointer; }
#top-down-canvas circle:focus { stroke: #fff; stroke-width: var(--top-down-focus-width, 3); outline: none; }
#top-down-image, #top-down-path { pointer-events: none; }
.saved-inputs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: -8px;
}
.saved-inputs label {
  font-size: 12px;
  color: var(--muted);
}
.saved-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.saved-input-row select {
  flex: 1;
  min-width: 0;
}
.run-inputs {
  margin: 14px 0;
}
.run-inputs h3 {
  font-size: 13px;
  margin: 0 0 6px;
}
.run-input-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

/* Anomaly labels */
.anomaly-labeling { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:12px 0; padding:10px 12px; border:1px solid var(--border); border-radius:7px; font-size:12px; }
.anomaly-labeling .help { flex-basis:100%; margin:0; }
.anomaly-labeling button { width:auto; font-size:12px; padding:6px 10px; }
.anomaly-import { cursor:pointer; padding:6px 10px; border:1px solid var(--border); border-radius:6px; }
.anomaly-import input { display:none; }
.anomaly-label-status { color:var(--muted); }
.anomaly-label-chip { display:inline-block; margin-left:6px; padding:1px 6px; border-radius:9px; font-size:11px; font-weight:600; background:#e2e8f0; color:#1e293b; }
.anomaly-label-chip.label-A, .anomaly-label-buttons .label-A[aria-pressed=true] { background:#fee2e2; color:#991b1b; }
.anomaly-label-chip.label-E, .anomaly-label-buttons .label-E[aria-pressed=true] { background:#fef3c7; color:#92400e; }
.anomaly-label-chip.label-M, .anomaly-label-buttons .label-M[aria-pressed=true] { background:#ffedd5; color:#9a3412; }
.anomaly-label-chip.label-N, .anomaly-label-buttons .label-N[aria-pressed=true] { background:#dcfce7; color:#166534; }
.anomaly-label-chip.label-X, .anomaly-label-buttons .label-X[aria-pressed=true] { background:#e0e7ff; color:#3730a3; }
.anomaly-labeler { margin:10px 0 14px; padding:10px; border:1px solid var(--border); border-radius:7px; }
.anomaly-labeler-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.anomaly-labeler h4 { margin:0; font-size:13px; }
.anomaly-queue-position { font-size:12px; color:var(--muted); }
.anomaly-label-buttons { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.anomaly-label-buttons button { width:auto; font-size:12px; padding:6px 10px; }
.anomaly-label-buttons button[aria-pressed=true] { font-weight:700; outline:2px solid currentColor; }
.anomaly-label-note { display:block; font-size:12px; max-width:420px; }
.anomaly-compare { display:flex; gap:8px; overflow-x:auto; padding:8px 0 4px; }
.anomaly-compare figure { flex:0 0 132px; margin:0; cursor:pointer; }
.anomaly-compare figure.own { cursor:default; }
.anomaly-compare img { display:block; width:132px; height:132px; object-fit:contain; background:#17271e; border-radius:4px; border:3px solid transparent; }
.anomaly-compare figure.own img { border-color:#facc15; }
.anomaly-compare figcaption { font-size:11px; color:var(--muted); margin-top:3px; overflow-wrap:anywhere; }
.candidate-review {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8faf5;
}
.candidate-review.editing {
  border-color: #56a8c9;
  background: #f1f8fb;
}
.candidate-review-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}
.candidate-review-actions,
.candidate-review-verify {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.candidate-review-verify label {
  flex: 1 1 260px;
  display: grid;
  gap: 4px;
  font-size: 12px;
}
.candidate-review .help {
  margin: 0;
}
.candidate-review .help:empty {
  display: none;
}
.review-tools {
  display: flex;
  border: 1px solid #b9cdb6;
  border-radius: 6px;
  overflow: hidden;
}
.review-tools button {
  border: 0;
  border-radius: 0;
  background: #f5f8f1;
  padding: 7px 12px;
  font-size: 12px;
}
.review-tools button[aria-pressed="true"] {
  background: #245c3a;
  color: white;
}
.badge.review-edited,
.badge.review-stale {
  color: #8a5a00;
  background: #fff4d6;
}
.badge.review-verified {
  color: #2e743d;
  background: #e7f2e6;
}
.history-item .review-chip {
  margin-left: 6px;
  font-size: 10px;
  color: #2e743d;
}
#viewer-wrap.review-adding #viewer canvas,
#viewer-wrap.review-adding #top-down-canvas {
  cursor: crosshair;
}
#viewer-wrap.review-removing #viewer canvas,
#viewer-wrap.review-removing #top-down-canvas {
  cursor: pointer;
}
