:root {
  color-scheme: light;
  --ink: #3c2f24;
  --soft: #6c5542;
  --paper: #fffaf0;
  --line: #d9b792;
  --accent: #a84f31;
  --muted: #ead5b9;
  --bg: #efd1af;
  --bar: #b76443;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  font:
    16px/1.5 "Helvetica Neue",
    Arial,
    sans-serif;
  background: linear-gradient(150deg, #f9efdf, var(--bg) 70%, #dfb487);
  min-height: 100vh;
}
a {
  color: inherit;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px max(24px, calc((100vw - 1100px) / 2));
  border-bottom: 2px solid var(--line);
  background: linear-gradient(90deg, #efd9bf, #e2b991);
}
.brand {
  font:
    bold 20px Georgia,
    serif;
  text-decoration: none;
  border: 2px solid var(--line);
  border-radius: 30px;
  padding: 6px 14px;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--line);
}
nav {
  display: flex;
  gap: 8px;
}
nav a {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
}
nav a[aria-current] {
  background: var(--paper);
  font-weight: bold;
}
main {
  max-width: 900px;
  margin: auto;
  padding: 54px 24px 64px;
}
.intro {
  margin-bottom: 30px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--soft);
}
h1 {
  font:
    normal clamp(34px, 5vw, 48px) / 1.1 Georgia,
    serif;
  margin: 14px 0;
}
.intro > .eyebrow {
  color: var(--soft);
  margin: 12px 0;
}
h2,
p {
  margin-top: 0;
}
.player {
  border: 2px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper);
  box-shadow:
    0 6px 0 #c69c6d,
    0 18px 40px #422b1918;
}
.titlebar {
  background: linear-gradient(90deg, #efd9bf, #e7c8a4);
  border-bottom: 2px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 18px;
  font:
    700 14px Georgia,
    serif;
}
.lights {
  display: flex;
  gap: 6px;
}
.lights i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cb8567;
  border: 1px solid #9d624c;
}
.lights i:nth-child(2) {
  background: #d9ba73;
}
.lights i:nth-child(3) {
  background: #9bab88;
}
.player-body {
  padding: 28px 32px 20px;
}
#state:not(.sr-only) {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--soft);
}
#title {
  font:
    normal clamp(25px, 4vw, 36px) / 1.15 Georgia,
    serif;
  max-width: 650px;
  margin: 0 0 8px;
}
.artist {
  font-size: 14px;
  color: var(--soft);
}
.wave-wrap {
  margin-top: 26px;
  padding: 15px 14px 10px;
  background: var(--muted);
  border-radius: 12px;
}
#waveform {
  display: block;
  width: 100%;
  height: 100px;
  fill: var(--bar);
}
#waveform rect.played {
  fill: var(--ink);
}
input[type="range"] {
  accent-color: var(--accent);
  cursor: pointer;
}
#seek {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  height: 24px;
}
.times {
  display: flex;
  justify-content: space-between;
  font: 12px monospace;
  color: var(--soft);
}
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
}
.play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #8d482e;
  border-radius: 30px;
  background: var(--accent);
  color: #fffaf0;
  padding: 12px 26px;
  min-width: 124px;
  min-height: 48px;
  font-weight: bold;
  box-shadow: 0 3px 0 #753f2c;
}
.play:disabled {
  opacity: 0.6;
}
.volume {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--soft);
}
.volume input {
  width: 105px;
  height: 32px;
}
.collection {
  margin-top: 40px;
}
.collection-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.collection-head h2 {
  font:
    24px Georgia,
    serif;
  margin: 0;
}
.collection-head > span {
  font: 10px monospace;
  letter-spacing: 0.12em;
  color: var(--soft);
}
ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.track {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 2px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  padding: 18px;
}
.track[aria-current] {
  border-color: var(--accent);
  box-shadow: inset 4px 0 var(--accent);
}
.track-select {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 0;
  color: var(--ink);
  text-align: left;
  background: none;
  padding: 0;
  min-height: 44px;
}
.track-number {
  font: 12px monospace;
  color: var(--soft);
}
.track-name {
  display: block;
  font-weight: bold;
  font-size: 14px;
}
.track-meta {
  display: block;
  font-size: 12px;
  color: var(--soft);
  margin-top: 3px;
}
.download {
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 9px 14px;
  border-radius: 10px;
  min-height: 44px;
}
.download span {
  display: block;
  font-size: 10px;
  color: var(--soft);
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 900px;
  padding: 0 24px 28px;
  margin: auto;
  color: var(--soft);
  font-size: 12px;
}
footer a {
  text-decoration: none;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 600px) {
  header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px;
  }
  .brand {
    font-size: 18px;
  }
  nav {
    width: 100%;
    justify-content: space-between;
    font-size: 13px;
  }
  nav a {
    padding: 6px 12px;
  }
  main {
    padding: 30px 20px 40px;
  }
  .intro {
    margin-bottom: 24px;
  }
  .player-body {
    padding: 22px 20px 18px;
  }
  #title {
    font-size: 28px;
  }
  .wave-wrap {
    margin-top: 20px;
  }
  #waveform {
    height: 78px;
  }
  .controls {
    gap: 14px;
  }
  .play {
    min-width: 110px;
    padding: 12px 20px;
  }
  .volume {
    gap: 6px;
  }
  .volume input {
    width: 76px;
  }
  .collection {
    margin-top: 30px;
  }
  .track {
    gap: 10px;
    padding: 14px;
  }
  .track-select {
    gap: 10px;
  }
  .track-name {
    font-size: 12px;
  }
  .download {
    padding: 8px 10px;
    font-size: 11px;
  }
  footer {
    font-size: 10px;
    padding: 0 20px 24px;
  }
  .track-meta {
    font-size: 11px;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #f5e6d2;
    --soft: #cdb9a3;
    --paper: #302a25;
    --line: #705a48;
    --accent: #a84f31;
    --muted: #41362c;
    --bg: #25211e;
    --bar: #dda078;
  }
  body {
    background: linear-gradient(150deg, #332a23, #211e1a);
  }
  header,
  .titlebar {
    background: linear-gradient(90deg, #44362b, #382c23);
  }
  .player {
    box-shadow:
      0 6px 0 #534232,
      0 18px 40px #0003;
  }
  .track[aria-current] {
    border-color: #dda078;
  }
  .download {
    border-color: #997a5c;
  }
  :focus-visible {
    outline-color: #efb78e;
  }
}

.track-group {
  font-size: 12px;
  font-weight: 700;
  color: var(--soft);
  margin: 22px 0 10px;
  letter-spacing: 0.04em;
}
.track + .track {
  margin-top: 10px;
}

.track-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.copy-link {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  min-height: 44px;
  font-size: 12px;
  white-space: nowrap;
}
#share-status {
  font-size: 12px;
  overflow-wrap: anywhere;
  margin-top: 12px;
}
.clipboard-fallback {
  position: fixed;
  left: -9999px;
}
@media (max-width: 600px) {
  .track {
    flex-wrap: wrap;
  }
  .track-select {
    flex-basis: 100%;
  }
  .track-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
