.song-layout {
  display: grid;
  gap: 16px;
}

.song-picker,
.song-preview {
  min-width: 0;
}

.song-picker .scope-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.song-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.song-list li:not(.song-group-heading) {
  border-top: 1px solid var(--line);
}

.song-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 38%);
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease;
}

.song-list button:hover,
.song-list button[aria-pressed="true"] {
  background: var(--accent-light);
}

.song-list button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.song-title {
  min-width: 0;
}

.song-title-main {
  overflow-wrap: anywhere;
  font-weight: 650;
}

.song-title-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.song-performer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.song-performer span:first-child {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.song-selection-rank {
  flex: 0 0 auto;
  min-width: 30px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--accent);
  font-size: 12px;
  text-align: center;
}

.song-list button[aria-pressed="true"] .song-selection-rank {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.song-group-heading {
  margin-top: 24px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  font-weight: 650;
}

.song-group-heading:first-child {
  margin-top: 0;
}

.song-empty {
  padding: 36px 16px;
  color: var(--muted);
  text-align: center;
}

.song-preview .rank-editor-row span {
  max-width: 100%;
}

.song-poster-best,
.song-poster-bands {
  display: flex;
  flex-direction: column;
  margin-top: 32px;
  padding: 0 20px;
  overflow: hidden;
  border: 1px solid #e4e2dc;
  border-radius: 10px;
  background: #fff;
}

.song-poster-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-width: 0;
  min-height: 92px;
  padding: 16px 4px;
  overflow: hidden;
  border-bottom: 1px solid #e4e2dc;
  background: transparent;
}

.song-poster-card:last-child {
  border-bottom: 0;
}

.song-poster-rank {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--song-color) 16%, #fff);
  color: color-mix(in srgb, var(--song-color) 70%, #222);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
}

.song-poster-band {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.song-poster-band img {
  display: block;
  max-width: 100%;
  max-height: 36px;
  object-fit: contain;
}

.song-poster-titles {
  min-width: 0;
}

.song-poster-title-line {
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.song-poster-name {
  min-width: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.song-poster-original {
  color: #666860;
  font-size: 14px;
  line-height: 1.35;
  text-align: right;
  margin-left: 8px;
  overflow-wrap: anywhere;
}

.song-poster-artist {
  display: block;
  color: #777870;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.song-poster-card.is-empty {
  --song-color: #a6a7a1;
}

.song-poster-card.is-empty .song-poster-name {
  color: #9b9c96;
  font-size: 16px;
}

@media (min-width: 1200px) {
  .song-layout {
    grid-template-columns: minmax(0, 1fr) 400px;
    align-items: start;
  }

  .song-picker {
    grid-column: 1;
    grid-row: 1;
  }

  .song-preview {
    position: sticky;
    top: 18px;
    grid-column: 2;
    grid-row: 1;
    max-height: calc(100vh - 36px);
    overflow: auto;
  }
}

@media (max-width: 760px) {
  .song-picker,
  .song-preview {
    padding: 24px 20px;
  }

  .filters {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 18px;
  }

  .scope-tabs {
    gap: 6px;
    padding-bottom: 18px;
    margin-bottom: 18px;
  }

  .scope-tab {
    padding: 8px 4px;
    font-size: 13px;
  }

  .roster-title {
    display: block;
    padding: 19px 0 14px;
  }

  .roster-title span {
    display: block;
    margin-top: 6px;
  }

  .song-list button {
    grid-template-columns: minmax(0, 1fr) minmax(100px, 40%);
    gap: 12px;
  }

  .song-list-head {
    padding: 0 6px 10px;
  }

  .song-list button {
    padding: 12px 6px;
    font-size: 13px;
  }

  .song-group-heading {
    padding: 12px 6px;
  }
}
