@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/figtree-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/figtree-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/figtree-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/figtree-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/figtree-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/figtree-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/figtree-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/figtree-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121212;
  --sidebar: #000000;
  --bar: #000000;
  --elevated: #181818;
  --elevated-2: #2a2a2a;
  --field: #242424;
  --text: #ffffff;
  --muted: #b3b3b3;
  --line: rgba(255, 255, 255, 0.12);
  --row-hover: rgba(255, 255, 255, 0.08);
  --play: #1ed760;
  --play-ink: #000000;
  --accent-text: #1ed760;
  --focus: #ffffff;
  --danger: #ff8b98;
  --shadow: 0 -10px 28px rgba(0, 0, 0, 0.55);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --sidebar: #f3f3f3;
  --bar: #ffffff;
  --elevated: #ffffff;
  --elevated-2: #e7e7e7;
  --field: #ffffff;
  --text: #121212;
  --muted: #4a4a4a;
  --line: rgba(0, 0, 0, 0.14);
  --row-hover: rgba(0, 0, 0, 0.06);
  --play: #1ed760;
  --play-ink: #000000;
  --accent-text: #0c6b2e;
  --focus: #121212;
  --danger: #a40020;
  --shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Figtree, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.4;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.sprite { position: absolute; width: 0; height: 0; }
.icon { width: 22px; height: 22px; display: block; fill: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100dvh;
}
aside {
  grid-column: 1;
  grid-row: 1;
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 12px 16px;
  min-height: 0;
  overflow: auto;
}
.stage {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
.player {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  z-index: 6;
}

.brand {
  margin: 2px 12px 14px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.finder, #launch label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.finder { margin: 0 8px 10px; }
input[type="search"], input[type="text"], #query {
  width: 100%;
  height: 44px;
  border-radius: 500px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 0 16px;
}
#filter { background: var(--elevated-2); }
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  padding: 6px 10px;
  font-weight: 600;
}
.nav.is-on, .nav:hover { background: var(--elevated-2); }
.nav img, .nav .mono, .thumb, .thumb img, .cover-btn, .cover-btn img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
}
.nav .count {
  margin-left: auto;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
#artists { list-style: none; margin: 8px 0 0; padding: 0; }
.mono {
  display: grid;
  place-items: center;
  background: var(--elevated-2);
  color: var(--text);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: -0.03em;
}

.sticky {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg);
  padding: 16px 20px 8px;
}
.top {
  display: flex;
  align-items: end;
  gap: 12px;
}
#menu { display: none; }
#launch {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}
#launch label { grid-column: 1 / -1; }
.pill, #all-on, #none, #stop {
  min-height: 44px;
  border-radius: 500px;
  border: 0;
  padding: 0 16px;
  font-weight: 700;
}
.pill {
  background: var(--text);
  color: var(--bg);
}
.pill:disabled, #all-on:disabled, #none:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#all-on, #none {
  background: transparent;
  color: var(--text);
}
#all-on:hover, #none:hover { background: var(--row-hover); }
#stop { background: transparent; color: var(--danger); }
#stop:disabled { color: var(--muted); }
.fine, .pick, .empty {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 72ch;
}
.job {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--elevated-2);
}
.job p { margin: 0; flex: 1; }
.job[hidden] { display: none; }
.listbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 12px;
}
.hit {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}
.hit input { width: 20px; height: 20px; accent-color: var(--play); }
.pick { flex: 1 1 12rem; margin: 0; }

.found { margin: 4px 20px 18px; }
.found[hidden] { display: none; }
.found-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 8px;
}
.found-bar[hidden] { display: none; }
.found-bar .fine { margin: 0; flex: 1 1 16rem; }
.found ul { list-style: none; margin: 8px 0 0; padding: 0; }
.hit-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 56px;
  padding: 0 4px;
  border-radius: 6px;
}
.hit-row:hover { background: var(--row-hover); }
.hit-row .kind { color: var(--muted); font-size: 0.78rem; }

.group { margin: 4px 12px 22px; }
.group h2 {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 20px 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.group ul { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: 44px 40px minmax(0, 1fr) auto 44px 44px;
  gap: 8px;
  align-items: center;
  min-height: 56px;
  padding: 0 4px;
  border-radius: 6px;
}
.row:hover, .row.is-on { background: var(--row-hover); }
.thumb {
  display: grid;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--elevated-2);
}
.thumb .mono { width: 40px; height: 40px; }
.meta { min-width: 0; display: flex; flex-direction: column; }
.ttl, .who, .sub, .now-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ttl { font-weight: 600; }
.who, .sub, .dur, #p-artist, #now-artist { color: var(--muted); }
.who, .sub, .dur { font-size: 0.86rem; }
.dur { font-variant-numeric: tabular-nums; }
.row.is-on .ttl { color: var(--accent-text); }
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  padding: 0;
  text-decoration: none;
}
.icon-btn:hover { background: var(--row-hover); }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i {
  display: block;
  width: 3px;
  height: 4px;
  background: var(--accent-text);
  animation: eq 0.9s ease-in-out infinite;
}
.eq i:nth-child(2) { animation-delay: 0.15s; }
.eq i:nth-child(3) { animation-delay: 0.3s; }
@keyframes eq {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

.player {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(18rem, 1.4fr) minmax(8rem, 0.8fr);
  grid-template-areas:
    "id transport volume"
    "id scrub volume";
  align-items: center;
  column-gap: 16px;
  row-gap: 0;
  min-height: 92px;
  padding: 8px 16px 10px;
  background: var(--bar);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.now-id { grid-area: id; display: flex; align-items: center; gap: 12px; min-width: 0; }
.cover-btn {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--elevated-2);
  display: grid;
  place-items: center;
}
.cover-btn img { width: 56px; height: 56px; }
.now-copy { min-width: 0; }
.now-copy p { margin: 0; }
#p-title { font-weight: 600; }
.transport {
  grid-area: transport;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.play-main {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--play);
  color: var(--play-ink);
  display: grid;
  place-items: center;
}
.play-main:disabled { opacity: 0.4; }
.play-main .icon { width: 22px; height: 22px; }
.scrub {
  grid-area: scrub;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.scrub input, .volume input { accent-color: var(--play); }
.scrub input { flex: 1; height: 44px; min-width: 0; }
.volume {
  grid-area: volume;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
}
.volume input { width: 108px; height: 44px; }
.rep-n {
  position: absolute;
  font-size: 0.62rem;
  font-weight: 700;
  margin-top: 14px;
}
.repeat { position: relative; }
.repeat[aria-pressed="true"], .shuffle[aria-pressed="true"] { color: var(--play); }

.now {
  position: fixed;
  z-index: 5;
  inset: 0 0 96px 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px 20px 24px;
  background: var(--bg);
}
.now[hidden] { display: none; }
#viz {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#now-cover, #now-title, #now-artist, #now-close { position: relative; z-index: 1; }
#now-close { position: absolute; top: 12px; right: 12px; }
#now-cover {
  width: min(46vh, 340px);
  height: min(46vh, 340px);
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.45);
}
#now-title {
  margin: 12px 0 0;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-align: center;
  max-width: 18ch;
}
#now-artist { margin: 0; text-align: center; }
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 7;
}
.scrim[hidden] { display: none; }

@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  aside {
    position: fixed;
    z-index: 8;
    inset: 0 auto 0 0;
    width: min(20rem, 88vw);
    transform: translateX(-105%);
    box-shadow: 12px 0 32px rgba(0, 0, 0, 0.45);
  }
  aside.is-open { transform: none; }
  #menu { display: inline-grid; }
  .stage { grid-column: 1; }
  .sticky { padding: 12px 12px 8px; }
  .top { flex-wrap: wrap; }
  #launch { min-width: calc(100% - 112px); }
  .row { grid-template-columns: 44px 40px minmax(0, 1fr) 44px 44px; }
  .dur { display: none; }
  .player {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "id play"
      "scrub scrub";
    min-height: 0;
    padding: 6px 10px 8px;
  }
  .transport { display: contents; }
  .play-main { grid-area: play; }
  .skip, .shuffle, .repeat, .volume { display: none; }
  body.now-open .player {
    grid-template-columns: 1fr;
    grid-template-areas:
      "id"
      "transport"
      "scrub"
      "volume";
  }
  body.now-open .transport {
    display: flex;
    grid-area: transport;
    justify-content: center;
  }
  body.now-open .skip,
  body.now-open .shuffle,
  body.now-open .repeat,
  body.now-open .volume { display: flex; }
  body.now-open .volume { grid-area: volume; justify-content: center; }
  body.now-open .volume input { width: min(220px, 70vw); }
  body.now-open .now { bottom: 210px; }
  .group h2 { font-size: 1.15rem; }
  .found { margin-left: 12px; margin-right: 12px; }
  .hit-row .dur { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .eq i { animation: none; height: 10px; }
  #viz { display: none; }
  aside { transition: none; }
}
