/* ── Calibration screen ──────────────────────────────────── */
#app.view-calibration {
  height: 100vh;
  overflow: hidden;
}
.view-calibration {
  width: 100%; height: 100%;
}
.calib-screen {
  display: flex; flex-direction: column;
  width: 100%; height: 100%;
}

/* Header */
.calib-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* Body: pad + panel side-by-side */
.calib-body {
  display: flex; flex: 1 1 0; min-height: 0;
}

/* Left column: pad + live readout */
.calib-left {
  flex: 0 0 48%; display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.1);
  min-height: 0;
}

.calib-pad {
  flex: 1 1 0;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: crosshair; touch-action: none;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.calib-pad-hint {
  text-align: center; color: rgba(255,255,255,0.3);
  font-size: 0.9rem; line-height: 2; pointer-events: none;
  margin: 0;
}

.calib-live {
  flex-shrink: 0; padding: 0.7rem 1.25rem;
}
.calib-live-tool {
  font-size: 1.35rem; font-weight: 700; display: block; margin-bottom: 0.35rem;
}
.calib-live-metrics {
  display: flex; gap: 1.25rem; flex-wrap: wrap;
}
.calib-live-metrics > div { display: flex; flex-direction: column; }
.calib-live-lbl {
  font-size: 0.7rem; color: rgba(255,255,255,0.4);
  text-transform: uppercase; letter-spacing: 0.03em;
}
.calib-live-metrics b { font-size: 0.95rem; }

/* Right column: threshold panel */
.calib-panel {
  flex: 1 1 0; min-width: 0;
  padding: 1rem 1.4rem; overflow-y: auto;
}

.calib-thr-row { margin-bottom: 0.85rem; }
.calib-thr-row > label {
  font-size: 0.78rem; color: rgba(255,255,255,0.5);
  display: block; margin-bottom: 0.2rem;
}
.calib-slider-wrap {
  display: flex; align-items: center; gap: 0.5rem;
}
.calib-slider-wrap input[type="range"]  { flex: 1; }
.calib-slider-wrap input[type="number"] { width: 4.5rem; font-size: 0.85rem; }

/* Range bar */
.calib-range-bar {
  display: flex; height: 26px; border-radius: 6px; overflow: hidden;
  margin-top: 1.1rem;
}
.calib-bar-seg {
  display: flex; align-items: center; justify-content: center;
  min-width: 4px; overflow: hidden;
  color: rgba(255,255,255,0.9); white-space: nowrap;
  font-size: 0.62rem; font-weight: 600; padding: 0 3px;
}
.calib-bar-palm {
  flex-shrink: 0;
  display: flex; align-items: center; padding: 0 8px;
  font-size: 0.62rem; font-weight: 600;
  color: rgba(255,255,255,0.9); white-space: nowrap;
}

.calib-save-msg {
  font-size: 0.82rem; color: var(--ep-correct);
  margin-top: 0.5rem; margin-bottom: 0;
}

/* History table */
.calib-history-wrap {
  flex-shrink: 0; max-height: 170px; overflow-y: auto;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 0.4rem 1.25rem 0.6rem;
}
.calib-history-title {
  font-size: 0.72rem; color: rgba(255,255,255,0.4);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.calib-table { font-size: 0.8rem; }
.calib-table th { color: rgba(255,255,255,0.4); font-weight: 500; border-color: rgba(255,255,255,0.08); }
.calib-table td { border-color: rgba(255,255,255,0.06); }
