:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #f8eee5;
  background: #161316;
  --surface: #221c22;
  --line: #423540;
  --muted: #bfaebb;
  --accent: #f1ac88;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
button, input { font: inherit; }
button, input {
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  border-radius: 9px;
  padding: .65rem .8rem;
}
button { cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.primary { background: var(--accent); color: #21151a; font-weight: 700; border: 0; }
.topbar {
  padding: 0 clamp(1rem, 5vw, 5rem);
  height: 4.8rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wordmark { display: inline-flex; align-items: center; gap: .65rem; font-weight: 800; letter-spacing: -.04em; text-decoration: none; font-size: 1.55rem; }
.record {
  width: 1.5rem;
  aspect-ratio: 1;
  display: inline-block;
  border-radius: 50%;
  background: radial-gradient(circle, #2b182a 0 8%, #fabd94 9% 30%, transparent 31%),
    repeating-radial-gradient(#241823 0 5%, #816077 6% 7%, #241823 8% 13%);
  border: 1px solid #b689a5;
}
.display-record { width: clamp(5rem, 18vw, 10rem); box-shadow: 1rem 1.3rem 5rem #b4626b42; }
.profile { display: flex; align-items: center; gap: .5rem; }
.entry {
  min-height: calc(100vh - 4.8rem);
  display: grid;
  align-items: center;
  grid-template-columns: 1fr minmax(17rem, 24rem);
  gap: clamp(2.5rem, 8vw, 8rem);
  padding: clamp(2rem, 8vw, 7rem) clamp(1rem, 9vw, 9rem);
  background: radial-gradient(ellipse at 20% 25%, #40263a, #161316 66%);
}
.entry h1 { font-size: clamp(3.5rem, 8vw, 7.5rem); letter-spacing: -.09em; line-height: .89; margin: .6em 0 .3em; }
.entry p, .muted { color: var(--muted); }
.auth-card { border: 1px solid var(--line); border-radius: 1.1rem; padding: clamp(1.25rem, 4vw, 2.5rem); background: #241e24; }
.auth-card h2 { margin: 0 0 1.6rem; letter-spacing: -.03em; }
.auth-card form, .auth-card label { display: grid; gap: .55rem; }
.auth-card form { gap: 1rem; }
.auth-card label { font-size: .9rem; }
.auth-card input { width: 100%; background: #19151a; }
.auth-card .quiet { margin-top: .5rem; text-align: left; padding-left: 0; }
.privacy { color: var(--muted); margin-top: 1rem; font-size: .83rem; line-height: 1.45; }
.privacy summary { cursor: pointer; }
.workspace { display: grid; grid-template-columns: minmax(13rem, 18rem) minmax(0, 1fr); max-width: 100rem; margin: auto; padding-bottom: 8.5rem; }
.sidebar { align-self: start; padding: clamp(1rem, 3vw, 2.5rem); border-right: 1px solid var(--line); }
.sidebar h2 { margin: 1.5rem 0 .6rem; color: var(--muted); font-size: .86rem; }
.sidebar nav { display: grid; gap: .28rem; }
.nav-button { width: 100%; text-align: left; background: transparent; border-color: transparent; overflow-wrap: anywhere; }
.nav-button.active { background: #3c2938; border-color: #614759; color: #facaad; }
.add-playlist { margin-top: 1rem; font-size: .84rem; color: var(--muted); }
.fields { margin-top: .35rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem; }
.fields input { width: 100%; }
#spotify-state { font-size: .85rem; color: var(--muted); line-height: 1.45; }
#spotify-settings button { margin: .25rem .25rem .25rem 0; font-size: .85rem; }
.collection { min-width: 0; padding: clamp(1rem, 5vw, 5rem); }
.collection-header { display: flex; align-items: start; gap: 1rem; justify-content: space-between; }
.collection h1 { font-size: clamp(2.35rem, 6vw, 5.4rem); margin: 0; letter-spacing: -.07em; line-height: 1.02; overflow-wrap: anywhere; }
.spotify-brand { display: inline-block; padding: .55rem; margin: -.3rem; flex: none; }
.spotify-brand img { display: block; height: auto; }
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.6rem 0 .5rem; }
.toolbar input { flex: 1 1 16rem; min-width: 0; }
.notice { margin: .75rem 0; color: #ffc2a4; font-size: .9rem; }
.notice:empty { display: none; }
.tracks { list-style: none; margin: 0; padding: 0; }
.track { border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 2.8rem minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .65rem 0; }
.track small { display: block; color: var(--muted); margin-top: .2rem; }
.track a { text-decoration-color: var(--line); text-underline-offset: .22em; }
.track.action-current { color: var(--accent); }
.track .play { border-radius: 50%; aspect-ratio: 1; padding: 0; width: 2.45rem; }
.track .index { color: var(--muted); text-align: center; }
.track .missing { color: var(--muted); text-align: right; font-size: .81rem; }
.empty { padding: 1.4rem 0; color: var(--muted); line-height: 1.5; }
.player {
  position: fixed;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(16rem, 30rem) minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  padding: .8rem clamp(1rem, 5vw, 5rem);
  background: #2c222c;
  border-top: 1px solid #64465c;
}
.now-playing { min-width: 0; }
.now-playing > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-playing small { color: var(--muted); margin-top: .25rem; }
.player-actions { display: flex; align-items: center; gap: .3rem; min-width: 0; }
audio { width: 100%; min-width: 0; }
@media (max-width: 720px) {
  .entry { grid-template-columns: 1fr; align-content: center; }
  .entry h1 { margin-top: .45em; }
  .workspace { grid-template-columns: 1fr; padding-bottom: 10rem; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
  .player { grid-template-columns: minmax(0, 1fr); }
  .track { gap: .4rem; }
}
