:root {
  --player-bg: rgba(255, 251, 246, 0.3);
  --player-border: rgba(255, 255, 255, 0.55);
  --player-text: #3d2b1f;
  --player-sub: #7f6958;
  --player-accent: #9a7d69;
}

body.has-vinyl-player {
  padding-bottom: max(108px, calc(86px + env(safe-area-inset-bottom)));
}

body.has-vinyl-player.is-player-compact {
  padding-bottom: max(88px, calc(72px + env(safe-area-inset-bottom)));
}

.global-vinyl-player {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 1200;
  border-radius: 18px;
  border: 1px solid var(--player-border);
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.48), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.26), var(--player-bg));
  box-shadow: 0 12px 24px rgba(80, 56, 42, 0.14);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  overflow: hidden;
}

.vinyl-player-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px 6px;
}

.vinyl-meta {
  min-width: 0;
}

.vinyl-kicker {
  margin: 0 0 3px;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--player-accent);
  text-transform: uppercase;
}

.vinyl-marquee {
  width: 100%;
  max-width: 220px;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 999px;
  padding: 4px 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.46);
}

.vinyl-marquee-track {
  display: inline-block;
  color: var(--player-text);
  font-size: 13px;
  letter-spacing: 0.01em;
  padding-left: 100%;
  animation: player-marquee 11s linear infinite;
}

.vinyl-marquee-track strong {
  color: #6a4733;
  font-weight: 700;
}

.vinyl-controls {
  display: grid;
  grid-template-columns: repeat(3, 30px);
  gap: 9px;
}

.vinyl-btn {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--player-text);
  font-size: 13px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.18));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 6px 12px rgba(80, 56, 42, 0.12);
  cursor: pointer;
}

.vinyl-btn:active {
  transform: scale(0.96);
}

.vinyl-btn-play {
  color: #3d2b1f;
  background: linear-gradient(150deg, rgba(255, 240, 224, 0.9), rgba(231, 203, 174, 0.62));
}

.vinyl-progress {
  margin: 0 10px 8px;
  height: 3px;
  border-radius: 999px;
  background: rgba(190, 154, 127, 0.2);
  overflow: hidden;
}

.vinyl-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #e0b48f, #ba7f58);
  transition: width 0.14s linear;
}

.global-vinyl-player.is-compact {
  left: 12px;
  right: 12px;
  width: auto;
  border-radius: 14px;
  bottom: calc(8px + env(safe-area-inset-bottom));
}

.global-vinyl-player.is-compact .vinyl-player-inner {
  padding: 8px 9px 7px;
  gap: 8px;
}

.global-vinyl-player.is-compact .vinyl-kicker {
  font-size: 9px;
  margin-bottom: 3px;
}

.global-vinyl-player.is-compact .vinyl-marquee {
  max-width: 180px;
  padding: 3px 0;
}

.global-vinyl-player.is-compact .vinyl-marquee-track {
  font-size: 12px;
}

.global-vinyl-player.is-compact .vinyl-controls {
  grid-template-columns: repeat(3, 28px);
  gap: 8px;
}

.global-vinyl-player.is-compact .vinyl-btn {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.global-vinyl-player.is-compact .vinyl-progress {
  margin: 0 9px 8px;
}

@keyframes player-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .vinyl-marquee-track {
    animation-duration: 1ms;
    animation-iteration-count: 1;
    transform: translateX(0);
    padding-left: 0;
  }
}
