.track-rail {
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 10px;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .28) transparent;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.track-rail::-webkit-scrollbar {
  height: 4px;
}

.track-rail::-webkit-scrollbar-track {
  background: transparent;
}

.track-rail::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .28);
  border-radius: 999px;
}

.track-rail__item {
  flex: 0 0 clamp(150px, 18vw, 230px);
  min-width: 0;
  scroll-snap-align: start;
}

.track-rail__button {
  width: 100%;
  min-height: 48px;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: var(--text);
  background: color-mix(in srgb, #000 46%, transparent);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.2;
  text-align: left;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.track-rail__button:hover,
.track-rail__button:focus-visible,
.track-rail__button.is-active {
  color: #fff;
  background: rgba(0, 0, 0, .74);
  border-color: rgba(255, 255, 255, .5);
  outline: 0;
  transform: translateY(-1px);
}

.track-rail__number {
  color: rgba(255, 255, 255, .52);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

.track-rail__title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}


@media (max-width: 640px) {
  .track-rail {
    margin-inline: -2px;
    padding-bottom: 8px;
  }

  .track-rail__item {
    flex-basis: min(72vw, 220px);
  }

  .track-rail__button {
    min-height: 44px;
    padding: 8px 10px;
  }
}

.home-player-showcase .track-rail {
  min-height: 64px;
  padding: 10px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  box-shadow: 0 18px 56px rgba(0, 0, 0, .18);
}

.home-player-showcase .track-rail__button {
  color: #fff;
  background: rgba(0, 0, 0, .46);
  border-color: rgba(255, 255, 255, .16);
}

.home-player-showcase .track-rail__button:hover,
.home-player-showcase .track-rail__button:focus-visible,
.home-player-showcase .track-rail__button.is-active {
  color: #fff;
  background: rgba(0, 0, 0, .74);
  border-color: rgba(255, 255, 255, .5);
}

.home-player-showcase .track-rail__number {
  color: rgba(255, 255, 255, .52);
}


.home-player-showcase .console__empty-state {
  flex: 0 0 100%;
  min-height: 44px;
  display: grid;
  place-items: center;
}
/* Home player: readable vertical track list on desktop, compact swipe rail on mobile. */
@media (min-width: 861px) {
  .home-player-showcase .track-rail {
    flex-direction: column;
    gap: 6px;
    max-height: 210px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 8px 10px 10px;
    scroll-snap-type: y proximity;
  }

  .home-player-showcase .track-rail__item {
    flex: 0 0 auto;
    width: 100%;
    scroll-snap-align: start;
  }

  .home-player-showcase .track-rail__button {
    min-height: 44px;
    padding: 9px 12px;
  }

  .home-player-showcase .track-rail__title {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    line-height: 1.3;
  }
}


/* Mobile Home Player: keep the full track list on desktop, show only the
   currently playing track on compact layouts to reduce vertical density. */
.home-player-showcase__mobile-track {
  display: none;
}

@media (max-width: 860px) {
  .home-player-showcase .track-rail {
    display: none;
  }

  .home-player-showcase__mobile-track {
    width: min(100%, 520px);
    margin: 0 auto 4px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
    padding: 8px 2px 2px;
    color: #fff;
  }


  .home-player-showcase__mobile-track strong {
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-player-showcase__mobile-track-position {
    color: rgba(255,255,255,.58);
    font-size: 9px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: .10em;
    line-height: 1.25;
    white-space: nowrap;
  }
}
