/* Collection pages share a stage and keep navigation against its lower edge. */
body#project .project .content:is([data-project='winamp'], [data-project='ipod']) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
}
:is([data-project='winamp'], [data-project='ipod']) .artwork-stack {
  display: grid;
  grid-template-rows: minmax(520px, 1fr) auto;
  align-self: stretch;
}

.piece-selector {
  --pill-duration: 500ms;
  --pill-easing: cubic-bezier(0.215, 0.61, 0.355, 1);
  --pill-dot-size: 8px;
  --pill-active-width: 28px;
  --pill-gap: 8px;
  --pill-bg: rgba(255, 255, 255, 0.3);
  --pill-fill-bg: rgba(255, 255, 255, 0.45);
  --pill-active-bg: rgba(255, 255, 255, 0.9);
  --pill-container-bg: rgba(0, 0, 0, 0.2);
  --pill-container-border: transparent;
  --pill-container-radius: 9999px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-family: system-ui, sans-serif;
}
.piece-selector__steps,
.piece-selector__arrow {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--pill-container-bg);
  border-radius: var(--pill-container-radius);
  cursor: pointer;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-duration: 0.15s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.piece-selector__steps {
  position: relative;
  display: inline-flex;
  height: 44px;
  padding: 0 10px;
  isolation: isolate;
  background: none;
}
.piece-selector__steps::before {
  content: '';
  position: absolute;
  inset: 6px 0;
  z-index: -1;
  border: 1px solid var(--pill-container-border);
  border-radius: inherit;
  background: var(--pill-container-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.piece-selector__track {
  display: flex;
  align-items: center;
  gap: var(--pill-gap);
}
.piece-selector__step {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  flex-shrink: 0;
  width: auto;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
}
.piece-selector__step span {
  display: block;
  position: relative;
  width: var(--pill-dot-size);
  height: var(--pill-dot-size);
  border-radius: 999px;
  background: var(--pill-bg);
  overflow: hidden;
  transition:
    width var(--pill-duration) var(--pill-easing),
    background var(--pill-duration) var(--pill-easing);
}
.piece-selector__step[aria-current] span {
  width: var(--pill-active-width);
  background: var(--pill-active-bg);
}
.piece-selector__step:focus-visible,
.piece-selector__arrow:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
.piece-selector__arrow {
  width: 44px;
  height: 44px;
  position: relative;
  isolation: isolate;
  background: none;
  padding: 0;
  border: 0;
  color: white;
  text-decoration: none;
}
.piece-selector__arrow::before {
  content: '';
  position: absolute;
  inset: 6px;
  z-index: -1;
  border-radius: inherit;
  background: var(--pill-container-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.piece-selector__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}
.piece-selector__arrow:not(:disabled):hover::before {
  background-color: rgba(0, 0, 0, 0.3);
}
@media (prefers-reduced-motion: reduce) {
  .piece-selector__step span,
  .piece-selector__track,
  .piece-selector__arrow::before,
  .piece-selector__steps {
    transition: none;
  }
}

.piece-selector__step span::after {
  content: '';
  pointer-events: none;
  width: 0;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  background: var(--pill-fill-bg);
}

.collection-copy p + p {
  margin-top: var(--spacing-sm);
}

[data-project='winamp'] .artwork-stage {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
}
