:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  --border: #2b2b2b;
  --muted: #a9a9a9;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  background: transparent;
  color: #fff;
  overflow: hidden;
}

button {
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.player-shell {
  width: 100%;
  margin: 0;
  padding: 0;
}

.player {
  display: grid;
  grid-template-columns: clamp(150px, 31%, 280px) minmax(0, 1fr);
  width: 100%;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 0;
}

.art-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #111;
}

.album-art {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
}

.content {
  min-width: 0;
  padding: 24px 28px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.track-copy h1 {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.06;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.track-copy p {
  margin: 7px 0 0;
  overflow: hidden;
  color: #e8e8e8;
  font-size: clamp(1rem, 2vw, 1.35rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.controls-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.controls-row > div:first-child {
  min-width: 1px;
}

.play-button,
.rating-button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.play-button {
  width: 74px;
  height: 74px;
  justify-self: center;
}

.play-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rating-group {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
}

.rating-button {
  width: 42px;
  height: 42px;
  opacity: .72;
  transition: opacity .15s ease, transform .15s ease;
}

.rating-button:hover,
.rating-button:focus-visible {
  opacity: 1;
  transform: scale(1.06);
}

.rating-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rating-button.is-selected {
  opacity: 1;
}

.rating-button.is-selected img {
  filter: none;
}

.progress-row {
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) 46px;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  background: #262626;
  border-radius: 0;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: #fff;
  border-radius: 0;
  transition: width .4s linear;
}

.time-label {
  display: block;
  min-width: 0;
  color: #fff;
  font-size: .86rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
}

.time-label:last-child { text-align: right; }

.status-text {
  min-height: 16px;
  margin-top: 6px;
  color: var(--muted);
  font-size: .78rem;
}

/* Same composition on mobile; dimensions simply scale down. */
@media (max-width: 700px) {
  .player {
    grid-template-columns: 34% minmax(0, 1fr);
  }

  .content {
    padding: 3vw 3vw 2.2vw;
  }

  .track-copy h1 {
    font-size: clamp(.92rem, 4.2vw, 1.3rem);
  }

  .track-copy p {
    margin-top: 1vw;
    font-size: clamp(.7rem, 3.2vw, .98rem);
  }

  .controls-row {
    gap: 2vw;
    margin-top: 2vw;
  }

  .play-button {
    width: clamp(42px, 12vw, 58px);
    height: clamp(42px, 12vw, 58px);
  }

  .rating-group {
    gap: 2vw;
  }

  .rating-button {
    width: clamp(25px, 7vw, 36px);
    height: clamp(25px, 7vw, 36px);
  }

  .progress-row {
    grid-template-columns: 34px minmax(0,1fr) 34px;
    gap: 1.3vw;
    margin-top: 2vw;
  }

  .progress-track {
    height: max(5px, 1.5vw);
  }

  .time-label {
    font-size: clamp(.56rem, 2.1vw, .7rem);
  }

  .status-text {
    min-height: 0;
    margin-top: .8vw;
    font-size: clamp(.48rem, 1.8vw, .62rem);
  }
}


.rating-group[hidden] {
  display: none !important;
}
