/* SPL Mixing portal — a quiet listening room. Brand colours from mixartistry.com. */
:root {
  --bg: #16161b;
  --panel: #1e1e24;
  --panel-2: #26262e;
  --line: #33333d;
  --text: #f2f5f7;
  --muted: #a3acb9;
  --faint: #6b7380;
  --purple: #5f21ce;
  --purple-hi: #8b5cf6;
  --teal: #1ae7be;
  --red: #ff5a64;
  --wave: #4a4a57;
  --radius: 10px;
  --head: "Poppins", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--body); }
a { color: var(--purple-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px 80px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--head); font-weight: 600; letter-spacing: 0.02em; color: var(--text); }
.brand span { color: var(--teal); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

.btn { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 14px; cursor: pointer; line-height: 1.3; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn.primary:hover { background: #6d31dc; }
.btn.quiet { background: none; border-color: transparent; color: var(--muted); padding: 4px 8px; }
.btn.quiet:hover { color: var(--text); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.play { width: 46px; height: 46px; border-radius: 50%; padding: 0; display: grid; place-items: center; background: var(--teal); border: 0; color: #0d0d10; }
.btn.play svg { width: 18px; height: 18px; }

input[type=email], input[type=text], textarea, select {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--purple-hi); outline-offset: -1px; border-color: transparent; }
input[type=range] { accent-color: var(--teal); width: 110px; }
input[type=checkbox] { accent-color: var(--teal); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stack > * + * { margin-top: 14px; }

/* library */
.project { margin-top: 26px; }
.song-link { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 8px; color: var(--text); background: var(--panel); border: 1px solid var(--line); margin-top: 8px; }
.song-link:hover { border-color: var(--purple-hi); text-decoration: none; }

/* player */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tab { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; cursor: pointer; color: var(--muted); }
.tab:hover { color: var(--text); }
.tab.on { border-color: var(--teal); color: var(--text); background: rgba(26, 231, 190, 0.08); }
.tab .count { font-size: 11px; color: var(--faint); margin-left: 4px; }
.tab.ref { border-style: dashed; }
.tab-group-label { font-size: 12px; color: var(--faint); margin: 0 4px 0 10px; text-transform: uppercase; letter-spacing: 0.06em; }

.wave-wrap { position: relative; margin-top: 14px; user-select: none; }
.wave { width: 100%; height: 110px; display: block; cursor: pointer; border-radius: 8px; background: var(--bg); }
.markers { position: relative; height: 16px; }
.marker { position: absolute; top: 3px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--teal); border: 2px solid var(--panel); cursor: pointer; }
.marker.done { background: var(--faint); }
.marker.sel { box-shadow: 0 0 0 3px rgba(26, 231, 190, 0.35); }
.hover-time { position: absolute; top: -22px; transform: translateX(-50%); font-size: 12px; color: var(--muted); pointer-events: none; }
.transport { margin-top: 14px; }
.time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 92px; }
.readout { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* comments */
.review { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
@media (min-width: 880px) { .review.threaded { grid-template-columns: 1fr 380px; } }
.composer .at { color: var(--teal); font-variant-numeric: tabular-nums; }
.comment { display: flex; gap: 12px; padding: 12px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.comment:hover { background: var(--panel-2); }
.comment.sel { border-color: var(--line); background: var(--panel-2); }
.comment.done .body { color: var(--faint); }
.stamp { font-variant-numeric: tabular-nums; color: var(--teal); background: rgba(26, 231, 190, 0.08); border: 0; border-radius: 6px; padding: 2px 8px; height: fit-content; cursor: pointer; }
.who { font-weight: 600; font-size: 13px; }
.body { white-space: pre-wrap; word-wrap: break-word; }
.meta { font-size: 12px; color: var(--faint); }
.thread { position: sticky; top: 12px; align-self: start; }
.reply { padding: 10px 0; border-top: 1px solid var(--line); }
.badge { font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; color: var(--muted); }

details.fold { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 16px; }
details.fold > summary { cursor: pointer; padding: 14px 18px; font-family: var(--head); font-weight: 600; list-style: none; display: flex; gap: 8px; align-items: center; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "▸"; color: var(--faint); transition: transform 0.15s; }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > .inner { padding: 0 18px 18px; }
.note { padding: 10px 0; border-top: 1px solid var(--line); }
.refs-edit .ref-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 8px; margin-top: 8px; }
@media (max-width: 600px) { .refs-edit .ref-row { grid-template-columns: 1fr; } }

.local-ref { margin-top: 16px; }
.bar { height: 6px; background: var(--bg); border-radius: 3px; cursor: pointer; position: relative; flex: 1; min-width: 120px; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--purple-hi); border-radius: 3px; }

.notice { padding: 12px 14px; border-radius: 8px; background: var(--panel-2); color: var(--muted); }
.error { color: var(--red); font-size: 13px; }
.center { min-height: 70vh; display: grid; place-items: center; }
.signin { width: min(420px, 100%); }

/* comment pin: follows the song until it's pinned */
.pin { display: inline-flex; align-items: center; gap: 8px; border: 1px dashed var(--line); background: none; border-radius: 999px; padding: 4px 12px; cursor: pointer; font-variant-numeric: tabular-nums; color: var(--muted); }
.pin .pin-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.pin:not(.pinned) .pin-dot { animation: live 1.6s ease-in-out infinite; background: var(--teal); }
.pin.pinned { border-style: solid; border-color: var(--teal); color: var(--text); background: rgba(26, 231, 190, 0.1); }
.pin.pinned .pin-dot { background: var(--teal); }
@keyframes live { 50% { opacity: 0.25; } }
.pin-line { position: absolute; top: 0; height: 126px; border-left: 2px dashed var(--teal); margin-left: -1px; pointer-events: none; z-index: 1; }

/* comment types */
.tones { gap: 6px; }
.tone-pick { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 3px 12px; cursor: pointer; font-size: 13px; color: var(--muted); }
.tone-pick:hover { color: var(--text); }
.tone-pick.on.tone-like { border-color: var(--teal); color: var(--teal); }
.tone-pick.on.tone-change { border-color: var(--purple-hi); color: var(--purple-hi); }
.tone-pick.on.tone-question { border-color: #7fa7d9; color: #7fa7d9; }
.tone { font-size: 11px; border-radius: 999px; padding: 0 7px; border: 1px solid; }
.tone.tone-like { color: var(--teal); } .tone.tone-change { color: var(--purple-hi); } .tone.tone-question { color: #7fa7d9; }
.marker.m-change { background: var(--purple-hi); }
.marker.m-question { background: #7fa7d9; }
.notice.approved { border: 1px solid rgba(26, 231, 190, 0.4); color: var(--text); }
.notice.approved > div + div { margin-top: 4px; color: var(--muted); }
.pill-status { border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; color: var(--muted); }
.pill-status.ready { border-color: rgba(26, 231, 190, 0.5); color: var(--text); }
.pill-status.failed { border-color: var(--red); color: var(--red); }
