.infinite-spiral {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  overflow: hidden;
  isolation: isolate;
}

.infinite-spiral__stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.infinite-spiral__item {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: var(--infinite-spiral-card-width);
  height: var(--infinite-spiral-card-height);
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: var(--infinite-spiral-card-radius);
  background: rgb(255 255 255 / 0.08);
  box-shadow: 0 14px 38px rgb(8 6 18 / 0.2);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity, filter;
  text-decoration: none;
}

.infinite-spiral__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-position: center;
  user-select: none;
}

/* port addition: title on the center card only (centerLabel) */
.infinite-spiral__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 18px 10px 7px;
  background: linear-gradient(to top, rgb(0 0 0 / 0.6), transparent);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.04em;
  line-height: 1.25;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.infinite-spiral__item.is-center .infinite-spiral__label {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .infinite-spiral__item {
    transition: none;
  }
}
