.spoiler {
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 1rem 0;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.spoiler-title {
  background-color: #f8f9fa;
  padding: 0.5rem 0.5rem;
  margin: 0;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.spoiler-title:hover {
  background-color: #e9ecef;
}

.spoiler-title::after {
  content: '▶';
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.spoiler.open .spoiler-title::after {
  content: '▼';
}

.spoiler-content {
  height: 0;
  overflow: hidden;
  transition: height 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* 🌿 Главное изменение */
  padding: 0 1.5rem;
  background-color: white;
}

.spoiler.open .spoiler-content {
  /* height задаётся JS — не трогаем здесь */
}
.spoiler-content {
  /* ... остальное как выше */
  opacity: 0;
  transition: height 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.6s ease-out;
}

.spoiler.open .spoiler-content {
  opacity: 1;
}