/* The deck — a classic silver direct-drive club turntable, built over a photo of the plinth (straightened square-on, fader and front controls trued).
   Every position below is in the photo's own units (1270 x 904), as percentages. */
.tt-page{background:radial-gradient(120% 90% at 50% 0%,var(--glow) 0%,var(--plum) 40%,var(--night) 80%);min-height:100vh;min-height:100svh}
.tt-page .nav{position:relative}
.tt-head{max-width:var(--measure);margin:0 auto;padding:clamp(24px,5vw,56px) clamp(20px,4vw,48px) 0}
.tt-head h1{font-family:var(--font-display);font-weight:400;color:var(--peach);font-size:clamp(44px,7vw,92px);line-height:.95;margin:0 0 14px;transform:rotate(-3deg);transform-origin:left bottom}
.tt-head p{color:var(--muted);max-width:56ch;margin:0}

#tt{max-width:1320px;margin:0 auto;padding:clamp(28px,4vw,52px) clamp(16px,3vw,40px) clamp(60px,8vw,110px)}
.tt-rig{display:grid;grid-template-columns:minmax(0,min(100%,calc(78vh * 1270 / 904))) 232px;justify-content:center;gap:clamp(20px,2.6vw,36px);align-items:center}

/* ---- the deck ---- */
.tt-stage{position:relative;width:100%;aspect-ratio:1270/904;container-type:inline-size;touch-action:none;user-select:none;-webkit-user-select:none}
.tt-stage>*{position:absolute}
/* the plinth's shadow is a plain box-shadow on its own element: a drop-shadow filter on the photo left
   stray fragments in the page background in some browsers while the record animated */
.tt-pshadow{left:3%;right:3%;top:4%;bottom:.4%;border-radius:.6cqw;pointer-events:none;box-shadow:0 2.4cqw 4cqw rgba(0,0,0,.55),0 .5cqw 1cqw rgba(0,0,0,.45)}
.tt-plinth-img{inset:0;width:100%;height:100%;display:block}
.tt-ring{left:5.386%;top:.531%;width:67.244%;aspect-ratio:1;border-radius:50%;touch-action:none;cursor:grab;
  /* the platter edge: dark band under the strobe dots, a machined lip, then the gap to the plinth */
  background:radial-gradient(circle closest-side,#111113 0,#161618 88%,#1a1a1c 95.6%,#2c2c2f 96.1%,#b9b9bd 96.6%,#ececee 97.3%,#a7a7ab 97.9%,#4a4a4e 98.3%,#0c0c0d 98.6%,rgba(0,0,0,.6) 99.1%,rgba(0,0,0,0) 100%)}
.tt-ring:active{cursor:grabbing}
.tt-dots{left:5.386%;top:.531%;width:67.244%;aspect-ratio:1;pointer-events:none}
.tt-disc{left:8.614%;top:5.066%;width:60.787%;aspect-ratio:1;border-radius:50%;cursor:grab;touch-action:none;will-change:transform;
  background:
    radial-gradient(circle,transparent 0 33.5%,rgba(0,0,0,.7) 33.7% 34.3%,transparent 34.6% 41%,rgba(0,0,0,.35) 41.2% 41.5%,transparent 41.7% 62%,rgba(0,0,0,.4) 62.2% 62.6%,transparent 62.8% 94%,rgba(0,0,0,.5) 94.2% 94.6%,transparent 94.8%),
    repeating-radial-gradient(circle,#121112 0 1px,#1b1a1b 1px 2px,#151415 2px 3px);
  box-shadow:inset 0 0 0 .25cqw #0a0a0a,0 .35cqw .9cqw rgba(0,0,0,.55)}
.tt-disc:active{cursor:grabbing}
.tt-disc .label{position:absolute;inset:33.42%;border-radius:50%}
.tt-disc .label svg{width:100%;height:100%;display:block}
/* the room light on the vinyl stays put while the record turns under it */
.tt-sheen{left:8.614%;top:5.066%;width:60.787%;aspect-ratio:1;border-radius:50%;pointer-events:none;
  background:
    conic-gradient(from 300deg,transparent 0deg,rgba(255,255,255,.07) 16deg,rgba(255,255,255,.2) 26deg,rgba(255,255,255,.07) 36deg,transparent 54deg,transparent 180deg,rgba(255,255,255,.05) 196deg,rgba(255,255,255,.14) 206deg,rgba(255,255,255,.05) 216deg,transparent 234deg);
  -webkit-mask:radial-gradient(circle,transparent 34.5%,#000 37%,#000 93%,transparent 95%);mask:radial-gradient(circle,transparent 34.5%,#000 37%,#000 93%,transparent 95%)}
.tt-spindle{left:39.008%;top:47.766%;width:1.3%;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;
  background:radial-gradient(circle at 36% 32%,#fff 0 8%,#cfcfd2 22%,#7c7c80 58%,#3a3a3d 100%);box-shadow:.12cqw .25cqw .35cqw rgba(0,0,0,.6)}
/* tonearm base housing, then the arm, which pivots on it */
.tt-armbase{left:69.921%;top:6.084%;width:23.622%;aspect-ratio:1;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,#1d1d1f 0 62%,#2b2b2e 63%,#141415 66%,#0e0e0f 92%,#5d5d60 93.5%,#2a2a2c 96%,transparent 97%);
  box-shadow:0 .5cqw 1cqw rgba(0,0,0,.35)}
.tt-arm,.tt-arm-shadow{left:73.739%;top:3.782%;width:16.845%;height:auto;aspect-ratio:392/1439;transform-origin:47.449% 21.751%;pointer-events:none;z-index:3;will-change:transform}
/* the arm's shadow is a blurred silhouette that only ever moves, never re-filters */
.tt-arm-shadow{z-index:2;filter:brightness(0) blur(.4cqw);opacity:.4}
/* the finger lift: grab here to carry the arm and set the needle down anywhere on the record */
.tt-grip{left:0;top:0;width:6.299%;aspect-ratio:1;border-radius:50%;z-index:4;cursor:grab;touch-action:none;will-change:transform}
.tt-grip:active{cursor:grabbing}
/* the strobe lamp lives in the power-switch post: it rings the post's base and throws red toward the platter,
   lit whenever the deck has power (the strobe dots it reaches are tinted in js/deck.js) */
.tt-lampglow{left:6.26%;top:76.55%;width:15.75%;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;
  background:radial-gradient(circle closest-side at 71% 37%,rgba(255,96,46,.55),rgba(255,72,36,.2) 45%,transparent 100%),
    radial-gradient(circle closest-side,transparent 0 44%,rgba(255,120,60,.85) 47.5%,rgba(255,84,40,.3) 54%,transparent 64%);
  /* the light leaks from the side of the post that faces the platter, not all the way round */
  -webkit-mask:radial-gradient(circle closest-side at 74% 34%,#000 0 40%,rgba(0,0,0,.35) 62%,transparent 80%);
          mask:radial-gradient(circle closest-side at 74% 34%,#000 0 40%,rgba(0,0,0,.35) 62%,transparent 80%);
  animation:lamp 4s ease-in-out infinite}
@keyframes lamp{50%{opacity:.8}}
/* power: the rotary switch turns, the strobe lamp goes dark, the platter coasts */
.tt-knob{left:2.637%;top:71.46%;width:7.244%;aspect-ratio:1;border:0;padding:0;border-radius:50%;cursor:pointer;z-index:2;
  background:url(/images/deck/knob.webp?v=cf83bf7d-9dd3-4ab3-bdc0-eaf50d253969) center/100% 100% no-repeat;transition:transform .25s cubic-bezier(.3,.6,.3,1.3)}
.tt-lampoff{left:6.22%;top:81.858%;width:2.52%;height:2.765%;pointer-events:none;opacity:0;transition:opacity .15s;
  background:radial-gradient(circle at 50% 45%,#5a1d18,#33100e 70%,#240a09);box-shadow:inset 0 .1cqw .25cqw rgba(0,0,0,.7)}
.tt-lampoff{display:none}   /* v4 plinth: no separate lamp window any more; the glow above goes out instead */
.off .tt-lampglow{display:none}
.off .tt-knob{transform:rotate(-42deg)}
/* quartz lock: lights green when the pitch is exactly 0 */
.tt-quartz{left:87%;top:47.35%;width:.75%;aspect-ratio:1;border-radius:50%;pointer-events:none;background:#20321f;box-shadow:inset 0 .05cqw .1cqw rgba(0,0,0,.6)}
.tt-quartz.on{background:#7dff6a;box-shadow:0 0 .6cqw #52f03c,inset 0 0 .1cqw #e8ffe2}
.tt-quartz-label{left:80.3%;top:46.75%;width:6.1%;text-align:right;pointer-events:none;font:600 .62cqw/1 "Space Mono",monospace;letter-spacing:.14em;color:#3a3a3d;opacity:.75}

/* buttons printed on the plinth: invisible press areas over the photo */
.tt-hit{border:0;padding:0;margin:0;background:transparent;cursor:pointer;border-radius:.3cqw;color:#2a2a2c;font:600 .9cqw/1 "Space Mono",monospace;letter-spacing:.12em;
  display:flex;align-items:flex-end;justify-content:flex-start;transition:box-shadow .06s,background .06s}
.tt-hit b{font-weight:600;padding:0 0 .55cqw .8cqw;opacity:.75}
.tt-hit:active,.tt-hit.down{background:rgba(0,0,0,.14);box-shadow:inset 0 .25cqw .5cqw rgba(0,0,0,.45)}
.tt-hit:focus-visible,.tt-fader:focus-visible{outline:.2cqw solid var(--peach);outline-offset:.3cqw}
.tt-start{left:2.677%;top:86.947%;width:10%;height:9.956%}
.tt-b33,.tt-b45{top:93.42%;width:5.157%;height:3.374%;justify-content:center;align-items:center;color:#d8d8da;font-size:.75cqw}
.tt-b33 b,.tt-b45 b{padding:0}
.tt-b33{left:14.055%}.tt-b45{left:19.567%}
/* speed indicator: a pinpoint amber LED above the selected button */
.tt-b33 i,.tt-b45 i{position:absolute;left:50%;top:-1.1cqw;width:.42cqw;height:.42cqw;margin-left:-.21cqw;border-radius:50%;background:#5a4a33}
.tt-b33[aria-pressed="true"] i,.tt-b45[aria-pressed="true"] i{background:#ffb347;box-shadow:0 0 .6cqw #ff9a1f}
/* pitch fader: a draggable cap over the slot in the photo */
.tt-fader{left:87.598%;top:52.102%;width:5.039%;height:36.504%;cursor:ns-resize;touch-action:none;border-radius:.4cqw}
.tt-fader::before{content:"";position:absolute;inset:-1cqw -1.6cqw}
.tt-cap-knob{position:absolute;left:0;width:100%;height:21.818%;top:38.9%;pointer-events:none;filter:drop-shadow(0 .35cqw .35cqw rgba(0,0,0,.45))}

/* wake prompt */
.tt-wake{left:8.614%;top:5.066%;width:60.787%;aspect-ratio:1;display:grid;place-items:center;z-index:5;pointer-events:none}
.tt-wake span{background:rgba(23,21,26,.84);border:1px solid rgba(217,119,159,.5);color:var(--peach);border-radius:999px;padding:12px 20px;font-size:13px;letter-spacing:.2em;text-transform:uppercase;backdrop-filter:blur(4px)}
#tt.touched .tt-wake{display:none}
#tt .tt-status:empty{display:none}
#tt .tt-status{left:39%;bottom:-6%;transform:translateX(-50%);margin:0;font-size:12px;letter-spacing:.2em;text-transform:uppercase;color:var(--peri);white-space:nowrap}

/* ---- the sampler beside it ---- */
.tt-side{display:flex;flex-direction:column;gap:14px;padding:18px;border-radius:16px;
  background:linear-gradient(180deg,#252326 0%,#1a191b 100%);box-shadow:0 30px 60px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.08),inset 0 0 0 1px rgba(255,255,255,.04)}
.tt-cap{font-size:10px;letter-spacing:.3em;text-transform:uppercase;color:#8d8a90}
.tt-lcd{display:flex;justify-content:space-between;align-items:baseline;padding:10px 12px;border-radius:8px;background:#0d0c0b;box-shadow:inset 0 2px 6px rgba(0,0,0,.8),0 1px 0 rgba(255,255,255,.06)}
.tt-lcd output{font:600 22px/1 "Space Mono",monospace;font-variant-numeric:tabular-nums;color:#ffb35c;text-shadow:0 0 10px rgba(255,150,40,.45)}
.tt-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.tt-key{font:inherit;font-weight:600;font-size:13px;letter-spacing:.06em;border-radius:9px;padding:10px 8px;cursor:pointer;color:#e9e6ea;
  background:linear-gradient(180deg,#3a383c,#2c2a2e);border:1px solid rgba(255,255,255,.08);box-shadow:0 4px 0 #0e0d0f,0 6px 12px rgba(0,0,0,.35);
  display:flex;align-items:center;justify-content:center;gap:8px;transition:transform .06s,box-shadow .06s}
.tt-key:active{transform:translateY(3px);box-shadow:0 1px 0 #0e0d0f,0 2px 6px rgba(0,0,0,.35)}
.tt-key i{width:7px;height:7px;border-radius:50%;background:#4a464c;flex:none}
.tt-key[aria-pressed="true"] i{background:#ffb347;box-shadow:0 0 8px #ff9a1f}
.tt-key.wide{width:100%;justify-content:space-between;padding:12px 14px}
.tt-key[data-act=start]{font-family:var(--font-display);font-weight:400;font-size:22px;color:var(--peach)}
.tt-mob{display:none}
.tt-pads{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.tt-pad{aspect-ratio:1;border-radius:10px;border:0;cursor:pointer;font:inherit;font-size:10px;letter-spacing:.2em;text-transform:uppercase;color:#a29fa5;touch-action:manipulation;
  background:radial-gradient(120% 90% at 50% 15%,#4a474c,#343236 60%,#2b292d);box-shadow:inset 0 -3px 0 rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.08),0 2px 0 #0e0d0f;
  display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;padding:9px 10px;transition:transform .05s}
.tt-pad:active{transform:translateY(1px)}
.tt-pad b{font-family:var(--font-display);font-weight:400;font-size:18px;letter-spacing:0;text-transform:none;color:var(--peach)}
.tt-pad:nth-child(2) b,.tt-pad:nth-child(4) b{color:var(--peri)}
.tt-pad.hit{animation:padhit .3s ease-out}
@keyframes padhit{0%{background:radial-gradient(120% 90% at 50% 40%,#ffd0ac,#f2b48f 50%,#c9805a);box-shadow:0 0 24px rgba(217,119,159,.7),inset 0 -3px 0 rgba(0,0,0,.25)}}
.tt-help{font-size:12px;color:#8d8a90;line-height:1.55;margin:0}
.tt-help kbd{font:inherit;font-size:10px;border:1px solid rgba(255,255,255,.18);border-radius:4px;padding:1px 4px;color:#d9d6db}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.tt-note{max-width:1320px;margin:0 auto;padding:0 clamp(16px,3vw,40px) 40px;font-size:13px;color:var(--muted)}

@media (max-width:900px){
  .tt-rig{grid-template-columns:1fr}
  .tt-side{display:grid;grid-template-columns:1fr 1fr;align-items:start}
  .tt-side .tt-mob{display:grid;grid-template-columns:1fr 1fr;gap:8px;grid-column:1/-1}
  .tt-mob .tt-key[data-act=start]{grid-column:1/-1}
  .tt-side .tt-help{grid-column:1/-1}
  .tt-pads{grid-column:2;grid-row:2/span 3}
}
@media (max-width:520px){
  #tt{padding-left:10px;padding-right:10px}
  .tt-side{grid-template-columns:1fr}
  .tt-pads{grid-column:auto;grid-row:auto;grid-template-columns:repeat(4,1fr);gap:8px}
  .tt-pad{padding:7px 8px}
  .tt-pad b{font-size:15px}
  .tt-help{display:none}
  .tt-wake span{font-size:10px;padding:7px 12px;letter-spacing:.16em}
}

/* big-screen mode: ?screen */
.tt-screen .nav,.tt-screen .tt-head,.tt-screen footer,.tt-screen .tt-note,.tt-screen .tt-help{display:none}
.tt-screen #tt{max-width:none;padding:3vh 3vw}
.tt-screen .tt-rig{grid-template-columns:minmax(0,calc(90vh * 1270 / 904)) 20vw;justify-content:center}

/* the target light: press the silver post at the corner and it pops up, throwing a pool of white light onto the
   record (the beam is the platter's own circle, so none lands on the plinth); like the strobe, it needs power */
.tt-target{left:5.276%;top:4.314%;width:8.189%;aspect-ratio:1;border:0;padding:0;border-radius:50%;background:transparent;cursor:pointer;z-index:3}
.tt-target:focus-visible{outline:.2cqw solid var(--peach);outline-offset:.3cqw}
.tt-target[aria-pressed="true"]{background:radial-gradient(circle closest-side,#fffdf6 0 16%,rgba(255,252,240,.85) 24%,rgba(255,250,235,.25) 60%,transparent 100%);
  box-shadow:0 0 1.6cqw .4cqw rgba(255,250,235,.45)}
.tt-beam{left:5.386%;top:.531%;width:67.244%;aspect-ratio:1;border-radius:50%;pointer-events:none;opacity:0;transition:opacity .35s;z-index:3;
  background:radial-gradient(ellipse 95% 95% at 5.9% 10.1%,rgba(255,250,236,.6) 0,rgba(255,248,230,.32) 30%,rgba(255,246,226,.12) 60%,transparent 100%)}
.tt-target[aria-pressed="true"]~.tt-beam{opacity:1}
.off .tt-target[aria-pressed="true"]{background:transparent;box-shadow:none}
.off .tt-target[aria-pressed="true"]~.tt-beam{opacity:0}
