/* ---------- Turntable (deck.js) ---------- */
.deck-wrap { position: relative; }
.deck {
  --energy: 0;
  position: relative; isolation: isolate;
  border-radius: var(--radius); padding: clamp(20px, 3vw, 36px);
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  user-select: none; -webkit-user-select: none;
}
/* Coloured halo behind the record: brighter as it spins */
.deck-glow {
  position: absolute; z-index: -1; left: 50%; top: 42%; width: 78%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; filter: blur(46px);
  background: conic-gradient(from 0deg, var(--orange), var(--orange-hot), var(--vals), var(--tango), var(--gold), var(--orange));
  opacity: calc(.42 + var(--energy) * .45); scale: calc(.86 + var(--energy) * .16);
  animation: deck-hue 9s linear infinite;
  transition: opacity .6s var(--ease), scale .6s var(--ease);
}
@keyframes deck-hue { to { rotate: 360deg; } }
.deck-plinth { position: relative; aspect-ratio: 1.12; display: grid; place-items: center; }
/* The record: same vector drawing as the app's VinylRecord (label in Tangofy orange) */
.deck-platter {
  position: relative; width: 82%; aspect-ratio: 1; border-radius: 50%;
  box-shadow: 6px 14px 30px -10px rgb(0 0 0 / .75), 0 2px 6px rgb(0 0 0 / .4);
}
.deck-disc { position: absolute; inset: 0; border-radius: 50%; cursor: grab; touch-action: none; outline: none; will-change: transform; }
.deck-disc:focus-visible { box-shadow: 0 0 0 3px var(--orange); }
.deck.is-scratching .deck-disc { cursor: grabbing; }
.deck-disc > svg, .deck-layer { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; pointer-events: none; display: block; }
/* Tonearm: rests off the record, swings onto it while playing */
.deck-arm { position: absolute; right: 2%; top: 4%; width: 14%; height: 70%; pointer-events: none; }
.deck-arm-base { position: absolute; right: 0; top: 0; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #3a3a40, #1a1a1d 70%); box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 10px 20px -6px rgb(0 0 0 / .7); }
.deck-arm-rod {
  position: absolute; right: 30%; top: 16%; width: 5px; height: 92%; border-radius: 3px;
  background: linear-gradient(90deg, #8c8c94, #e2e2e6 45%, #77777e);
  transform-origin: 50% 0; rotate: -10deg; transition: rotate .8s var(--ease);
}
.deck.is-playing .deck-arm-rod { rotate: 22deg; }
.deck-arm-head { position: absolute; left: 50%; bottom: -6px; width: 16px; height: 26px; translate: -50% 0; border-radius: 4px; background: linear-gradient(#d8d8dc, #8a8a92); box-shadow: 0 6px 12px -4px rgb(0 0 0 / .7); }
/* Music notes */
.deck-notes { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 2; }
.deck-notes span {
  position: absolute; left: var(--x); top: 46%; font-size: calc(22px * var(--s)); line-height: 1;
  text-shadow: 0 0 12px currentColor; opacity: 0;
  animation: deck-note 2.4s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes deck-note {
  0% { opacity: 0; transform: translate(0, 0) rotate(0) scale(.6); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), -190px) rotate(var(--r)) scale(1); }
}
/* Controls */
.deck-bar { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 14px; border-radius: 20px; background: rgb(255 255 255 / .03); box-shadow: inset 0 0 0 1px var(--line); }
.deck-play {
  width: 54px; height: 54px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--orange); color: #1a0b00; border: 0;
  background-image: linear-gradient(180deg, rgb(255 255 255 / .3), rgb(255 255 255 / 0) 55%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 10px 30px -10px rgb(255 143 45 / .8);
  transition: transform .3s var(--ease);
}
.deck-play:hover { transform: scale(1.06); }
.deck-play svg { width: 24px; height: 24px; grid-area: 1 / 1; transition: opacity .2s, scale .3s var(--ease); }
.deck-play .i-pause, .deck.is-playing .deck-play .i-play { opacity: 0; scale: .6; }
.deck.is-playing .deck-play .i-pause { opacity: 1; scale: 1; }
.deck-meta { min-width: 0; flex: 1; display: grid; gap: 3px; }
.deck-genre { justify-self: start; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--tango) 18%, transparent); color: var(--tango); font-weight: 700; font-size: 11px; letter-spacing: .06em; }
.deck-meta b { font-family: var(--display); font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-tap { display: none; color: var(--orange); font-size: 13px; }
.deck.needs-tap .deck-tap { display: block; }
.deck.needs-tap .deck-hint { display: none; }
.deck-hint { color: var(--text-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-progress { height: 3px; border-radius: 3px; background: rgb(255 255 255 / .08); overflow: hidden; margin-top: 6px; }
.deck-progress i { display: block; height: 100%; background: var(--orange); transform-origin: 0 50%; transform: scaleX(0); }
.deck:not(.has-sound) .deck-progress { display: none; }
@media (prefers-reduced-motion: reduce) { .deck-glow { animation: none; } }
@media (max-width: 480px) { .deck-hint { white-space: normal; } }
