.ts-stage-carousel {
  --stage-gold: #c6922d;
  --stage-text: #f5f1e8;
  --stage-gap: 16px;
  --stage-card-width: calc((100% - 3 * var(--stage-gap)) / 4);
  box-sizing: border-box;
  max-width: 1140px;
  width: calc(100% - 48px);
  margin: 0 auto;
  padding: 32px 0 40px;
  color: var(--stage-text);
  font-family: Lora, Georgia, serif;
}

.ts-stage-carousel h2 {
  margin: 0 0 16px;
  color: inherit;
  font: 600 clamp(24px, 3vw, 32px)/1.2 Lora, Georgia, serif;
}

.ts-stage-carousel__controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.ts-stage-carousel__controls[hidden] {
  display: none;
}

.ts-stage-carousel__controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #45413b;
  border-radius: 4px;
  background: #222;
  color: var(--stage-gold);
  font: 28px/1 Georgia, serif;
  cursor: pointer;
}

.ts-stage-carousel__controls button[aria-disabled="true"] {
  opacity: .52;
  cursor: default;
}

.ts-stage-carousel .ts-stage-carousel__list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--stage-card-width);
  gap: var(--stage-gap);
  overflow-x: auto;
  margin: 0;
  padding: 3px 0 8px;
  list-style: none;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--stage-gold) #222;
}

.ts-stage-carousel__slide {
  min-width: 0;
  display: flex;
  scroll-snap-align: start;
}

.ts-stage-carousel a.ts-stage-carousel__card {
  box-sizing: border-box;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #45413b;
  border-radius: 4px;
  background: #222;
  color: var(--stage-text);
  text-decoration: none;
}

.ts-stage-carousel__card:hover {
  border-color: var(--stage-gold);
}

.ts-stage-carousel .ts-stage-carousel__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
}

.ts-stage-carousel__card h3 {
  margin: 0;
  color: var(--stage-gold);
  font: 600 clamp(18px, 1.6vw, 23px)/1.25 Lora, Georgia, serif;
}

.ts-stage-carousel__card p {
  margin: auto 0 0;
  font-size: 15px;
  line-height: 1.45;
}

.ts-stage-carousel a.ts-stage-carousel__all {
  display: table;
  margin: 18px auto 0;
  padding: 10px 18px;
  border: 1px solid var(--stage-gold);
  border-radius: 4px;
  color: var(--stage-gold);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.ts-stage-carousel a.ts-stage-carousel__all:hover {
  background: var(--stage-gold);
  color: #222;
}

.ts-stage-carousel :is(a, button, ul):focus-visible {
  outline: 2px solid var(--stage-gold);
  outline-offset: -3px;
}

@media (max-width: 1024px) {
  .ts-stage-carousel {
    /* Keep a three-card row at or below the desktop card width at 1025px. */
    --stage-card-width: calc((100% - 2 * var(--stage-gap)) / 3);
    max-width: calc(3 * 232px + 2 * var(--stage-gap));
  }
}

@media (max-width: 767px) {
  .ts-stage-carousel {
    /* Keep the next card partly visible on phones and fit two on wider screens. */
    --stage-card-width: min(84%, 229px);
    --stage-gap: 12px;
    width: calc(100% - 36px);
    max-width: calc(2 * 229px + var(--stage-gap));
  }
}
