/* Keep library matches in the form flow, immediately after the search field. */
.dashboard-page .custom-workout-suggestion-menu {
  display: block;
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-top: 6px !important;
  margin-bottom: 0 !important;
  overflow-y: auto !important;
  box-shadow: none !important;
}

.dashboard-page .custom-workout-suggestion-menu[hidden] {
  display: none !important;
}

.coach-admin-page .custom-workout-suggestion-menu {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 8px !important;
  overflow-y: auto !important;
  box-shadow: none !important;
}

/* Keep a dedicated second line for muscles. */
.dashboard-page .custom-workout-suggestion-menu button {
  display: grid !important;
  justify-items: start;
  justify-content: stretch !important;
  text-align: left !important;
  gap: 4px;
}
.dashboard-page .custom-workout-suggestion-menu button > :is(strong, small, span) {
  width: 100%;
  text-align: left;
}

.dashboard-page .custom-workout-card .custom-workout-card-toggle,
.coach-admin-page .custom-workout-card .custom-workout-card-toggle {
  top: 12px !important;
  transform: none !important;
}

.dashboard-page .custom-workout-card.is-open .custom-workout-card-toggle i,
.coach-admin-page .custom-workout-card.is-open .custom-workout-card-toggle i {
  transform: rotate(90deg) !important;
}

.dashboard-page .workout-session-date,
.coach-admin-page .workout-session-date {
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.dashboard-page .workout-session-date-control,
.coach-admin-page .workout-session-date-control {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  inline-size: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--ui-radius) !important;
  background: var(--paper) !important;
  color: inherit !important;
  font: inherit !important;
  text-transform: none !important;
}

.dashboard-page .workout-session-date-value,
.coach-admin-page .workout-session-date-value {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding-inline: 44px;
  color: var(--black);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  text-align: center;
  text-transform: none;
}

.dashboard-page .workout-session-date-control input[type="date"],
.coach-admin-page .workout-session-date-control input[type="date"] {
  position: relative !important;
  z-index: 2;
  display: block !important;
  width: 100% !important;
  inline-size: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding-inline: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  caret-color: transparent !important;
}

.dashboard-page .workout-session-date-control input[type="date"]::-webkit-calendar-picker-indicator,
.coach-admin-page .workout-session-date-control input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 14px;
}

.dashboard-page .workout-start-control,
.coach-admin-page .workout-start-control {
  display: grid;
  width: 100%;
  margin: -2px 0 4px;
}

.dashboard-page .workout-start-button,
.coach-admin-page .workout-start-button {
  width: 100%;
  min-height: 52px;
  border-radius: var(--ui-radius) !important;
  font-weight: 900;
}

.dashboard-page .workout-start-button.is-active,
.coach-admin-page .workout-start-button.is-active {
  border-color: var(--black);
  background: var(--lime);
  color: var(--black);
}

@media (max-width: 760px) {
  .dashboard-page .custom-workout-card > .custom-workout-card-summary,
  .coach-admin-page .custom-workout-card > .custom-workout-card-summary {
    display: block !important;
    padding: 10px 54px 10px 10px !important;
    overflow: visible !important;
  }

  .dashboard-page .custom-workout-card-summary > span,
  .coach-admin-page .custom-workout-card-summary > span {
    gap: 6px !important;
  }

  .dashboard-page .custom-workout-card-marker-row,
  .coach-admin-page .custom-workout-card-marker-row {
    display: inline-flex !important;
    width: fit-content !important;
    inline-size: fit-content !important;
    max-width: calc(100% - 44px) !important;
    padding-right: 0 !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
  }

  .dashboard-page .custom-workout-editable-title,
  .coach-admin-page .custom-workout-editable-title {
    margin: 0 !important;
  }

  .dashboard-page .custom-workout-card-marker-row .status-pill,
  .coach-admin-page .custom-workout-card-marker-row .status-pill {
    flex: 0 0 auto !important;
  }

  .dashboard-page .custom-workout-delete-icon,
  .coach-admin-page .custom-workout-delete-icon {
    display: grid !important;
    flex: 0 0 36px !important;
    width: 36px !important;
    inline-size: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 7px !important;
    place-items: center !important;
  }

  .dashboard-page .custom-workout-card .custom-workout-card-toggle,
  .coach-admin-page .custom-workout-card .custom-workout-card-toggle {
    top: 10px !important;
    right: 8px !important;
    transform: none !important;
  }

  .dashboard-page .custom-workout-card .set-header,
  .coach-admin-page .custom-workout-card .set-header {
    display: grid !important;
    grid-template-columns: minmax(34px, .45fr) minmax(62px, 1fr) minmax(54px, .82fr) minmax(44px, .58fr) 44px !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    font-size: .58rem !important;
  }

  .dashboard-page .custom-workout-card .set-header > span,
  .coach-admin-page .custom-workout-card .set-header > span {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .dashboard-page .custom-workout-card .set-input-field em,
  .coach-admin-page .custom-workout-card .set-input-field em,
  .dashboard-page .custom-workout-card .set-rir-button span,
  .coach-admin-page .custom-workout-card .set-rir-button span {
    display: none !important;
  }
}

/* Keep the exercise-name editor roomy when open and compact when collapsed. */
.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-name-field-label,
.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-collapsed-name {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 38px;
  padding-right: 88px;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-name-field-label {
  display: flex;
  color: #676b65;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-collapsed-name {
  display: block !important;
  color: #111411;
  font-size: clamp(1.35rem, 6vw, 1.75rem) !important;
  font-style: italic !important;
  font-weight: 900 !important;
  letter-spacing: -.025em;
  line-height: 1.02;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  white-space: normal;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-editable-title input {
  min-width: 0;
  font-size: 1rem !important;
  font-style: normal !important;
  font-weight: 400 !important;
  letter-spacing: normal;
  line-height: 1.2;
  text-overflow: ellipsis !important;
  text-transform: none;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-editable-title input::placeholder {
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-card.is-open .custom-workout-collapsed-name {
  max-height: none;
  padding-right: .12em;
  overflow: hidden;
  text-overflow: clip;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-card:not(.is-open) .custom-workout-name-field-label,
.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-card:not(.is-open) .custom-workout-editable-title {
  display: none !important;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-card:not(.is-open) .custom-workout-collapsed-name {
  display: -webkit-box !important;
  max-height: 3.65rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Grouped custom workouts edit every A1/A2 name above the swipe deck. */
.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-group-name-section {
  position: relative;
  z-index: 8;
  display: grid;
  gap: 10px;
  margin: 0 14px 14px;
  padding: 12px 14px 14px;
  border: 1px solid #d4d7cf;
  border-radius: 14px;
  background: #fff;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-group-name-toggle {
  display: flex;
  width: 100%;
  min-height: 44px;
  padding: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #111411;
  font: inherit;
  text-align: left;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-group-name-toggle > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-group-name-toggle strong {
  font-size: 16px;
  font-weight: 900;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-group-name-toggle small {
  overflow: hidden;
  color: #676b65;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-group-name-toggle i {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #d4d7cf;
  border-radius: 50%;
  color: #111411;
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-group-name-fields {
  display: grid;
  gap: 10px;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-group-name-fields[hidden] {
  display: none !important;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-group-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 6px;
  align-items: end;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-group-name-label {
  display: block;
  margin: 0 0 5px;
  color: #676b65;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: none;
}

.dashboard-page .custom-workout-carousel:is(
  [data-custom-workout-format="superset"],
  [data-custom-workout-format="circuit"]
) .custom-workout-card .set-header,
.dashboard-page .custom-workout-carousel:is(
  [data-custom-workout-format="superset"],
  [data-custom-workout-format="circuit"]
) .custom-workout-card .set-row {
  grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) 50px !important;
}

.dashboard-page .custom-workout-carousel:is(
  [data-custom-workout-format="superset"],
  [data-custom-workout-format="circuit"]
) .custom-workout-card .set-complete-button {
  display: none !important;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-group-name-row .custom-workout-name-editor,
.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-group-name-row input {
  width: 100%;
  min-width: 0;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-group-name-row input {
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid #111411;
  border-radius: 10px;
  background: #fff;
  color: #111411;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-group-name-row input:focus {
  border-color: #111411;
  outline: 3px solid var(--lime, #caff2c);
  outline-offset: 1px;
}

.dashboard-page .client-workout-panel-custom .custom-workout-carousel:is(
  [data-custom-workout-format="superset"],
  [data-custom-workout-format="circuit"]
) .custom-workout-card-summary :is(
  .custom-workout-name-field-label,
  .custom-workout-editable-title
) {
  display: none !important;
}

.dashboard-page .client-workout-panel-custom .custom-workout-carousel:is(
  [data-custom-workout-format="superset"],
  [data-custom-workout-format="circuit"]
) .custom-workout-group-card-code {
  display: inline-flex !important;
  width: fit-content;
  min-height: 32px;
  padding: 6px 10px;
  align-items: center;
  border-radius: 8px;
  background: var(--lime, #caff2c);
  color: #111411;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .06em;
}

.dashboard-page .client-workout-panel-custom .custom-workout-carousel:is(
  [data-custom-workout-format="superset"],
  [data-custom-workout-format="circuit"]
) .custom-workout-collapsed-name {
  display: block !important;
  max-height: none !important;
  padding-right: 88px;
  overflow: visible;
  text-overflow: clip;
  -webkit-line-clamp: initial;
}

/* Workout cards use a compact action cluster instead of repeating the group badge. */
.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-card > .custom-workout-card-summary {
  padding-right: 10px !important;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-card-actions {
  position: absolute;
  top: 10px;
  right: 8px;
  z-index: 2;
  display: flex;
  width: auto;
  align-items: center;
  gap: 4px;
}

.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-card-actions .custom-workout-delete-icon,
.dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-card-actions .custom-workout-card-toggle {
  position: static !important;
  inset: auto !important;
  flex: 0 0 38px !important;
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  transform: none !important;
}

/* Custom workout supersets and circuits become swipeable exercise cards on mobile. */
.custom-workout-carousel-heading,
.custom-workout-carousel-footer,
.custom-workout-carousel-cue,
.workout-group-progress,
.workout-group-primary-action {
  display: none;
}

.custom-workout-carousel-stack,
.custom-workout-add-actions {
  display: grid;
  gap: 16px;
}

.custom-workout-exercise-deck {
  display: contents;
}

.custom-workout-deck-layer,
.custom-workout-new-exercise-card {
  display: none;
}

.custom-workout-add-actions > [hidden] {
  display: none !important;
}

/* Match the Sets stepper for both custom-workout exercise controls. */
.dashboard-page .client-workout-panel-custom .custom-workout-exercise-control {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 8px 12px;
  align-items: center;
  gap: 8px;
  border: 1px solid #d7d9d2;
  border-radius: 14px;
  background: #f8f8f3;
  color: #111411;
}

.dashboard-page .client-workout-panel-custom .custom-workout-exercise-control :is(button, output) {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 6px;
  place-items: center;
  border: 1px solid #d7d9d2;
  border-radius: 11px;
  background: #fff;
  color: #111411;
  font: inherit;
  font-weight: 950;
  line-height: 1;
}

.dashboard-page .client-workout-panel-custom .custom-workout-exercise-control button {
  min-width: 44px;
  border: 2px solid #111411;
  font-size: 1.45rem;
  cursor: pointer;
  touch-action: manipulation;
}

.dashboard-page .client-workout-panel-custom .custom-workout-exercise-control [data-pick-custom-exercise] {
  background: var(--lime, #d7ff3f);
}

.dashboard-page .client-workout-panel-custom .custom-workout-exercise-control button:disabled {
  border-color: #d7d9d2;
  color: #a5a7a1;
  background: #eceee9;
  cursor: default;
}

.dashboard-page .client-workout-panel-custom .custom-workout-exercise-control output {
  display: flex;
  justify-content: center;
  gap: 9px;
  text-transform: uppercase;
}

.dashboard-page .client-workout-panel-custom .custom-workout-exercise-control output span {
  color: #676b65;
  font-size: .66rem;
  letter-spacing: .08em;
}

.dashboard-page .client-workout-panel-custom .custom-workout-exercise-control output strong {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.dashboard-page .client-workout-panel-custom .custom-workout-exercise-control button:focus-visible,
.dashboard-page .client-workout-panel-custom .custom-workout-card:focus-visible,
.dashboard-page .custom-workout-exercise-dialog :is(button, input):focus-visible {
  outline: 3px solid var(--blue, #2878ff);
  outline-offset: 3px;
}

.dashboard-page .custom-workout-exercise-dialog {
  width: min(440px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  height: fit-content;
  block-size: fit-content;
  min-height: 0;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  min-width: 0;
  margin: auto;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #d7d9d2;
  border-radius: 20px;
  background: #fff;
  color: #111411;
  color-scheme: light;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}

.dashboard-page .custom-workout-exercise-dialog[open] {
  display: block;
}

.dashboard-page .custom-workout-exercise-dialog::backdrop {
  background: rgba(17, 20, 17, .55);
}

.dashboard-page .custom-workout-exercise-dialog > header {
  display: flex;
  height: auto;
  min-height: 44px;
  min-width: 0;
  margin: 0 0 16px;
  padding: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-page .custom-workout-exercise-dialog :is(h2, h3, p) {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.dashboard-page .custom-workout-exercise-dialog :is(h2, h3) {
  font-size: clamp(1.3rem, 5vw, 1.65rem);
}

.dashboard-page .custom-workout-exercise-dialog > header :is(h2, h3) {
  flex: 1 1 auto;
}

.dashboard-page .custom-workout-exercise-dialog > p {
  margin-bottom: 14px;
  font-size: .9rem;
  line-height: 1.5;
}

.dashboard-page .custom-workout-exercise-dialog > header button {
  display: grid;
  flex: 0 0 44px !important;
  width: 44px !important;
  inline-size: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid #d7d9d2;
  border-radius: 11px;
  background: #fff;
  color: #111411;
  font: inherit;
  font-size: 1.4rem !important;
  line-height: 1;
  cursor: pointer;
}

.dashboard-page .custom-workout-exercise-dialog form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.dashboard-page .custom-workout-exercise-dialog .custom-workout-name-editor {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  flex: 0 0 auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  gap: 6px !important;
}

.dashboard-page .custom-workout-exercise-dialog label {
  display: block;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
}

.dashboard-page .custom-workout-exercise-dialog input[type="text"] {
  width: 100%;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 12px;
  border: 1px solid #d7d9d2;
  border-radius: 11px;
  background: #f8f8f3;
  color: #111411;
  font: inherit;
  font-size: 16px !important;
  line-height: 1.4;
}

.dashboard-page .custom-workout-exercise-dialog .custom-workout-picker-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.dashboard-page .custom-workout-exercise-dialog [data-workout-picker-filter] {
  max-width: 132px;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--line, #d7d9d2);
  border-radius: 11px;
  background: var(--surface, #fff);
  color: var(--ink, #111411);
  font: inherit;
  font-size: .8rem;
}

.dashboard-page .custom-workout-exercise-dialog [data-workout-picker-empty] {
  padding: 10px 0;
  color: var(--muted, #676b65);
  font-size: .85rem;
}

.dashboard-page .custom-workout-exercise-dialog form > button[type="submit"] {
  display: flex;
  flex: 0 0 auto;
  width: 100% !important;
  height: auto;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 12px 16px;
  font-size: 1rem !important;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dashboard-page .custom-workout-exercise-dialog [data-custom-exercise-suggestions] {
  position: static;
  inset: auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  max-height: min(340px, 46vh) !important;
  max-height: min(340px, 46dvh) !important;
  margin: 0 !important;
  padding: 4px;
  overflow-y: auto;
  box-shadow: none;
}

.dashboard-page .custom-workout-exercise-dialog [data-custom-exercise-suggestions]:not([hidden]) {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  gap: 6px;
}

.dashboard-page .custom-workout-exercise-dialog .custom-workout-exercise-options button {
  height: auto;
  min-height: 48px;
  align-content: start;
  padding: 10px 12px;
  font-size: .9rem !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.dashboard-page .custom-workout-exercise-dialog [hidden] {
  display: none !important;
}

@media (max-width: 420px), (max-height: 520px) {
  .dashboard-page .custom-workout-exercise-dialog {
    width: min(440px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 16px;
  }

  .dashboard-page .custom-workout-exercise-dialog > header {
    margin-bottom: 12px;
  }
}

.dashboard-page .custom-workout-exercise-options {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.dashboard-page .custom-workout-exercise-options button {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 14px;
  gap: 5px;
  border: 2px solid #111411;
  border-radius: 12px;
  background: #fff;
  color: #111411;
  font: inherit;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  touch-action: manipulation;
}

.dashboard-page .custom-workout-exercise-options button :is(span, small) {
  color: #676b65;
  font-size: .85rem;
  font-weight: 500;
}

.dashboard-page .custom-workout-exercise-dialog .custom-workout-exercise-options button.is-recommended {
  background: var(--lime, #d7ff3f);
}

@media (hover: hover) {
  .dashboard-page .client-workout-panel-custom .custom-workout-exercise-control button:not(:disabled):hover,
  .dashboard-page .custom-workout-exercise-options button:not(:disabled):hover {
    background: var(--lime, #d7ff3f);
  }
}

@media (max-width: 760px) {
  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] {
    min-width: 0;
    border: 1px solid rgba(40, 120, 255, .2);
    padding: 0 0 16px;
    background: #f5f8ff;
    color: #111411;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .workout-group-progress {
    display: grid;
    gap: 14px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid #d9dad4;
  }

  .dashboard-page .workout-group-progress-heading {
    position: relative;
    display: block;
  }

  .dashboard-page .workout-group-progress-heading > span {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .dashboard-page .workout-group-progress-heading small {
    padding-right: 120px;
    color: #287800;
    font-size: 14px;
    font-weight: 850;
    letter-spacing: .09em;
    line-height: 1;
    text-transform: uppercase;
  }

  .dashboard-page .workout-group-progress-heading strong {
    color: #111411;
    font-family: Impact, "Arial Narrow", sans-serif;
    font-size: clamp(24px, 7vw, 34px);
    font-weight: 400;
    letter-spacing: .015em;
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
  }

  .dashboard-page .workout-group-progress-heading em {
    position: absolute;
    top: 0;
    right: 0;
    color: #676b65;
    font-size: clamp(11px, 3vw, 13px);
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
  }

  .dashboard-page .workout-group-sequence {
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .dashboard-page .workout-group-sequence::-webkit-scrollbar {
    display: none;
  }

  .dashboard-page .workout-group-sequence-item {
    display: grid;
    flex: 1 0 min(42%, 150px);
    gap: 5px;
    min-width: 0;
    padding-top: 9px;
    border-top: 3px solid #c9ccc6;
    color: #676b65;
  }

  .dashboard-page .workout-group-sequence-item.is-done {
    border-color: #4fd072;
    color: #111411;
  }

  .dashboard-page .workout-group-sequence-item.is-next {
    border-color: #caff31;
    color: #111411;
  }

  .dashboard-page .workout-group-sequence-item strong,
  .dashboard-page .workout-group-sequence-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-page .workout-group-sequence-item strong {
    font-size: 14px;
    font-weight: 850;
    text-transform: uppercase;
  }

  .dashboard-page .workout-group-sequence-item span {
    font-size: 15px;
    font-weight: 700;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-carousel-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 12px;
    min-height: 28px;
    padding: 12px 18px;
    border-bottom: 1px solid #d9dad4;
    color: #111411;
  }

  .dashboard-page .custom-workout-carousel-heading strong {
    min-width: 0;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1.25;
    text-transform: uppercase;
  }

  .dashboard-page .custom-workout-carousel-heading span {
    flex: 0 0 auto;
    color: #676b65;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-list {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    grid-template-columns: none !important;
    align-items: start;
    gap: 12px !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 12px !important;
    border: 0 !important;
    border-left: 0 !important;
    background: transparent !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 12px;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-list.is-touch-swiping {
    scroll-snap-type: none;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-list::-webkit-scrollbar {
    display: none;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-list:focus-visible {
    outline: 3px solid var(--lime, #caff2c);
    outline-offset: 3px;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    opacity: .76;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    transition: opacity 180ms ease, transform 180ms ease;
    border-color: #d9dad4 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-card :is(
    .custom-workout-editable-title,
    .custom-workout-card-summary,
    .superset-exercise-heading strong,
    .exercise-notes-toggle,
    .previous-weights
  ) {
    color: #111411;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-card :is(
    .set-header,
    .set-label-field em,
    .set-input-field em,
    [data-log-status],
    .manual-exercise-hint
  ) {
    color: #676b65 !important;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-card :is(
    input,
    textarea,
    .set-rir-button
  ) {
    border-color: #d9dad4 !important;
    background: #fff !important;
    color: #111411 !important;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-card :is(input, textarea)::placeholder {
    color: #858982 !important;
    opacity: 1;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-card.is-carousel-active {
    opacity: 1;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-card:not(:first-child) {
    scroll-margin-inline-start: 0;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] :is(
    .custom-workout-delete-icon,
    .custom-workout-card-toggle
  ) {
    overflow: hidden !important;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] :is(
    .custom-workout-card-summary,
    .custom-workout-editable-title,
    .custom-workout-name-editor,
    .custom-workout-detail,
    .assigned-exercise-log,
    .custom-exercise-log,
    .set-table,
    .set-table [data-set-rows],
    .set-table-actions,
    .exercise-notes
  ) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-card .set-header,
  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-card .set-row {
    grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) 50px 40px !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"]:is(
    [data-custom-workout-format="superset"],
    [data-custom-workout-format="circuit"]
  ) .custom-workout-card .set-header,
  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"]:is(
    [data-custom-workout-format="superset"],
    [data-custom-workout-format="circuit"]
  ) .custom-workout-card .set-row {
    grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) 50px !important;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-card .set-table-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-card .set-finished-button {
    grid-column: 1 / -1;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-card .set-table-actions button {
    min-width: 0 !important;
    max-width: 100% !important;
    padding-inline: 8px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-carousel-footer {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px 12px 0;
  }

  .dashboard-page .custom-workout-carousel-arrow {
    display: grid;
    width: 48px;
    min-width: 48px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    place-items: center;
    border: 2px solid #8a8e87;
    border-radius: 0;
    background: transparent;
    color: #111411;
    font: inherit;
    font-size: 22px;
    font-weight: 900;
  }

  .dashboard-page .custom-workout-carousel-arrow:disabled {
    opacity: .3;
  }

  .dashboard-page .custom-workout-carousel-arrow:not(:disabled):active {
    border-color: var(--lime, #caff2c);
    color: var(--lime, #caff2c);
  }

  .dashboard-page .custom-workout-carousel-dots {
    display: flex;
    min-width: 0;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .dashboard-page .custom-workout-carousel-dots::-webkit-scrollbar {
    display: none;
  }

  .dashboard-page .custom-workout-carousel-dot {
    position: relative;
    flex: 0 0 30px;
    width: 30px;
    min-width: 30px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .dashboard-page .custom-workout-carousel-dot::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    border: 1px solid #c4cac3;
    background: transparent;
    content: "";
    transform: translate(-50%, -50%);
  }

  .dashboard-page .custom-workout-carousel-dot.is-active::after {
    border-color: var(--lime, #caff2c);
    background: var(--lime, #caff2c);
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .custom-workout-carousel-cue {
    display: block;
    min-height: 24px;
    margin: 8px 4px 0;
    color: #676b65;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.45;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .workout-group-primary-action {
    display: grid;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 10px 0 0;
    box-sizing: border-box;
  }

  .dashboard-page .custom-workout-carousel[data-carousel-enabled="true"] .workout-group-primary-action[hidden] {
    display: none !important;
  }

  .dashboard-page .workout-group-primary-action [data-workout-group-log-set] {
    width: 100%;
    min-width: 0;
    min-height: 56px;
    padding: 13px 14px;
    border: 2px solid #111411;
    border-radius: 8px;
    background: #caff31;
    box-shadow: 0 5px 0 #111411;
    color: #111411;
    font: inherit;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .035em;
    text-transform: uppercase;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
  }

  .dashboard-page .workout-group-primary-action [data-workout-group-log-set]:disabled {
    border-color: #c9ccc6;
    background: #e5e7e1;
    box-shadow: none;
    color: #676b65;
    cursor: default;
  }

  /* Option 1: mobile exercises use one full-width card in a lifted, swipeable deck. */
  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] {
    position: relative;
    min-width: 0;
    padding: 0 0 14px;
    overflow: hidden;
    border: 1px solid #d9dad4;
    border-radius: 22px;
    background: #f8f9f5;
    color: #111411;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-carousel-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    min-height: 68px;
    padding: 14px 116px 10px 16px;
    align-content: center;
    border-bottom: 0;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-carousel-heading strong {
    font-size: 16px;
    letter-spacing: 0;
    line-height: 1.15;
    text-transform: none;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-carousel-heading span {
    overflow: hidden;
    color: #676b65;
    font-size: 13px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-carousel-footer {
    position: absolute;
    z-index: 6;
    top: 12px;
    right: 12px;
    display: grid;
    grid-template-columns: repeat(2, 44px);
    gap: 8px;
    width: auto;
    padding: 0;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-carousel-dots {
    display: none;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-carousel-arrow {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    border: 1px solid #d4d7cf;
    border-radius: 12px;
    background: #fff;
    color: #111411;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-exercise-deck {
    --custom-workout-deck-peek: 108px;
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px 12px calc(var(--custom-workout-deck-peek) + 12px);
    overflow: hidden;
    box-sizing: border-box;
    isolation: isolate;
    perspective: 1000px;
    perspective-origin: 48% 32%;
    scroll-margin-bottom: calc(var(--client-bottom-dock-clearance, 94px) + 16px);
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-deck-layer {
    position: absolute;
    top: 20px;
    right: 22px;
    bottom: calc(var(--custom-workout-deck-peek) + 4px);
    left: 18px;
    display: block;
    border: 1px solid #d9dad4;
    border-radius: 20px;
    background: #f1f3ed;
    box-shadow: 0 12px 24px rgba(17, 20, 17, .12);
    pointer-events: none;
    transform-origin: 50% 92%;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-deck-layer-one {
    z-index: 2;
    transform: translate3d(8px, 10px, -42px) rotate(.8deg);
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-deck-layer-two {
    z-index: 1;
    transform: translate3d(15px, 19px, -82px) rotate(1.4deg);
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-list {
    --custom-workout-deck-drag-x: 0px;
    --custom-workout-deck-drag-rotate: 0deg;
    --custom-workout-deck-drag-opacity: 1;
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    border: 0 !important;
    background: transparent !important;
    overscroll-behavior-x: contain;
    touch-action: pan-y pinch-zoom;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-card {
    border: 1px solid #d4d7cf !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 16px 30px rgba(17, 20, 17, .18) !important;
    backface-visibility: hidden;
    transform-origin: 50% 88%;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-card.is-carousel-active {
    transform: translate3d(var(--custom-workout-deck-drag-x), 0, 0) rotate(var(--custom-workout-deck-drag-rotate));
    opacity: var(--custom-workout-deck-drag-opacity);
    transition: transform 180ms cubic-bezier(.22, 1, .36, 1), opacity 180ms ease-out;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-list.is-touch-swiping .custom-workout-card.is-carousel-active {
    transition: none !important;
    will-change: transform, opacity;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-list.is-deck-settling .custom-workout-card.is-carousel-active {
    pointer-events: none;
    transition: transform 180ms cubic-bezier(.22, 1, .36, 1), opacity 180ms ease-out !important;
    will-change: transform, opacity;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-card.is-exercise-complete {
    border-color: #21a637 !important;
    background: #f5faf4 !important;
    box-shadow: 0 0 0 2px rgba(33, 166, 55, .14), 0 16px 30px rgba(17, 20, 17, .14) !important;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-card:not(.is-carousel-active) {
    display: none !important;
    pointer-events: none;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-card.is-deck-entering-forward {
    animation: custom-workout-deck-enter-forward 460ms cubic-bezier(.16, 1, .3, 1);
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-card.is-deck-entering-backward {
    animation: custom-workout-deck-enter-backward 460ms cubic-bezier(.16, 1, .3, 1);
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-group-workout-deck="true"] {
    border-color: rgba(40, 120, 255, .28);
    border-left: 4px solid var(--blue, #2878ff);
    background: #f5f8ff;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-group-workout-deck="true"] .workout-group-progress {
    display: none !important;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-group-workout-deck="true"] .custom-workout-deck-layer {
    border-color: #c7d5ef;
    background: #edf3ff;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-group-workout-deck="true"] .custom-workout-group-next-card {
    position: absolute;
    z-index: 0;
    top: 24px;
    right: 34px;
    bottom: 10px;
    left: 20px;
    display: flex;
    width: auto !important;
    inline-size: auto !important;
    max-width: none !important;
    max-inline-size: none !important;
    min-width: 0;
    min-inline-size: 0 !important;
    padding: 16px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    overflow: hidden;
    border: 2px dashed #9dbd24;
    border-left: 7px solid var(--lime, #caff2c);
    border-radius: 20px;
    background: #efffc7;
    box-shadow: 0 14px 30px rgba(17, 20, 17, .15);
    color: #111411;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    text-align: left !important;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    transform: translate3d(8px, 0, -118px) scale(.97);
    transform-origin: 50% 92%;
  }

  .dashboard-page .custom-workout-group-next-card:not(:disabled):active {
    transform: translate3d(8px, 2px, -118px) scale(.965);
  }

  .dashboard-page .custom-workout-group-next-card:focus-visible {
    outline: 3px solid var(--blue, #2878ff);
    outline-offset: -5px;
  }

  .dashboard-page .custom-workout-group-next-card:disabled {
    cursor: default;
    pointer-events: none;
  }

  .dashboard-page .custom-workout-group-next-card[hidden] {
    display: none !important;
  }

  .dashboard-page .custom-workout-group-next-card > span:first-child {
    display: grid;
    min-width: 0;
    gap: 3px;
  }

  .dashboard-page .custom-workout-group-next-card small {
    color: #287800;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .dashboard-page .custom-workout-group-next-card strong {
    overflow: hidden;
    color: #111411;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-group-workout-deck="true"]:is(.is-superset-complete, .is-circuit-complete) {
    border-color: #21a637;
    border-left-color: #21a637;
    background: #f5faf4;
    box-shadow: 0 0 0 2px rgba(33, 166, 55, .14);
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-group-workout-deck="true"]:is(.is-superset-complete, .is-circuit-complete) .custom-workout-deck-layer {
    border-color: #79c98c;
    background: #dff5df;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-group-workout-deck="true"]:is(.is-superset-complete, .is-circuit-complete) .custom-workout-card.is-carousel-active {
    border-color: #21a637 !important;
    background: #f5faf4 !important;
    box-shadow: 0 0 0 2px rgba(33, 166, 55, .14), 0 16px 30px rgba(17, 20, 17, .14) !important;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel[data-group-workout-deck="true"] .custom-workout-group-next-card.is-complete {
    border-color: #21a637;
    border-left-color: #21a637;
    background: #dff5df;
  }

  .dashboard-page .client-workout-panel-custom .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-new-exercise-card {
    position: absolute;
    z-index: 0;
    top: 24px;
    right: 46px;
    bottom: 10px;
    left: 20px;
    display: flex;
    min-width: 0;
    padding: 16px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    overflow: hidden;
    border: 2px dashed #9dbd24;
    border-left: 7px solid var(--lime, #caff2c);
    border-radius: 20px;
    background: #efffc7;
    box-shadow: 0 14px 30px rgba(17, 20, 17, .15);
    color: #111411;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transform: translate3d(8px, 0, -118px) scale(.97);
    transform-origin: 50% 92%;
  }

  .dashboard-page .client-workout-panel-custom .custom-workout-carousel[data-custom-workout-deck="true"] .custom-workout-new-exercise-card[hidden] {
    display: none !important;
  }

  .dashboard-page .client-workout-panel-custom .custom-workout-new-exercise-card > span:first-child {
    display: grid;
    min-width: 0;
    gap: 3px;
  }

  .dashboard-page .client-workout-panel-custom .custom-workout-new-exercise-card small {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .dashboard-page .client-workout-panel-custom .custom-workout-new-exercise-card strong {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-page .client-workout-panel-custom .custom-workout-new-exercise-card:focus-visible {
    outline: 3px solid #111411;
    outline-offset: 3px;
  }

  .dashboard-page .client-workout-panel-custom[data-custom-workout-deck-enabled="true"] .custom-workout-add-actions {
    display: grid;
  }

  .dashboard-page .client-workout-panel-custom .custom-workout-card.is-entering-deck {
    animation: custom-workout-card-lift-in 360ms cubic-bezier(.22, 1, .36, 1);
  }
}

@keyframes custom-workout-card-lift-in {
  from {
    opacity: .72;
    transform: translate3d(10px, 68px, -110px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes custom-workout-deck-enter-forward {
  0% { opacity: .35; transform: translate3d(54px, 18px, -70px) rotate(2deg) scale(.96); }
  68% { opacity: 1; transform: translate3d(-5px, -2px, 0) rotate(-.15deg) scale(1.006); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0) scale(1); }
}

@keyframes custom-workout-deck-enter-backward {
  0% { opacity: .35; transform: translate3d(-54px, 18px, -70px) rotate(-2deg) scale(.96); }
  68% { opacity: 1; transform: translate3d(5px, -2px, 0) rotate(.15deg) scale(1.006); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-page .custom-workout-carousel .custom-workout-card,
  .dashboard-page .custom-workout-card.is-entering-deck,
  .dashboard-page .custom-workout-card.is-deck-entering-forward,
  .dashboard-page .custom-workout-card.is-deck-entering-backward,
  .dashboard-page .custom-workout-list.is-touch-swiping .custom-workout-card,
  .dashboard-page .custom-workout-list.is-deck-settling .custom-workout-card {
    transition: none !important;
    animation: none !important;
  }
}

/* Prevent accidental iOS focus and double-tap zoom on workout controls. */
@media (max-width: 760px) {
  .dashboard-page :where(input, select, textarea),
  .coach-admin-page :where(input, select, textarea) {
    font-size: 16px !important;
  }

  .dashboard-page :where(a, button, input, select, textarea, [role="button"]),
  .coach-admin-page :where(a, button, input, select, textarea, [role="button"]) {
    touch-action: manipulation;
  }
}

/* Unified custom superset/circuit logger. This replaces the swipe-deck preview
   only when the grouped renderer opts in with data-custom-workout-grouped. */
.dashboard-page [data-custom-workout-grouped="true"] {
  --grouped-ink: #111411;
  --grouped-muted: #676b65;
  --grouped-line: #d7d9d2;
  --grouped-paper: #fff;
  --grouped-cream: #f8f8f3;
  --grouped-lime: var(--lime, #d7ff3f);
  --grouped-blue: var(--blue, #2878ff);
  --grouped-gold: #d5a239;
  --grouped-focus: #ffd400;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: var(--grouped-ink);
  color-scheme: light;
  box-sizing: border-box;
}

.dashboard-page [data-custom-workout-grouped="true"],
.dashboard-page [data-custom-workout-grouped="true"] *,
.dashboard-page [data-custom-workout-grouped="true"] *::before,
.dashboard-page [data-custom-workout-grouped="true"] *::after {
  box-sizing: border-box;
}

.dashboard-page [data-custom-workout-grouped="true"] :is(
  .custom-workout-deck-layer,
  .custom-workout-group-next-card,
  .custom-workout-new-exercise-card,
  .custom-workout-carousel-footer,
  .custom-workout-carousel-cue,
  .custom-workout-carousel-dots,
  .custom-workout-carousel-arrow
) {
  display: none !important;
}

.dashboard-page [data-custom-workout-grouped="true"] :is(
  .custom-workout-carousel-stack,
  .custom-workout-exercise-deck,
  .custom-workout-list
) {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  transform: none !important;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-card {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--grouped-line);
  border-radius: 20px;
  background: var(--grouped-paper);
  box-shadow: 0 12px 28px rgba(17, 20, 17, .09);
}

.dashboard-page .workout-next-exercise-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  margin-top: 10px;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--grouped-ink);
  border-radius: 14px;
  background: var(--lime);
  color: var(--grouped-ink);
  font: inherit;
  font-size: .82rem;
  font-weight: 950;
  letter-spacing: .04em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .14s ease, box-shadow .2s ease;
}

.dashboard-page .workout-next-exercise-button:active {
  transform: scale(.985);
}

.dashboard-page .workout-next-exercise-button.is-finish-link {
  background: var(--grouped-paper);
}

.dashboard-page [data-custom-workout-carousel].is-navigation-target .custom-workout-grouped-card {
  animation: workout-next-card-arrival .62s cubic-bezier(.2, .75, .25, 1);
}

@keyframes workout-next-card-arrival {
  0% { box-shadow: 0 0 0 0 rgba(202, 255, 38, 0); }
  45% { box-shadow: 0 0 0 6px rgba(202, 255, 38, .25), 0 12px 28px rgba(17, 20, 17, .09); }
  100% { box-shadow: 0 12px 28px rgba(17, 20, 17, .09); }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-page .workout-next-exercise-button,
  .dashboard-page [data-custom-workout-carousel].is-navigation-target .custom-workout-grouped-card {
    transition: none;
    animation: none;
  }
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-card-heading {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  padding: 16px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--grouped-line);
  background: var(--grouped-cream);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-card-heading :is(h2, h3, strong) {
  min-width: 0;
  margin: 0;
  color: var(--grouped-ink);
  font-size: clamp(1.2rem, 5.8vw, 1.75rem);
  font-style: normal;
  font-weight: 950;
  letter-spacing: -.025em;
  line-height: 1;
  overflow-wrap: anywhere;
  text-transform: none;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-card-heading > div {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-cue {
  margin: 0;
  color: var(--grouped-muted);
  font-size: clamp(.78rem, 2vw, .95rem);
  font-weight: 500;
  line-height: 1.25;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-progress {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  color: #497000;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1.25;
  text-align: right;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-timer {
  display: flex;
  min-width: 0;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--grouped-line);
  background: var(--grouped-ink);
  color: #fff;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-timer[hidden] {
  display: none !important;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-timer-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  color: #fff;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .04em;
  line-height: 1.25;
  text-transform: uppercase;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-timer-copy > strong {
  color: #fff;
  font: inherit;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-timer > :is(output, time),
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-timer-copy :is(output, time) {
  flex: 0 0 auto;
  color: var(--grouped-lime);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key {
  display: grid;
  min-width: 0;
  padding: 4px 12px;
  background: var(--grouped-paper);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  min-width: 0;
  padding: 7px 0;
  align-items: baseline;
  gap: 8px;
  row-gap: 3px;
  border-bottom: 1px solid var(--grouped-line);
  color: var(--grouped-ink);
  font-size: clamp(.9rem, 4.6vw, 1.1rem);
  font-style: italic;
  font-weight: 950;
  letter-spacing: -.01em;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.dashboard-page .client-workout-panel-custom .custom-workout-grouped-exercise-key-item [data-open-custom-exercise] {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: left;
  text-transform: inherit;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  touch-action: manipulation;
}

.dashboard-page .client-workout-panel-custom .custom-workout-grouped-exercise-key-item:focus-within {
  background: var(--grouped-cream, #f8f8f3);
}

.dashboard-page .client-workout-panel-custom .custom-workout-grouped-exercise-key-item [data-open-custom-exercise]:focus-visible {
  outline: 3px solid var(--blue, #2878ff);
  outline-offset: 2px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-round-stepper {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  min-width: 0;
  padding: 8px 12px;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--grouped-line);
  background: var(--grouped-cream);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-round-stepper :is(button, output) {
  display: grid;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 6px;
  place-items: center;
  border: 1px solid var(--grouped-line);
  border-radius: 11px;
  background: var(--grouped-paper);
  color: var(--grouped-ink);
  font: inherit;
  font-weight: 950;
  line-height: 1;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-round-stepper button {
  border: 2px solid var(--grouped-ink);
  font-size: 1.45rem;
  touch-action: manipulation;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-round-stepper button:last-child {
  background: var(--grouped-lime);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-round-stepper button:disabled {
  border-color: var(--grouped-line);
  color: #a5a7a1;
  background: #eceee9;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-round-stepper output {
  display: flex;
  justify-content: center;
  gap: 9px;
  text-transform: uppercase;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-round-stepper output span {
  color: var(--grouped-muted);
  font-size: .66rem;
  letter-spacing: .08em;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-round-stepper output strong {
  font-size: 1.05rem;
}

/* Approved compact warm-up / working-set picker for custom straight sets. */
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-set-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 7px 9px 8px;
  border-top: 1px solid var(--grouped-line);
  background: var(--grouped-cream);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-count-field {
  display: block;
  position: relative;
  min-width: 0;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-count-field span {
  display: block;
  padding: 0 0 3px 2px;
  color: var(--grouped-muted);
  font-size: .69rem;
  font-weight: 900;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-count-field select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 0 32px 0 11px;
  border: 2px solid var(--grouped-ink) !important;
  border-radius: 10px;
  background: var(--grouped-paper) !important;
  color: var(--grouped-ink) !important;
  font: inherit;
  font-size: 1.3rem !important;
  font-weight: 900;
  touch-action: manipulation;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-count-field.is-working select {
  background: #ffd400 !important;
  color: #111411 !important;
  border-color: #111411 !important;
  color-scheme: light !important;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-count-field::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 20px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--grouped-ink);
  border-bottom: 2px solid var(--grouped-ink);
  transform: rotate(45deg);
  pointer-events: none;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-count-field.is-working::after {
  border-color: #111411;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-count-field select:focus-visible {
  outline: 3px solid #ffd400;
  outline-offset: 2px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item:last-child {
  border-bottom: 0;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-number {
  color: var(--grouped-ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-columns,
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-row {
  display: grid;
  grid-template-columns: 44px repeat(3, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-items: end;
  gap: 6px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-columns {
  padding: 6px 10px 2px;
  color: var(--grouped-muted);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .035em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-columns > :first-child {
  color: transparent;
  user-select: none;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-section {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 0 0 6px 5px;
  border-top: 1px solid var(--grouped-line);
  background: var(--grouped-paper);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-section.is-current-step {
  box-shadow: inset 0 0 0 3px var(--grouped-focus);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-section:is(.is-warmup, .is-warm-up, [data-section="warmup"], [data-kind="warmup"], [data-custom-grouped-section="warmup"], [data-custom-workout-grouped-section="warmup"]) {
  background: #fffcf1;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-section-heading {
  display: flex;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--grouped-line);
  color: var(--grouped-ink);
  font-size: .94rem;
  font-weight: 950;
  letter-spacing: .015em;
  line-height: 1.1;
  text-transform: uppercase;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-section-heading :is(h4, p) {
  margin: 0;
  font: inherit;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-section-heading h4 {
  flex: 0 0 auto;
  overflow-wrap: normal;
  white-space: nowrap;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-section-heading :is(p, small, span:last-child) {
  color: var(--grouped-muted);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .025em;
  text-align: right;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-row {
  padding: 4px 10px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-code,
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-field {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--grouped-line);
  border-radius: 11px;
  background: var(--grouped-cream);
  color: var(--grouped-ink);
  font: inherit;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-field > input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 7px 3px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--grouped-ink);
  font: inherit;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-field > input::placeholder {
  color: rgba(103, 110, 106, .52);
  opacity: 1;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-field > input::-webkit-inner-spin-button,
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-field > input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-code {
  border-color: #9dbd24;
  background: #fbffe9;
  color: #486000;
  font-size: .86rem;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-section:is(.is-warmup, .is-warm-up, [data-section="warmup"], [data-kind="warmup"], [data-custom-grouped-section="warmup"], [data-custom-workout-grouped-section="warmup"]) .custom-workout-grouped-code {
  border-color: #c7932b;
  background: #fffaf0;
  color: #895c00;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-field:focus-within {
  border-color: var(--grouped-ink);
  outline: 3px solid var(--grouped-lime);
  outline-offset: 1px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-field:has(> input[aria-invalid="true"]) {
  border-color: #d52922;
  box-shadow: inset 0 0 0 1px #d52922;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-row:is(.is-complete, .is-logged) {
  background: #f2faef;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-row:is(.is-complete, .is-logged) .custom-workout-grouped-code {
  border-color: #21a637;
  background: #e6f8e4;
  color: #126f24;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-round-action {
  display: grid;
  min-width: 0;
  padding: 6px 10px 0;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-warmup-actions {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: 8px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-warmup-actions[hidden] {
  display: none !important;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-skip-warmup {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 2px solid var(--grouped-ink);
  border-radius: 11px;
  background: var(--grouped-paper);
  color: var(--grouped-ink);
  font: inherit;
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .02em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  touch-action: manipulation;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-log-round {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 2px solid var(--grouped-ink);
  border-radius: 11px;
  background: var(--grouped-lime);
  color: var(--grouped-ink);
  font: inherit;
  font-size: .82rem;
  font-weight: 950;
  letter-spacing: .025em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  touch-action: manipulation;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-rest-controls {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  min-width: 0;
  gap: 6px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-rest-controls[hidden],
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-log-round[hidden] {
  display: none !important;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-rest-controls button {
  min-width: 0;
  min-height: 44px;
  padding: 7px 5px;
  border: 2px solid var(--grouped-ink);
  border-radius: 11px;
  background: var(--grouped-paper);
  color: var(--grouped-ink);
  font: inherit;
  font-size: .77rem;
  font-weight: 950;
  line-height: 1.05;
  text-transform: uppercase;
  touch-action: manipulation;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-rest-controls [data-custom-grouped-rest-toggle] {
  background: var(--grouped-ink);
  color: var(--grouped-lime);
  font-variant-numeric: tabular-nums;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-log-round:is(.is-logged, [aria-pressed="true"]),
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-log-round[data-custom-grouped-log-warmup][aria-pressed="true"]:disabled {
  border-color: #16852a;
  background: #e6f8e4;
  color: #126f24;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-log-round:disabled,
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-skip-warmup:disabled {
  border-color: #c9ccc6;
  background: #e8e9e4;
  color: var(--grouped-muted);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-log-round:focus-visible,
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-skip-warmup:focus-visible,
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-round-stepper button:focus-visible,
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-rest-controls button:focus-visible,
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-actions button:focus-visible,
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-toggle:focus-visible,
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-delete:focus-visible,
.dashboard-page [data-custom-workout-grouped="true"] [data-custom-workout-group-name-delete]:focus-visible {
  outline: 3px solid var(--grouped-blue);
  outline-offset: 2px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  padding: 10px 12px;
  gap: 8px;
  background: var(--grouped-cream);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-actions.is-round-only {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-actions button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--grouped-ink);
  border-radius: 11px;
  background: var(--grouped-paper);
  color: var(--grouped-ink);
  font: inherit;
  font-size: .76rem;
  font-weight: 950;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  touch-action: manipulation;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-actions button:last-child {
  background: var(--grouped-ink);
  color: #fff;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-actions.is-round-only button:last-child {
  background: var(--grouped-paper);
  color: var(--grouped-ink);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-code:disabled {
  cursor: default;
  opacity: 1;
}

/* Keep the set fields easy to tap while using less vertical space per round. */
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-row {
  padding-block: 2px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-columns {
  padding-block: 4px 1px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-section-heading {
  min-height: 40px;
  padding-block: 6px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-round-exercise-title {
  display: none;
}

.dashboard-page .custom-workout-next-set-advice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  color: var(--grouped-ink);
  font-size: .78rem;
  line-height: 1.3;
}

.dashboard-page .custom-workout-next-set-advice button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--grouped-ink);
  border-radius: 9px;
  background: var(--grouped-paper);
  color: var(--grouped-ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.dashboard-page .client-workout-pr-dialog {
  width: min(92vw, 520px);
  max-height: min(85dvh, 740px);
  padding: 18px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 60px #0008;
}

.dashboard-page .client-workout-pr-dialog::backdrop {
  background: #0009;
}

.dashboard-page .client-workout-pr-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-page .client-workout-pr-dialog :is(h2, h3, p) {
  margin: 0 0 10px;
  color: inherit;
}

.dashboard-page .client-workout-pr-dialog header button {
  flex: 0 0 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.5rem;
}

.dashboard-page .client-workout-pr-list {
  display: grid;
  gap: 16px;
}

.dashboard-page .client-workout-pr-list section {
  display: grid;
  gap: 6px;
}

.dashboard-page .client-workout-pr-list section > button {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dashboard-page .client-workout-pr-list button small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
}

.dashboard-page .client-workout-pr-dialog :is(button, input):focus-visible,
.dashboard-page .custom-workout-next-set-advice button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.dashboard-page .custom-workout-format-button {
  min-height: 44px !important;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-status {
  min-width: 0;
  padding: 0 14px 14px;
  color: #126f24;
  font-size: .78rem;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-status:empty,
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-status[hidden] {
  display: none !important;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-source {
  display: none !important;
}

/* Notes stay available below the final set while backing log fields stay hidden. */
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-notes {
  min-width: 0;
  padding: 4px 12px;
  border-top: 1px solid var(--grouped-line);
  background: var(--grouped-paper);
  color: var(--grouped-ink);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-notes[hidden],
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-notes [hidden] {
  display: none !important;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-notes details {
  min-width: 0;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-notes summary {
  display: flex;
  min-width: 0;
  min-height: 44px;
  padding: 8px 0;
  align-items: center;
  gap: 8px;
  color: var(--grouped-ink);
  font-size: .82rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
  list-style: none;
  text-transform: none;
  cursor: pointer;
  touch-action: manipulation;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-notes summary::-webkit-details-marker {
  display: none;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-notes summary::after {
  content: "+";
  flex: 0 0 20px;
  margin-left: auto;
  color: var(--grouped-muted);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-notes details[open] > summary::after {
  content: "−";
}

.dashboard-page [data-custom-workout-grouped="true"] [data-custom-grouped-notes-state] {
  margin-left: auto;
  color: #126f24;
  font-size: .7rem;
  font-weight: 600;
}

.dashboard-page [data-custom-workout-grouped="true"] [data-custom-grouped-notes-state]:empty {
  display: none;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-notes summary:has([data-custom-grouped-notes-state]:not(:empty))::after {
  margin-left: 0;
}

.dashboard-page [data-custom-workout-grouped="true"] [data-custom-grouped-notes-fields] {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 4px 0 12px;
}

.dashboard-page [data-custom-workout-grouped="true"] [data-custom-grouped-notes-fields] > label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.dashboard-page [data-custom-workout-grouped="true"] [data-custom-grouped-notes-label] {
  min-width: 0;
  color: var(--grouped-muted);
  font-size: .75rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-transform: none;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-notes textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 84px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--grouped-line);
  border-radius: 10px !important;
  background: var(--grouped-cream);
  color: var(--grouped-ink);
  font-family: inherit;
  font-size: 16px !important;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
  overflow: auto !important;
  resize: vertical;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-notes :is(summary, textarea):focus-visible {
  outline: 3px solid var(--grouped-blue);
  outline-offset: 2px;
}

.dashboard-page .custom-workout-grouped-finish-overlay {
  position: fixed;
  z-index: 10020;
  inset: 0;
  display: grid;
  min-width: 0;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  place-items: center;
  overflow: auto;
  background: rgba(17, 20, 17, .68);
  color: #111411;
  color-scheme: light;
}

body.dashboard-page.custom-workout-grouped-finish-open {
  overflow: hidden;
}

.dashboard-page .custom-workout-grouped-finish-overlay[hidden] {
  display: none !important;
}

.dashboard-page .custom-workout-grouped-finish-dialog {
  display: grid;
  width: min(100%, 430px);
  max-width: 100%;
  min-width: 0;
  padding: 20px;
  gap: 14px;
  overflow: hidden;
  border: 1px solid #d7d9d2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}

.dashboard-page .custom-workout-grouped-finish-dialog > p {
  margin: 0;
  color: #676b65;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.4;
}

.dashboard-page .custom-workout-grouped-finish-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-page .custom-workout-grouped-finish-heading :is(h2, h3, strong) {
  min-width: 0;
  margin: 0;
  color: #111411;
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-page .custom-workout-grouped-finish-heading > span {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.dashboard-page .custom-workout-grouped-finish-heading small {
  color: #497000;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.dashboard-page .custom-workout-grouped-finish-heading button {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid #d7d9d2;
  border-radius: 50%;
  background: #fff;
  color: #111411;
  font: inherit;
  font-size: 1.3rem;
  font-weight: 900;
}

.dashboard-page .custom-workout-grouped-finish-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: 8px;
}

.dashboard-page .custom-workout-grouped-finish-choices button {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 11px 9px;
  border: 2px solid #111411;
  border-radius: 11px;
  background: #fff;
  color: #111411;
  font: inherit;
  font-size: .76rem;
  font-weight: 950;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  touch-action: manipulation;
}

.dashboard-page .custom-workout-grouped-finish-choices button:last-child {
  background: var(--lime, #d7ff3f);
}

/* The grouped exercise editor is a compact, collapsible card above the logger. */
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-section {
  z-index: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 14px;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--grouped-line);
  border-radius: 20px;
  background: var(--grouped-paper);
  box-shadow: none;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-toggle {
  min-height: 64px;
  padding: 10px 12px 10px 16px;
  gap: 10px;
  background: var(--grouped-cream);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-toggle > span {
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  align-items: baseline;
  gap: 8px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-toggle strong {
  min-width: 0;
  color: var(--grouped-ink);
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: .02em;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-toggle small {
  color: var(--grouped-muted);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .03em;
  text-align: right;
  text-transform: uppercase;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-toggle i {
  flex-basis: 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border-color: var(--grouped-line);
  background: var(--grouped-paper);
  font-size: 1.35rem;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-fields {
  padding: 10px;
  gap: 8px;
  border-top: 1px solid var(--grouped-line);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-row {
  grid-template-columns: minmax(0, 1fr) 44px;
  min-width: 0;
  gap: 7px;
  align-items: end;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-row input {
  min-height: 48px;
  padding: 8px 10px;
  border-color: var(--grouped-ink);
  background: var(--grouped-paper);
  color: var(--grouped-ink);
  font-size: 16px;
  font-weight: 750;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-delete,
.dashboard-page [data-custom-workout-grouped="true"] [data-custom-workout-group-name-delete] {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin-bottom: 2px;
  padding: 10px;
  place-items: center;
  border: 1px solid #ffc5c1;
  border-radius: 10px;
  background: #fff;
  color: #d52922;
  font: inherit;
  line-height: 1;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-delete svg,
.dashboard-page [data-custom-workout-grouped="true"] [data-custom-workout-group-name-delete] svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

@media (max-width: 390px) {
  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-card-heading {
    padding: 13px 12px;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-columns,
  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-row {
    grid-template-columns: 44px repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-columns,
  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-row {
    padding-right: 8px;
    padding-left: 8px;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-field,
  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-code {
    min-height: 44px;
    border-radius: 9px;
    font-size: .92rem;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-toggle > span {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-toggle small {
    text-align: left;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-row {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 5px;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-delete,
  .dashboard-page [data-custom-workout-grouped="true"] [data-custom-workout-group-name-delete] {
    width: 44px;
    min-width: 44px;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-actions,
  .dashboard-page .custom-workout-grouped-finish-choices {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 761px) {
  .dashboard-page [data-custom-workout-grouped="true"] {
    max-width: 760px;
    margin-inline: auto;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-columns,
  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-row {
    grid-template-columns: 64px repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-columns,
  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-row {
    padding-right: 18px;
    padding-left: 18px;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-field,
  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-code {
    min-height: 48px;
  }
}

@media (prefers-color-scheme: dark) {
  /* The workout surface intentionally remains paper/cream in dark browser UI;
     explicit colors prevent native controls from becoming illegible. */
  .dashboard-page [data-custom-workout-grouped="true"] :is(input, select, button),
  .dashboard-page .custom-workout-grouped-finish-overlay :is(input, select, button) {
    color-scheme: light;
  }
}

/* Photo-rich workout cards. Static start/end art is the lightweight list
   preview; motion is only inserted after the athlete opens the preview. */
.dashboard-page [data-custom-workout-grouped="true"] .workout-progression-group-slot,
.dashboard-page [data-exercise-log] > [data-workout-progression] {
  display: none !important;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key {
  padding: 0;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item,
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item:has(.exercise-video-link) {
  display: grid;
  grid-template-columns: clamp(116px, 34%, 210px) minmax(0, 1fr) 28px;
  min-height: 128px;
  padding: 12px;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--grouped-line);
  font-style: normal;
  text-transform: none;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-copy {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 5px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-number {
  display: inline-flex;
  width: fit-content;
  min-width: 52px;
  min-height: 34px;
  padding: 5px 12px 5px 15px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(90deg, #e2a91e 0 5px, #315f2b 5px 100%);
  color: #fff;
  font-size: .9rem;
  font-weight: 900;
  line-height: 1;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-copy > strong,
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-copy [data-open-custom-exercise] {
  min-height: 0;
  color: var(--grouped-ink);
  font-size: clamp(.93rem, 2.4vw, 1.18rem);
  font-style: normal;
  font-weight: 950;
  letter-spacing: -.025em;
  line-height: 1.05;
  text-transform: uppercase;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-copy [data-open-custom-exercise] strong {
  display: block;
  max-width: 100%;
  font: inherit;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item .custom-workout-grouped-target,
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item .custom-workout-grouped-meta {
  grid-column: auto;
  margin: 0;
  color: var(--grouped-muted);
  font-size: clamp(.72rem, 1.8vw, .92rem);
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item .custom-workout-grouped-meta {
  font-size: .75rem;
}

.exercise-media-button {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #111;
  cursor: pointer;
  aspect-ratio: 16 / 10;
}

.exercise-media-button > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Branded masters include a text panel on the right. Exercise rows already
   render that information, so frame only the two Start/End photo panels here. */
.exercise-media-button-branded-crop {
  aspect-ratio: 176 / 117;
}

.exercise-media-button-branded-crop > img {
  width: auto;
  max-width: none;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.exercise-media-info {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  width: 38px;
  height: 34px;
  place-items: center;
  border: 2px solid #111;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  color: #111;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

.exercise-media-button:focus-visible {
  outline: 3px solid #e2a91e;
  outline-offset: 3px;
}

.custom-workout-grouped-media-placeholder {
  display: block;
  width: 100%;
  border-radius: 14px;
  background: linear-gradient(135deg, #edf0e8, #f9f9f5);
  aspect-ratio: 16 / 10;
}

.custom-workout-grouped-chevron {
  color: #3f433f;
  font-size: 2.35rem;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.exercise-media-dialog {
  width: min(920px, calc(100vw - 24px));
  max-width: 920px;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d7d9d2;
  border-radius: 22px;
  background: #fff;
  color: #111411;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .3);
}

.exercise-media-dialog::backdrop {
  background: rgba(11, 14, 11, .72);
  backdrop-filter: blur(7px);
}

.exercise-media-dialog-card {
  display: grid;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}

.exercise-media-dialog header {
  display: flex;
  padding: 14px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f8f8f3;
}

.exercise-media-dialog header small {
  display: block;
  color: #315f2b;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.exercise-media-dialog h2 {
  margin: 2px 0 0;
  font-size: clamp(1rem, 4vw, 1.45rem);
  line-height: 1.05;
}

.exercise-media-dialog [data-exercise-media-close] {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid #d7d9d2;
  border-radius: 50%;
  background: #fff;
  color: #111411;
  font: inherit;
  font-size: 1.6rem;
}

.exercise-media-dialog-stage {
  display: grid;
  min-height: 180px;
  place-items: center;
  background: #111;
}

.exercise-media-dialog-stage :is(img, video) {
  display: block;
  width: 100%;
  max-height: min(58dvh, 600px);
  object-fit: contain;
}

.exercise-media-dialog-stage video {
  background: #000;
}

.exercise-media-dialog [data-exercise-media-caption] {
  margin: 0;
  padding: 12px 16px;
  color: #676b65;
  font-size: .82rem;
  font-weight: 700;
}

.exercise-media-dialog-actions {
  padding: 0 16px 14px;
}

.exercise-media-dialog :is([data-exercise-media-video-toggle], [data-exercise-media-video-link]) {
  display: flex;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid #315f2b;
  border-radius: 14px;
  background: #315f2b;
  color: #fff;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
}

.exercise-media-dialog :is([data-exercise-media-video-toggle], [data-exercise-media-video-link])[hidden] {
  display: none;
}

.exercise-media-dialog-instructions {
  padding: 0 16px 18px;
  color: #242824;
}

.exercise-media-dialog-instructions h3 {
  margin: 2px 0 6px;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.exercise-media-dialog-instructions p {
  margin: 0;
  font-size: .95rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) {
    padding-inline: 6px !important;
  }

  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-builder,
  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) .custom-workout-carousel-stack,
  .dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) [data-custom-workout-carousel] {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-group-name-section {
    margin-inline: 0;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-card {
    border-radius: 16px;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-card-heading {
    padding: 14px 12px;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item,
  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item:has(.exercise-video-link) {
    grid-template-columns: minmax(104px, 34vw) minmax(0, 1fr) 20px;
    min-height: 116px;
    padding: 10px;
    gap: 10px;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-copy > strong,
  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-copy [data-open-custom-exercise] {
    font-size: clamp(.82rem, 3.6vw, 1rem);
  }

  .exercise-media-info {
    right: 6px;
    bottom: 6px;
    width: 34px;
    height: 30px;
  }
}

/* Exercises without mapped artwork keep the same photo-card grid. The compact
   demo link sits inside the media placeholder instead of replacing that grid;
   otherwise Android auto-placement wraps the chevron onto a second row. */
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item:has(.exercise-video-link) {
  grid-template-columns: clamp(116px, 34%, 210px) minmax(0, 1fr) 28px;
  align-items: center;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item > :is(
  .exercise-media-button,
  .custom-workout-grouped-media-placeholder
) {
  grid-column: 1;
  grid-row: 1;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item > .custom-workout-grouped-exercise-copy {
  grid-column: 2;
  grid-row: 1;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item > .custom-workout-grouped-chevron {
  grid-column: 3;
  grid-row: 1;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item .exercise-video-link {
  display: inline-flex;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-size: .875rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
}

@media (max-width: 760px) {
  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item:has(.exercise-video-link) {
    grid-template-columns: minmax(104px, 34vw) minmax(0, 1fr) 20px;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-columns {
    font-size: min(.58rem, 2.5vw);
    letter-spacing: min(.035em, .12vw);
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-columns > * {
    min-width: 0;
    max-width: 100%;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-columns .one-rm-trigger {
    flex-wrap: wrap;
    gap: 2px;
    font-size: min(.58rem, 2.5vw) !important;
    white-space: normal;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-columns .one-rm-trigger svg {
    flex-basis: 13px;
    width: 13px;
    height: 13px;
  }
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item .exercise-video-link > span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 8px;
  background: var(--grouped-lime);
  line-height: 1;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item .exercise-video-link:focus-visible {
  outline: 3px solid var(--grouped-blue);
  outline-offset: 2px;
}

/* Desktop keeps the title and actions alongside each other. */
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-section-heading:has(.custom-workout-grouped-copy-weights) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "exercise exercise"
    "round actions";
  gap: 6px;
  padding: 6px 10px;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-round-heading > h4 {
  grid-area: round;
  align-self: center;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-round-exercise-title {
  grid-area: exercise;
  min-width: 0;
  color: var(--grouped-ink) !important;
  font-size: .62rem !important;
  font-weight: 950 !important;
  letter-spacing: .025em !important;
  line-height: 1.2 !important;
  text-align: left !important;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-copy-actions {
  grid-area: actions;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

/* Give mobile actions their own row so they cannot cover the round title. */
@media (max-width: 600px) {
  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-section-heading:has(.custom-workout-grouped-copy-weights) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "exercise" "round" "actions";
    gap: 8px;
  }

  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-copy-actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.dashboard-page [data-custom-workout-grouped="true"] :is(.custom-workout-grouped-copy-weights, .custom-workout-grouped-undo-weights) {
  display: inline-flex;
  flex: 0 1 auto;
  width: auto !important;
  inline-size: auto !important;
  max-width: 100%;
  min-width: 0;
  min-height: 34px;
  margin: 0;
  padding: 5px 7px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--grouped-line);
  border-radius: 10px;
  background: var(--grouped-paper);
  color: var(--grouped-ink);
  box-shadow: none;
  font-family: inherit;
  font-size: .66rem !important;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
  text-align: center;
  text-transform: none;
  white-space: normal;
  overflow: visible !important;
  text-overflow: clip !important;
  cursor: pointer;
  touch-action: manipulation;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-copy-actions .custom-workout-grouped-copy-weights {
  flex: 0 0 auto;
  padding-inline: 7px;
  gap: 4px;
  white-space: nowrap;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-copy-weights:where(:not([data-custom-grouped-copy-source="pr"])) {
  background: var(--grouped-lime);
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-copy-weights:where([data-custom-grouped-copy-source="pr"]) {
  background: transparent;
  color: var(--grouped-muted);
  font-weight: 600;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-pr-action {
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 0;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-pr-action [data-pr-help] {
  display: inline-flex;
  flex: 0 0 32px;
  width: 32px !important;
  inline-size: 32px !important;
  min-width: 32px !important;
  min-inline-size: 32px !important;
  max-width: 32px !important;
  max-inline-size: 32px !important;
  min-height: 34px;
  margin: 0;
  padding: 8px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px !important;
  background: transparent;
  color: var(--grouped-muted);
  box-shadow: none;
  font: inherit;
  font-size: .75rem !important;
  line-height: 1;
  overflow: visible !important;
  cursor: pointer;
  touch-action: manipulation;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-pr-action [data-pr-help] svg {
  display: block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-pr-action [data-pr-help]:focus-visible {
  outline: 3px solid var(--grouped-blue);
  outline-offset: 1px;
}

.dashboard-page .pr-help-tooltip {
  position: fixed;
  z-index: 150;
  width: max-content;
  max-width: calc(100vw - 16px);
  margin: 0;
  padding: 8px 11px;
  border: 1px solid #353a31;
  border-radius: 9px;
  background: #171a17;
  color: #fff;
  box-shadow: 0 4px 16px rgb(17 20 17 / 16%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .75rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  text-align: center;
  text-transform: none;
  overflow-wrap: anywhere;
  pointer-events: auto;
}

.dashboard-page .pr-help-tooltip[hidden] {
  display: none !important;
}

@media (max-width: 360px) {
  .dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-copy-actions .custom-workout-grouped-copy-weights {
    padding-inline: 6px;
  }
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-section-heading .custom-workout-grouped-copy-weights span {
  min-width: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  overflow-wrap: normal;
  white-space: nowrap;
  text-align: inherit;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-copy-weights svg {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item > .custom-workout-grouped-pr-preview {
  grid-column: 2 / -1;
  grid-row: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  color: var(--grouped-muted);
  font-size: .72rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-transform: none;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-pr-preview[hidden] {
  display: none !important;
}

/* Targets, generated instructions and PR notes each need their own content-sized
   row. Pinning them to row 2 makes longer instructions overlap the target. */
.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-exercise-key-item > .custom-workout-grouped-target {
  grid-column: 2 / -1;
  grid-row: auto;
  min-width: 0;
  margin: 0;
  color: var(--grouped-ink);
  font-size: .75rem;
  font-weight: 700;
  font-style: normal;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: anywhere;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-copy-status {
  display: flex;
  min-width: 0;
  padding: 0 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 8px;
  color: var(--grouped-muted);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-transform: none;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-copy-status[hidden] {
  display: none !important;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-copy-status p {
  margin: 0;
  color: inherit;
  font: inherit;
}

.dashboard-page [data-custom-workout-grouped="true"] .custom-workout-grouped-undo-weights {
  border-color: transparent;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dashboard-page [data-custom-workout-grouped="true"] :is(.custom-workout-grouped-copy-weights, .custom-workout-grouped-undo-weights):disabled {
  color: var(--grouped-muted);
  background: var(--grouped-cream);
  opacity: .65;
  cursor: default;
}

.dashboard-page [data-custom-workout-grouped="true"] :is(.custom-workout-grouped-copy-weights, .custom-workout-grouped-undo-weights):focus-visible {
  outline: 3px solid var(--grouped-blue);
  outline-offset: 2px;
}

@media (hover: hover) {
  .dashboard-page [data-custom-workout-grouped="true"] :is(.custom-workout-grouped-copy-weights, .custom-workout-grouped-undo-weights):hover:not(:disabled) {
    border-color: var(--grouped-muted);
    background: var(--grouped-cream);
  }
}

/* Keep suggested PR weights/reps visually distinct from entered or copied values. */
.dashboard-page.client-dashboard-page :is(.client-workout-panel-custom, .client-workout-panel-assigned) :is(
  input[data-set-weight],
  input[data-set-reps],
  input[data-custom-grouped-field="weight"],
  input[data-custom-grouped-field="reps"]
)::placeholder {
  color: #b9bdb5 !important;
  -webkit-text-fill-color: #b9bdb5;
  opacity: 1;
}
.dashboard-page .workout-finish-issues {
  margin: 12px 16px 20px;
  padding: 16px;
  border: 1px solid #d4a438;
  border-radius: 16px;
  background: #fffcef;
  color: #20231d;
  font-size: 14px;
  line-height: 1.5;
  scroll-margin: 120px 0 180px;
}
.dashboard-page .workout-finish-issues ul {
  margin: 8px 0;
  padding-left: 20px;
}
.dashboard-page .workout-finish-issues li button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-transform: none;
}
.dashboard-page .workout-finish-issues p { margin: 8px 0 0; }

/* List rows already render the exercise name, so their compact thumbnails show
   only the Start/End photos. The detail dialog must show the complete branded
   card, including the exercise title and full end position. */
.exercise-media-button-branded-crop {
  --exercise-photo-image-width: 218.182%;
  --exercise-photo-image-height: 142.735%;
  --exercise-photo-image-left: -9.091%;
  --exercise-photo-image-top: -21.368%;
  position: relative;
  overflow: hidden;
  aspect-ratio: 176 / 117;
}
.exercise-media-button-branded-crop > img {
  position: absolute;
  left: var(--exercise-photo-image-left);
  top: var(--exercise-photo-image-top);
  width: var(--exercise-photo-image-width);
  max-width: none;
  height: var(--exercise-photo-image-height);
  max-height: none;
  object-fit: fill;
}
.exercise-media-dialog-stage.is-branded-card {
  width: 100%;
  min-height: 0;
  justify-self: center;
}
.exercise-media-dialog-stage.is-branded-card > img {
  position: static;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(58dvh, 600px);
  object-fit: contain;
  object-position: center;
}
