.yt-host {
  position: fixed;
  top: 0;
  left: -400px;
  width: 200px;
  height: 200px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.player {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.9rem;
  border-top: var(--border);
  background: var(--gray-light);
}

.player[hidden] {
  display: none;
}

.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}

.icon-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.icon-btn:focus-visible {
  outline: 3px dashed var(--ink);
  outline-offset: 2px;
}

.player-label {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 0.55rem;
  min-width: 0;
  padding: 0 0.5rem;
  font-size: 1.55rem;
  white-space: nowrap;
}

.player-label i {
  flex: none;
}

.player-label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eq {
  display: flex;
  align-items: flex-end;
  flex: none;
  gap: 3px;
  width: 30px;
  height: 22px;
}

.eq span {
  flex: 1;
  height: 25%;
  background: var(--ink);
}

.player.playing .eq span {
  animation: eq 0.8s steps(4) infinite;
}

.player.playing .eq span:nth-child(2) {
  animation-duration: 0.6s;
  animation-delay: 0.1s;
}

.player.playing .eq span:nth-child(3) {
  animation-duration: 0.95s;
  animation-delay: 0.2s;
}

.player.playing .eq span:nth-child(4) {
  animation-duration: 0.7s;
  animation-delay: 0.05s;
}

@keyframes eq {
  0% {
    height: 25%;
  }
  25% {
    height: 100%;
  }
  50% {
    height: 55%;
  }
  75% {
    height: 85%;
  }
  100% {
    height: 25%;
  }
}

.tracklist {
  display: grid;
  gap: 0.8rem;
  list-style: none;
  margin-top: 0.75rem;
}

.track {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 48px;
  padding: 0.55rem 0.9rem;
  border: var(--border);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.7rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
}

.track:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.track:focus-visible {
  outline: 3px dashed var(--ink);
  outline-offset: 3px;
}

.track.active {
  background: var(--ink);
  color: var(--paper);
}

.track-num {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  opacity: 0.7;
}

.track-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-icon {
  flex: none;
  font-size: 1.2rem;
}

@media (hover: hover) {
  .icon-btn:hover {
    background: var(--gray-light);
  }

  .track:hover:not(.active) {
    background: var(--gray-light);
  }
}

@media (max-width: 640px) {
  .player {
    gap: 0.35rem;
    padding: 0.5rem 0.6rem;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .player-label {
    gap: 0.4rem;
    padding: 0 0.3rem;
    font-size: 1.4rem;
  }

  .eq {
    width: 22px;
    height: 18px;
  }

  .tracklist {
    gap: 0.7rem;
  }

  .track {
    gap: 0.8rem;
    font-size: 1.5rem;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .track:active {
    transform: translate(3px, 3px);
  }
}

@media (max-width: 360px) {
  .eq {
    display: none;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }

  .player {
    gap: 0.3rem;
    padding: 0.45rem 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .player.playing .eq span {
    animation: none;
    height: 60%;
  }
}