:root {
  --bg: #14110f;
  --bg-2: #1c1815;
  --line: #352d26;
  --text: #f1e8db;
  --muted: #a5978a;
  --accent: #d9a35f;
  --accent-ink: #1a130c;
  --player-h: 132px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Josefin Sans", system-ui, sans-serif;
  font-weight: 300;
  min-height: 100vh;
  padding-bottom: calc(var(--player-h) + env(safe-area-inset-bottom));
}
button { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: currentColor; flex: none; }

.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background: url("cover.jpg") center 20% / cover no-repeat;
  filter: blur(60px) brightness(.35) saturate(.8);
  transform: scale(1.2);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(20,17,15,.35), var(--bg) 70%);
}

.wrap { max-width: 980px; margin: 0 auto; padding: 48px 16px 32px; }

.album {
  display: grid;
  grid-template-columns: minmax(0, 340px) 1fr;
  gap: 40px;
  align-items: end;
}
.cover {
  width: 100%; height: auto; display: block;
  box-shadow: 0 30px 70px rgba(0,0,0,.6);
  border: 1px solid rgba(217,163,95,.25);
}
.eyebrow {
  margin: 0 0 6px;
  letter-spacing: .32em; text-transform: uppercase;
  font-size: 14px; color: var(--accent);
}
h1 {
  font-family: "Cormorant Garamond", serif;
  font-style: italic; font-weight: 500;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.02; margin: 0 0 10px;
}
.count { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; cursor: pointer;
  letter-spacing: .1em; text-transform: uppercase; font-size: 13px;
  border: 1px solid var(--accent);
}
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); font-weight: 400; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost[aria-pressed="true"] { background: rgba(217,163,95,.16); }
.btn:hover { filter: brightness(1.08); }

.tracks { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.track {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center; gap: 12px;
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  border-radius: 6px;
}
.track:hover { background: rgba(255,255,255,.04); }
.track:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.track .num { color: var(--muted); text-align: center; font-size: 15px; }
.track .title { font-size: 17px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track .len { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.track.active .title, .track.active .num { color: var(--accent); }
.track .eq { display: none; gap: 2px; height: 14px; align-items: flex-end; justify-content: center; }
.track.active .num-text { display: none; }
.track.active .eq { display: inline-flex; }
.eq i { width: 3px; background: var(--accent); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; }
.eq i:nth-child(3) { animation-delay: .4s; }
.paused .eq i { animation-play-state: paused; }
@keyframes eq { 0%,100% { height: 30%; } 50% { height: 100%; } }

.foot { text-align: center; color: var(--muted); font-size: 14px; padding: 40px 0 0; }
.foot p { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 18px; margin: 0; }

/* Player */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: rgba(22,18,15,.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
}
.progress { display: flex; align-items: center; gap: 12px; max-width: 980px; margin: 0 auto 6px; }
.time { font-size: 12px; color: var(--muted); width: 40px; font-variant-numeric: tabular-nums; }
.time:last-child { text-align: right; }
#seek { flex: 1; accent-color: var(--accent); height: 20px; margin: 0; }
.bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  max-width: 980px; margin: 0 auto; gap: 12px;
}
.now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.now img { border-radius: 4px; flex: none; }
.now div { min-width: 0; }
.now-title { margin: 0; font-size: 15px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-artist { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.controls { display: flex; align-items: center; gap: 8px; }
.extra { display: flex; justify-content: flex-end; }
.ctl {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent; border: 0; cursor: pointer; color: var(--text);
}
.ctl:hover { background: rgba(255,255,255,.07); }
.ctl.play { width: 54px; height: 54px; background: var(--accent); color: var(--accent-ink); }
.ctl.play svg { width: 26px; height: 26px; }
.ctl.play:hover { background: var(--accent); filter: brightness(1.08); }
.ctl.small svg { width: 20px; height: 20px; }
.ctl[aria-pressed="true"] { color: var(--accent); }
.i-pause { display: none; }
.playing .i-pause { display: block; }
.playing .i-play { display: none; }

@media (max-width: 720px) {
  .wrap { padding-top: 24px; }
  .album { grid-template-columns: 1fr; gap: 22px; text-align: center; }
  .cover { max-width: 320px; margin: 0 auto; }
  .actions { justify-content: center; }
  .bar { grid-template-columns: 1fr auto; }
  .extra { display: none; }
  .now img { width: 40px; height: 40px; }
}
