@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@400;500&display=swap');
/* Room palette and soft light over a paneled wall. */
:root {
  color-scheme: dark;
  --text: #f1e7d3;
  --muted: #b6b5a0;
  --accent: #e2c28a;
  --wall: #273c35;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 16px 'DM Sans', sans-serif;
  background:
    radial-gradient(ellipse at 85% 18%, #e8ba6a26, transparent 40%),
    linear-gradient(115deg, #fff1c40c, transparent 45%),
    repeating-linear-gradient(90deg, transparent 0 139px, #071b1626 140px 142px, #f9edcc08 143px 144px),
    var(--wall);
}

body::before {
  content: '';
  position: fixed;
  inset: auto 0 0;
  height: 12vh;
  z-index: -1;
  border-top: 12px ridge #6f624c;
  background: repeating-linear-gradient(100deg, #594230 0 119px, #322a23 120px 123px);
  box-shadow: 0 -16px 40px #0003;
}

button, a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

button:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}

header {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 5%;
  height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee2bd20;
}

header > span {
  color: var(--muted);
  font-size: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 3px;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

.mark {
  flex-shrink: 0;
  font-size: 38px;
  color: var(--accent);
}

main {
  max-width: 1440px;
  margin: auto;
  padding: 42px 5% 36px;
}

.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--muted);
}

h1, h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
}

h1 {
  font-size: clamp(42px, 5.5vw, 76px);
  letter-spacing: -2px;
  line-height: 1.1;
  margin: 17px 0;
}

#collection-meta {
  font-size: 14px;
  color: var(--muted);
}

.shelf-note {
  color: #d8c9a9;
  line-height: 1.7;
  font: italic 18px/1.7 Georgia, serif;
  transform: rotate(-4deg);
}

.toolbar {
  border-top: 1px solid #eee2bd20;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent);
}

.collection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 56px;
  align-items: start;
}

/* Walnut shelving: narrow spines and fixed pointer targets. */
#shelves {
  min-width: 0;
  border: 15px solid #654b34;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: #29251e;
  box-shadow: 2px 3px 0 #b38a5460, 16px 24px 40px #07151180;
}

.shelf {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 280px;
  padding: 30px 22px 0;
  border-bottom: 20px solid #79593b;
  background: linear-gradient(#0007, transparent 40%, #0008), repeating-linear-gradient(0deg, #fff1 0 1px, transparent 1px 7px);
  box-shadow: inset 0 7px 16px #0008, 0 5px 9px #0005;
  perspective: 1000px;
}

.shelf::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 4px;
  background: #d8b17c50;
  pointer-events: none;
}

.shelf-label {
  position: absolute;
  bottom: -16px;
  right: 12px;
  color: #ead0a1;
  font-size: 9px;
  letter-spacing: 2px;
}

.shelf-empty {
  padding: 30px;
  line-height: 1.7;
  color: var(--muted);
}

.record-slot {
  --disc-size: clamp(140px, 16vw, 210px);
  position: relative;
  flex: 1;
  min-width: 6px;
  max-width: 22px;
  height: 198px;
  padding: 0;
  z-index: 1;
}

.record-slot:nth-child(3n) {
  height: 187px;
}

.record-slot:nth-child(4n) {
  height: 180px;
}

.record-slot:nth-child(5n) {
  margin-right: 3px;
}

.record-slot.active {
  z-index: 30;
}

.spine {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 10px 0;
  background: var(--cover);
  color: var(--ink);
  border-radius: 2px 2px 0 0;
  box-shadow: inset 2px 0 3px #ffffff30, inset -2px 0 3px #0007, 3px 0 5px #0006;
  filter: brightness(.85);
  pointer-events: none;
  transition: opacity .2s, transform .3s;
}

.spine .num {
  font-size: 8px;
  opacity: .7;
}

.record-slot.active .spine {
  opacity: .28;
  transform: translateY(-8px);
}

.record-turn {
  position: absolute;
  display: block;
  width: var(--disc-size);
  height: var(--disc-size);
  left: 50%;
  bottom: 0;
  pointer-events: none;
  opacity: 0;
  transform-style: preserve-3d;
  transform: translateX(-50%) rotateY(-88deg);
  transition: transform .58s cubic-bezier(.2,.75,.2,1), opacity .16s;
}

.record-slot.active .record-turn {
  opacity: 1;
  transform: translateX(-50%) translateY(-30px) translateZ(75px) rotateY(0);
  animation: pull-and-turn .62s cubic-bezier(.2,.75,.2,1);
}

.record-slot:not(.active) .record-turn {
  animation: none;
}

.record-slot:first-child .record-turn {
  left: calc(var(--disc-size) / 2 - 18px);
}

.record-slot:nth-last-child(2) .record-turn {
  left: calc(100% - var(--disc-size) / 2 + 18px);
}

@keyframes pull-and-turn {
  0% {
    transform: translateX(-50%) rotateY(-88deg);
  }

  35% {
    transform: translateX(-50%) translateY(-30px) translateZ(75px) rotateY(-78deg);
  }

  100% {
    transform: translateX(-50%) translateY(-30px) translateZ(75px) rotateY(0);
  }

}

/* A generous photo label leaves a visible grooved vinyl rim. */
.vinyl {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: repeating-radial-gradient(circle, #171918 0 2px, #343733 3px, #141615 4px);
  border: 3px solid #090b09;
  box-shadow: 8px 14px 22px #000a, inset 0 0 0 6px #222522;
  backface-visibility: hidden;
}

.vinyl-label {
  width: 82%;
  height: 82%;
  border-radius: 50%;
  background: var(--cover, #bdb692);
  color: var(--ink, #222);
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  text-align: center;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 600;
  border: 2px solid #101410;
}

.vinyl-label > span, .vinyl-label small {
  padding: 0 10px;
}

.vinyl-label small {
  font-size: 10px;
  font-weight: 400;
}

.vinyl-label img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vinyl::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  background: #141816;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #ffffff60;
  pointer-events: none;
}

.flying-record {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform-origin: top left;
}

/* Spotify remains interactive inside a real frame, with no overlay on controls. */
#detail {
  min-width: 0;
}

#detail > .eyebrow {
  margin: 0 0 34px;
  text-align: center;
}

.wall-art {
  position: relative;
  margin: 0 0 32px;
}

.picture-light {
  position: absolute;
  width: 112px;
  height: 9px;
  left: calc(50% - 56px);
  top: -19px;
  border-radius: 5px;
  background: linear-gradient(#e6c895, #8a6a3d);
  box-shadow: 0 15px 30px 8px #ffd28b30;
}

.picture-frame {
  padding: 12px;
  border: 10px ridge #87613f;
  background: #d7cbb4;
  box-shadow: inset 0 0 0 1px #fff8, 5px 10px 0 #07161040, 12px 18px 28px #0005;
  border-radius: 2px;
}

.picture-frame iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
}

#embed-host:empty {
  display: none;
}

.wall-art figcaption {
  width: fit-content;
  margin: 12px auto 0;
  padding: 5px 10px;
  background: #b59c6b;
  color: #302a20;
  box-shadow: 1px 2px 3px #0004;
  font-size: 8px;
  letter-spacing: 1.6px;
}

.listening-console {
  position: relative;
  padding: 22px 18px 18px;
  background: linear-gradient(100deg, #6c503b, #473528);
  border-top: 6px solid #99744f;
  border-radius: 3px;
  box-shadow: 9px 16px 25px #07151170;
}

.listening-console::after {
  content: '';
  display: block;
  position: absolute;
  height: 18px;
  bottom: -18px;
  left: 8%;
  right: 8%;
  border-left: 12px solid #392c23;
  border-right: 12px solid #392c23;
}

/* All player geometry scales together. The arm pivots at 82%, 18% of the deck.
   Its needle lands inside the platter at 38 degrees, independently of playback. */
.turntable {
  position: relative;
  width: 100%;
  aspect-ratio: 1.45;
  border: 8px solid #302b25;
  border-radius: 7px;
  background: linear-gradient(135deg, #d4c7a8, #a99a7d);
  box-shadow: 0 8px 0 #241f1b, 0 14px 18px #0006;
  isolation: isolate;
}

#platter {
  position: absolute;
  left: 5%;
  top: 9%;
  width: 62%;
  aspect-ratio: 1;
  border: 5px solid #7c8077;
  border-radius: 50%;
  background: repeating-radial-gradient(#181c19 0 2px, #343a34 3px 4px);
  display: grid;
  place-items: center;
}

#playing-disc {
  animation: spin 1.8s linear infinite paused;
  box-shadow: 2px 4px 6px #0007;
}

.is-playing #playing-disc {
  animation-play-state: running;
}

.tonearm-pivot {
  position: absolute;
  left: 82%;
  top: 18%;
  width: 11%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 4px solid #63685f;
  border-radius: 50%;
  background: radial-gradient(circle, #a2a69a 0 30%, #272c27 34%);
  box-shadow: 2px 4px 5px #0005;
  z-index: 3;
}

.tonearm {
  position: absolute;
  left: calc(82% - 4px);
  top: 18%;
  width: 8px;
  height: 60%;
  background: linear-gradient(90deg, #555d56, #f0eee0 40%, #969d90 70%, #434c45);
  border-radius: 4px;
  transform-origin: 50% 0;
  transform: rotate(-8deg);
  transition: transform .7s cubic-bezier(.4,0,.2,1);
  box-shadow: 3px 3px 4px #0006;
  z-index: 4;
}

.arm-engaged .tonearm {
  transform: rotate(38deg);
}

.headshell {
  position: absolute;
  bottom: -3px;
  left: -5px;
  width: 18px;
  height: 27px;
  border-radius: 3px;
  background: linear-gradient(90deg, #202c28, #47574c, #19241f);
  border: 1px solid #69796b;
}

.needle {
  position: absolute;
  bottom: -3px;
  left: 7px;
  width: 3px;
  height: 5px;
  background: #d5be84;
}

.player-brand {
  position: absolute;
  bottom: 5%;
  right: 5%;
  font-size: 7px;
  color: #3f4438;
  letter-spacing: 1px;
}

.power-light {
  position: absolute;
  right: 12%;
  bottom: 17%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #745c36;
}

.is-playing .power-light {
  background: #d8e49c;
  box-shadow: 0 0 8px #e8ffac;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }

}

.transport {
  margin: 20px 0;
  font-size: 11px;
  color: #e2d5bb;
}

.transport::before {
  content: '●';
  margin-right: 7px;
  color: var(--accent);
  font-size: 8px;
}

.art {
  width: 88px;
  aspect-ratio: 1;
  float: left;
  margin: 0 16px 16px 0;
  padding: 9px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--cover);
  color: var(--ink);
  overflow: hidden;
  box-shadow: 3px 4px 8px #0004;
}

.art.has-image {
  padding: 0;
  background: #20251f;
}

.art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-title {
  font: 17px/1.1 Georgia, serif;
  overflow-wrap: anywhere;
}

.cover-artist {
  font-size: 8px;
}

.cover-bottom {
  display: none;
}

#track-number {
  color: var(--accent);
  font-size: 9px;
}

h2 {
  font-size: 24px;
  line-height: 1.2;
  margin: 10px 0;
  overflow-wrap: anywhere;
}

#artist {
  color: #cec4af;
  font-size: 13px;
  margin: 8px 0 18px;
}

.album-info {
  clear: both;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid #ead1a630;
  padding-top: 14px;
  font-size: 12px;
  color: #cec4af;
}

.open-link {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  text-underline-offset: 4px;
  margin-top: 18px;
}

.playback-note {
  clear: both;
  color: #c4b9a3;
  font-size: 11px;
  line-height: 1.6;
  margin: 18px 0 0;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  padding-top: 42px;
}

#status {
  color: var(--accent);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .collection {
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 28px;
  }

  .shelf {
    padding-left: 14px;
    padding-right: 14px;
  }

}

@media (max-width: 850px) {
  .collection {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  #detail {
    width: min(390px, 100%);
    margin: auto;
  }

  .record-slot {
    --disc-size: 180px;
  }

}

@media (max-width: 620px) {
  header {
    height: 76px;
  }

  .brand {
    font-size: 13px;
    letter-spacing: 1.5px;
    gap: 7px;
  }

  .mark {
    font-size: 29px;
  }

  header > span {
    font-size: 10px;
  }

  main {
    padding-top: 28px;
  }

  .shelf-note {
    display: none;
  }

  .toolbar {
    font-size: 9px;
    letter-spacing: 1px;
  }

  .toolbar > span:last-child {
    text-align: right;
  }

  #shelves {
    border-width: 10px;
    border-bottom: 0;
  }

  .shelf {
    height: 250px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .record-slot {
    --disc-size: 160px;
  }

  .record-slot:first-child .record-turn {
    left: calc(var(--disc-size) / 2 - 10px);
  }

  .record-slot:nth-last-child(2) .record-turn {
    left: calc(100% - var(--disc-size) / 2 + 10px);
  }

  .picture-frame {
    padding: 6px;
    border-width: 7px;
  }

  .listening-console {
    padding: 18px 12px;
  }

  footer {
    flex-direction: column;
    gap: 7px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

}

/* Idle painting and playback controls share one frame without covering Spotify. */
.idle-art {
  height: 352px;
  overflow: hidden;
  border-radius: 8px;
  background: #e7b3a0;
}

.idle-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.painting-toggle {
  display: block;
  margin: 12px auto 0;
  padding: 6px 10px;
  color: var(--accent);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Small creator credit beneath the wordmark. */
.brand-block {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.creator-credit {
  margin: 0;
  padding-left: 49px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0;
}

.creator-credit a {
  color: var(--accent);
  text-decoration: none;
}

.creator-credit a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 620px) {
  .creator-credit {
    padding-left: 36px;
    font-size: 9px;
  }
}
