/* ── COVERS PAGE ── */

#coversPage {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
}

/* ── Scroll area ── */
.cv-scroll {
  position: relative; z-index: 2;
  flex: 1; min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,169,110,0.35) transparent;
}
.cv-scroll::-webkit-scrollbar { width: 8px; }
.cv-scroll::-webkit-scrollbar-track { background: transparent; }
.cv-scroll::-webkit-scrollbar-thumb {
  background: rgba(201,169,110,0.35);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.cv-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(201,169,110,0.55);
  background-clip: padding-box;
}
.cv-scroll-inner {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

/* ── Header ── */
.cv-header {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "art meta"
    "intro intro";
  column-gap: 20px;
  padding: 32px 22px 14px;
}
.cv-art { grid-area: art; }
.cv-head-meta { grid-area: meta; align-self: center; min-width: 0; }
.cv-art {
  flex-shrink: 0;
  width: clamp(96px, 26vw, 150px);
  height: clamp(96px, 26vw, 150px);
  display: flex; align-items: center; justify-content: center;
  background: rgba(250,247,242,0.04);
  border: 1px solid rgba(201,169,110,0.15);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  position: relative; overflow: hidden;
}
.cv-art::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,169,110,0.5), transparent);
}
.cv-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  opacity: 0.95;
}
.cv-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(30px, 8vw, 44px);
  font-weight: 300; font-style: italic;
  color: var(--ivory); letter-spacing: 2px;
  line-height: 1.05;
  margin-bottom: 8px;
}
.cv-sub {
  font-size: 9px; letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blush); opacity: 0.5;
  white-space: nowrap;
}
.cv-intro {
  grid-area: intro;
  margin-top: 18px;
  max-width: 520px;
  font-size: 12.5px; font-weight: 300;
  line-height: 1.8; letter-spacing: 0.4px;
  color: var(--ivory); opacity: 0.65;
}

/* ── Track list ── */
.cv-tracks {
  list-style: none;
  padding: 4px 12px calc(24px + env(safe-area-inset-bottom));
}
.cv-row {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 13px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .25s ease;
}
.cv-row::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: rgba(201,169,110,0.10);
}
.cv-row:last-child::after { display: none; }
.cv-row:focus { outline: none; }
.cv-row:focus-visible {
  outline: 1px solid rgba(201,169,110,0.55);
  outline-offset: -1px;
}
.cv-row:active { background: rgba(250,247,242,0.05); }
@media (hover: hover) {
  .cv-row:hover { background: rgba(250,247,242,0.05); }
}

.cv-row-left {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.cv-num {
  font-family: 'Cinzel', serif;
  font-weight: 300; font-size: 14px;
  color: var(--gold); opacity: 0.55;
}
.cv-row-play {
  display: none;
  width: 16px; height: 16px;
  color: var(--ivory);
}
@media (hover: hover) {
  .cv-row:hover:not(.is-playing) .cv-num { display: none; }
  .cv-row:hover:not(.is-playing) .cv-row-play { display: block; }
}

/* Equalizer bars (visible on the current track) */
.cv-eq {
  display: none;
  align-items: flex-end; gap: 2px;
  height: 14px;
}
.cv-eq i {
  width: 3px; height: 100%;
  background: var(--gold);
  border-radius: 1px;
  transform-origin: bottom;
  animation: cv-eq-bounce 1s ease-in-out infinite;
}
.cv-eq i:nth-child(1) { animation-delay: 0s; }
.cv-eq i:nth-child(2) { animation-delay: -0.35s; }
.cv-eq i:nth-child(3) { animation-delay: -0.7s; }
@keyframes cv-eq-bounce {
  0%, 100% { transform: scaleY(0.25); }
  50%      { transform: scaleY(1); }
}
.cv-row.is-current .cv-num { display: none; }
.cv-row.is-current .cv-eq { display: flex; }
.cv-row.is-current:not(.is-playing) .cv-eq i {
  animation-play-state: paused;
  transform: scaleY(0.25);
}
@media (hover: hover) {
  .cv-row.is-current:hover .cv-row-play { display: none; }
}

.cv-row-main { flex: 1; min-width: 0; }
.cv-row-title {
  font-weight: 300; font-size: 15px;
  letter-spacing: 1px;
  color: var(--ivory);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .25s ease;
}
.cv-row.is-current .cv-row-title { color: var(--gold); }
.cv-row-artist {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 14px;
  color: rgba(250,247,242,0.55);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cv-row-dur {
  flex-shrink: 0;
  margin-left: auto;
  font-family: 'Cinzel', serif;
  font-weight: 300; font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--gold); opacity: 0.6;
}

/* ── Player bar ── */
.cv-player {
  flex-shrink: 0;
  position: relative; z-index: 3;
  background: linear-gradient(180deg, rgba(26,20,16,0.9), rgba(18,15,12,0.96));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(201,169,110,0.18);
  padding: 10px 20px calc(12px + env(safe-area-inset-bottom));
}
.cv-player::before {
  content: '';
  position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,169,110,0.5), transparent);
}

.cv-progress {
  display: flex; align-items: center; gap: 12px;
  max-width: 560px; margin: 0 auto;
}
.cv-time {
  flex-shrink: 0;
  font-family: 'Cinzel', serif;
  font-weight: 300; font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  min-width: 34px; text-align: center;
}
.cv-bar {
  flex: 1;
  height: 24px;
  display: flex; align-items: center;
  cursor: pointer;
  touch-action: none;
}
.cv-bar-track {
  position: relative;
  width: 100%; height: 3px;
  border-radius: 2px;
  background: rgba(250,247,242,0.15);
}
.cv-bar-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 0%;
  border-radius: 2px;
  background: var(--gold);
}
.cv-bar-knob {
  position: absolute; top: 50%; left: 0%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--ivory);
  opacity: 0;
  transition: opacity .2s ease;
}
.cv-bar.is-dragging .cv-bar-knob { opacity: 1; }
@media (hover: hover) {
  .cv-bar:hover .cv-bar-knob { opacity: 1; }
}

.cv-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 26px;
  margin: 6px 0 4px;
}
.cv-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: rgba(232,197,176,0.7);
  cursor: pointer;
  transition: color .25s ease;
}
.cv-btn svg { width: 20px; height: 20px; }
.cv-btn:focus,
.cv-bar:focus { outline: none; }
.cv-btn:focus-visible,
.cv-bar:focus-visible {
  outline: 1px solid rgba(201,169,110,0.55);
  outline-offset: 2px;
  border-radius: 50%;
}
.cv-btn:active { color: var(--gold); }
@media (hover: hover) {
  .cv-btn:hover { color: var(--gold); }
}
.cv-btn-play {
  width: 52px; height: 52px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  transition: background .3s, color .3s;
}
.cv-btn-play svg { width: 22px; height: 22px; }
.cv-btn-play:active,
.cv-btn-play:hover {
  background: var(--gold);
  color: var(--deep);
}
.cv-btn-play .cv-icon-pause { display: none; }
.cv-btn-play.is-playing .cv-icon-play { display: none; }
.cv-btn-play.is-playing .cv-icon-pause { display: block; }

.cv-now {
  display: flex; align-items: baseline; justify-content: center;
  min-height: 16px;
  margin-bottom: 8px;
  overflow: hidden;
}
.cv-now-title {
  font-size: 12px; font-weight: 300;
  letter-spacing: 1px;
  color: var(--ivory);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Desktop ── */
@media (min-width: 768px) {
  .cv-header {
    grid-template-areas:
      "art meta"
      "art intro";
    align-content: start;
    padding: 48px 22px 28px;
  }
  .cv-head-meta { align-self: start; }
  .cv-sub { font-size: 10px; letter-spacing: 3px; }
}
