/* The hardware and the needle share the plinth's original 1536 × 1024 coordinates. */
#family-radio {
  color: #422a27;
  background: radial-gradient(ellipse at 50% 0, #fff0d0, transparent 70%), #ead2a4;
  --ink: .28;
}
.record-inner {
  width: min(calc(100% - 44px), 1000px);
  grid-template-columns: minmax(190px, .72fr) minmax(0, 1.3fr);
  grid-template-areas: "bill deck" "bill foot" "sleeve sleeve" "status status";
  gap: 0 clamp(20px, 5vw, 64px); padding-block: clamp(26px, 5vw, 58px);
}
.record-bill { grid-area: bill; min-width: 0; }
.turntable-sleeve { width: min(68%, 206px); margin: 0 0 22px 7px; }
.turntable-sleeve img { transform: rotate(-5deg); box-shadow: 3px 8px 11px #4e342747; }
.record-copy label { margin: 10px 0 1px; }
.record-copy small { font-size: 12px; }
.record-picker { width: fit-content; max-width: 100%; min-height: 44px; display: grid; align-items: center; }
#record-display:not(:empty) { padding-right: 22px; }
.hi-fi { grid-area: deck; position: relative; isolation: isolate; aspect-ratio: 3/2;
  width: 100%; justify-self: center; filter: drop-shadow(1px 8px 5px #55372150); }
.walnut-plinth { display: block; width: 100%; height: 100%; border-radius: 5% / 7%; }
.groove-field {
  position: absolute; left: 12.08%; top: 7.61%; width: 54.64%; aspect-ratio: 1;
  border-radius: 50%; cursor: crosshair; touch-action: pan-y pinch-zoom;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.groove-field:focus-visible { outline: 3px dashed #e9ca85; outline-offset: 3px; }
.black-vinyl {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid #5d5144; box-shadow: 0 2px 3px #241d19;
  background:
    conic-gradient(from 24deg, transparent 0 3%,#a5a4985c 10%, transparent 19% 51%,#c6b9a659 60%,transparent 69%),
    repeating-radial-gradient(circle,#252524 0 .65%,#161817 .8% 1.3%,#343331 1.5%);
}
.paper-label {
  position: relative; display: grid; place-content: center; text-align: center;
  width: 35%; aspect-ratio: 1; border-radius: 50%; color: #ffeac0; pointer-events: none;
  container-type: inline-size; background: var(--label-ink,#99453c);
  border: 2px solid #cdb18a; outline: 1px solid #271f1a; box-shadow: inset 0 0 0 2px #e0c79b44;
}
.paper-label b { font: italic 700 19cqw/1 Georgia,serif; transform: translateY(-10cqw); }
.paper-label i { font: 8.5cqw/1 Georgia,serif; transform: translateY(-8cqw); }
.paper-label small { font: 700 10cqw/1.3 Georgia,serif; transform: translateY(10cqw); }
.paper-label::after { content: ""; position: absolute; left: 47%; top: 47%; width: 6%; aspect-ratio: 1;
  background: radial-gradient(circle at 30% 18%,#fff6d8,#a69c81 42%,#534b3f 74%); border-radius: 50%; }
.tone-arm { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.arm-pickup { transform-origin: 1201px 222px; filter: drop-shadow(4px 8px 3px #2c201b70); }
body.record-playing .arm-pickup, .hi-fi.cueing .arm-pickup { transform: rotate(var(--needle-angle, 18deg)); }
.deck-clock { position: absolute; left: 73%; width: 14%; top: 76%; color: #422d21;
  text-align: center; font: 700 clamp(9px,1.2vw,14px)/1.1 ui-monospace,monospace; font-variant-numeric: tabular-nums; }
.deck-switch.record-play { position: absolute; left: 91.7%; top: 83.7%; transform: translate(-50%,-50%);
  width: max(44px,8%); height: max(44px,10%); background: transparent; border: 0; color: #473524; }
.deck-switch span { scale: .75; }
.deck-switch:focus-visible { outline: 2px dashed #fff3cc; outline-offset: 2px; }
.deck-footer { grid-area: foot; display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; padding-top: 12px; }
#needle-hint { font: italic 15px/1.3 Georgia,serif; }
#deck-speed { font: 600 10px/1.3 system-ui,sans-serif; letter-spacing: .1em; white-space: nowrap; }
.record-inner .record-notes, .record-inner .record-notes[open] { grid-area: sleeve; margin-top: 16px; border-top: 1px solid #96744a; }
#record-status { grid-area: status; }
.sleeve-extras { display: flex; justify-content: space-between; align-items: center; gap: 6px 14px; flex-wrap: wrap; }
#record-gift { display: inline-flex; min-height: 44px; align-items: center; gap: 5px; color: #663437; text-underline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
  body:not(:has(#quiet[aria-pressed="true"])) .arm-pickup { transition: transform .5s cubic-bezier(.18,.65,.3,1); }
  body.record-playing:not(:has(#quiet[aria-pressed="true"])) .paper-label { animation: needle-spin 1.8s linear infinite; }
}
@media (max-width: 620px) and (orientation: portrait) {
  .record-inner { width: min(92%,440px); grid-template-columns: 1fr;
    grid-template-areas: "bill" "deck" "foot" "sleeve" "status"; }
  .record-bill { display: grid; grid-template-columns: min(24vw, 98px) 1fr; gap: 18px; align-items: center; margin: 0 5px 19px; }
  .turntable-sleeve { width: 100%; margin: 0; }
  .record-copy small { font-size: 10px; }
  .record-copy label { font-size: 13px; margin-top: 5px; }
  .record-inner .record-notes { margin-top: 12px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .record-inner { width: min(94%,760px); padding-block: 19px; grid-template-columns: minmax(145px,.8fr) minmax(0,1.2fr); }
  .turntable-sleeve { width: min(40%,103px); margin-bottom: 12px; }
}

/* The type stays on the paper while the record follows the sung line. */
#record-lyrics p:has(.song-words):not([hidden]) {
  grid-template-areas: "portrait words" "title words" ". words"; grid-template-rows: auto auto 1fr;
}
#record-lyrics p:has(.song-words) .sleeve-print { grid-area: portrait; }
#record-lyrics .song-words { grid-area: words; position: relative; white-space: normal; font: 18px/1.36 S, Georgia, serif; }
.sleeve-heading { grid-area: title; display: grid; gap: 4px; white-space: normal; }
.sleeve-heading small { color: #6b4438; font: 700 11px/1.2 system-ui,sans-serif; letter-spacing: .08em; }
.sleeve-heading strong { color: #762e3b; font: italic 700 clamp(21px,2.8vw,31px)/1.02 Georgia,serif; letter-spacing: -.035em; }
#record-lyrics p:has(.sleeve-film,.song-words) .sleeve-film { align-self: end; }
.song-words > span { position: relative; display: block; padding: .11em 0 .11em .7em; }
.song-words .new-verse { margin-top: .65em; }
.song-words [data-singing] { box-shadow: inset 2px 0 #872c3f; color: #70283b; background: linear-gradient(90deg,#eccda780,transparent 95%); }
@media (min-width: 750px) {
  #record-lyrics .song-words { font-size: 22px; }
}
@media (max-width: 520px) {
  #record-lyrics p:has(.song-words):not([hidden]) {
    grid-template-columns: 84px minmax(0,1fr); grid-template-rows: auto auto;
    grid-template-areas: "portrait title" "words words"; align-items: center;
  }
  #record-lyrics p:has(.song-words) .sleeve-print { width: 84px; aspect-ratio: 1.15; margin-bottom: 4px; }
  #record-lyrics p:has(.song-words) .sleeve-film { grid-column: 1 / -1; }
}
