.exercise-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 4px 0;
  text-align: left;
  font: inherit;
}
@media (hover: hover) and (pointer: fine) {
  .exercise-toggle:hover { color: var(--accent); }
}
.exercise-toggle svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(180deg);
  transition: transform .35s cubic-bezier(.215, .61, .355, 1);
}
.exercise-toggle[aria-expanded="false"] svg { transform: rotate(0deg); }
.exercise-label { display: grid; min-width: 0; gap: 3px; }
.exercise-overview { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); line-height: 1.4; }
.exercise-card { padding: 16px; }
.exercise-card > .heading { margin-bottom: 0; flex-wrap: nowrap; align-items: start; }
.exercise-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.exercise-group-controls { display: flex; align-items: center; gap: 16px; }
.exercise-add-top { margin-left: auto; }
.exercise-group-button { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.exercise-group-button span { text-decoration: underline; }
.exercise-group-button svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.action-menu { position: relative; flex: none; }
.action-menu > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; list-style: none; cursor: pointer; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.action-menu-panel { position: absolute; z-index: 1; top: calc(100% + 6px); right: 0; display: grid; gap: 6px; min-width: 200px; padding: 8px; border: 1px solid var(--glass-edge); border-radius: 12px; background: var(--glass-solid); box-shadow: 0 12px 32px rgb(2 7 14 / .4); }
.action-menu-panel > button { text-align: left; }
.exercise-options > summary, .exercise-remove { width: 44px; min-height: 44px; border-radius: 8px; color: var(--muted); }
.exercise-options .action-menu-panel { display: flex; min-width: 0; }
.exercise-remove { display: grid; place-items: center; border: 1px solid var(--line); }
.exercise-card:has(.exercise-options[open]) { position: relative; z-index: 3; }
@media (hover: hover) and (pointer: fine) {
  .exercise-options > summary:hover, .exercise-remove:hover { background: var(--raised); color: var(--text); }
}
@media (max-width: 800px) {
  .exercise-add-top { display: none; }
  .exercise-toolbar:not(:has(.exercise-group-controls)) { display: none; }
}
.collapsible-motion {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 16px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 16px), transparent);
}
@media (prefers-reduced-motion: reduce) {
  .exercise-toggle svg { transition: none; }
}
