/* listen.spite.stream (#171): the web app's colours (apps/web/src/styles.css), trimmed down. */
:root {
  --bg: #0f1115;
  --bg2: #171a21;
  --bg3: #1f232c;
  --fg: #e8eaf0;
  --muted: #8a90a0;
  --accent: #3b82f6;
  --accent2: #2563eb;
  --line: #2c313c;
  --bar-h: 76px;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--fg);
  font:
    15px/1.45 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.15;
  margin: 0.15em 0;
}
.icon {
  fill: currentColor;
  flex: none;
}
.muted,
.by {
  color: var(--muted);
}
.by a {
  color: var(--fg);
}

/* ---- page frame ---- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page.has-bar {
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
}
.top {
  padding: 14px 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}
.brand:hover {
  text-decoration: none;
}
#app {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 20px 32px;
  flex: 1;
}
.foot {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 24px 16px 32px;
}
.foot a {
  color: var(--fg);
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  font: inherit;
  cursor: pointer;
  min-height: 40px;
}
.btn:hover {
  background: #262b36;
}
.btn:disabled {
  opacity: 0.5;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.primary:hover {
  background: var(--accent2);
}
.icon-btn {
  background: none;
  border: 0;
  color: var(--fg);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: inline-flex;
  line-height: 0;
}
.icon-btn:hover {
  background: var(--bg3);
}
.icon-btn.big {
  background: var(--fg);
  color: var(--bg);
}
.icon-btn.big:hover {
  background: #fff;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- album page ---- */
.hero {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  margin: 12px 0 28px;
}
.cover {
  width: min(300px, 40vw);
  height: auto;
  aspect-ratio: 1;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  flex: none;
}
.nocover {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  color: var(--muted);
}
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
@media (max-width: 640px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .cover {
    width: 100%;
    max-width: 340px;
  }
}

.tracks {
  list-style: none;
  margin: 0;
  padding: 0;
}
.row {
  display: flex;
  align-items: center;
  border-radius: 8px;
}
.row:hover {
  background: var(--bg2);
}
.row.on {
  background: var(--bg3);
}
.row.on .t {
  color: var(--accent);
}
.track {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  min-height: 48px;
  min-width: 0;
}
.track .n {
  width: 2ch;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.track .t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.track .d {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.dl {
  color: var(--muted);
  padding: 10px;
  line-height: 0;
}
.dl:hover {
  color: var(--fg);
}

.embed-code {
  margin-top: 28px;
  color: var(--muted);
}
.embed-code summary {
  cursor: pointer;
}
.embed-code textarea {
  display: block;
  width: 100%;
  margin: 10px 0;
  background: var(--bg2);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font:
    13px/1.4 ui-monospace,
    monospace;
  resize: vertical;
}

/* ---- player bar ---- */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: var(--bar-h);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(23, 26, 33, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 14px;
  z-index: 10;
}
.bar[hidden] {
  display: none;
}
.bar-cover {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
}
.bar-title {
  min-width: 0;
}
.bar-title b,
.bar-title span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.bar-title span {
  color: var(--muted);
  font-size: 13px;
}
.ctl,
.ectl {
  display: flex;
  align-items: center;
  gap: 4px;
}
.seekrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.seek {
  flex: 1;
  accent-color: var(--accent);
  min-height: 24px;
}
@media (max-width: 720px) {
  .bar {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    row-gap: 6px;
  }
  .bar .seekrow {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .bar > [data-act='viz'] {
    display: none;
  }
}

/* ---- lock ---- */
.lock {
  display: flex;
  gap: 28px;
  align-items: center;
  margin: 24px 0;
}
.lock .cover {
  width: min(220px, 36vw);
}
.unlock {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.unlock input {
  background: var(--bg2);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
  min-height: 40px;
  min-width: 0;
  flex: 1 1 180px;
}
.err {
  color: #f87171;
  min-height: 1.4em;
}
@media (max-width: 560px) {
  .lock:not(.embedded) {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- front page and band pages ---- */
.listing {
  margin-top: 12px;
}
.cards {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 22px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.card:hover {
  text-decoration: none;
}
.card b {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.card span {
  color: var(--muted);
  font-size: 13px;
}
.ccover {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.15s;
}
.card:hover .ccover {
  transform: scale(1.03);
}

/* ---- embed ---- */
body.embed {
  background: var(--bg2);
  height: 100vh;
  overflow: hidden;
}
.embed #app {
  max-width: none;
  padding: 12px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ehead {
  display: flex;
  gap: 14px;
  align-items: center;
  position: relative;
}
.ecover {
  width: 112px;
  height: 112px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
}
.emeta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.etitle {
  font-weight: 700;
  font-size: 18px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.eband {
  color: var(--muted);
}
.ectl {
  margin-top: 8px;
  margin-left: -8px;
}
.ebrand {
  position: absolute;
  top: 0;
  right: 0;
  line-height: 0;
  opacity: 0.85;
}
.embed .tracks {
  flex: 1;
  overflow-y: auto;
  margin: 0 -4px;
}
.embed .track {
  min-height: 40px;
  padding: 6px 10px;
}
.embed .lock {
  margin: 0;
}
.embed .lock h1 {
  font-size: 18px;
}

/* ---- visualizer (the web app's, apps/web/src/styles.css .viz) ---- */
.viz {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #000;
  color: #fff;
}
.viz.idle {
  cursor: none;
}
.viz-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.viz-ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 20px
    calc(20px + env(safe-area-inset-bottom, 0px));
  transition: opacity 0.5s;
  pointer-events: none;
}
.viz.idle .viz-ui {
  opacity: 0;
}
.viz-ui button {
  pointer-events: auto;
}
.viz.idle .viz-ui button {
  pointer-events: none;
}
.viz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.viz-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.viz-modes button {
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.viz-modes button.on {
  background: #fff;
  color: #000;
}
.viz-actions {
  display: flex;
  gap: 4px;
}
.viz .icon-btn {
  color: #fff;
}
.viz .icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
.viz .icon-btn.big {
  background: #fff;
  color: #000;
}
.viz-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}
.viz-title {
  font-size: clamp(22px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.15;
}
.viz-sub {
  font-size: clamp(14px, 2vw, 20px);
  opacity: 0.85;
}
.viz-transport {
  display: flex;
  align-items: center;
  gap: 8px;
}
.viz-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}
.viz-progress > div {
  height: 100%;
  width: 0;
  background: #fff;
}
