@font-face {
  font-family: "GT Standard";
  src: url("/assets/gt-standard.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  font-family: "GT Standard", sans-serif;
  color: #000;
  background: #fff;
  --song-size: clamp(16.8px, 3.09vw, 60px);
  --disc-size: max(min(66vh, 60vw), calc(var(--song-size) * 6));
  --disc-center: 4vw;
  --row-height: min(clamp(76px, 8.15vw, 160px), calc(var(--disc-size) / 5), 25vh);
}

* { box-sizing: border-box; }
body { margin: 0; overflow-x: hidden; }

#disc {
  position: fixed;
  top: calc(50% - var(--disc-size) / 2);
  left: calc(var(--disc-center) - var(--disc-size) / 2);
  width: var(--disc-size);
  height: var(--disc-size);
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  transform-origin: center;
  z-index: 1;
  cursor: pointer;
}

#disc:disabled { cursor: default; opacity: 1; }
#disc img { display: block; width: 100%; height: 100%; }
#disc:focus-visible { outline: 2px solid; outline-offset: 8px; }

#songs {
  list-style: none;
  margin: 0;
  padding: max(0px, calc(50vh - var(--row-height) / 2)) 0;
}

#songs li {
  position: relative;
  padding-left: var(--song-x, calc(var(--disc-center) + var(--disc-size) / 4 + 1.2vw));
  padding-right: 1rem;
  min-height: var(--row-height);
  display: flex;
  align-items: center;
}

.song {
  font: inherit;
  font-size: var(--song-size);
  line-height: min(1.2em, 25vh);
  text-align: left;
  color: inherit;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.song[aria-current="true"] { text-decoration: underline; text-underline-offset: .12em; }
.song:focus-visible { outline: 2px solid; outline-offset: 4px; }

#add {
  position: fixed;
  bottom: 16px;
  right: 20px;
  font: 32px/1 sans-serif;
  color: inherit;
  text-decoration: none;
  z-index: 3;
}

#player {
  position: fixed;
  bottom: 12px;
  left: 16px;
  width: min(480px, calc(100vw - 76px));
  aspect-ratio: 7.5;
  padding: 0;
  border: 2px solid #565e50;
  border-radius: 999px;
  background: white;
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
}

#player:focus-visible { outline: 2px solid black; outline-offset: 4px; }
#progress { display: block; position: absolute; inset: 0; }
#ball {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  aspect-ratio: 1;
  pointer-events: none;
  transform-origin: center;
}

#error {
  position: fixed;
  bottom: 84px;
  right: 20px;
  max-width: min(30rem, 90vw);
  font: 14px/1.4 sans-serif;
  background: white;
  z-index: 3;
}

@media (max-width: 768px) {
  :root { --disc-center: 0px; }
}
