/* The server-rendered community pages. Same near-black palette as the studio,
   with each track's own hue (--h, derived from its id) doing the colour work. */
:root { color-scheme: dark; --bg:#060608; --panel:#0e0e12; --panel2:#15151b; --line:#25252d; --text:#f2f2f3; --dim:#9a9aa2; --faint:#6f6f78; --like:#ff4d6d; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; min-height:100vh; display:flex; flex-direction:column; background:var(--bg); color:var(--text); font:14px/1.5 Inter,system-ui,-apple-system,'Segoe UI',sans-serif; }
body.has-bar { padding-bottom:72px; }
a { color:inherit; text-decoration:none; }
button { font:inherit; color:inherit; cursor:pointer; background:none; border:0; padding:0; }
h1,h2,p { margin:0; }
[hidden] { display:none !important; }
:focus-visible { outline:2px solid #fff; outline-offset:2px; border-radius:4px; }
.bl-dim { color:var(--dim); font-size:12.5px; }
.bl-pad { padding:14px 16px; }

/* nav */
.bl-nav { position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:18px; padding:12px clamp(16px,4vw,36px); background:rgba(6,6,8,.78); backdrop-filter:blur(16px); border-bottom:1px solid rgba(255,255,255,.07); }
.bl-logo { font-size:11px; letter-spacing:2px; font-weight:600; white-space:nowrap; }
.bl-links { display:flex; gap:4px; }
.bl-links a { padding:6px 12px; border-radius:99px; color:var(--dim); font-weight:500; }
.bl-links a:hover { color:var(--text); }
.bl-links a.on { background:var(--panel2); color:var(--text); }
.bl-me { position:relative; margin-left:auto; display:flex; align-items:center; gap:10px; min-height:32px; }
.bl-signin { color:var(--dim); font-weight:500; }
.bl-signin:hover { color:var(--text); }
.bl-icon-btn { position:relative; width:32px; height:32px; display:grid; place-items:center; border-radius:50%; font-size:14px; }
.bl-icon-btn:hover { background:var(--panel2); }
.bl-badge { position:absolute; top:-2px; right:-3px; min-width:16px; height:16px; padding:0 4px; border-radius:99px; background:var(--like); color:#fff; font-size:10px; font-weight:700; line-height:16px; text-align:center; }
.bl-studio { background:#fff; color:#000; font-weight:600; font-size:13px; padding:8px 14px; border-radius:99px; white-space:nowrap; transition:transform .15s; }
.bl-studio:hover { transform:translateY(-1px); }
.bl-notes { position:absolute; top:44px; right:0; width:min(350px,calc(100vw - 32px)); max-height:60vh; overflow:auto; background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:6px; box-shadow:0 24px 60px rgba(0,0,0,.7); }
.bl-notes > p { padding:14px; }
.bl-note-row { display:flex; gap:10px; padding:9px; border-radius:10px; font-size:13px; }
.bl-note-row:hover { background:var(--panel2); }
.bl-note-row.fresh { background:rgba(255,255,255,.05); }
.bl-note-row em { color:var(--dim); font-style:normal; }
.bl-note-row time { color:var(--faint); font-size:11.5px; }

.bl-main { flex:1; width:100%; max-width:1180px; margin:0 auto; padding:clamp(20px,4vw,40px) clamp(16px,4vw,36px) 60px; }
.bl-foot { display:flex; flex-wrap:wrap; gap:16px; justify-content:center; padding:24px 16px; font-size:12px; color:var(--faint); border-top:1px solid rgba(255,255,255,.06); }
.bl-foot a:hover { color:var(--text); }

.bl-hero { margin-bottom:28px; }
.bl-hero h1 { font-size:clamp(30px,5.4vw,50px); line-height:1.05; letter-spacing:-.03em; font-weight:700; }
.bl-hero p { margin:12px 0 18px; color:var(--dim); font-size:15px; max-width:58ch; }
.bl-tabs-row { display:flex; align-items:center; gap:8px; margin-bottom:18px; flex-wrap:wrap; }
.bl-tabs { display:flex; gap:4px; }
.bl-tabs a, .bl-tab-btn { padding:6px 13px; border-radius:99px; color:var(--dim); font-size:13px; font-weight:500; border:1px solid transparent; }
.bl-tabs a:hover, .bl-tab-btn:hover { color:var(--text); }
.bl-tabs a.on, .bl-tab-btn.on { color:var(--text); border-color:var(--line); background:var(--panel); }
.bl-split { display:grid; grid-template-columns:minmax(0,1fr) 290px; gap:36px; align-items:start; }
.bl-h2 { font-size:18px; letter-spacing:-.01em; margin:34px 0 14px; }

/* buttons */
.bl-btn { display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:99px; border:1px solid var(--line); background:var(--panel); font-size:13px; font-weight:500; transition:border-color .15s,background .15s; white-space:nowrap; }
.bl-btn:hover { border-color:#4a4a55; }
.bl-btn.solid { background:#fff; border-color:#fff; color:#000; font-weight:600; }
.bl-btn.solid:hover { filter:brightness(.9); }
.bl-btn.ghost { background:transparent; color:var(--dim); }
.bl-btn.sm { padding:4px 11px; font-size:12px; }
.bl-btn.following { color:var(--dim); }

/* cards */
.bl-grid { list-style:none; margin:0; padding:0; display:grid; gap:18px; grid-template-columns:repeat(auto-fill,minmax(205px,1fr)); }
.bl-card { min-width:0; }
.bl-art { position:relative; aspect-ratio:1; border-radius:14px; overflow:hidden; background:
  radial-gradient(90% 70% at 22% 18%, hsl(var(--h) 92% 66% / .95), transparent 62%),
  radial-gradient(90% 90% at 88% 88%, hsl(calc(var(--h) + 72) 88% 52% / .9), transparent 60%),
  linear-gradient(140deg, hsl(calc(var(--h) + 24) 58% 22%), hsl(calc(var(--h) + 120) 50% 8%)); box-shadow:inset 0 0 0 1px rgba(255,255,255,.08); }
.bl-art-link { position:absolute; inset:0; }
.bl-art-note { position:absolute; inset:0; display:grid; place-items:center; font-size:64px; color:rgba(255,255,255,.3); }
.bl-art-wave::after { content:''; position:absolute; inset:34% 0; pointer-events:none; opacity:.55; background:repeating-linear-gradient(90deg,#fff 0 2px,transparent 2px 7px); -webkit-mask:linear-gradient(90deg,transparent,#000 22%,#000 78%,transparent); mask:linear-gradient(90deg,transparent,#000 22%,#000 78%,transparent); }
.bl-wave-tag, .bl-star { position:absolute; left:10px; top:10px; padding:2px 9px; font-size:10.5px; font-weight:600; border-radius:99px; background:rgba(0,0,0,.5); backdrop-filter:blur(6px); text-transform:capitalize; }
.bl-art-play { position:absolute; right:10px; bottom:10px; z-index:2; width:44px; height:44px; border-radius:50%; background:#fff; color:#000; display:grid; place-items:center; opacity:0; transform:translateY(5px); transition:opacity .15s,transform .15s; box-shadow:0 8px 20px rgba(0,0,0,.45); }
.bl-card:hover .bl-art-play, .bl-art-play:focus-visible, .bl-art-play.is-playing { opacity:1; transform:none; }
@media (hover:none) { .bl-art-play { opacity:1; transform:none; } }
.bl-ico { width:0; height:0; margin-left:3px; border-left:12px solid currentColor; border-top:7.5px solid transparent; border-bottom:7.5px solid transparent; }
.is-playing > .bl-ico { width:12px; height:14px; margin:0; border:0; border-left:4px solid currentColor; border-right:4px solid currentColor; }
.bl-card-body { padding-top:10px; display:flex; flex-direction:column; gap:1px; }
.bl-card-title { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bl-card-title:hover { text-decoration:underline; }
.bl-by { font-size:12.5px; color:var(--dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
a.bl-by:hover { color:var(--text); }
.bl-stats { display:flex; align-items:center; gap:11px; margin-top:6px; font-size:12px; color:var(--faint); }
.bl-stats time { margin-left:auto; white-space:nowrap; }
.bl-stat-link:hover { color:var(--text); }
.bl-push { margin-left:auto; white-space:nowrap; }
.bl-like { display:inline-flex; align-items:center; gap:4px; transition:color .15s; }
.bl-like:hover { color:var(--like); }
.bl-like.liked, .bl-like.liked .bl-heart { color:var(--like); }
.bl-like.liked .bl-heart { animation:pop .28s ease; }
@keyframes pop { 40% { transform:scale(1.4); } }
.bl-like.big { font-size:14px; }
.bl-empty { border:1px dashed var(--line); border-radius:14px; padding:40px 24px; text-align:center; color:var(--dim); grid-column:1/-1; }
.bl-empty a { color:var(--text); text-decoration:underline; }
.bl-404 { margin-top:40px; } .bl-404 h1 { font-size:24px; margin-bottom:8px; color:var(--text); } .bl-404 .bl-btn { margin-top:14px; text-decoration:none; }
.bl-empty-line { color:var(--dim); font-size:13px; }

/* rail + people */
.bl-rail { position:sticky; top:76px; background:var(--panel); border:1px solid rgba(255,255,255,.07); border-radius:16px; padding:16px; }
.bl-rail h2 { font-size:12px; letter-spacing:1.2px; text-transform:uppercase; color:var(--dim); font-weight:600; margin-bottom:10px; }
.bl-rail-more { display:block; margin-top:10px; font-size:12.5px; color:var(--dim); } .bl-rail-more:hover { color:var(--text); }
.bl-ava { flex:none; width:34px; height:34px; border-radius:50%; overflow:hidden; display:grid; place-items:center; font-weight:700; font-size:13px; color:#fff; background:linear-gradient(135deg,hsl(var(--h) 72% 54%),hsl(calc(var(--h) + 60) 72% 34%)); }
.bl-ava img { width:100%; height:100%; object-fit:cover; }
.bl-ava.xl { width:124px; height:124px; font-size:48px; box-shadow:0 18px 48px rgba(0,0,0,.5); position:relative; }
.bl-person { display:flex; align-items:center; gap:10px; padding:8px 0; min-width:0; }
.bl-person-main { flex:1; min-width:0; display:flex; flex-direction:column; }
.bl-person-main .bl-dim { font-size:11.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bl-person-name { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bl-person-name:hover { text-decoration:underline; }
.bl-people { display:grid; grid-template-columns:repeat(auto-fill,minmax(310px,1fr)); gap:4px 28px; }
.bl-mini { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.bl-mini li { display:flex; align-items:center; gap:10px; min-width:0; }
.bl-mini a { flex:1; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .bl-mini a:hover { text-decoration:underline; }
.bl-mini-art { flex:none; width:34px; height:34px; border-radius:8px; background:linear-gradient(135deg,hsl(var(--h) 80% 58%),hsl(calc(var(--h) + 70) 70% 26%)); }

/* song / patch / profile header */
.bl-song, .bl-profile { position:relative; display:flex; gap:clamp(20px,4vw,40px); align-items:center; margin-bottom:40px; }
.bl-song-glow { position:absolute; inset:-120px 0 auto; height:420px; z-index:-1; filter:blur(70px); opacity:.42; background:radial-gradient(50% 60% at 30% 40%,hsl(var(--h) 90% 55%),transparent),radial-gradient(40% 60% at 72% 30%,hsl(calc(var(--h) + 72) 90% 50%),transparent); pointer-events:none; }
.bl-art-xl { flex:none; width:clamp(180px,26vw,280px); box-shadow:0 30px 70px rgba(0,0,0,.55),inset 0 0 0 1px rgba(255,255,255,.1); border-radius:18px; }
.bl-song-info, .bl-profile-info { flex:1; min-width:0; }
.bl-kicker { font-size:11px; letter-spacing:1.6px; text-transform:uppercase; color:rgba(255,255,255,.7); font-weight:600; }
.bl-song h1, .bl-profile h1 { font-size:clamp(28px,5vw,48px); line-height:1.08; letter-spacing:-.03em; font-weight:700; margin:6px 0 12px; overflow-wrap:anywhere; }
.bl-profile h1 { margin-bottom:2px; }
.bl-artist { display:flex; align-items:center; gap:9px; margin-bottom:18px; }
.bl-artist .bl-by { font-size:14px; color:var(--text); font-weight:500; }
.bl-player { display:flex; align-items:center; gap:14px; margin-bottom:16px; }
.bl-play-xl { flex:none; width:54px; height:54px; border-radius:50%; background:#fff; color:#000; display:grid; place-items:center; transition:transform .15s; }
.bl-play-xl:hover { transform:scale(1.06); }
.bl-wave-wrap { flex:1; min-width:0; height:58px; }
.bl-wave { width:100%; height:100%; display:block; cursor:pointer; --wave-on:#fff; }
.bl-time { font-size:12px; color:var(--dim); font-variant-numeric:tabular-nums; min-width:34px; text-align:right; }
.bl-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.bl-plays { font-size:13px; color:var(--dim); margin:0 6px; }
.bl-bio { margin:10px 0; max-width:60ch; white-space:pre-wrap; overflow-wrap:anywhere; }
.bl-numbers { display:flex; gap:18px; margin:10px 0 16px; color:var(--dim); font-size:13px; }
.bl-numbers b { color:var(--text); }

/* profiles, search */
.bl-links-out { display:flex; flex-wrap:wrap; gap:12px; margin:8px 0; font-size:13px; color:var(--dim); }
.bl-links-out a:hover { color:var(--text); }
.bl-numbers button { color:var(--dim); font-size:13px; }
.bl-numbers button:hover { color:var(--text); }
.bl-search { display:block; width:min(420px,100%); margin-bottom:20px; padding:10px 14px; background:var(--panel); border:1px solid var(--line); border-radius:99px; color:var(--text); font:inherit; outline:none; }
.bl-search:focus { border-color:#4a4a55; }
.bl-handle-field { display:flex; align-items:center; background:var(--panel2); border:1px solid var(--line); border-radius:9px; padding-left:10px; margin-top:4px; }
.bl-handle-field span { color:var(--dim); font-size:14px; }
.bl-dialog .bl-handle-field input { margin:0; border:0; background:none; padding-left:2px; outline:none; }
.bl-check { min-height:18px; margin:-6px 0 10px; font-size:12px; color:var(--dim); }
.bl-check.ok { color:#5ad08a; } .bl-check.bad { color:#e2707a; }

/* synth keys */
.bl-keys { position:relative; display:flex; height:92px; max-width:420px; margin-bottom:16px; touch-action:none; user-select:none; }
.bl-keys .wht { flex:1; background:linear-gradient(#f4f4f6,#d6d6dc); border-radius:0 0 7px 7px; margin-right:2px; transition:background .06s; }
.bl-keys .blk { flex:none; width:0; z-index:2; position:relative; }
.bl-keys .blk::after { content:''; position:absolute; left:-12px; top:0; width:23px; height:58px; background:linear-gradient(#2c2c34,#0a0a0e); border-radius:0 0 5px 5px; box-shadow:0 3px 7px rgba(0,0,0,.5); }
.bl-keys .wht.down { background:hsl(var(--h) 85% 68%); }
.bl-keys .blk.down::after { background:hsl(var(--h) 80% 45%); }

/* comments */
.bl-thread h2 { font-size:17px; margin-bottom:14px; letter-spacing:-.01em; }
.bl-compose { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:10px 12px; margin-bottom:24px; }
.bl-compose:focus-within { border-color:#4a4a55; }
.bl-compose textarea { width:100%; background:none; border:0; outline:none; color:var(--text); font:inherit; resize:vertical; }
.bl-compose-row { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.bl-note { flex:1; font-size:12px; color:var(--dim); }
.bl-c-list, .bl-replies { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:20px; }
.bl-replies:not(:empty) { margin-top:16px; }
.bl-c { display:flex; gap:11px; scroll-margin-top:90px; border-radius:12px; }
.bl-c.flash { background:rgba(255,255,255,.06); box-shadow:0 0 0 8px rgba(255,255,255,.06); }
.bl-c-main { flex:1; min-width:0; }
.bl-c-head { display:flex; align-items:baseline; gap:8px; }
.bl-c-who { font-weight:600; font-size:13px; }
a.bl-c-who:hover { text-decoration:underline; }
.bl-c-when { font-size:11.5px; color:var(--faint); }
.bl-c-body { font-size:14px; color:#dcdce0; white-space:pre-wrap; overflow-wrap:anywhere; margin-top:1px; }
.bl-c-acts { display:flex; gap:12px; margin-top:4px; }
.bl-c-acts button { font-size:12px; color:var(--faint); }
.bl-c-acts button:hover { color:var(--text); }
.bl-reply-form { display:flex; gap:8px; align-items:flex-start; margin-top:8px; }
.bl-reply-form textarea { flex:1; background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:8px 10px; color:var(--text); font:inherit; font-size:13px; }

/* now-playing bar */
.bl-bar { position:fixed; left:0; right:0; bottom:0; z-index:40; display:flex; align-items:center; gap:14px; padding:11px clamp(16px,4vw,36px); background:rgba(14,14,18,.92); backdrop-filter:blur(18px); border-top:1px solid var(--line); animation:rise .2s ease; }
@keyframes rise { from { transform:translateY(100%); } }
.bl-bar-play { flex:none; width:40px; height:40px; border-radius:50%; background:#fff; color:#000; display:grid; place-items:center; }
.bl-bar.is-playing .bl-bar-play .bl-ico { width:12px; height:14px; margin:0; border:0; border-left:4px solid currentColor; border-right:4px solid currentColor; }
.bl-bar-title { width:min(280px,34vw); font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bl-bar-seek { flex:1; min-width:0; accent-color:#fff; }

/* inbox */
.bl-inbox { display:grid; grid-template-columns:310px minmax(0,1fr); height:calc(100vh - 190px); min-height:430px; background:var(--panel); border:1px solid rgba(255,255,255,.08); border-radius:18px; overflow:hidden; }
.bl-threads { border-right:1px solid var(--line); overflow:auto; }
.bl-threads h2 { font-size:17px; padding:16px; }
.bl-thread-row { display:flex; align-items:center; gap:11px; padding:10px 16px; }
.bl-thread-row:hover { background:var(--panel2); }
.bl-thread-row.on { background:#1c1c24; }
.bl-thread-text { flex:1; min-width:0; display:flex; flex-direction:column; }
.bl-thread-text > * { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:500; }
.bl-thread-row.unread .bl-thread-text span { color:var(--text); font-weight:600; }
.bl-thread-row time { font-size:11px; color:var(--faint); }
.bl-convo { display:flex; flex-direction:column; min-height:0; }
.bl-convo-empty { margin:auto; color:var(--dim); }
.bl-convo-head { display:flex; align-items:center; gap:10px; padding:12px 16px; border-bottom:1px solid var(--line); font-weight:600; }
.bl-back { display:none; font-size:18px; padding:0 6px; }
.bl-log { flex:1; overflow:auto; padding:18px 16px; display:flex; flex-direction:column; gap:6px; }
.bl-msg { position:relative; align-self:flex-start; max-width:72%; display:flex; align-items:center; gap:8px; }
.bl-msg > span { background:var(--panel2); padding:8px 13px; border-radius:16px 16px 16px 4px; white-space:pre-wrap; overflow-wrap:anywhere; }
.bl-msg.mine { align-self:flex-end; }
.bl-msg.mine > span { background:#fff; color:#000; border-radius:16px 16px 4px 16px; }
.bl-msg-flag { opacity:0; font-size:11px; color:var(--faint); }
.bl-msg:hover .bl-msg-flag, .bl-msg-flag:focus-visible { opacity:1; }
.bl-send { display:flex; gap:10px; align-items:flex-end; padding:12px 14px; border-top:1px solid var(--line); }
.bl-send textarea { flex:1; background:var(--panel2); border:1px solid var(--line); border-radius:18px; padding:9px 14px; color:var(--text); font:inherit; resize:none; outline:none; }

.bl-toast { position:fixed; left:50%; bottom:90px; transform:translateX(-50%); z-index:60; background:#fff; color:#000; font-weight:600; font-size:13px; padding:9px 16px; border-radius:99px; box-shadow:0 12px 30px rgba(0,0,0,.5); }
.bl-dialog { background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:16px; padding:22px; width:min(420px,calc(100vw - 32px)); }
.bl-dialog::backdrop { background:rgba(0,0,0,.65); }
.bl-dialog h2 { font-size:18px; margin-bottom:14px; }
.bl-dialog label { display:block; font-size:12px; color:var(--dim); margin-bottom:12px; }
.bl-dialog input, .bl-dialog textarea { display:block; width:100%; margin-top:4px; padding:8px 10px; background:var(--panel2); border:1px solid var(--line); border-radius:9px; color:var(--text); font:inherit; font-size:14px; }

@media (max-width:860px) {
  .bl-split { grid-template-columns:minmax(0,1fr); }
  .bl-rail { position:static; }
}
@media (max-width:640px) {
  .bl-nav { flex-wrap:wrap; gap:8px 12px; }
  .bl-links { order:3; width:100%; }
  .bl-links a { padding:5px 11px; }
  .bl-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  .bl-song, .bl-profile { flex-direction:column; align-items:flex-start; }
  .bl-art-xl { width:min(240px,62vw); }
  .bl-people { grid-template-columns:minmax(0,1fr); }
  .bl-inbox { grid-template-columns:minmax(0,1fr); height:calc(100vh - 170px); }
  .bl-inbox .bl-convo { display:none; }
  .bl-inbox.in-thread .bl-threads { display:none; }
  .bl-inbox.in-thread .bl-convo { display:flex; }
  .bl-back { display:block; }
  .bl-msg { max-width:88%; }
  .bl-bar-title { width:30vw; }
}
@media (prefers-reduced-motion:reduce) { * { animation:none !important; transition:none !important; } }
