/* freecrate. Night (default) is ink and fog with one amber signal, like a
   dub techno sleeve under club light; day is the original concrete. Tempo is
   the loudest thing on every row. */
:root {
  --bg: #151b22;
  --surface: #1b232c;
  --raised: #232d38;
  --ink: #e4e7e0;
  --fog: #8f9891;
  --rule: #2c3743;
  --signal: #f0a04b;
  --signal-ink: #1d1307;
  --dub: #8db7da;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
:root[data-theme="day"] {
  --bg: #d5d7d0;
  --surface: #e0e2db;
  --raised: #eaece6;
  --ink: #1e2833;
  --fog: #5f6862;
  --rule: #b6bab1;
  --signal: #c2621a;
  --signal-ink: #fff8ef;
  --dub: #2f5677;
  --shadow: 0 10px 30px rgba(30, 40, 51, .15);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variation-settings: "wdth" 100;
}
a { color: var(--ink); text-decoration-color: var(--fog); text-underline-offset: 3px; }
a:hover { color: var(--signal); text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
kbd { font: inherit; font-size: .8em; padding: 0 5px; border: 1px solid var(--rule); border-radius: 3px; }

.intro, .controls, .styles, main, .foot { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px;
  padding: 12px max(24px, calc((100vw - 1120px) / 2 + 24px));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.mark {
  color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.5rem; line-height: 1;
  letter-spacing: -.02em; display: inline-flex; align-items: center; gap: .4em;
}
.mark:hover { color: var(--ink); }
.mark-accent { color: var(--signal); }
.mark-icon { width: 1.35em; height: 1.35em; flex: none; }
.mi-disc { fill: var(--signal); } .mi-sleeve { fill: var(--ink); } .mi-hole { fill: var(--bg); }
.mi-groove { fill: none; stroke: var(--bg); stroke-opacity: .3; stroke-width: 1.1; }
.search { position: relative; max-width: 480px; display: block; }
.search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--fog); }
.search input { width: 100%; padding: 9px 12px 9px 38px; border-radius: 999px; }
.theme { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--rule); background: transparent; cursor: pointer; display: grid; place-items: center; }
.theme svg { width: 18px; height: 18px; }

input, select {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 6px; padding: 7px 10px;
}
input:focus, select:focus { border-color: var(--fog); }

/* ---------- list ---------- */
.intro { padding-top: 32px; padding-bottom: 12px; }
.lede {
  margin: 0; max-width: 34ch; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.15;
  font-weight: 700; letter-spacing: -.01em; font-variation-settings: "wdth" 110;
}
.status { margin: 12px 0 0; color: var(--fog); font-size: .9375rem; }

.controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 20px; padding-top: 8px; padding-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-size: .8125rem; color: var(--fog); padding: 0; }
.controls { padding: 16px 20px; margin-top: 8px; margin-bottom: 14px; border-radius: 12px; background: var(--surface);
  max-width: calc(1120px - 48px); }
.tempo-filter { flex: 1 1 320px; min-width: 260px; }
.tempo-filter legend { display: flex; justify-content: space-between; width: 100%; }
.tempo-filter output { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.hist { position: relative; height: 44px; margin-top: 6px; }
.hist canvas { position: absolute; inset: 0 0 6px 0; width: 100%; height: calc(100% - 6px); }
.hist input[type="range"] {
  position: absolute; left: 0; right: 0; bottom: -6px; width: 100%; margin: 0; padding: 0; height: 18px;
  background: transparent; border: 0; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.hist input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--rule); }
.hist input[type="range"]::-moz-range-track { height: 2px; background: var(--rule); }
.hist input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; width: 16px; height: 16px; margin-top: -7px; border-radius: 50%;
  background: var(--ink); border: 3px solid var(--signal); cursor: ew-resize;
}
.hist input[type="range"]::-moz-range-thumb {
  pointer-events: auto; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 3px solid var(--signal); cursor: ew-resize;
}
.hist input[type="range"]:focus-visible { outline: none; }
.hist input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--signal); }
.hist-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: .7rem; color: var(--fog); font-variant-numeric: tabular-nums; }
.toggle { display: flex; gap: 8px; align-items: center; font-size: .9375rem; padding-bottom: 8px; cursor: pointer; }
.toggle input { accent-color: var(--signal); width: 17px; height: 17px; }

.styles { display: flex; gap: 8px; padding-bottom: 20px; overflow-x: auto; scrollbar-width: thin; }
.chip {
  flex: none; cursor: pointer; padding: 5px 13px; font-size: .9rem; white-space: nowrap;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--surface);
}
.chip:hover { border-color: var(--fog); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip small { opacity: .6; margin-left: 5px; font-variant-numeric: tabular-nums; }

.count { margin: 0 0 8px; color: var(--fog); font-size: .875rem; }
.crate { list-style: none; margin: 0; padding: 0; }
.row {
  position: relative; display: grid; align-items: center; gap: 4px 18px; padding: 10px 12px; margin: 0 -12px;
  /* fixed widths: every row is its own grid, so the columns only line up if nothing is 'auto' */
  grid-template-columns: 60px 5.2rem minmax(0, 1fr) 12rem 14.5rem;
  border-radius: 8px; content-visibility: auto; contain-intrinsic-size: auto 82px;
}
.row + .row::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; border-top: 1px solid var(--rule); }
.row:hover { background: var(--surface); }
.row:hover::before, .row:hover + .row::before { opacity: 0; }
.row.current { background: var(--surface); box-shadow: inset 3px 0 0 var(--signal); }
.row.skeleton { height: 82px; }
.row.skeleton::after {
  content: ""; position: absolute; inset: 14px 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--surface), var(--raised), var(--surface)); background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.art {
  position: relative; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 6px; overflow: hidden;
  background: var(--raised); cursor: pointer; display: block;
}
div.art { cursor: default; }
.art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art .overlay {
  position: absolute; inset: 0; display: grid; place-items: center; color: #fff;
  background: rgba(10, 14, 18, .5); opacity: 0; transition: opacity .12s;
}
.art .overlay svg { width: 22px; height: 22px; fill: #fff; stroke: none; }
.art:hover .overlay, .art:focus-visible .overlay, .row.current .art .overlay { opacity: 1; }

.tempo { line-height: 1; font-variant-numeric: tabular-nums; }
.tempo b { display: block; font-size: 2.2rem; font-weight: 700; letter-spacing: -.02em; font-variation-settings: "wdth" 68; }
.tempo span { font-size: .75rem; color: var(--fog); }
.tempo.unknown b { color: var(--rule); }

.info { min-width: 0; }
.title { margin: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title a { color: inherit; text-decoration: none; }
.title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.who { margin: 0; color: var(--fog); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 3px; font-size: .8rem; color: var(--fog); }
.meta .style { color: var(--dub); }
.meta .harm { color: var(--signal); font-weight: 600; }
.meta a { color: var(--fog); }

.act { text-align: right; min-width: 0; justify-self: stretch; }
.cols { display: grid; grid-template-columns: 3.2rem 4rem 3rem; align-items: center; gap: 12px; justify-items: start; }
.cols .len { justify-self: end; }
.len { font-size: .85rem; color: var(--fog); font-variant-numeric: tabular-nums; }
.cam {
  display: inline-grid; place-items: center; min-width: 2.6rem; padding: 3px 6px; border-radius: 6px;
  font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums;
  background: hsl(var(--h) 55% 28%); color: hsl(var(--h) 80% 86%);
}
.cam.maj { background: hsl(var(--h) 45% 42%); color: hsl(var(--h) 90% 94%); }
:root[data-theme="day"] .cam { background: hsl(var(--h) 60% 82%); color: hsl(var(--h) 60% 22%); }
:root[data-theme="day"] .cam.maj { background: hsl(var(--h) 70% 90%); color: hsl(var(--h) 55% 28%); }
.cam.none { background: transparent; color: var(--rule); }
.nrg { display: inline-flex; gap: 3px; align-items: flex-end; height: 14px; align-self: center; }
.nrg i { width: 5px; border-radius: 1px; background: var(--rule); }
.nrg i:nth-child(1) { height: 5px; } .nrg i:nth-child(2) { height: 7px; } .nrg i:nth-child(3) { height: 9px; }
.nrg i:nth-child(4) { height: 11px; } .nrg i:nth-child(5) { height: 14px; }
.nrg i.on { background: var(--signal); }
.nrg.empty { opacity: .45; }
.meta .src { color: var(--fog); }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: .9rem;
  padding: 8px 14px; border-radius: 6px; white-space: nowrap;
}
.btn.direct { background: var(--signal); color: var(--signal-ink); }
.btn.direct:hover { filter: brightness(1.08); }
.btn.gated { border: 1px solid var(--rule); color: var(--ink); background: var(--surface); }
.btn.gated:hover { border-color: var(--fog); }
.gate-note { display: block; font-size: .75rem; color: var(--fog); margin-top: 4px; }
.gate-note a { color: var(--signal); }

.empty { padding: 32px 0; color: var(--fog); }
.sentinel { height: 1px; }

.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; margin-right: 6px; vertical-align: -1px; }
.eq i { width: 3px; background: var(--signal); animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.paused .eq i { animation-play-state: paused; }

.foot { padding-top: 40px; padding-bottom: 40px; color: var(--fog); font-size: .875rem; }
.foot p { max-width: 75ch; margin: 0 0 8px; }

/* ---------- track page ---------- */
.trackview { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.back { display: inline-block; margin: 20px 0 16px; font-size: .9375rem; color: var(--fog); }
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px;
  padding: 28px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow);
}
.hero-bg {
  position: absolute; inset: -40px; z-index: -1; background-size: cover; background-position: center;
  filter: blur(40px) saturate(1.2); opacity: .35;
}
:root[data-theme="day"] .hero-bg { opacity: .25; }
.hero-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hero-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; }
.big-play {
  width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--signal); color: var(--signal-ink); display: grid; place-items: center; box-shadow: var(--shadow);
}
.big-play svg, .bar-play svg { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.big-play .i-pause, .bar-play .i-pause { display: none; }
.is-playing .i-play { display: none; }
.is-playing .i-pause { display: inline; }
.hero-artist { margin: 0 0 4px; color: var(--fog); }
.hero-title { margin: 0; font-size: clamp(1.5rem, 3.5vw, 2.3rem); line-height: 1.1; font-weight: 700; overflow-wrap: anywhere; }
.hero-tempo { text-align: right; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-tempo b { display: block; font-size: 3.6rem; font-weight: 700; font-variation-settings: "wdth" 68; letter-spacing: -.02em; }
.hero-tempo span { font-size: .8rem; color: var(--fog); }
.hero-styles { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-styles span { font-size: .8125rem; padding: 2px 10px; border: 1px solid var(--rule); border-radius: 999px; background: var(--bg); }
.hero-art img, .art-blank { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 8px; box-shadow: var(--shadow); }
.art-blank, .hero-art.broken { background: linear-gradient(135deg, var(--dub), var(--raised)); }
.hero-art.broken { aspect-ratio: 1; border-radius: 8px; }

.wave-wrap { margin-top: auto; }
.seek { position: relative; cursor: pointer; touch-action: none; }
.seek canvas { width: 100%; height: 100%; display: block; }
.big-wave { height: 84px; }
.seek-tip {
  position: absolute; bottom: calc(100% + 6px); transform: translateX(-50%); pointer-events: none;
  padding: 2px 6px; border-radius: 4px; font-size: .75rem; font-variant-numeric: tabular-nums;
  background: var(--ink); color: var(--bg); white-space: nowrap;
}
.transport { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }
.transport .icon { width: 40px; height: 40px; color: var(--ink); }
.transport .icon svg { width: 20px; height: 20px; }
.transport-play {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--ink); color: var(--bg); display: grid; place-items: center;
}
.transport-play svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.transport-play .i-pause { display: none; }
.transport-play.is-playing .i-play { display: none; }
.transport-play.is-playing .i-pause { display: inline; }
.wave-times { display: flex; justify-content: space-between; font-size: .75rem; color: var(--fog); margin-top: 4px; font-variant-numeric: tabular-nums; }

.track-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 40px; align-items: start; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.track-left, .track-right { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.track-left .social { margin-top: 0; } .track-left .social > :first-child { margin-top: 0; }
.track-get { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; align-content: start; }
.track-get .gate-note { width: 100%; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin: 0; }
.stats div { padding: 10px 12px; border-radius: 8px; background: var(--surface); }
.stats dt { font-size: .75rem; color: var(--fog); }
.stats dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.stats .note { font-size: .7rem; font-weight: 400; color: var(--fog); }
.meter { display: flex; gap: 2px; margin-top: 4px; }
.meter i { flex: 1; height: 4px; border-radius: 1px; background: var(--rule); }
.meter i.on { background: var(--signal); }
.facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; }
.facts dt { font-size: .8rem; color: var(--fog); }
.facts dd { margin: 0; font-weight: 600; }
.why, .desc, .tags { grid-column: 1 / -1; }
.why h3, .desc h3, .mates h3 { font-size: 1.05rem; margin: 0 0 8px; }
.why ul { margin: 0; padding-left: 1.2em; color: var(--fog); }
.desc p { margin: 0; max-width: 70ch; white-space: pre-line; }
.tags { margin: 0; color: var(--dub); font-size: .875rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.loading-details { grid-column: 1 / -1; height: 60px; border-radius: 8px; background: var(--surface); }
.mates { padding: 28px 0 8px; }
.mates-note { margin: 0 0 12px; color: var(--fog); font-size: .875rem; }

/* ---------- player bar ---------- */
body.has-bar { padding-bottom: 96px; }
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); align-items: center; gap: 4px 24px;
  padding: 10px 24px; background: var(--surface); border-top: 1px solid var(--rule); box-shadow: 0 -6px 24px rgba(0, 0, 0, .25);
}
.bar[hidden] { display: none; }
.bar-now { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.bar-art { flex: none; width: 48px; height: 48px; border-radius: 6px; overflow: hidden; background: var(--raised); }
.bar-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bar-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.bar-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-artist { font-size: .8125rem; color: var(--fog); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-mid { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bar-buttons { display: flex; justify-content: center; align-items: center; gap: 6px; }
.icon {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--fog);
}
.icon:hover { color: var(--ink); background: var(--raised); }
.icon:disabled { opacity: .35; cursor: default; background: transparent; }
.icon svg { width: 18px; height: 18px; }
.bar-play {
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; margin: 0 4px;
  background: var(--ink); color: var(--bg); display: grid; place-items: center;
}
.bar-play svg { width: 18px; height: 18px; }
.bar.loading .bar-play svg { opacity: 0; }
.bar.loading .bar-play { position: relative; }
.bar.loading .bar-play::after {
  content: ""; position: absolute; inset: 11px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.bar-seek { display: grid; grid-template-columns: 3em minmax(0, 1fr) 3em; align-items: center; gap: 10px; }
.bar-seek .seek { height: 28px; }
.bar-time { font-size: .75rem; color: var(--fog); font-variant-numeric: tabular-nums; text-align: center; }
.bar-end { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
#barMute .i-x { display: none; }
#barMute.muted .i-x { display: inline; }
#barMute.muted .i-wave { display: none; }
.volume { width: 96px; accent-color: var(--ink); padding: 0; border: 0; background: transparent; }
.bar-get { margin-left: 8px; font-size: .85rem; font-weight: 600; padding: 7px 12px; border-radius: 6px; text-decoration: none; background: var(--signal); color: var(--signal-ink); white-space: nowrap; }
.bar-get.gated { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.bar-msg { grid-column: 1 / -1; margin: 0; font-size: .8125rem; color: var(--signal); text-align: center; }
.bar-msg:empty { display: none; }

.filters-toggle { display: none; }

/* ---------- small screens ---------- */
@media (max-width: 1000px) {
  .row { grid-template-columns: 60px 4.8rem minmax(0, 1fr) 14.5rem; }
  .row .cols { grid-column: 3; grid-row: 2; grid-template-columns: 3.2rem 4rem 3rem; gap: 12px; }
  .row .act { grid-column: 4; grid-row: 1 / span 2; }
}
@media (max-width: 860px) {
  .bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "now end" "mid mid"; padding: 8px 16px 10px; gap: 6px 12px; }
  .bar-now { grid-area: now; }
  .bar-end { grid-area: end; }
  .bar-mid { grid-area: mid; flex-direction: column-reverse; }
  .volume { width: 72px; }
  .bar-get { display: none; }
  body.has-bar { padding-bottom: 150px; }
}
@media (max-width: 520px) {
  .volume, #barMute { display: none; }
  .bar-buttons { gap: 0; }
}
@media (max-width: 680px) {
  .intro, .controls, .styles, main, .foot, .trackview { padding-left: 16px; padding-right: 16px; }
  .intro { padding-top: 20px; padding-bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
  .lede { font-size: 1.25rem; max-width: none; width: 100%; }
  .status { margin: 0; flex: 1; font-size: .8125rem; }
  .filters-toggle { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); cursor: pointer; }
  .controls { display: none; }
  body.filters-open .controls { display: flex; }
  .search input { padding-top: 7px; padding-bottom: 7px; }
  .top { padding: 10px 16px; gap: 12px; }
  .mark { font-size: 1.2rem; }
  .controls { margin-left: 16px; margin-right: 16px; padding: 14px; }
  .row { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "art info tempo" "art cols act"; margin: 0 -8px; padding: 10px 8px; align-items: start; gap: 6px 12px; }
  .row .art { align-self: start; }
  .row .cols { grid-area: cols; grid-column: auto; grid-row: auto; display: flex; gap: 12px; align-items: center; align-self: center; }
  .row .act { grid-area: act; grid-column: auto; grid-row: auto; min-width: 0; align-self: center; }
  .row .act .gate-note { display: none; }
  .row .btn { padding: 6px 12px; font-size: .85rem; }
  .row .art { grid-area: art; width: 52px; height: 52px; }
  .row .tempo { grid-area: tempo; text-align: right; }
  .row .tempo b { font-size: 1.6rem; }
  .row .info { grid-area: info; }
  .row .act { grid-area: act; text-align: left; }

  .hero { grid-template-columns: 1fr; padding: 18px; }
  .hero-art { order: -1; max-width: 200px; }
  .hero-tempo b { font-size: 2.6rem; }
  .track-body { grid-template-columns: 1fr; }
  .track-right { order: -1; }            /* phones: download and details first, then likes and comments */
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- download with format menu ---------- */
.dl { display: inline-flex; align-items: stretch; vertical-align: middle; max-width: 100%; }
.dl .btn.direct { border-radius: 6px 0 0 6px; }
.dl .btn.direct:only-child, .dl .btn.direct:has(+ .dl-tag) { border-radius: 6px; }
.dl-fmt {
  border-radius: 0 6px 6px 0; border: 0; border-left: 1px solid color-mix(in srgb, var(--signal-ink) 25%, transparent);
  background: var(--signal); color: var(--signal-ink); font-weight: 600; font-size: .8rem; padding: 0 6px; max-width: 9.5rem; cursor: pointer;
}
.dl-fmt option { background: var(--surface); color: var(--ink); font-weight: 400; }
.dl-tag { align-self: center; margin-left: 8px; font-size: .75rem; color: var(--fog); font-weight: 600; }
.btn.busy { opacity: .85; cursor: progress; }

/* ---------- Bandcamp embedded player in the bar ---------- */
.bar-embed iframe { display: block; width: 100%; max-width: 700px; margin: 0 auto; height: 120px; border: 0; border-radius: 6px; background: var(--raised); }
.bar.embed .bar-seek, .bar.embed #barBack, .bar.embed #barFwd, .bar.embed #barPlay, .bar.embed #barMute, .bar.embed .volume { display: none; }
.bar.embed .bar-msg { color: var(--fog); }
body.has-bar.bar-tall { padding-bottom: 220px; }
@media (max-width: 860px) { body.has-bar.bar-tall { padding-bottom: 260px; } }
.embed-only .big-wave, .embed-only .wave-times, .embed-only [data-ctl="back"], .embed-only [data-ctl="fwd"] { display: none; }
.embed-note { margin: 0 0 8px; color: var(--fog); font-size: .875rem; }

/* ---------- about, removal form ---------- */
.about { max-width: 68ch; padding-bottom: 24px; }
.about h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 16px; }
.about h2 { font-size: 1.15rem; margin: 36px 0 10px; scroll-margin-top: 80px; }
.about p, .about li { line-height: 1.6; color: var(--ink); }
.about ul { padding-left: 1.2em; }
.about li { margin-bottom: 6px; }
.takedown { display: grid; gap: 14px; margin-top: 16px; padding: 18px; border-radius: 10px; background: var(--surface); }
.takedown label { display: grid; gap: 6px; font-size: .875rem; color: var(--fog); }
.takedown em { font-style: normal; opacity: .8; }
.takedown input, .takedown select, .takedown textarea { font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: 6px; padding: 9px 10px; width: 100%; box-sizing: border-box; }
.takedown textarea { resize: vertical; }
.takedown button { justify-self: start; font: inherit; font-weight: 600; padding: 9px 16px; border: 0; border-radius: 6px; background: var(--signal); color: var(--signal-ink); cursor: pointer; }
.takedown button:disabled { opacity: .6; cursor: default; }
.form-msg { margin: 0; font-size: .9rem; }
.form-msg:empty { display: none; }
.foot-links a { color: inherit; }
.track-foot { margin: 32px 0 8px; font-size: .85rem; color: var(--fog); }
.track-foot a { color: inherit; }

/* ---------- phones ---------- */
@media (hover: none) { .foot .keys { display: none; } }
@media (max-width: 860px) {
  /* Bandcamp's player already says what to do; keep the bar as short as possible. */
  .bar.embed .bar-msg { display: none; }
  .bar.embed { padding-top: 6px; }
  .bar.embed .bar-art { width: 36px; height: 36px; }
  .bar.embed .bar-buttons { position: absolute; top: 8px; right: 12px; }
  .bar.embed .bar-end { display: none; }
  body.has-bar.bar-tall { padding-bottom: 200px; }
}

/* ---------- supporting artists ---------- */
.support { padding: 14px 16px; border-radius: 10px; background: var(--surface); border-left: 3px solid var(--signal); }
.support h3 { margin: 0 0 6px; font-size: .95rem; }
.support p { margin: 0; line-height: 1.55; }
.support a, .toast a { color: var(--signal); }
.banner { margin: 0; padding: 9px 24px; text-align: center; font-size: .9rem; background: var(--raised); color: var(--ink); border-bottom: 1px solid var(--rule); }
.banner[hidden] { display: none; }
.suggest-cta { margin: 28px 0 0; text-align: center; color: var(--fog); font-size: .9rem; }
.suggest-cta a { color: inherit; }
.bar-embed iframe.sc { height: 166px; max-width: 900px; }
@media (max-width: 860px) { .bar-embed iframe.sc { height: 130px; } }
.row .dl-fmt { width: 8.6rem; min-width: 0; text-overflow: ellipsis; }

/* ---------- style filter (multi-choice dropdown) ---------- */
.multi { position: relative; }
.multi-btn { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 6px;
  padding: 7px 32px 7px 10px; min-width: 11rem; max-width: 16rem; text-align: left; cursor: pointer; position: relative;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.multi-btn::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.multi-btn.on { border-color: var(--signal); }
.multi-btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.multi-pop { position: absolute; z-index: 25; top: calc(100% + 6px); left: 0; width: 17rem; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; }
.multi-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 6px; font-size: .75rem; color: var(--fog); }
.multi-head button { font: inherit; background: none; border: 0; color: var(--signal); cursor: pointer; padding: 0; }
.multi-list { max-height: 300px; overflow: auto; display: grid; }
.multi-opt { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: .9rem; }
.multi-opt:hover { background: var(--raised); }
.multi-opt input { accent-color: var(--signal); margin: 0; width: 16px; height: 16px; }
.multi-opt small { color: var(--fog); font-variant-numeric: tabular-nums; }
.support-strip { margin: 10px 0 0; max-width: 75ch; font-size: .9rem; line-height: 1.5; color: var(--fog);
  padding: 8px 12px; border-left: 3px solid var(--signal); background: var(--surface); border-radius: 0 8px 8px 0; }
.support-strip a { color: var(--signal); font-weight: 600; }
.support-strip[hidden] { display: none; }
@media (max-width: 680px) { .support-strip { width: 100%; font-size: .85rem; } }

/* ---------- how it works ---------- */
.how ol, .how ul { padding-left: 1.3em; }
.how li { margin-bottom: 8px; }
.how-acc { padding: 10px 14px; border-radius: 8px; background: var(--surface); border-left: 3px solid var(--good, var(--signal)); }
.how-acc:empty { display: none; }
.how .limits { color: var(--fog); font-size: .92rem; }
.how-live { color: var(--fog); font-size: .9rem; }
.how-link { margin: 6px 0 0; font-size: .85rem; } .how-link a { color: var(--fog); }
.support-strip .about-me { color: var(--ink); }
.support-strip .donate-btn { display: inline-flex; align-items: center; gap: 7px; margin: 8px 12px 0 0; padding: 7px 14px; border-radius: 8px; background: #72a4f2; color: #fff; text-decoration: none; font-weight: 700; font-size: .875rem; box-shadow: 1px 1px 0 rgba(0,0,0,.2); }
.support-strip .donate-btn svg { width: 20px; height: 20px; flex: none; }
.support-strip .donate-btn:hover { filter: brightness(1.08); }
.support-strip .artists-first { display: inline-block; margin-top: 8px; font-size: .8rem; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .875rem; color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.share-btn:hover { border-color: var(--fog); }
.share-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.share-btn circle { fill: currentColor; stroke: none; }
.share-msg { font-size: .8rem; color: var(--good, var(--signal)); }

/* ---------- accounts ---------- */
.top { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.acct { position: relative; }
.acct-btn { font: inherit; font-size: .9rem; font-weight: 600; color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: 999px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.acct-btn.in { padding: 3px; border-radius: 50%; line-height: 0; }
.acct-btn:hover { border-color: var(--fog); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 180px; display: grid; padding: 6px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow); }
.acct-menu[hidden] { display: none; }
.acct-menu a, .acct-menu button { font: inherit; font-size: .9rem; text-align: left; color: var(--ink); text-decoration: none; background: none; border: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--raised); }
.ava { border-radius: 50%; object-fit: cover; flex: none; display: inline-block; vertical-align: middle; background: var(--raised); }
.ava-blank { display: inline-grid; place-items: center; color: var(--ink); font-weight: 700; background: color-mix(in srgb, var(--signal) 35%, var(--raised)); }

.auth { width: min(420px, 100%); margin: 28px auto 48px; border: 1px solid var(--rule); border-radius: 14px; padding: 26px 24px 20px; background: var(--surface); color: var(--ink); box-sizing: border-box; }
.auth h1 { margin: 0 0 4px; font-size: 1.5rem; }
@media (max-width: 520px) { .auth { margin-top: 12px; padding: 20px 16px 16px; } }
.auth-switch { margin: 0 0 14px; color: var(--fog); font-size: .9rem; } .auth-switch a { color: var(--signal); }
#authForm { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
#authForm input { width: 100%; min-width: 0; box-sizing: border-box; }
#authForm label { display: grid; gap: 5px; font-size: .85rem; color: var(--fog); }
#authForm input { font: inherit; font-size: 1rem; padding: 9px 10px; background: var(--bg); }
#authForm button[type=submit] { font: inherit; font-weight: 700; padding: 10px; border: 0; border-radius: 8px; background: var(--signal); color: var(--signal-ink); cursor: pointer; }
.auth-note { margin: 0; font-size: .8rem; color: var(--fog); }
.auth #authForm .m-login, .auth #authForm .m-signup, .auth #authForm .m-forgot, .auth #authForm .m-code { display: none; }
.auth[data-mode="code"] #authForm label.m-code { display: grid; } .auth[data-mode="code"] #authForm p.m-code { display: block; }
#authForm [name=code] { font-size: 1.4rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.auth[data-mode="login"] #authForm label.m-login, .auth[data-mode="signup"] #authForm label.m-signup, .auth[data-mode="forgot"] #authForm label.m-forgot { display: grid; }
.auth[data-mode="login"] #authForm p.m-login, .auth[data-mode="signup"] #authForm p.m-signup, .auth[data-mode="forgot"] #authForm p.m-forgot { display: block; }
.auth-forgot { margin: -4px 0 0; font-size: .85rem; } .auth-forgot a { color: var(--fog); }
#authMsg.ok { color: var(--good, #7ee2a8); }
.verify-bar { background: color-mix(in srgb, var(--signal) 18%, var(--surface)); }
.verify-bar button { font: inherit; background: none; border: 0; color: var(--signal); text-decoration: underline; cursor: pointer; padding: 0; }
.verify-bar a { color: var(--signal); }

.social { margin-top: 6px; }
.social h3 { font-size: 1rem; margin: 18px 0 10px; } .social h3 small { color: var(--fog); font-weight: 500; }
.like-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.like-btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-weight: 650; font-size: .9rem; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.like-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.like-btn.on { color: #ff5e7a; border-color: #ff5e7a; } .like-btn.on svg { fill: currentColor; }
.like-count, .hint-line { color: var(--fog); font-size: .875rem; } .hint-line a { color: var(--signal); }
.comment-form { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; margin-bottom: 14px; }
.comment-form textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 9px 10px; resize: vertical; min-height: 44px; }
.comment-form button { font: inherit; font-weight: 650; padding: 9px 14px; border: 0; border-radius: 8px; background: var(--signal); color: var(--signal-ink); cursor: pointer; }
.comment-form .form-msg { grid-column: 2 / -1; margin: 0; }
.comments { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.comments li { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.c-head { margin: 0; font-size: .85rem; } .c-head a { color: inherit; text-decoration: none; } .c-head small { color: var(--fog); }
.c-body { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.c-report[disabled] { text-decoration: none; cursor: default; opacity: .7; }
.c-rules { margin: 0; grid-column: 1 / -1; font-size: .8rem; } .c-rules a { color: var(--fog); }
.c-del { font: inherit; font-size: .75rem; color: var(--fog); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.suggested-by { margin: 0 0 10px; font-size: .9rem; color: var(--fog); } .suggested-by a { color: var(--signal); font-weight: 600; }
.meta .soc { color: var(--fog); } .meta .soc.mine { color: #ff5e7a; }

.profile h1 { margin: 0; font-size: clamp(1.5rem, 4vw, 2rem); }
.profile h2 { font-size: 1.05rem; margin: 30px 0 8px; }
.profile-head { display: flex; gap: 18px; align-items: center; margin: 4px 0 8px; }
.profile-head .hint-line, .profile-stats { margin: 4px 0 0; } .profile-stats { color: var(--fog); font-size: .9rem; } .profile-stats b { color: var(--ink); }
.profile-head .share-btn { margin-top: 10px; text-decoration: none; }
.settings .ava-edit { display: flex; gap: 16px; align-items: center; }
.file-btn { display: inline-block; font-size: .9rem; font-weight: 600; color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; padding: 7px 12px; cursor: pointer; }
.link-btn { font: inherit; font-size: .85rem; background: none; border: 0; color: var(--fog); text-decoration: underline; cursor: pointer; margin-left: 8px; }
.takedown.danger { border: 1px solid color-mix(in srgb, #ff5e5b 40%, transparent); }
.takedown.danger button { background: #c0362c; color: #fff; }
.form-msg.ok { color: var(--good, #7ee2a8); }
.takedown .check { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: .9rem; }
.takedown .check input { width: auto; margin-top: 3px; accent-color: var(--signal); }
@media (max-width: 680px) { .acct-btn:not(.in) { padding: 6px 11px; font-size: .85rem; } .comment-form { grid-template-columns: 1fr auto; } .comment-me { display: none; } }
.version { font-size: .75rem; color: var(--fog); opacity: .8; font-variant-numeric: tabular-nums; } .version a { color: inherit; }
@media (max-width: 440px) { .mark > span { display: none; } .mark-icon { width: 34px; height: 34px; } }
.stage-banner { position: sticky; top: 0; z-index: 50; padding: 6px 16px; text-align: center; font-size: .8rem; font-weight: 700; letter-spacing: .04em; background: #b4232a; color: #fff; }
