:root {
  color-scheme: dark;
  --bg: #101419;
  --panel: #171d24;
  --panel-strong: #1e2731;
  --text: #f4f5f7;
  --muted: #9da8b4;
  --line: #2d3844;
  --accent: #b7e56c;
  --accent-ink: #12200a;
  --danger: #ff9e9e;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 15% 0%, #26372a 0, transparent 34rem), var(--bg);
  color: var(--text);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.has-jobs { padding-bottom: 130px; }
.shell { width: min(100% - 32px, 860px); margin: 0 auto; padding: 54px 0 36px; }
.hero { max-width: 650px; margin-bottom: 36px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: .73rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 16px; font-size: clamp(2.6rem, 9vw, 5.6rem); line-height: .95; letter-spacing: -.065em; }
h1 span { color: var(--accent); }
h2 { margin-bottom: 0; font-size: 1.5rem; letter-spacing: -.025em; }
h3 { margin-bottom: 4px; font-size: 1rem; line-height: 1.2; }
.lede { max-width: 510px; margin-bottom: 0; color: var(--muted); font-size: 1.08rem; }
.panel, .result-card, .job-card, .empty { border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 90%, transparent); border-radius: 18px; }
.panel { padding: 24px; }
.stack { display: grid; gap: 10px; }
label { color: var(--muted); font-size: .88rem; }
input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: #0d1116; color: var(--text); padding: 0 14px; font: inherit; }
button { min-height: 46px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); padding: 0 18px; font: inherit; font-weight: 800; cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
.search-box { display: flex; gap: 10px; }
.search-box input { flex: 1; min-height: 56px; border-radius: 16px; font-size: 1.05rem; }
.search-box button { min-height: 56px; border-radius: 16px; }
.hint, footer, .result-copy p, .section-heading > span, .job-copy span { color: var(--muted); font-size: .86rem; }
.hint { margin: 10px 4px 28px; }
.status { min-height: 24px; margin-bottom: 16px; color: var(--muted); }
.error { color: var(--danger); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 12px 0; }
.results, .results-list { display: grid; gap: 10px; }
.album-card { display: grid; grid-template-columns: 88px 1fr auto; align-items: center; gap: 16px; border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line)); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 10%, var(--panel)), var(--panel)); border-radius: 18px; padding: 12px; }
.album-art { width: 88px; height: 88px; }
.album-copy { min-width: 0; }
.album-copy .eyebrow { margin-bottom: 3px; font-size: .65rem; }
.album-copy h3, .album-copy p, .album-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-copy p, .album-copy span { display: block; margin-bottom: 0; color: var(--muted); font-size: .85rem; }
.album-copy span { margin-top: 5px; color: #c4ccd4; font-size: .75rem; }
.singles-heading { margin-top: 30px; }
.result-card { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px; padding: 10px; }
.art { width: 56px; height: 56px; overflow: hidden; border-radius: 10px; background: var(--panel-strong); }
.art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.art-placeholder { display: grid; place-items: center; height: 100%; color: var(--accent); font-size: 1.6rem; }
.result-copy { min-width: 0; }
.result-copy h3, .result-copy p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-copy p { margin-bottom: 0; }
.download-button { min-height: 40px; padding: 0 12px; font-size: .83rem; }
.jobs { display: grid; gap: 10px; margin-top: 30px; }
#jobs:not(:empty) {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 12px;
  width: min(calc(100% - 24px), 720px);
  max-height: min(34vh, 260px);
  margin: 0;
  padding: 10px;
  overflow-y: auto;
  transform: translateX(-50%);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: 0 14px 40px rgb(0 0 0 / 35%);
  backdrop-filter: blur(18px);
}
.job-card { display: flex; align-items: center; gap: 14px; padding: 16px; }
.job-icon { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-size: 1.5rem; }
.job-copy { flex: 1; min-width: 0; }
.job-copy strong, .job-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 3px; background: var(--line); }
.progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease; }
.download-link { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 800; }
.empty { display: grid; gap: 4px; padding: 24px; }
footer { margin-top: 58px; text-align: center; }
footer p { margin-bottom: 5px; }
.fine-print { font-size: .72rem; opacity: .7; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
[hidden] { display: none !important; }

@media (max-width: 560px) {
  body.has-jobs { padding-bottom: 176px; }
  .shell { width: min(100% - 24px, 860px); padding-top: 34px; }
  .search-box { display: grid; grid-template-columns: 1fr; }
  .search-box button { width: 100%; }
  .result-card { grid-template-columns: 48px 1fr; }
  .art { width: 48px; height: 48px; }
  .download-button { grid-column: 1 / -1; width: 100%; }
  .album-card { grid-template-columns: 64px 1fr; }
  .album-art { width: 64px; height: 64px; }
  .album-button { grid-column: 1 / -1; }
  .section-heading { align-items: start; flex-direction: column; gap: 4px; }
  #jobs:not(:empty) {
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100% - 16px);
    max-height: 42vh;
    padding: 8px;
  }
}
