/* Overlay-specific tokens for canvas-painted region colors are kept in JS (CLASS_COLORS).
   This file holds non-canvas overlay styles. */

.fd-drag-indicator {
  position: absolute;
  background: rgba(51, 204, 102, 0.25);
  border: 2px solid var(--graiph-accent);
  pointer-events: none;
  border-radius: 2px;
}

.fd-region-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background: var(--graiph-bg-tertiary);
  font-size: 11px;
}
.fd-region-legend .fd-region-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.fd-region-legend .fd-region-legend-swatch {
  width: 10px; height: 10px;
  border-radius: 2px;
}

/* Per-field hint (protocol `hint`) — quiet sub-label under the field title. */
.fd-form-hint {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--graiph-text-secondary);
}

/* Glossary / reference modal (header info icon). Reuses .fd-modal chrome; the
   inner code→name list reuses the existing .fd-gloss-* styles. */
.fd-glossary-modal { max-width: 560px; }
/* Scroll within the fixed-height .fd-modal-body (flex column, overflow hidden). */
.fd-glossary-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 2px; }

/* Phase 3: parameter-first traversal bar (under the header). */
.fd-traversal-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 12px;
  background: var(--graiph-bg-secondary);
  border-bottom: var(--graiph-border-default);
}
.fd-traversal-bar[hidden] { display: none; }
/* Geología layout: after the zoom group come the describe tools (Vector | Marca
   de regularizado), then the Workflows selector inline (NOT pushed to the far
   right), then the "now describing" readout. Ordering only — no margin-auto. */
.fd-traversal-bar.fd-geologia-layout .fd-fracture-toolbar { order: 1; }
.fd-traversal-bar.fd-geologia-layout .fd-workflow-bar { order: 2; }
.fd-traversal-bar.fd-geologia-layout .fd-describe-readout { order: 3; }
/* The workflow runner's prev/next stepper follows too, so nothing order-0 slots
   between the zoom group and the describe tools. */
.fd-traversal-bar.fd-geologia-layout .fd-traversal-nav { order: 4; }
.fd-traversal-toggle {
  display: inline-flex;
  border: var(--graiph-border-default);
  border-radius: var(--graiph-radius-sm);
  overflow: hidden;
}
.fd-traversal-opt {
  border: none;
  background: transparent;
  color: var(--graiph-text-secondary);
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
}
.fd-traversal-opt[data-active="true"] {
  background: var(--graiph-accent);
  color: var(--graiph-bg-primary);
  font-weight: 600;
}
.fd-traversal-params {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fd-traversal-params[hidden] { display: none; }
.fd-traversal-param {
  border: var(--graiph-border-default);
  background: var(--graiph-bg-tertiary);
  color: var(--graiph-text-secondary);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.fd-traversal-param[data-active="true"] {
  border-color: var(--graiph-accent);
  color: var(--graiph-text-primary);
}
.fd-traversal-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.fd-traversal-nav[hidden] { display: none; }
.fd-traversal-progress {
  font-size: 12px;
  color: var(--graiph-text-secondary);
  min-width: 8ch;
  text-align: center;
}

/* Control bar: relocated zoom group (left), workflow selector, and the live
   "now describing" readout. Shares the .fd-traversal-bar container. */
.fd-control-zoom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.fd-control-zoom .fd-icon-btn {
  width: 38px;
  height: 38px;
}
.fd-control-zoom .fd-icon-btn svg { width: 18px; height: 18px; }

/* Context-window stepper: how many trays stay loaded around the current one. */
.fd-context-window {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--graiph-border);
}
.fd-context-window > svg { width: 16px; height: 16px; opacity: 0.7; margin-right: 2px; }
.fd-context-window .fd-icon-btn {
  width: 30px;
  height: 30px;
  font-size: 18px;
  line-height: 1;
}
.fd-context-window-value {
  min-width: 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--graiph-text-primary);
}

.fd-workflow-bar { display: inline-flex; align-items: center; gap: 8px; }
.fd-workflow-bar[hidden] { display: none; }
.fd-workflow-select { display: inline-flex; flex-wrap: wrap; gap: 6px; }

/* "Now describing" readout: band-color swatch · parameter · current value. */
.fd-describe-readout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: var(--graiph-border-default);
  border-radius: var(--graiph-radius-sm);
  background: var(--graiph-bg-tertiary);
}
.fd-describe-readout[hidden] { display: none; }
.fd-describe-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--graiph-gray-dark);
  flex-shrink: 0;
}
.fd-describe-param { font-size: 12px; font-weight: 600; color: var(--graiph-text-primary); }
.fd-describe-value { font-size: 12px; color: var(--graiph-accent-text); font-weight: 600; }
.fd-describe-value[hidden] { display: none; }

/* Top-bar workflow value picker: the parameter's fields as inline dropdowns. */
.fd-describe-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fd-describe-controls[hidden] { display: none; }
.fd-topbar-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.fd-topbar-field-label {
  font-size: 11px;
  color: var(--graiph-text-secondary);
}
.fd-topbar-select {
  height: 34px;
  min-width: 96px;
  background: var(--graiph-bg-secondary);
  border: 1px solid var(--graiph-border);
  border-radius: var(--graiph-radius-sm);
  color: var(--graiph-text-primary);
  font-family: inherit;
  font-size: 14px;
  padding: 0 8px;
  outline: none;
}
.fd-topbar-select:focus { border-color: var(--graiph-border-focus); }

/* Clear-descriptions button (two-tap confirm). Idle: neutral/outline. Armed:
   error-tinted so the destructive second tap is unmistakable. */
.fd-clear-descriptions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 10px;
  background: var(--graiph-bg-secondary);
  border: 1px solid var(--graiph-border);
  border-radius: var(--graiph-radius-sm);
  color: var(--graiph-text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.fd-clear-descriptions[hidden] { display: none; }
.fd-clear-descriptions i { width: 15px; height: 15px; }
.fd-clear-descriptions:hover { border-color: var(--graiph-alert-error, #E53935); color: var(--graiph-alert-error, #E53935); }
.fd-clear-descriptions[data-armed="true"] {
  background: var(--graiph-alert-error, #E53935);
  border-color: var(--graiph-alert-error, #E53935);
  color: #fff;
}

/* On-canvas value matrix: a grid of colored option swatches placed at the tap
   for continuous-parameter painting. Tablet-friendly (large targets). */
.fd-value-matrix {
  position: fixed;
  z-index: 1000;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 6px;
  max-width: min(86vw, 360px);
  max-height: 70vh;
  overflow-y: auto;
  padding: 8px;
  background: var(--graiph-bg-secondary);
  border: var(--graiph-border-default);
  border-radius: var(--graiph-radius-md, 8px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.fd-value-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 10px;
  background: var(--graiph-bg-tertiary);
  border: 1px solid var(--graiph-border);
  border-radius: var(--graiph-radius-sm);
  color: var(--graiph-text-primary);
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.fd-value-option:active { background: var(--graiph-bg-hover); }
.fd-value-option.is-selected {
  border-color: var(--graiph-accent);
  box-shadow: inset 0 0 0 1px var(--graiph-accent);
}
.fd-value-swatch {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}
.fd-value-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Workflow parameter picker: a native <select> list box reusing the value-matrix
   shell. Opened by tapping the active workflow chip. */
.fd-param-menu { grid-template-columns: 1fr; max-width: min(70vw, 260px); padding: 6px; }
.fd-param-select {
  width: 100%;
  border: 1px solid var(--graiph-border);
  border-radius: var(--graiph-radius-sm);
  background: var(--graiph-bg-tertiary);
  color: var(--graiph-text-primary);
  font-family: inherit;
  font-size: 14px;
  padding: 2px;
  outline: none;
}
.fd-param-select option {
  padding: 8px 10px;
  border-radius: var(--graiph-radius-sm);
}
.fd-param-select option:checked {
  background: var(--graiph-accent);
  color: var(--graiph-bg-primary);
}
.fd-param-menu .fd-value-option { justify-content: space-between; }
.fd-param-kind {
  font-size: 11px;
  color: var(--graiph-text-secondary);
  text-transform: capitalize;
  flex-shrink: 0;
}
.fd-wf-caret { width: 13px; height: 13px; vertical-align: middle; opacity: 0.8; }

/* Depth-block readings popup (F / P / R) — single-column form reusing the
   value-matrix shell. Opened by tapping a DepthBlock band in geotech mode. */
.fd-depth-popup {
  display: block;
  grid-template-columns: none;
  width: min(54vw, 180px);
  padding: 10px 12px 12px;
}
.fd-depth-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--graiph-text-secondary);
  padding-bottom: 7px;
  margin-bottom: 9px;
  border-bottom: 1px solid var(--graiph-border);
}
/* Flex column (not grid): rows stretch to the popup width instead of an auto
   grid track inflating to the number input's intrinsic width and overflowing. */
.fd-depth-grid { display: flex; flex-direction: column; gap: 6px; }
.fd-depth-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.fd-depth-key {
  width: 12px;
  flex-shrink: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--graiph-text-secondary);
}
.fd-depth-input {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  padding: 5px 10px;
  background: var(--graiph-bg-tertiary);
  border: 1px solid var(--graiph-border);
  border-radius: var(--graiph-radius-sm);
  color: var(--graiph-text-primary);
  font-family: inherit;
  font-size: 14px;
  /* No spinner buttons — they crowd the field and the value-matrix look is clean. */
  appearance: textfield;
  -moz-appearance: textfield;
}
.fd-depth-input::-webkit-outer-spin-button,
.fd-depth-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fd-depth-input:focus {
  outline: none;
  border-color: var(--graiph-accent);
}
.fd-depth-warn {
  margin-top: 9px;
  padding: 7px 9px;
  border-radius: var(--graiph-radius-sm);
  border: 1px solid var(--alert-warning, #F5A623);
  background: rgba(245, 166, 35, 0.12);
  color: var(--alert-warning, #F5A623);
  font-size: 12px;
  line-height: 1.35;
}
.fd-depth-actions { margin-top: 11px; }
.fd-depth-btn {
  width: 100%;
  min-height: 36px;
  padding: 7px 14px;
  background: var(--graiph-accent);
  border: none;
  border-radius: var(--graiph-radius-sm);
  color: #00001e;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.fd-depth-btn:active { filter: brightness(0.92); }

/* Mode-scoped help body text. */
.fd-help-text, .fd-help-empty {
  font-size: 14px;
  line-height: 1.5;
  color: var(--graiph-text-secondary);
  margin: 0;
}

/* Describe-mode help: gesture + shortcut reference (geológico / geotécnico). */
.fd-help-section { margin: 0 0 16px; }
.fd-help-section h4 {
  margin: 0 0 6px;
  font: 700 12px/1.2 var(--graiph-font, "Nunito Sans", sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--graiph-text-primary);
}
.fd-help-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--graiph-text-secondary);
}
.fd-help-list li { margin: 2px 0; }
.fd-help-list b { color: var(--graiph-text-primary); font-weight: 700; }
.fd-help-muted {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--graiph-text-muted);
}

/* Collapsible help sections — Describe-mode accordion. */
.fd-help-details {
  margin: 0 0 10px;
  border: var(--graiph-border-default);
  border-radius: var(--graiph-radius-md, 10px);
  overflow: hidden;
}
.fd-help-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  list-style: none;
  padding: 11px 13px;
  background: var(--graiph-bg-tertiary);
  font: 700 12px/1.2 var(--graiph-font, "Nunito Sans", sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--graiph-text-primary);
  transition: background 0.12s ease;
}
.fd-help-summary:hover { background: var(--graiph-bg-hover); }
.fd-help-summary::-webkit-details-marker { display: none; }
.fd-help-summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  opacity: 0.5;
}
.fd-help-details[open] > .fd-help-summary { border-bottom: var(--graiph-border-default); }
.fd-help-details[open] > .fd-help-summary::after { transform: rotate(45deg); }
.fd-help-details-body { padding: 12px 13px 4px; }

/* Subsections inside a collapsible. */
.fd-help-sub { margin: 0 0 14px; }
.fd-help-sub:last-child { margin-bottom: 2px; }
.fd-help-sub h5 {
  margin: 0 0 6px;
  font: 700 12px/1.2 var(--graiph-font, "Nunito Sans", sans-serif);
  color: var(--graiph-text-primary);
}

/* Two-column block (geotécnica toolbar: visualización | edición). */
.fd-help-cols { display: flex; gap: 10px; flex-wrap: wrap; }
.fd-help-card {
  flex: 1 1 190px;
  min-width: 0;
  padding: 10px 12px;
  border: var(--graiph-border-default);
  border-radius: var(--graiph-radius-sm, 8px);
  background: var(--graiph-bg-tertiary);
}
.fd-help-card h6 {
  margin: 0 0 9px;
  font: 700 10.5px/1.2 var(--graiph-font, "Nunito Sans", sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--graiph-text-secondary);
}

/* Button-style icon badge — mirrors the real header / toolbar buttons. */
.fd-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 5px;
  background: var(--graiph-bg-elevated);
  border: var(--graiph-border-default);
  color: var(--graiph-text-primary);
  vertical-align: -5px;
}
.fd-ic svg { width: 12px; height: 12px; }
.fd-ic-txt { font: 700 9px/1 var(--graiph-font, "Nunito Sans", sans-serif); letter-spacing: 0.02em; }

/* Icon-led help lists (badge + label rows). */
.fd-help-iconlist { list-style: none; margin: 0; padding: 0; }
.fd-help-iconlist li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 9px;
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--graiph-text-secondary);
}
.fd-help-iconlist li:last-child { margin-bottom: 0; }
.fd-help-iconlist .fd-ic { vertical-align: 0; }
.fd-help-iconlist b { display: block; margin-bottom: 2px; color: var(--graiph-text-primary); }

/* Muted detail text. */
.fd-help-dim { color: var(--graiph-text-muted); font-size: 12px; }

/* Keyboard keycaps in the shortcut list. */
.fd-kbd {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  margin: 0 1px;
  font: 600 11px/1.5 var(--graiph-font, "Nunito Sans", sans-serif);
  text-align: center;
  color: var(--graiph-text-primary);
  background: var(--graiph-bg-tertiary);
  border: var(--graiph-border-default);
  border-bottom-width: 2px;
  border-radius: 5px;
}
.fd-help-kbdlist li { margin: 7px 0; }

/* ── Workflow selector (control bar) ───────────────────────────────────── */
.fd-workflow-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: var(--graiph-border-default);
  background: var(--graiph-bg-tertiary);
  color: var(--graiph-text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.fd-workflow-chip[data-active="true"] {
  background: var(--graiph-accent);
  border-color: var(--graiph-accent);
  color: var(--graiph-bg-primary);
}
.fd-workflow-new { color: var(--graiph-text-primary); }
.fd-workflow-new svg { width: 14px; height: 14px; }

/* ── Parameter kind badges (config modal + readout) ────────────────────── */
.fd-kind-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.fd-kind-continuous   { background: rgba(51, 204, 102, 0.18); color: var(--graiph-accent-text); }
.fd-kind-intermittent { background: rgba(245, 166, 35, 0.18); color: var(--graiph-alert-warning); }
.fd-kind-point        { background: rgba(33, 150, 243, 0.18); color: var(--graiph-alert-info); }

/* ── Workflow config modal ─────────────────────────────────────────────── */
.fd-workflow-modal { max-width: 620px; height: auto; max-height: 92vh; }
.fd-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: var(--graiph-border-default);
  background: var(--graiph-bg-tertiary);
}
.fd-workflow-body { display: flex; flex-direction: column; gap: 16px; padding: 16px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.fd-wf-field { display: flex; flex-direction: column; gap: 6px; }
.fd-wf-label { font-size: 12px; font-weight: 700; color: var(--graiph-text-secondary); }
.fd-wf-label em { font-weight: 400; font-style: normal; color: var(--graiph-text-muted); }
.fd-wf-input {
  min-height: 40px;
  padding: 8px 12px;
  background: var(--graiph-bg-primary);
  border: 1px solid var(--graiph-border);
  border-radius: var(--graiph-radius-sm);
  color: var(--graiph-text-primary);
  font: inherit;
}
.fd-wf-traversal { display: inline-flex; border: var(--graiph-border-default); border-radius: var(--graiph-radius-sm); overflow: hidden; width: fit-content; }
.fd-wf-trav {
  border: none;
  background: transparent;
  color: var(--graiph-text-secondary);
  font-size: 13px;
  padding: 8px 16px;
  cursor: pointer;
}
.fd-wf-trav[data-active="true"] { background: var(--graiph-accent); color: var(--graiph-bg-primary); font-weight: 600; }
.fd-wf-hint { margin: 0; font-size: 12px; color: var(--graiph-text-muted); }
.fd-wf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fd-wf-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--graiph-bg-tertiary);
  border: 1px solid var(--graiph-border);
  border-radius: var(--graiph-radius-sm);
}
.fd-wf-order {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--graiph-accent); color: var(--graiph-bg-primary);
  border-radius: 50%; font-size: 11px; font-weight: 700;
}
.fd-wf-name { flex: 1 1 auto; font-size: 13px; color: var(--graiph-text-primary); }
.fd-wf-row-actions { display: inline-flex; gap: 4px; }
.fd-wf-row-actions .fd-icon-btn, .fd-wf-add { width: 32px; height: 32px; }
.fd-wf-row-actions .fd-icon-btn svg, .fd-wf-add svg { width: 16px; height: 16px; }
.fd-wf-empty { font-size: 13px; color: var(--graiph-text-muted); padding: 8px 4px; }

/* ===== Geotechnical sub-mode: describe-kind selector + fracture toolbar ===== */
/* Collapsed dropdown with a CUSTOM option list (a native select's popup
   scrolled instead of showing the three short options at once). Trigger skins
   like .fd-mode-select; the menu floats under it, all options always visible. */
.fd-kind-bar { position: relative; display: inline-flex; }
.fd-kind-bar[hidden] { display: none; }
.fd-kind-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 6px 12px;
  background: var(--graiph-bg-primary);
  border: 1px solid var(--graiph-border);
  border-radius: var(--graiph-radius-md);
  color: var(--graiph-text-primary);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.fd-kind-trigger:focus { outline: none; border-color: var(--graiph-border-focus); }
.fd-kind-trigger-icon { width: 18px; height: 18px; color: var(--graiph-accent-text); pointer-events: none; }
.fd-kind-trigger-arrow { color: var(--graiph-text-secondary); pointer-events: none; }
.fd-kind-menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 300;
  min-width: 100%;
  display: flex; flex-direction: column; gap: 2px;
  padding: 4px;
  background: var(--graiph-bg-primary);
  border: 1px solid var(--graiph-border);
  border-radius: var(--graiph-radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.fd-kind-menu[hidden] { display: none; }
.fd-kind-option {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  background: transparent; border: 0; border-radius: 6px;
  color: var(--graiph-text-primary);
  font-size: 13px; font-weight: 600; cursor: pointer;
  text-align: left; white-space: nowrap;
}
/* The base `display: flex` (author rule) beats the UA `[hidden] { display: none }`,
   so a disabled/unavailable option would still show. Restore hiding for hidden
   options (configurable logging modes + the legacy section-availability toggle). */
.fd-kind-option[hidden] { display: none; }
.fd-kind-option:hover { background: rgba(255, 255, 255, 0.06); }
.fd-kind-option[aria-selected="true"] { background: var(--graiph-accent); color: #00001E; }

.fd-fracture-toolbar { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
/* The class rule above out-specifies the UA [hidden]{display:none}, so guard it
   explicitly — otherwise the geotécnico toolbar stays visible in geológico. */
.fd-fracture-toolbar[hidden] { display: none; }
.fd-fracture-toolbar .fd-icon-btn { width: 36px; height: 36px; }
.fd-fracture-toolbar .fd-icon-btn svg { width: 18px; height: 18px; }
.fd-frac-sep { width: 1px; height: 24px; background: var(--graiph-border); margin: 0 4px; }
.fd-frac-category { display: inline-flex; gap: 4px; align-items: center; }
/* Compact category droplist (replaces the three pills — space in the tools bar). */
.fd-frac-cat-select {
  height: 36px; padding: 0 8px; border-radius: var(--graiph-radius-md);
  background: var(--graiph-bg-surface); border: 1px solid var(--graiph-border);
  color: var(--graiph-text-primary); font-size: 12px; font-weight: 600; cursor: pointer;
  max-width: 150px;
}
.fd-frac-delete svg { color: var(--graiph-alert-error); }

/* Geotechnical mode: let a single-finger drag over the core draw a fracture
   (vertical strokes cross the core) instead of scrolling the stack. */
body.fd-geotech-active #trayStack canvas { touch-action: none; }

/* ===== Section-logging mode: stepper bar (describeKind "section") =====
   Lives as the LAST child of #fdTraversalBar (round-2 G): margin-left:auto
   right-aligns it into the tools bar's free space, so the readout
   (JYD802_0.00_3.00 · 0.00 m – 3.00 m · 1/10) never clips header controls. */
.fd-section-bar { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.fd-section-bar[hidden] { display: none; }
/* Landscape: the right-docked description sheet overlays the tools bar's right
   end — shift the stepper left of the open sheet so prev/next stay tappable
   (eases in sync with the panel slide, like .fd-tray-stack). */
@media (min-width: 900px) and (orientation: landscape) {
  .fd-section-bar { transition: margin-right 0.34s cubic-bezier(0.4, 0, 0.2, 1); }
  body[data-sheet-open] .fd-section-bar { margin-right: var(--fd-sheet-w, 340px); }
}
.fd-section-bar .fd-icon-btn { width: 36px; height: 36px; }
.fd-section-bar .fd-icon-btn svg { width: 18px; height: 18px; }
.fd-section-info {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px;
  border-radius: var(--graiph-radius-md);
  border: 1px solid var(--graiph-border);
  font-size: 13px; font-weight: 600; color: var(--graiph-text-primary);
  white-space: nowrap;
}
.fd-section-info .fd-section-count { color: var(--graiph-text-muted); font-weight: 500; }
.fd-section-info { cursor: pointer; }
.fd-section-chip {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: var(--graiph-text-muted);
}
.fd-section-chip[data-status="partial"] { background: #F5A623; }
.fd-section-chip[data-status="complete"] { background: #33CC66; }
/* Lives in the sheet footer next to Borrar/Guardar (T5); sizing comes from
   .fd-btn — this only paints the accent-outline completion styling. */
.fd-section-done {
  border: 1px solid var(--graiph-accent);
  background: transparent; color: var(--graiph-text-primary);
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  /* Round-2 H: full-width second footer row (row 1 = Borrar + Guardar). */
  flex: 1 1 100%; order: 2;
}
.fd-section-done:disabled { opacity: 0.45; cursor: default; }
/* Completed section → the button un-sets (T11): warning-toned outline. */
.fd-section-done.fd-section-reopen { border-color: #F5A623; }

/* ── Section sheet tabs (T6): Parámetros | Calculados ── */
.fd-sheet-tabs {
  display: flex; gap: 4px; margin: 0 0 12px;
  border-bottom: var(--graiph-border-subtle);
}
.fd-sheet-tab {
  padding: 8px 14px; background: transparent; border: none;
  border-bottom: 2px solid transparent;
  color: var(--graiph-text-muted);
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.fd-sheet-tab[aria-selected="true"] {
  color: var(--graiph-text-primary);
  border-bottom-color: var(--graiph-accent);
}

/* ── Section computed-cells strip (M3-d, design §2.3 step 6) ── */
.fd-section-cells {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--graiph-border);
  border-radius: var(--graiph-radius-md);
  background: var(--graiph-surface-2, rgba(255, 255, 255, 0.03));
}
.fd-cells-head {
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--graiph-text-muted); text-transform: uppercase;
  margin-bottom: 8px;
}
.fd-cells-approx { color: var(--graiph-alert-warning); font-weight: 700; cursor: help; }

/* ── Estructuras Mayores "Calculados" tab (Corrida + Desde/Hasta range) ── */
.fd-struct-calc { display: flex; flex-direction: column; gap: 14px; }
.fd-struct-calc-field { display: flex; flex-direction: column; gap: 6px; }
.fd-struct-auto {
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--graiph-text-muted); text-transform: uppercase;
  border: 1px solid var(--graiph-border); border-radius: 4px;
  padding: 1px 5px; margin-left: 4px;
}
.fd-struct-corrida {
  font-family: var(--graiph-mono, monospace); font-size: 13px;
  color: var(--graiph-text-primary);
  padding: 8px 10px; border: 1px solid var(--graiph-border);
  border-radius: var(--graiph-radius-md);
  background: var(--graiph-surface-2, rgba(255, 255, 255, 0.03));
  word-break: break-all;
}
.fd-cells-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 6px;
}
.fd-cell {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 6px 8px;
  border: 1px solid var(--graiph-border);
  border-radius: var(--graiph-radius-sm, 6px);
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.fd-cell:active { border-color: var(--graiph-accent); }
/* Persistent tap-through highlight: the active cell keeps an accent border
   until toggled off / replaced / tab change. */
.fd-cell.is-active { border-color: var(--graiph-accent); background: var(--graiph-bg-hover); }
/* Static interval-window cells (Desde/Hasta/Largo) — informational, no
   tap-through highlight. */
.fd-cells-interval { margin-bottom: 10px; }
.fd-cell-static { cursor: default; }
.fd-cell-static:active { border-color: var(--graiph-border); }
/* Corrida cell spans the full row — its identifier string is longer than a metric. */
.fd-cell-wide { grid-column: 1 / -1; }
.fd-cell-wide .fd-cell-value { font-variant-numeric: normal; word-break: break-all; }
.fd-cell-label {
  font-size: 11px; font-weight: 600; color: var(--graiph-text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.fd-cell-value {
  font-size: 15px; font-weight: 700; color: var(--graiph-text-primary);
  font-variant-numeric: tabular-nums;
}
.fd-cells-pending {
  font-size: 12px; color: var(--graiph-text-muted); font-weight: 500;
}
