/* Reproductor compartido Neverlan — apariencia basada en Cosmos */
.collection-player {
  --player-paper: #e9e7e1;
  --player-accent: #b69a62;
  position: fixed;
  z-index: 2600;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 76px;
  padding: 13px clamp(18px, 3vw, 52px);
  display: grid;
  grid-template-columns: 44px minmax(180px, 310px) minmax(120px, 1fr) auto 34px;
  gap: clamp(14px, 2vw, 32px);
  align-items: center;
  border-top: 1px solid rgba(233,231,225,.13);
  background: rgba(8,10,13,.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transform: translateY(105%);
  visibility: hidden;
  transition: transform .7s cubic-bezier(.16,1,.3,1), visibility 0s linear .7s;
}
.collection-player.is-open {
  transform: none;
  visibility: visible;
  transition-delay: 0s;
}
.collection-player__toggle,
.collection-player__close {
  border: 0;
  background: transparent;
  color: var(--player-paper);
  cursor: pointer;
}
.collection-player__toggle {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(233,231,225,.28);
}
.collection-player__icon { position:absolute; inset:50% auto auto 50%; transform:translate(-50%,-50%); }
.collection-player__play {
  width:0; height:0; margin-left:2px;
  border-top:5px solid transparent;
  border-bottom:5px solid transparent;
  border-left:8px solid currentColor;
}
.collection-player__pause {
  display:none; width:8px; height:11px;
  border-left:2px solid currentColor;
  border-right:2px solid currentColor;
}
.collection-player.is-playing .collection-player__play { display:none; }
.collection-player.is-playing .collection-player__pause { display:block; }
.collection-player__meta { min-width:0; display:grid; gap:4px; }
.collection-player__meta strong {
  overflow:hidden; color:var(--player-paper);
  font-family:"Cormorant Garamond", Georgia, serif;
  font-size:1.18rem; font-weight:300;
  text-overflow:ellipsis; white-space:nowrap;
}
.collection-player__meta span {
  overflow:hidden; color:#777e84; font-size:.54rem;
  letter-spacing:.17em; text-overflow:ellipsis;
  text-transform:uppercase; white-space:nowrap;
}
.collection-player__progress {
  width:100%; height:2px; appearance:none; -webkit-appearance:none;
  border:0;
  background:linear-gradient(90deg,var(--player-accent) var(--progress,0%),rgba(233,231,225,.18) var(--progress,0%));
  cursor:pointer;
}
.collection-player__progress::-webkit-slider-thumb {
  width:9px; height:9px; -webkit-appearance:none; appearance:none;
  border-radius:50%; background:var(--player-paper);
}
.collection-player__progress::-moz-range-thumb {
  width:9px; height:9px; border:0; border-radius:50%; background:var(--player-paper);
}
.collection-player__time {
  display:flex; gap:7px; color:#7d8489;
  font-size:.58rem; font-variant-numeric:tabular-nums;
}
.collection-player__close {
  font-family:"Cormorant Garamond", Georgia, serif;
  font-size:1.8rem; font-weight:300;
}
@media (max-width:760px) {
  .collection-player {
    right:10px; bottom:10px; left:10px; width:auto; min-height:0;
    grid-template-columns:44px minmax(0,1fr) 34px;
    grid-template-areas:
      "toggle meta close"
      "progress progress progress";
    column-gap:12px; row-gap:10px; padding:12px;
    border:1px solid rgba(233,231,225,.13);
  }
  .collection-player__toggle { grid-area:toggle; }
  .collection-player__meta { grid-area:meta; }
  .collection-player__progress {
    display:block;
    grid-area:progress;
    align-self:center;
  }
  .collection-player__time { display:none; }
  .collection-player__close { grid-area:close; }
}
@media (prefers-reduced-motion:reduce) {
  .collection-player { transition-duration:.01ms; }
}

/* Corrección de robustez del reproductor compartido */
.collection-player__toggle { display:block; flex:0 0 auto; }
.collection-player__play { display:block; color:var(--player-paper); }
.collection-player__pause { color:var(--player-paper); }
.collection-player.is-playing .collection-player__play { display:none; }
.collection-player.is-playing .collection-player__pause { display:block; }
.collection-player audio { display:none; }
