/* Manual / Guided annotation workflow for full-spine profiles. */
.spine-guide {
  margin: 4px 10px 10px;
  display: grid;
  gap: 8px;
  font-size: var(--font-support);
}
.sg-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.sg-mode-button {
  display: grid;
  gap: 1px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 6px 8px;
  text-align: center;
  font-weight: 600;
  white-space: normal;
  line-height: 1.25;
}
.sg-mode-button small { font-weight: 400; font-size: calc(var(--font-support) * .88); opacity: .85; }
.sg-mode-button:hover { background: var(--panel-soft); color: var(--text); }
.sg-mode-button.selected, .sg-mode-button[aria-checked="true"] {
  background: var(--accent-dark);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.sg-body { display: grid; gap: 7px; }
.sg-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sg-step-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 7px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  white-space: normal;
}
.sg-step-mark {
  flex: 0 0 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sg-step-text { display: grid; gap: 1px; line-height: 1.3; min-width: 0; }
.sg-step-text strong { font-weight: 600; color: var(--text); }
.sg-step-text small { color: var(--muted); }
.sg-step.active .sg-step-button { border-color: var(--accent); background: var(--accent-dark); }
.sg-step.active .sg-step-mark { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.sg-step.done .sg-step-mark { color: var(--accent); background: var(--accent-dark); }
.sg-step.skipped .sg-step-text strong, .sg-step.absent .sg-step-text strong { color: var(--muted); }
.sg-prompt {
  margin: 0;
  padding: 8px 9px;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: var(--panel-soft);
  color: var(--text);
  line-height: 1.45;
}
.sg-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 5px; }
.sg-row > [hidden] { display: none !important; }
.spine-guide button, .spine-guide select {
  min-width: 0;
  min-height: var(--control-height);
  font-size: var(--font-support);
  padding: 5px 7px;
  line-height: 1.3;
  white-space: normal;
}
.spine-guide select { margin: 0; }
.sg-review { display: grid; gap: 6px; padding-top: 7px; border-top: 1px solid var(--line); }
.sg-summary { margin: 0; color: var(--text); font-weight: 600; }
.sg-nav { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 5px; }
.sg-current {
  text-align: center;
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.sg-note { margin: 0; line-height: 1.4; }
.sg-message { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.sg-message.warning { color: var(--yellow); }
.sg-tools { display: grid; gap: 6px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }
.sg-slider { display: grid; grid-template-columns: auto minmax(0, 1fr) 46px; align-items: center; gap: 8px; }
.sg-slider kbd { font: 600 10px system-ui, sans-serif; color: var(--accent); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; margin-left: 3px; }
.sg-slider input { width: 100%; min-height: 0; padding: 0; accent-color: var(--accent); }
.sg-slider output { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.sg-check { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.sg-check input { margin: 0; accent-color: var(--accent); }
.sg-tag { font-size: calc(var(--font-support) * .85); color: var(--yellow); border: 1px solid var(--warning-border); border-radius: 4px; padding: 0 5px; }
.sg-learn-status { margin: 0; line-height: 1.45; }
.sg-slider > span { white-space: nowrap; min-width: 92px; }
.sg-experimental { display: grid; gap: 6px; margin-top: 2px; padding-top: 7px; border-top: 1px dashed var(--line); }
.sg-experimental > .sg-tag { justify-self: start; }
.sg-snap { display: grid; gap: 6px; padding-left: 20px; }
.sg-view { margin-top: 2px; }
.sg-toggles { grid-template-columns: 1fr 1fr; }
.sg-toggles .sg-check { font-size: var(--font-support); }
/* The viewer's global label/input styles must not inflate these compact rows. */
.spine-guide label { margin: 0; color: var(--text); font-size: var(--font-support); }
.spine-guide label input, .spine-guide label select { margin-top: 0; }
.spine-guide input[type=range] { display: block; padding: 0; border: 0; background: transparent; box-shadow: none; height: 18px; min-height: 0; }
.spine-guide input[type=checkbox] { display: inline-block; flex: 0 0 auto; }
.spine-guide .sg-tools { gap: 4px; padding: 6px 8px; }
.sg-slider { min-height: 24px; }
/* Lumbar count switch */
.sg-lumbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sg-lumbar > span { color: var(--text); font-weight: 600; }
.sg-segment { display: inline-grid; grid-template-columns: repeat(3, 34px); padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }
.spine-guide .sg-segment button { min-height: 26px; padding: 2px 0; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.spine-guide .sg-segment button:hover:not(:disabled) { color: var(--text); background: var(--panel-soft); }
.spine-guide .sg-segment button[aria-checked="true"] { background: var(--accent); color: var(--bg); }
.spine-guide .sg-segment button.assumed[aria-checked="true"] { background: var(--accent-dark); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sg-lumbar-note { margin: -3px 0 0; line-height: 1.4; }
/* Collapsed anchors */
.spine-guide .sg-anchors-summary { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: var(--panel-soft); border-color: transparent; color: var(--text); }
.spine-guide .sg-anchors-summary::after { content: "edit"; margin-left: auto; color: var(--muted); font-size: calc(var(--font-support) * .9); }
.spine-guide .sg-anchors-summary[aria-expanded="true"]::after { content: "hide"; }
/* Accept all */
.spine-guide .sg-accept-all { min-height: 38px; font-size: var(--font-control); }
.spine-guide .sg-accept-all kbd, .sg-actionbar kbd { font: 600 10px system-ui, sans-serif; border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; margin-left: 6px; opacity: .75; }
/* Action bar on the image */
.sg-actionbar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: #0e1928ee; box-shadow: 0 10px 34px #0008; font-size: var(--font-support); color: var(--muted); white-space: nowrap; }
.sg-actionbar b { color: var(--text); font-weight: 600; }
.sg-actionbar button { padding: 7px 12px; font-size: var(--font-control); }
.sg-actionbar button.primary { padding: 8px 16px; }
.sg-actionbar button { white-space: nowrap; width: auto; }
.spine-guide .sg-accept-all { white-space: nowrap; }

/* Suggestion visibility: in the panel (always visible in Guided) and on the image bar. */
.spine-guide .sg-visibility { margin: 6px 0 2px; }
.sg-actionbar .sg-bar-fade { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.sg-actionbar .sg-bar-fade input { width: 80px; accent-color: var(--accent); padding: 0; border: 0; background: transparent; min-height: 0; }
