/* the record player: the 7" sleeve, the turntable, the tone arm */
/* the turntable: the 7" slides out of its sleeve onto the platter; the tone arm swings over, drops, and tracks the song (= the progress bar).
   Contained (Matt 11/28): the deck is exactly the sleeve's height; the controls stack down the deck's right side. Stage 660×240, scaled to fit. */
.tt-wrap{position:relative;width:100%;max-width:660px;height:calc(240px * var(--s,1))}
.tt{position:absolute;left:0;top:0;width:660px;height:240px;transform:scale(var(--s,1));transform-origin:0 0}
.deck{position:absolute;left:250px;top:0;width:410px;height:240px;z-index:1;border-radius:12px;
  background:repeating-linear-gradient(90deg,rgba(255,255,255,.022) 0 1px,transparent 1px 3px),linear-gradient(160deg,#474747,#2b2b2b 55%,#1c1c1c);
  box-shadow:0 18px 36px rgba(0,0,0,.85),inset 0 1px 0 rgba(255,255,255,.16),inset 0 -3px 0 rgba(0,0,0,.6)}
.platter{position:absolute;left:10px;top:6px;width:228px;height:228px;border-radius:50%;cursor:pointer;
  background:radial-gradient(circle,#ccc 0 2.6%,#141414 3% 88%,transparent 88.5%),repeating-conic-gradient(#dedede 0 2.5deg,#8a8a8a 2.5deg 5deg);
  box-shadow:0 5px 12px rgba(0,0,0,.75),inset 0 0 0 2px #c4c4c4}
.platter::after{content:"";position:absolute;inset:7%;border-radius:50%;background:repeating-radial-gradient(circle,rgba(255,255,255,.035) 0 1px,transparent 1px 6px)}
/* the tiny play button on the empty platter: the TV's button, shrunk to spindle size; gone once the record lands */
.ttplay{position:absolute;left:359px;top:105px;z-index:2;width:30px;height:30px;padding:0;border:0;border-radius:50%;cursor:pointer;display:grid;place-items:center;
  background:#fff;color:#000;box-shadow:0 2px 6px rgba(0,0,0,.6);transition:opacity .3s,transform .15s}
.ttplay svg{width:13px;height:13px;margin-left:2px}
.ttplay:hover{transform:scale(1.12)}
.tt:not([data-state="idle"]) .ttplay{opacity:0;pointer-events:none}
.ctrlcol{position:absolute;left:568px;top:0;z-index:2;width:84px;height:240px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:13px}
.ttstart{width:74px;height:30px;border:0;border-radius:4px;cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1px;
  background:linear-gradient(#f2f2f2,#a9a9a9);box-shadow:0 2px 4px rgba(0,0,0,.7),inset 0 1px 0 #fff;color:#1a1a1a;font:400 9px/1 var(--label);letter-spacing:.12em}
.ttstart:active{transform:translateY(1px);box-shadow:0 1px 2px rgba(0,0,0,.7),inset 0 1px 0 #fff}
.rpms{display:flex;gap:6px}
.rpm{display:grid;place-items:center;width:32px;height:20px;border-radius:3px;font:400 12px/1 var(--label);color:#bdbdbd;background:linear-gradient(#3a3a3a,#202020);box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 1px 2px rgba(0,0,0,.6)}
.rpm.on{color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 0 0 1px rgba(255,90,60,.55),0 1px 2px rgba(0,0,0,.6)}
.ttime{font:400 12px/1 var(--label);color:#e6e6e6;letter-spacing:.03em;font-variant-numeric:tabular-nums;white-space:nowrap}
.pwr{width:8px;height:8px;border-radius:50%;background:#3a0d0d;box-shadow:inset 0 1px 1px rgba(0,0,0,.6)}
.tt:not([data-state="idle"]) .pwr{background:#ff3b30;box-shadow:0 0 8px #ff3b30}
.tt .single{position:absolute;left:0;top:0;width:240px;z-index:3}
.tt .single .vinyl{top:5%;left:5%;width:90%;height:90%}
.tt:not([data-state="idle"]) .single .vinyl{transform:translateX(254px)}
.tt[data-state="playing"] .single .disc{animation-play-state:running}
.armbase{position:absolute;z-index:5;left:517px;top:19px;width:42px;height:42px;border-radius:50%;background:radial-gradient(circle at 40% 35%,#ececec,#7c7c7c 70%);box-shadow:0 3px 6px rgba(0,0,0,.6);pointer-events:none}
.armrest{position:absolute;z-index:4;left:528px;top:150px;width:20px;height:13px;border-radius:3px;background:#151515;box-shadow:inset 0 1px 0 rgba(255,255,255,.14),0 2px 3px rgba(0,0,0,.6)}
.arm{position:absolute;z-index:6;left:538px;top:40px;width:0;height:0;transform-origin:0 0;transform:rotate(0deg);transition:transform .9s cubic-bezier(.3,.8,.3,1);filter:drop-shadow(3px 6px 4px rgba(0,0,0,.55))}
.arm .tube{position:absolute;left:-3px;top:0;width:6px;height:134px;border-radius:3px;background:linear-gradient(90deg,#8d8d8d,#f2f2f2 45%,#9a9a9a)}
.arm .weight{position:absolute;left:-11px;top:-36px;width:22px;height:24px;border-radius:4px;background:linear-gradient(90deg,#6f6f6f,#dedede 45%,#7a7a7a)}
.arm .head{position:absolute;left:-11px;top:128px;width:22px;height:26px;border-radius:3px;background:linear-gradient(#2e2e2e,#0f0f0f);transform:rotate(16deg);transform-origin:50% 0;cursor:grab;touch-action:none}
.arm .head::after{content:"";position:absolute;left:8px;bottom:-4px;width:6px;height:6px;border-radius:1px;background:#d0d0d0}
.tt[data-state="paused"] .arm,.tt[data-state="starting"] .arm,.tt.dragging .arm{filter:drop-shadow(8px 14px 6px rgba(0,0,0,.5))}
.tt.dragging .arm{transition:none}.tt.dragging .arm .head{cursor:grabbing}
@media (prefers-reduced-motion:reduce){.arm{transition:none}}
/* the 7" single: sleeve in front, the record behind it; play = it slides out and spins at 45 rpm */
.single{position:relative;width:300px;aspect-ratio:1;cursor:pointer}
.single .sleeve{position:relative;z-index:2;width:100%;height:100%;border-radius:3px;overflow:hidden;box-shadow:0 14px 30px rgba(0,0,0,.75)}
.single .sleeve img{width:100%;height:100%;object-fit:cover;border:0;box-shadow:none;filter:sepia(.1) contrast(1.03) brightness(.97)}
.single .sleeve::before{content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(circle at 52% 50%,transparent 0 43%,rgba(255,255,255,.13) 44.5%,rgba(255,255,255,.04) 46%,transparent 47.5%)}
.single .sleeve::after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:3px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.10),inset 0 0 22px rgba(0,0,0,.55),inset 0 0 3px rgba(255,255,255,.25)}
.single .vinyl{position:absolute;z-index:1;top:3%;left:3%;width:94%;height:94%;border-radius:50%;
  transform:translateX(13%);transition:transform .9s cubic-bezier(.2,.75,.25,1);filter:drop-shadow(0 8px 16px rgba(0,0,0,.8))}
.single .vinyl::after{content:"";position:absolute;inset:0;border-radius:50%;pointer-events:none;
  background:conic-gradient(from 20deg,transparent 0 30deg,rgba(255,255,255,.10) 48deg,transparent 66deg 200deg,rgba(255,255,255,.07) 222deg,transparent 244deg)}
.single .disc{position:absolute;inset:0;border-radius:50%;
  background:radial-gradient(circle,transparent 0 31%,#0b0b0b 31.5% 33%,transparent 33.5% 95%,#0a0a0a 95.5% 97%,rgba(255,255,255,.16) 97.6%,#080808 98.4%),
    repeating-radial-gradient(circle,#161616 0 1px,#252525 1.6px 2.6px);
  animation:spin45 1.333s linear infinite;animation-play-state:paused}
.single .label{position:absolute;inset:32%;border-radius:50%;background:center 62%/180% no-repeat;box-shadow:0 0 0 2px #000,inset 0 0 0 1px rgba(255,255,255,.15)}
.single .label::after{content:"";position:absolute;left:50%;top:50%;width:9%;height:9%;margin:-4.5% 0 0 -4.5%;border-radius:50%;background:#000;box-shadow:0 0 0 1px #444}
.single.out .vinyl{transform:translateX(57%)}
.single.spinning .disc{animation-play-state:running}
@keyframes spin45{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.single .vinyl{transition:none}.single .disc{animation:none}}
@media (max-width:860px){
  .single{width:min(300px,58vw)}
}
