.exercise-drag-handle {
  display: none !important;
}

/* Keep vertical page scrolling native while allowing a deliberate horizontal
   last-set swipe to be handled by mobile-log-fix.js. */
.set-swipe {
  touch-action: pan-y;
}

/* Focusing Load/Reps/RIR/Pain must never reveal Delete by itself. */
.set-swipe:not(.revealed):not(.swiping):focus-within .set-row,
.set-swipe:not(.revealed):not(.swiping):focus-within .cardio-set-card {
  transform: translate3d(0, 0, 0) !important;
}

/* Stable resting position when Delete is open. */
.set-swipe.revealed:not(.swiping) .set-row,
.set-swipe.revealed:not(.swiping) .cardio-set-card {
  transform: translate3d(-76px, 0, 0) !important;
}

/* Carousel feel: while swiping, the content follows the finger exactly with
   no transition. On release the normal short transition handles the snap. */
.set-swipe.swiping .set-row,
.set-swipe.swiping .cardio-set-card {
  transform: translate3d(var(--set-swipe-x, 0px), 0, 0) !important;
  transition: none !important;
  will-change: transform;
}

/* Safari can drop repeat(var(--field-count), ...) on the shared dynamic
   tracker. Give each generated field count an explicit grid so duration and
   other custom trackers render like the normal horizontal set table. */
.dynamic-tracking[style*="--field-count:1"] .set-row {
  grid-template-columns: 42px minmax(50px, 1fr) 52px;
}
.dynamic-tracking[style*="--field-count:2"] .set-row {
  grid-template-columns: 42px repeat(2, minmax(50px, 1fr)) 52px;
}
.dynamic-tracking[style*="--field-count:3"] .set-row {
  grid-template-columns: 42px repeat(3, minmax(50px, 1fr)) 52px;
}
.dynamic-tracking[style*="--field-count:4"] .set-row {
  grid-template-columns: 42px repeat(4, minmax(50px, 1fr)) 52px;
}
.dynamic-tracking[style*="--field-count:5"] .set-row {
  grid-template-columns: 42px repeat(5, minmax(50px, 1fr)) 52px;
}
.dynamic-tracking[style*="--field-count:6"] .set-row {
  grid-template-columns: 42px repeat(6, minmax(50px, 1fr)) 52px;
}

@media (max-width: 720px) {
  .dynamic-tracking[style*="--field-count:1"] .set-row {
    grid-template-columns: 28px minmax(39px, 1fr) 40px;
  }
  .dynamic-tracking[style*="--field-count:2"] .set-row {
    grid-template-columns: 28px repeat(2, minmax(39px, 1fr)) 40px;
  }
  .dynamic-tracking[style*="--field-count:3"] .set-row {
    grid-template-columns: 28px repeat(3, minmax(39px, 1fr)) 40px;
  }
  .dynamic-tracking[style*="--field-count:4"] .set-row {
    grid-template-columns: 28px repeat(4, minmax(39px, 1fr)) 40px;
  }
  .dynamic-tracking[style*="--field-count:5"] .set-row {
    grid-template-columns: 28px repeat(5, minmax(39px, 1fr)) 40px;
  }
  .dynamic-tracking[style*="--field-count:6"] .set-row {
    grid-template-columns: 28px repeat(6, minmax(39px, 1fr)) 40px;
  }
}
