:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #050505;
  color: #f4cf78;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  overflow-x: hidden;
  background: #050505;
}

html:fullscreen,
html:-webkit-full-screen {
  overflow: hidden;
}

html:fullscreen body,
html:-webkit-full-screen body {
  overflow: hidden;
}

html:fullscreen .stage,
html:-webkit-full-screen .stage {
  min-height: 100vh;
  padding: 0;
}

button,
input {
  font: inherit;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.player-shell {
  width: min(100%, 56.25svh, 2160px);
}

.player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  isolation: isolate;
  container-type: inline-size;
  overflow: hidden;
  background: #050505;
  touch-action: manipulation;
}

.layer {
  position: absolute;
  display: block;
  max-width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.chassis {
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(1.9% 4.25% 2% 4.25% round 5% 5% 4% 4%);
}

.cassette-bay {
  position: absolute;
  z-index: 5;
  top: 16.2%;
  left: 13.1%;
  width: 73.8%;
  height: 29.5%;
  border-radius: 4%;
  background: #151310;
  pointer-events: none;
}

.cassette {
  z-index: 10;
  left: 13.6%;
  top: 16.4%;
  width: 72.8%;
  height: 28.8%;
  max-width: none;
  object-fit: cover;
  clip-path: inset(3.5% 2.5% 4% 2.5% round 5%);
}

.spool {
  z-index: 20;
  top: 25.25%;
  width: 18%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background: #11100e;
  transform-origin: center center;
  will-change: transform;
}

.spool img {
  position: absolute;
  inset: -5%;
  width: 110%;
  height: 110%;
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.spool::after {
  position: absolute;
  inset: 38.5%;
  border: max(1px, 0.16cqi) solid #8a641e;
  border-radius: 50%;
  background: #11100e;
  content: "";
}

.spool-left {
  left: 25.55%;
}

.spool-right {
  left: 57.35%;
}

.spool.is-spinning {
  animation: spool-spin 1.25s linear infinite;
}

.spool-right.is-spinning {
  animation-duration: 1.08s;
}

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

.metadata-panel {
  position: absolute;
  z-index: 30;
  left: 35.8%;
  top: 36.15%;
  width: 28.4%;
  height: 4.55%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: 0;
  min-width: 0;
  padding: 0.22cqi 0.65cqi 0.3cqi;
  overflow: hidden;
  color: #f6d47f;
  text-align: center;
  text-shadow: 0 1px 0 #000;
}

.metadata-kicker {
  display: flex;
  justify-content: space-between;
  gap: 0.4cqi;
  min-width: 0;
  color: #c6932f;
  font-size: clamp(5px, 1.15cqi, 18px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.track-title {
  min-width: 0;
  overflow: hidden;
  color: #ffe2a0;
  font-size: clamp(9px, 2.9cqi, 34px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-title.long-title {
  font-size: clamp(7px, 2.1cqi, 26px);
}

.timeline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35cqi;
  min-width: 0;
  color: #c6932f;
  font-size: clamp(5px, 0.98cqi, 15px);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

#seekControl {
  width: 100%;
  height: clamp(4px, 0.45cqi, 7px);
  margin: 0;
  padding: 0;
  appearance: none;
  border: 1px solid #8c651d;
  border-radius: 2px;
  outline: none;
  background: #2b210f;
  cursor: pointer;
}

#seekControl::-webkit-slider-thumb {
  width: clamp(5px, 0.65cqi, 10px);
  height: clamp(5px, 0.65cqi, 10px);
  appearance: none;
  border: 1px solid #ffe2a0;
  border-radius: 50%;
  background: #c6932f;
}

#seekControl::-moz-range-thumb {
  width: clamp(5px, 0.65cqi, 10px);
  height: clamp(5px, 0.65cqi, 10px);
  border: 1px solid #ffe2a0;
  border-radius: 50%;
  background: #c6932f;
}

.cassette-window-trim {
  position: absolute;
  z-index: 35;
  top: 16.45%;
  left: 13.55%;
  width: 72.9%;
  height: 28.75%;
  border: max(1px, 0.26cqi) solid rgb(176 123 36 / 72%);
  border-radius: 4%;
  box-shadow: inset 0 0 0 max(1px, 0.18cqi) rgb(0 0 0 / 78%);
  pointer-events: none;
}

.fullscreen-control {
  position: absolute;
  z-index: 55;
  top: 2.2%;
  right: 5.3%;
  width: 8.5%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  outline: 0;
  background: transparent;
  color: #161616;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.fullscreen-icon {
  --corner-stroke: max(2px, 0.34cqi);
  position: relative;
  display: block;
  width: 58%;
  height: 58%;
}

.fullscreen-corner {
  position: absolute;
  width: 38%;
  height: 38%;
  border-color: currentcolor;
  border-style: solid;
}

.fullscreen-corner.top-left {
  top: 0;
  left: 0;
  border-width: var(--corner-stroke) 0 0 var(--corner-stroke);
}

.fullscreen-corner.top-right {
  top: 0;
  right: 0;
  border-width: var(--corner-stroke) var(--corner-stroke) 0 0;
}

.fullscreen-corner.bottom-left {
  bottom: 0;
  left: 0;
  border-width: 0 0 var(--corner-stroke) var(--corner-stroke);
}

.fullscreen-corner.bottom-right {
  right: 0;
  bottom: 0;
  border-width: 0 var(--corner-stroke) var(--corner-stroke) 0;
}

.fullscreen-control:hover,
.fullscreen-control.is-active {
  background: rgb(255 241 195 / 22%);
}

.fullscreen-control:active {
  transform: scale(0.94);
}

.fullscreen-control:focus-visible {
  outline: max(2px, 0.3cqi) solid #fff0bd;
  outline-offset: calc(max(2px, 0.3cqi) * -1);
}

.liner-notes {
  position: absolute;
  z-index: 45;
  top: 46.4%;
  left: 13.2%;
  width: 73.6%;
  height: 34.1%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  border-top: max(1px, 0.18cqi) solid #9b7229;
  border-bottom: max(1px, 0.18cqi) solid #9b7229;
  background: #101214;
  color: #f7dda0;
}

.liner-heading {
  display: flex;
  justify-content: space-between;
  gap: 1cqi;
  padding: 1.5cqi 0.8cqi 1.15cqi;
  color: #c89639;
  font-size: clamp(8px, 1.85cqi, 30px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.liner-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.2cqi 1.2cqi 2.6cqi 0.8cqi;
  outline: 0;
  scrollbar-color: #b88630 #171717;
  scrollbar-width: thin;
  touch-action: pan-y;
}

.liner-scroll:focus-visible {
  outline: max(2px, 0.28cqi) solid #f8dfaa;
  outline-offset: calc(max(2px, 0.28cqi) * -1);
}

.liner-scroll::-webkit-scrollbar {
  width: clamp(3px, 0.55cqi, 8px);
}

.liner-scroll::-webkit-scrollbar-track {
  background: #171717;
}

.liner-scroll::-webkit-scrollbar-thumb {
  background: #b88630;
}

.liner-copy {
  min-width: 0;
}

.liner-copy.is-changing {
  animation: liner-note-in 360ms ease-out;
}

.liner-copy h2 {
  margin: 0 0 1.5cqi;
  overflow-wrap: anywhere;
  color: #ffe6aa;
  font-size: clamp(17px, 4.8cqi, 68px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
}

.liner-copy p {
  margin: 0;
  color: #e4e0d5;
  font-size: clamp(12px, 3.05cqi, 38px);
  letter-spacing: 0;
  line-height: 1.46;
}

.liner-ticker {
  min-width: 0;
  overflow: hidden;
  border-top: max(1px, 0.12cqi) solid #473718;
  color: #c89639;
  font-size: clamp(7px, 1.55cqi, 24px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.liner-ticker-track {
  display: flex;
  width: max-content;
  padding: 1.15cqi 0;
  transform: translateX(0);
}

.ticker-item {
  padding-right: 7cqi;
}

.is-playing .liner-ticker-track {
  animation: liner-ticker 18s linear infinite;
}

@keyframes liner-note-in {
  from {
    opacity: 0;
    transform: translateY(1.8cqi);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes liner-ticker {
  to {
    transform: translateX(-50%);
  }
}

.control-hitbox {
  position: absolute;
  z-index: 50;
  top: 85.75%;
  width: 12.5%;
  height: 8.35%;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8%;
  outline: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.control-hitbox:hover {
  background: rgb(255 219 133 / 8%);
}

.control-hitbox:active {
  background: rgb(0 0 0 / 10%);
  transform: scale(0.975);
}

.control-hitbox:focus-visible {
  outline: clamp(2px, 0.35cqi, 6px) solid #fff0bd;
  outline-offset: calc(clamp(2px, 0.35cqi, 6px) * -1.5);
}

.previous-control {
  left: 10.9%;
}

.play-control {
  left: 25.7%;
}

.stop-control {
  left: 40.5%;
}

.next-control {
  left: 55.3%;
}

.download-control {
  left: 70.1%;
}

#audioPlayer {
  display: none;
}

noscript {
  position: fixed;
  inset: auto 1rem 1rem;
  z-index: 100;
  padding: 0.75rem;
  background: #151515;
  color: #fff;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .spool.is-spinning {
    animation-duration: 4s;
  }

  .liner-copy.is-changing,
  .is-playing .liner-ticker-track {
    animation: none;
  }
}
