/* Song detail page — builds on /styles.css tokens */
.song-page { padding-top: 28px; padding-bottom: 24px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600;
  color: var(--soft); text-decoration: none; margin-bottom: 24px;
}
.back-link:hover { color: var(--ink); }
.back-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.song-loading, .song-missing { padding: 80px 0; text-align: center; color: var(--muted); }
.song-missing h1 { margin-bottom: 12px; }
.song-missing .btn { margin-top: 20px; }

.song-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: start; }

/* ---------- info column ---------- */
.song-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.song-tags .pill { height: 30px; font-size: 13px; }
.song-tags .badge { font-size: 12px; padding: 4px 10px; align-self: center; }
.song-info h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-bottom: 6px; }
.song-artist { font-size: 1.15rem; color: var(--soft); }
.song-desc { margin-top: 20px; font-size: 1.08rem; color: var(--ink-2); line-height: 1.75; white-space: pre-line; max-width: 560px; }

.specs { display: grid; grid-template-columns: repeat(4, 1fr); margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specs div { padding: 16px 0; }
.specs div + div { padding-right: 16px; border-right: 1px solid var(--line); }
.specs dt { font-size: 13px; color: var(--muted); }
.specs dd { margin: 4px 0 0; font-weight: 700; font-size: 1.05rem; }

/* ---------- buy box ---------- */
.buy {
  margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 28px); box-shadow: var(--shadow); display: grid; gap: 20px;
}
.buy-label { font-size: 14px; font-weight: 600; color: var(--soft); margin-bottom: 10px; }
.keys { display: flex; flex-wrap: wrap; gap: 8px; }
.key-opt { position: relative; }
.key-opt input { position: absolute; opacity: 0; pointer-events: none; }
.key-opt span {
  display: inline-grid; place-items: center; min-width: 52px; height: 44px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 12px; font: 600 15px var(--latin); cursor: pointer;
  direction: ltr; transition: all .15s var(--ease); background: var(--surface);
}
.key-opt span:hover { border-color: var(--ink); }
.key-opt input:checked + span { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.key-opt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.key-other { font-family: var(--font) !important; font-weight: 500 !important; }
.buy-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.buy-price { font: 800 2.4rem var(--latin); line-height: 1; letter-spacing: -.02em; }
.buy-price small { font-size: 1.1rem; font-weight: 600; color: var(--muted); margin-right: 4px; }
.buy-note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.buy-actions { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.buy-actions .btn { height: 54px; font-size: 16px; border-radius: 14px; }
.buy-actions .btn-icon { width: 54px; }

/* ---------- player column ---------- */
.song-player { position: sticky; top: 96px; }
.big-player {
  background: #0d0a16; color: var(--cream); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(18, 17, 17, .4); position: relative;
}
.bp-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.bp-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .55; transform: scale(1.04); transition: transform 6s ease; }
.big-player.is-playing .bp-cover img { transform: scale(1.12); }
.bp-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #0d0a16 4%, rgba(13, 10, 22, .2) 60%, rgba(13, 10, 22, .5)); }
.bp-title { position: absolute; bottom: 16px; right: 22px; left: 22px; z-index: 1; }
.bp-title span { font-size: 13px; color: rgba(255, 249, 240, .6); }
.bp-title strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.9rem; line-height: 1.15; -webkit-text-stroke: var(--display-stroke) currentColor; }
.bp-body { padding: 8px 22px 22px; }
.bp-wave { display: flex; align-items: center; gap: 2px; height: 84px; direction: ltr; cursor: pointer; touch-action: none; }
.bp-wave i { flex: 1; border-radius: 2px; background: rgba(255, 249, 240, .2); min-height: 3px; transition: background .15s; }
.bp-wave i.on { background: var(--gold); }
.bp-controls { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.bp-play {
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; flex: none;
  background: var(--cream); color: var(--ink); display: grid; place-items: center; transition: transform .15s var(--ease);
}
.bp-play:hover { transform: scale(1.05); }
.bp-play svg { width: 20px; height: 20px; fill: currentColor; }
.bp-play:disabled { opacity: .35; cursor: default; transform: none; }
.bp-time { font: 500 14px var(--latin); color: rgba(255, 249, 240, .6); direction: ltr; }
.bp-note { margin-right: auto; font-size: 13px; color: rgba(255, 249, 240, .5); }

/* ---------- related ---------- */
.related { margin-top: clamp(56px, 8vw, 96px); }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rel {
  display: grid; gap: 4px; padding: 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform .2s var(--ease), border-color .2s;
}
.rel:hover { transform: translateY(-2px); border-color: var(--line-2); }
.rel strong { font-weight: 700; font-size: 1.05rem; }
.rel small { color: var(--muted); font-size: 14px; }
.rel-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; color: var(--soft); }
.rel-foot b { font: 700 15px var(--latin); color: var(--ink); }

@media (max-width: 960px) {
  .song-grid { grid-template-columns: 1fr; }
  .song-player { position: static; order: -1; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .song-page { padding-top: 18px; }
  .back-link { margin-bottom: 16px; }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .specs div:nth-child(3) { padding-right: 0; border-right: 0; }
  .specs div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .bp-cover { aspect-ratio: 16 / 9; }
  .bp-title strong { font-size: 1.6rem; }
  .bp-note { display: none; }
  .buy-actions { grid-template-columns: 1fr auto auto; }
  .related-grid { grid-template-columns: 1fr; }
}
