.queue-section {
  display: grid;
  grid-template-areas: "composition";
  padding-block: var(--section-space-before, 106px) var(--section-space-after, 90px);
  isolation: isolate;
}

/* Copy and components share a field. The open upper-left area belongs
   to the heading; the source joins the queue on its final row axis. */
.queue-section__heading {
  grid-area: composition;
  align-self: start;
  z-index: 4;
  width: 365px;
  max-width: 41%;
  margin-top: 37px;
}

.queue-section__heading p {
  margin-top: 24px;
  color: var(--text-secondary);
}

.setlist-story {
  --queue-left: 48%;
  --queue-width: 46%;
  --queue-top: 96px;
  --queue-heading: 64px;
  --queue-row: 78px;
  --joining-offset: 22px;
  --source-width: 256px;
  --queue-plane: #1c1b1e;
  --join-top: calc(var(--queue-top) + var(--queue-heading) + 2 * var(--queue-row));
  position: relative;
  grid-area: composition;
  height: 510px;
  min-width: 0;
  isolation: isolate;
}

.queue-section--proportional .setlist-story {
  width: min(100%, 980px);
  height: auto;
  aspect-ratio: 980 / 510;
  margin-inline: auto;
}

.setlist-story__composition {
  position: absolute;
  top: 0;
  left: 0;
  width: 980px;
  height: 510px;
  transform: scale(var(--scene-scale, 1));
  transform-origin: top left;
}

.scene-cover {
  --cover-size: 44px;
  display: block;
  position: relative;
  flex: none;
  width: var(--cover-size);
  height: var(--cover-size);
  overflow: hidden;
  background: #242424;
}

/* Unmodified approved product materials, cropped to identify the track. */
.scene-cover img {
  position: absolute;
  width: 2333.333%;
  max-width: none;
  left: -333.333%;
  top: var(--cover-y);
}

.setlist-story__source {
  position: absolute;
  z-index: 2;
  left: calc(var(--queue-left) - var(--joining-offset) - 16px - var(--source-width));
  top: var(--join-top);
  width: var(--source-width);
}

.catalog-excerpt {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  height: var(--queue-row);
  padding: 15px 0;
}

.catalog-excerpt .scene-cover {
  opacity: .82;
}

.catalog-excerpt__identity {
  flex: 1;
  min-width: 0;
}

.catalog-excerpt__identity strong {
  display: block;
  color: #bdb6be;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
}

.catalog-excerpt__add {
  display: flex;
  align-items: center;
  justify-content: end;
  flex: none;
  gap: 8px;
  height: 36px;
  color: #d68ba1;
  font-size: 15px;
  line-height: 1.5;
  white-space: nowrap;
}

.catalog-excerpt__add .icon {
  width: 23px;
  height: 23px;
}

/* The final row is inside the queue, not a card covering an empty slot.
   Its fill extends the same plane beyond the left edge. */
.setlist-story__destination {
  position: absolute;
  z-index: 1;
  left: var(--queue-left);
  top: var(--queue-top);
  width: var(--queue-width);
  padding-bottom: 2px;
  background: var(--queue-plane);
}

.setlist-story__list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--queue-heading);
  padding: 16px 22px;
}

.setlist-story__list-header h3 {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.5;
}

.setlist-story__count {
  color: #89838b;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.setlist-row {
  display: flex;
  align-items: center;
  gap: 13px;
  height: var(--queue-row);
  min-width: 0;
  padding: 16px 20px;
  color: #b9b3ba;
}

.setlist-row__order {
  flex: none;
  width: 20px;
  color: #928a94;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.setlist-row__identity {
  flex: 1;
  min-width: 0;
}

.setlist-row__identity > strong {
  display: block;
  overflow: hidden;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setlist-row__identity > span {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: #8f8990;
  font-size: 14px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setlist-story__rows > .setlist-row .scene-cover {
  opacity: .8;
}

.setlist-row__actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: 12px;
  color: #756f78;
}

.setlist-row__actions > .icon {
  width: 16px;
  height: 16px;
}

.setlist-row__play {
  display: flex;
  margin-right: 3px;
  color: #aa6c7f;
}

.setlist-row__play .icon {
  width: 20px;
  height: 20px;
}

.setlist-story__rows > .setlist-row:first-child .setlist-row__actions > .icon:first-of-type,
.setlist-row__actions > .setlist-row__disabled {
  opacity: .35;
}

.setlist-story__arrival {
  position: relative;
  z-index: 3;
  left: calc(-1 * var(--joining-offset));
  width: 100%;
}

.setlist-row--arriving {
  background: var(--queue-plane);
  color: #f4eef3;
  box-shadow: 0 9px 20px -8px rgb(0 0 0 / .6), 0 2px 5px -2px rgb(0 0 0 / .4);
}

.setlist-row--arriving .setlist-row__order {
  color: #b9acbb;
}

.setlist-row--arriving .setlist-row__identity > span {
  color: #a59aa7;
}

.setlist-row--arriving .setlist-row__actions {
  color: #a79ca9;
}

.setlist-row--arriving .setlist-row__play {
  color: var(--accent);
}

@media (max-width: 1150px) {
  .queue-section:not(.queue-section--proportional) .setlist-row {
    gap: 11px;
    padding-inline: 16px;
  }

  .queue-section:not(.queue-section--proportional) .setlist-row__actions {
    gap: 10px;
  }
}

@media (max-width: 800px) {
  .queue-section {
    display: block;
    padding-block: 65px;
  }

  .queue-section__heading {
    width: auto;
    max-width: none;
    margin-top: 0;
  }

  .queue-section:not(.queue-section--proportional) .setlist-story {
    --queue-left: 8%;
    --queue-width: 92%;
    --queue-top: 170px;
    --joining-offset: 18px;
    height: 510px;
    margin-top: 32px;
  }

  .queue-section:not(.queue-section--proportional) .setlist-story__source {
    left: 0;
    top: 0;
    width: 90%;
  }

  .queue-section:not(.queue-section--proportional) .scene-cover {
    --cover-size: 36px;
  }

  .queue-section:not(.queue-section--proportional) .setlist-row {
    gap: 9px;
    padding-inline: 12px;
  }

  .queue-section:not(.queue-section--proportional) .setlist-row__identity > strong {
    font-size: 15px;
  }

  .queue-section:not(.queue-section--proportional) .setlist-row__identity > span {
    font-size: 12px;
  }

  .queue-section:not(.queue-section--proportional) .setlist-row__actions {
    gap: 7px;
  }

  .queue-section:not(.queue-section--proportional) .setlist-row__actions > .icon {
    width: 14px;
    height: 14px;
  }

  .queue-section--proportional .setlist-story {
    margin-top: 32px;
  }
}
